app-misc/fastfetch: initial import

Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com>
This commit is contained in:
Viorel Munteanu
2022-01-20 22:53:11 +02:00
parent 6e84417af6
commit b793f72d72
3 changed files with 97 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST fastfetch-20220120.tar.gz 177779 BLAKE2B 348b42b132c033db3830f74c2aab9ee40d88842c86ff395e14ba74863dbb353ad1f017ca9d8c136142e32c0492af193b735a6aab9bc973ace6d22162eb73d851 SHA512 1c4e8bd6ab4d21fec732007c3026ea690486ea5f3749115204235cff918e3e0479013ef19c65aeea6e38049a1d3fe0a05f1d1750cbae2b09e9caa64fe4945f2e

View File

@@ -0,0 +1,79 @@
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit bash-completion-r1 cmake
COMMIT="e30a64e97e0bf1c6bf68aa6f54a25c5995c2fdd2"
VERSION_MAJOR="554"
VERSION_MINOR="cd4739e"
DESCRIPTION="Like neofetch but faster"
HOMEPAGE="https://github.com/LinusDierheimer/fastfetch"
SRC_URI="https://github.com/LinusDierheimer/fastfetch/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
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 )"
S="${WORKDIR}/${PN}-${COMMIT}"
# disable_check VAR lib
disable_check() {
sed -i -e "
/pkg_check_modules ($1 /d
/message.*$2/d" CMakeLists.txt || die "Cannot disable $1"
}
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
# version comes from git, fake it
sed -i -e "
s/\(PROJECT_VERSION\) .*$/\1 "r${VERSION_MAJOR}.${VERSION_MINOR}")/
s/\(PROJECT_VERSION_MAJOR\) .*$/\1 "${VERSION_MAJOR}")/" CMakeLists.txt || die "Cannot patch version"
cmake_src_configure
}
src_install() {
pushd "${BUILD_DIR}" || die
dobin fastfetch
popd
newbashcomp completions/bash fastfetch
insinto /usr/share/${PN}/presets
doins presets/*
einstalldocs
}

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>ceamac.paragon@gmail.com</email>
<description>Primary maintainer</description>
</maintainer>
<upstream>
<remote-id type="github">LinusDierheimer/fastfetch</remote-id>
</upstream>
<use>
<flag name="pci">Enables reading GPU via <pkg>sys-apps/pciutils</pkg></flag>
<flag name="vulkan">Enables reading GPU via <pkg>media-libs/vulkan-loader</pkg></flag>
<flag name="xfce">Enables support for XFCE config</flag>
<flag name="xrandr">Enables support for Xrandr</flag>
</use>
</pkgmetadata>