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

@@ -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
}