summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Pielmeier <billie@gentoo.org>2022-11-21 18:02:04 +0100
committerDaniel Pielmeier <billie@gentoo.org>2022-11-21 18:02:04 +0100
commit2e840ff7949dd41dc0b7a2a7d491ec5cc4bf3367 (patch)
tree19d2973db2cafcee8b3c8e47129b6ac1f21c4a22 /app-admin
parentmedia-libs/libshumate: Keyword 1.0.2 x86, #881799 (diff)
downloadgentoo-2e840ff7949dd41dc0b7a2a7d491ec5cc4bf3367.tar.gz
gentoo-2e840ff7949dd41dc0b7a2a7d491ec5cc4bf3367.tar.bz2
gentoo-2e840ff7949dd41dc0b7a2a7d491ec5cc4bf3367.zip
app-admin/conky: Another try to fix python related stuff.
Closes: https://bugs.gentoo.org/878427 Signed-off-by: Daniel Pielmeier <billie@gentoo.org>
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/conky/conky-1.15.0.ebuild37
1 files changed, 31 insertions, 6 deletions
diff --git a/app-admin/conky/conky-1.15.0.ebuild b/app-admin/conky/conky-1.15.0.ebuild
index ec41cde86063..d3d700c1507a 100644
--- a/app-admin/conky/conky-1.15.0.ebuild
+++ b/app-admin/conky/conky-1.15.0.ebuild
@@ -4,8 +4,9 @@
EAPI=8
LUA_COMPAT=( lua5-3 )
+PYTHON_COMPAT=( python{3_9,3_10,3_11} )
-inherit cmake linux-info lua-single readme.gentoo-r1 xdg
+inherit cmake linux-info lua-single python-any-r1 readme.gentoo-r1 xdg
DESCRIPTION="An advanced, highly configurable system monitor for X"
HOMEPAGE="https://github.com/brndnmtthws/conky"
@@ -20,7 +21,6 @@ IUSE="apcupsd bundled-toluapp cmus curl doc extras hddtemp ical iconv imlib
webserver wifi X xinerama xmms2"
COMMON_DEPEND="
- cmus? ( media-sound/cmus )
curl? ( net-misc/curl )
ical? ( dev-libs/libical:= )
iconv? ( virtual/libiconv )
@@ -51,6 +51,7 @@ COMMON_DEPEND="
RDEPEND="
${COMMON_DEPEND}
apcupsd? ( sys-power/apcupsd )
+ cmus? ( media-sound/cmus )
hddtemp? ( app-admin/hddtemp )
moc? ( media-sound/moc )
extras? (
@@ -60,10 +61,29 @@ RDEPEND="
"
DEPEND="
${COMMON_DEPEND}
- doc? ( virtual/pandoc dev-python/pyyaml dev-python/jinja )
- extras? ( dev-python/pyyaml dev-python/jinja )
+"
+BDEPEND="
+ doc? (
+ virtual/pandoc
+ $(python_gen_any_dep '
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ ')
+ )
+ extras? (
+ $(python_gen_any_dep '
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/jinja[${PYTHON_USEDEP}]
+ ')
+ )
"
+python_check_deps() {
+ use doc || use extras || return 0
+ python_has_version -b "dev-python/pyyaml[${PYTHON_USEDEP}]" &&
+ python_has_version -b "dev-python/jinja[${PYTHON_USEDEP}]"
+}
+
REQUIRED_USE="
imlib? ( X )
lua-cairo? ( X bundled-toluapp )
@@ -88,13 +108,14 @@ Also see https://github.com/brndnmtthws/conky/wiki or https://wiki.gentoo.org/wi
pkg_setup() {
linux-info_pkg_setup
-
lua-single_pkg_setup
+ if use doc || use extras; then
+ python-any-r1_pkg_setup
+ fi
}
src_prepare() {
cmake_src_prepare
-
xdg_environment_reset
}
@@ -158,6 +179,10 @@ src_configure() {
-DRELEASE=yes
)
+ if use doc || use extras; then
+ mycmakeargs+=( -DPython3_EXECUTABLE="${PYTHON}" )
+ fi
+
cmake_src_configure
}