app-misc/fastfetch: fix automagical deps

Patch the build system instead of sedding out checks

Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com>
This commit is contained in:
Viorel Munteanu
2022-02-08 07:07:31 +02:00
parent 46a6ee2092
commit 61a59bd4bd
3 changed files with 303 additions and 16 deletions

View File

@@ -40,24 +40,23 @@ BDEPEND="virtual/pkgconfig"
REQUIRED_USE="xrandr? ( X )"
# disable_check VAR lib
disable_check() {
sed -i -e "
/pkg_check_modules ($1 /d
/message.*$2/d" CMakeLists.txt || die "Cannot disable $1"
}
PATCHES=(
"${FILESDIR}/fastfetch-0.569-cmake-optional-deps.patch"
)
src_configure() {
disable_check RPM librpm
use X || disable_check X11 x11
use gnome || (disable_check GIO gio- && disable_check DCONF dconf)
use pci || disable_check LIBPCI libpci
use vulkan || disable_check VULKAN vulkan
use wayland || disable_check WAYLAND wayland-client
use xcb || (disable_check XCB_RANDR xcb-randr && disable_check XCB xcb)
use xfce || disable_check XFCONF libxfconf
use xrandr || disable_check XRANDR xrandr
local mycmakeargs=(
-DENABLE_RPM=no
-DENABLE_VULKAN=$(usex vulkan)
-DENABLE_WAYLAND=$(usex wayland)
-DENABLE_XCB_RANDR=$(usex xcb)
-DENABLE_XCB=$(usex xcb)
-DENABLE_XRANDR=$(usex xrandr)
-DENABLE_X11=$(usex X)
-DENABLE_GIO=$(usex gnome)
-DENABLE_DCONF=$(usex gnome)
-DENABLE_XFCONF=$(usex xfce)
)
if [[ ${PV} != *9999 ]]; then
# version comes from git, fake it