aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViorel Munteanu <ceamac.paragon@gmail.com>2022-06-20 13:48:52 +0300
committerViorel Munteanu <ceamac.paragon@gmail.com>2022-06-20 13:48:52 +0300
commit3c45722492e409af426816da8f22254eec29a867 (patch)
treed97bcfde1b60c5b33ecb4ace3ec5edf0851a5b1a
parentnet-misc/maestral-qt: bash function signature (diff)
downloadguru-3c45722492e409af426816da8f22254eec29a867.tar.gz
guru-3c45722492e409af426816da8f22254eec29a867.tar.bz2
guru-3c45722492e409af426816da8f22254eec29a867.zip
app-misc/fastfetch: chafa depends on imagemagick
Closes: https://bugs.gentoo.org/853052 Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com>
-rw-r--r--app-misc/fastfetch/fastfetch-1.5.4-r1.ebuild (renamed from app-misc/fastfetch/fastfetch-1.5.4.ebuild)23
-rw-r--r--app-misc/fastfetch/fastfetch-9999.ebuild23
2 files changed, 40 insertions, 6 deletions
diff --git a/app-misc/fastfetch/fastfetch-1.5.4.ebuild b/app-misc/fastfetch/fastfetch-1.5.4-r1.ebuild
index 5a99748337..cda8b003a6 100644
--- a/app-misc/fastfetch/fastfetch-1.5.4.ebuild
+++ b/app-misc/fastfetch/fastfetch-1.5.4-r1.ebuild
@@ -23,7 +23,10 @@ IUSE="X chafa dbus gnome imagemagick opencl opengl osmesa pci sqlite vulkan wayl
RDEPEND="
sys-libs/zlib
X? ( x11-libs/libX11 )
- chafa? ( media-gfx/chafa )
+ chafa? (
+ media-gfx/chafa
+ media-gfx/imagemagick:=
+ )
dbus? ( sys-apps/dbus )
gnome? (
dev-libs/glib
@@ -46,6 +49,20 @@ BDEPEND="virtual/pkgconfig"
REQUIRED_USE="xrandr? ( X )"
+pkg_setup() {
+ if use chafa && ! use imagemagick; then
+ elog "USE chafa depends on imagemagick, but that is currently disabled. Enabling imagemagick"
+ fi
+
+ if use imagemagick || use chafa; then
+ export fastfetch_enable_imagemagick7=$(has_version '>=media-gfx/imagemagick-7.0.0' && echo yes || echo no)
+ fi
+
+ if use imagemagick || use chafa; then
+ export fastfetch_enable_imagemagick6=$(has_version '<media-gfx/imagemagick-7.0.0' && echo yes || echo no)
+ fi
+}
+
src_configure() {
local mycmakeargs=(
-DENABLE_RPM=no
@@ -59,8 +76,8 @@ src_configure() {
-DENABLE_GIO=$(usex gnome)
-DENABLE_DCONF=$(usex gnome)
-DENABLE_XFCONF=$(usex xfce)
- -DENABLE_IMAGEMAGICK7=$(use imagemagick && has_version '>=media-gfx/imagemagick-7.0.0' && echo yes || echo no)
- -DENABLE_IMAGEMAGICK6=$(use imagemagick && has_version '<media-gfx/imagemagick-7.0.0' && echo yes || echo no)
+ -DENABLE_IMAGEMAGICK7=${fastfetch_enable_imagemagick7}
+ -DENABLE_IMAGEMAGICK6=${fastfetch_enable_imagemagick6}
-DENABLE_ZLIB=yes
-DENABLE_CHAFA=$(usex chafa)
-DENABLE_SQLITE3=$(usex sqlite)
diff --git a/app-misc/fastfetch/fastfetch-9999.ebuild b/app-misc/fastfetch/fastfetch-9999.ebuild
index 2169043e57..ceed40e9fe 100644
--- a/app-misc/fastfetch/fastfetch-9999.ebuild
+++ b/app-misc/fastfetch/fastfetch-9999.ebuild
@@ -22,7 +22,10 @@ IUSE="X chafa dbus gnome imagemagick opencl opengl osmesa pci sqlite vulkan wayl
RDEPEND="
sys-libs/zlib
X? ( x11-libs/libX11 )
- chafa? ( media-gfx/chafa )
+ chafa? (
+ media-gfx/chafa
+ media-gfx/imagemagick:=
+ )
dbus? ( sys-apps/dbus )
gnome? (
dev-libs/glib
@@ -45,6 +48,20 @@ BDEPEND="virtual/pkgconfig"
REQUIRED_USE="xrandr? ( X )"
+pkg_setup() {
+ if use chafa && ! use imagemagick; then
+ elog "USE chafa depends on imagemagick, but that is currently disabled. Enabling imagemagick"
+ fi
+
+ if use imagemagick || use chafa; then
+ export fastfetch_enable_imagemagick7=$(has_version '>=media-gfx/imagemagick-7.0.0' && echo yes || echo no)
+ fi
+
+ if use imagemagick || use chafa; then
+ export fastfetch_enable_imagemagick6=$(has_version '<media-gfx/imagemagick-7.0.0' && echo yes || echo no)
+ fi
+}
+
src_configure() {
local mycmakeargs=(
-DENABLE_RPM=no
@@ -58,8 +75,8 @@ src_configure() {
-DENABLE_GIO=$(usex gnome)
-DENABLE_DCONF=$(usex gnome)
-DENABLE_XFCONF=$(usex xfce)
- -DENABLE_IMAGEMAGICK7=$(use imagemagick && has_version '>=media-gfx/imagemagick-7.0.0' && echo yes || echo no)
- -DENABLE_IMAGEMAGICK6=$(use imagemagick && has_version '<media-gfx/imagemagick-7.0.0' && echo yes || echo no)
+ -DENABLE_IMAGEMAGICK7=${fastfetch_enable_imagemagick7}
+ -DENABLE_IMAGEMAGICK6=${fastfetch_enable_imagemagick6}
-DENABLE_ZLIB=yes
-DENABLE_CHAFA=$(usex chafa)
-DENABLE_SQLITE3=$(usex sqlite)