app-misc/fastfetch: add 0.583

Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com>
This commit is contained in:
Viorel Munteanu
2022-02-12 14:55:12 +02:00
parent c236c365b1
commit baa8c0e50e
2 changed files with 86 additions and 0 deletions

View File

@@ -1 +1,2 @@
DIST fastfetch-0.575.tar.gz 321524 BLAKE2B a59dee15e7492d7af7671ed25eb5492a0a0c97346c000b794cab923dcc7298aa06c0cc232d5cc8ee171c470b474f42b3adf912e20b5b59370f23dbd803372934 SHA512 45a573a4e837463398151775d7a4bbb666021422e5b2d08955cfd60c6a7b89263d5464691481ac419876439689b09dac6817388592d4c27b1bbe5d27f1d6881e
DIST fastfetch-0.583.tar.gz 321971 BLAKE2B 65565ecaa2a0d54d17fff98736c0c923371a848ab31ba403430d3dc76d6d412077a15761b951de907c82c87b879762c2b441a1baeebe179e7234308e5a988ec7 SHA512 81d1a54033517747349228c397ad4eda64bcf5946de25edcd3b7eb4bb90102e8b7bc886b5e7697f7de1f71f47e38fa75e33b6467b8a81421b6675384aebc24d2

View File

@@ -0,0 +1,85 @@
# 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="fb3028cafa5393c608aa83d7df826474a447c0b3"
VERSION_REV="fb3028c"
SRC_URI="https://github.com/LinusDierheimer/fastfetch/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${COMMIT}"
fi
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
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
}