Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gui-libs/pugl and add dependency on it for media-sound/carla, improve libX11 dependency #563

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions gui-libs/pugl/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST pugl-0.20231112.gh.tar.gz 227776 BLAKE2B 69a651dd8f4300d7e3a249e4cee64642dee909ee9a06ce41355cb57279239f62e6d491ffb072fd515adab003b432b66c494fe842b41179a4e5fc330f36181774 SHA512 5565cd06c67483ff5b2120ace400e0c2ba7fab5b246b8e1d7a22fa3269d1aa6086fa210d92ca8efa5d70b6b18a314db5d47669126e2f4d8e6db690a04b0a2fe6
8 changes: 8 additions & 0 deletions gui-libs/pugl/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>[email protected]</email>
<name>Adrian Schollmeyer</name>
</maintainer>
</pkgmetadata>
78 changes: 78 additions & 0 deletions gui-libs/pugl/pugl-0.20231112.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{10..12} )
inherit meson python-any-r1

DESCRIPTION="Minimal portable API for embeddable GUIs"
HOMEPAGE="https://github.com/lv2/pugl"

if [[ "${PV}" == "9999" ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/lv2/pugl.git"
else
PUGL_COMMIT=e33b2f6b0cea6d6263990aa9abe6a69fdfba5973
SRC_URI="https://github.com/lv2/pugl/archive/${PUGL_COMMIT}.tar.gz -> ${P}.gh.tar.gz"
KEYWORDS="~amd64"
S="${WORKDIR}/${PN}-${PUGL_COMMIT}"
fi

LICENSE="ISC"
# subslot is SONAME version
SLOT="0/0.5.3"
IUSE="cairo doc opengl vulkan"

RDEPEND="
x11-libs/libX11
x11-libs/libXcursor
x11-libs/libXext
x11-libs/libXrandr

cairo? ( x11-libs/cairo )
opengl? ( virtual/opengl )
vulkan? ( media-libs/vulkan-loader )
"
DEPEND="${RDEPEND}"
# shellcheck disable=SC2016
BDEPEND="
doc? (
app-text/doxygen

$(python_gen_any_dep '
dev-python/sphinx-lv2-theme[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
dev-python/sphinxygen[${PYTHON_USEDEP}]
')
)
"

# Tests don't work in the sandbox
RESTRICT="test"

python_check_deps() {
! use doc || \
python_has_version "dev-python/sphinx-lv2-theme[${PYTHON_USEDEP}]" \
&& python_has_version "dev-python/sphinx[${PYTHON_USEDEP}]" \
&& python_has_version "dev-python/sphinxygen[${PYTHON_USEDEP}]"
}

src_configure() {
local emesonargs=(
"$(meson_feature cairo)"
"$(meson_feature doc docs)"
"$(meson_use doc docs_cpp)"
"$(meson_feature opengl)"
"$(meson_feature vulkan)"

-Dxcursor=enabled
-Dxsync=enabled
-Dxrandr=enabled

-Dexamples=disabled
-Dlint=false
-Dtests=disabled
)
meson_src_configure
}
78 changes: 78 additions & 0 deletions gui-libs/pugl/pugl-9999.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{10..12} )
inherit meson python-any-r1

DESCRIPTION="Minimal portable API for embeddable GUIs"
HOMEPAGE="https://github.com/lv2/pugl"

if [[ "${PV}" == "9999" ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/lv2/pugl.git"
else
PUGL_COMMIT=
SRC_URI="https://github.com/lv2/pugl/archive/${PUGL_COMMIT}.tar.gz -> ${P}.gh.tar.gz"
KEYWORDS="~amd64"
S="${WORKDIR}/${PN}-${PUGL_COMMIT}"
fi

LICENSE="ISC"
# subslot is SONAME version
SLOT="0/0.5.3"
IUSE="cairo doc opengl vulkan"

RDEPEND="
x11-libs/libX11
x11-libs/libXcursor
x11-libs/libXext
x11-libs/libXrandr

cairo? ( x11-libs/cairo )
opengl? ( virtual/opengl )
vulkan? ( media-libs/vulkan-loader )
"
DEPEND="${RDEPEND}"
# shellcheck disable=SC2016
BDEPEND="
doc? (
app-text/doxygen

$(python_gen_any_dep '
dev-python/sphinx-lv2-theme[${PYTHON_USEDEP}]
dev-python/sphinx[${PYTHON_USEDEP}]
dev-python/sphinxygen[${PYTHON_USEDEP}]
')
)
"

# Tests don't work in the sandbox
RESTRICT="test"

python_check_deps() {
! use doc || \
python_has_version "dev-python/sphinx-lv2-theme[${PYTHON_USEDEP}]" \
&& python_has_version "dev-python/sphinx[${PYTHON_USEDEP}]" \
&& python_has_version "dev-python/sphinxygen[${PYTHON_USEDEP}]"
}

src_configure() {
local emesonargs=(
"$(meson_feature cairo)"
"$(meson_feature doc docs)"
"$(meson_use doc docs_cpp)"
"$(meson_feature opengl)"
"$(meson_feature vulkan)"

-Dxcursor=enabled
-Dxsync=enabled
-Dxrandr=enabled

-Dexamples=disabled
-Dlint=false
-Dtests=disabled
)
meson_src_configure
}
4 changes: 3 additions & 1 deletion media-sound/carla/carla-9999-r1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ RDEPEND="${PYTHON_DEPS}
rdf? ( dev-python/rdflib )
sf2? ( media-sound/fluidsynth )
sndfile? ( media-libs/libsndfile )
X? ( x11-base/xorg-server )"
X? ( x11-libs/libX11 )
!X? ( gui-libs/pugl:= )
"
DEPEND=${RDEPEND}

src_prepare() {
Expand Down