app-misc/fastfetch: add 0.604

Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com>
This commit is contained in:
Viorel Munteanu
2022-02-22 20:18:49 +02:00
parent f5291650ed
commit cef2099239
3 changed files with 84 additions and 24 deletions

View File

@@ -1 +1,2 @@
DIST fastfetch-0.599.tar.gz 323683 BLAKE2B 73dd5269fd37b6393f2f02fa93c1a398726101922cc6ec05862939f290edb02269131292cf1384dba3bd13996e06e861f62cd77cfa5c2dd2eaeee28c0eb97707 SHA512 90af0425d8a7746009028aeddb50970ead3d74506bc75defb8c4a179a9e51b8d2cd32186b25e9cc45c40c85567ee783edf581a79ee1fd5468d6936caf5ab4e2a
DIST fastfetch-0.604.tar.gz 324226 BLAKE2B 75860f98b5eaca0a59e29618a9d7bd2542aff12eb9761186b6233ffe17212df0b54e387b86511540b4e1522f017f73a1286ec58b0f54a4687a9f11fbb5235652 SHA512 09a531be1d35deb7ad34dd9059baa8abaa1d9872d27178d467d743e74d6b8e49549762f893ce2538c14c52dd392ed25ed4b68218d2bcda9b1e86f6bf1310011e

View File

@@ -0,0 +1,72 @@
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit 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="0cb6e40bacfed8c217afc4bd580b7905d6d6893b"
VERSION_REV="0cb6e40"
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
elog "REV=\"r$(git rev-list --count HEAD)\""
elog "COMMIT=\"$(git rev-parse HEAD)\""
elog "VERSION_REV=\"$(git rev-parse --short HEAD)\""
else
# version comes from git, fake it
local project_version_major=$(ver_cut 2)
mycmakeargs+=(
-DPROJECT_VERSION="r${project_version_major}.${VERSION_REV}"
-DPROJECT_VERSION_MAJOR="${project_version_major}"
)
fi
cmake_src_configure
}

View File

@@ -3,7 +3,7 @@
EAPI=8
inherit bash-completion-r1 cmake
inherit cmake
DESCRIPTION="Like neofetch but faster"
HOMEPAGE="https://github.com/LinusDierheimer/fastfetch"
@@ -11,8 +11,8 @@ if [[ ${PV} == *9999 ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/LinusDierheimer/fastfetch.git"
else
COMMIT="f72ec8a99f6021e95abce282668cce99fabd28c5"
VERSION_REV="f72ec8a"
COMMIT="0cb6e40bacfed8c217afc4bd580b7905d6d6893b"
VERSION_REV="0cb6e40"
SRC_URI="https://github.com/LinusDierheimer/fastfetch/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/${PN}-${COMMIT}"
fi
@@ -54,31 +54,18 @@ src_configure() {
-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)\""
else
# version comes from git, fake it
local project_version_major=$(ver_cut 2)
mycmakeargs+=(
-DPROJECT_VERSION="r${project_version_major}.${VERSION_REV}"
-DPROJECT_VERSION_MAJOR="${project_version_major}"
)
fi
pushd "${BUILD_DIR}" || die
dobin fastfetch
popd
newbashcomp completions/bash fastfetch
insinto /usr/share/${PN}/presets
doins presets/*
einstalldocs
cmake_src_configure
}