Skip to content

Commit

Permalink
app-admin/conky: Another try to fix python related stuff.
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/878427

Signed-off-by: Daniel Pielmeier <[email protected]>
  • Loading branch information
billie80 committed Nov 21, 2022
1 parent 37c5e8b commit 2e840ff
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions app-admin/conky/conky-1.15.0.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 )
Expand Down Expand Up @@ -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? (
Expand All @@ -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 )
Expand All @@ -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
}

Expand Down Expand Up @@ -158,6 +179,10 @@ src_configure() {
-DRELEASE=yes
)

if use doc || use extras; then
mycmakeargs+=( -DPython3_EXECUTABLE="${PYTHON}" )
fi

cmake_src_configure
}

Expand Down

0 comments on commit 2e840ff

Please sign in to comment.