app-misc/fastfetch: add 0.575

Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com>
This commit is contained in:
Viorel Munteanu
2022-02-09 12:41:00 +02:00
parent e0dd660f0d
commit 48f036c844
3 changed files with 85 additions and 4 deletions

View File

@@ -1 +1,2 @@
DIST fastfetch-0.569.tar.gz 319899 BLAKE2B 07c3169e97a5127a67941972ea6feac1bec11203bb55b23243a4b298580299d942b518eab24a741dd0354d56879dc9ccd192bf88024aa660a4c83f149c8133cd SHA512 979a9e717bc2ef59aa0b410fe62015f8ecf58419e4b1df56ea139aa84e627491ab310da358e821a7dcc95efc8017b8fd71d1174cde8a770717759a1e50d0fb31
DIST fastfetch-0.575.tar.gz 321524 BLAKE2B a59dee15e7492d7af7671ed25eb5492a0a0c97346c000b794cab923dcc7298aa06c0cc232d5cc8ee171c470b474f42b3adf912e20b5b59370f23dbd803372934 SHA512 45a573a4e837463398151775d7a4bbb666021422e5b2d08955cfd60c6a7b89263d5464691481ac419876439689b09dac6817388592d4c27b1bbe5d27f1d6881e

View File

@@ -0,0 +1,84 @@
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit bash-completion-r1 cmake
DESCRIPTION="Like neofetch but faster"
HOMEPAGE="https://github.com/LinusDierheimer/fastfetch"
if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/LinusDierheimer/fastfetch.git"
else
COMMIT="2ff35952510fa5a9ef655af9b328f31f7c50f689"
VERSION_REV="2ff3595"
SRC_URI="https://github.com/LinusDierheimer/fastfetch/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${COMMIT}"
fi
LICENSE="MIT"
SLOT="0"
IUSE="X gnome pci vulkan wayland xcb xfce xrandr"
# note - qa-vdb will always report errors because fastfetch loads the libs dynamically
RDEPEND="
X? ( x11-libs/libX11 )
gnome? (
dev-libs/glib
gnome-base/dconf
)
pci? ( sys-apps/pciutils )
vulkan? ( media-libs/vulkan-loader )
wayland? ( dev-libs/wayland )
xcb? ( x11-libs/libxcb )
xfce? ( xfce-base/xfconf )
xrandr? ( x11-libs/libXrandr )
"
DEPEND="${RDEPEND}"
BDEPEND="virtual/pkgconfig"
REQUIRED_USE="xrandr? ( X )"
src_configure() {
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
VERSION_MAJOR="$(ver_cut 2)"
sed -i -e "
s/\(PROJECT_VERSION\) .*$/\1 \"r${VERSION_MAJOR}.${VERSION_REV}\")/
s/\(PROJECT_VERSION_MAJOR\) .*$/\1 \"${VERSION_MAJOR}\")/" CMakeLists.txt || die "Cannot patch version"
fi
cmake_src_configure
}
src_install() {
if [[ ${PV} == *9999 ]]; then
elog "REV=\"r$(git rev-list --count HEAD)\""
elog "COMMIT=\"$(git rev-parse HEAD)\""
elog "VERSION_REV=\"$(git rev-parse --short HEAD)\""
fi
pushd "${BUILD_DIR}" || die
dobin fastfetch
popd
newbashcomp completions/bash fastfetch
insinto /usr/share/${PN}/presets
doins presets/*
einstalldocs
}

View File

@@ -40,10 +40,6 @@ BDEPEND="virtual/pkgconfig"
REQUIRED_USE="xrandr? ( X )"
PATCHES=(
"${FILESDIR}/fastfetch-0.569-cmake-optional-deps.patch"
)
src_configure() {
local mycmakeargs=(
-DENABLE_RPM=no