summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuYiyang <xgreenlandforwyy@gmail.com>2021-02-05 14:05:22 +0800
committerSam James <sam@gentoo.org>2021-02-05 07:00:44 +0000
commitbb7b6b0caf02195a62ba5aeefade48dab6bf421f (patch)
treea3fb235253d1c0beea39b8c2ee922f0fbe066813 /app-misc/neofetch
parentsys-kernel/pf-sources: bump to 5.10-pf11 (diff)
downloadgentoo-bb7b6b0caf02195a62ba5aeefade48dab6bf421f.tar.gz
gentoo-bb7b6b0caf02195a62ba5aeefade48dab6bf421f.tar.bz2
gentoo-bb7b6b0caf02195a62ba5aeefade48dab6bf421f.zip
app-misc/neofetch: Gentoo Prefix support
* Move install location inside prefix * hprefixify neofetch to recognize prefix environment * Modify neofetch to enable counting packages installed by portage in prefix (this will also keep the host system's packages manager's information, except for using gentoo prefix upon gentoo) Closes: https://bugs.gentoo.org/693526 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/19341 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-misc/neofetch')
-rw-r--r--app-misc/neofetch/neofetch-7.1.0.ebuild14
-rw-r--r--app-misc/neofetch/neofetch-9999.ebuild14
2 files changed, 26 insertions, 2 deletions
diff --git a/app-misc/neofetch/neofetch-7.1.0.ebuild b/app-misc/neofetch/neofetch-7.1.0.ebuild
index 1b5936a85115..8c04178cf5f3 100644
--- a/app-misc/neofetch/neofetch-7.1.0.ebuild
+++ b/app-misc/neofetch/neofetch-7.1.0.ebuild
@@ -1,8 +1,10 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
+inherit prefix
+
if [[ ${PV} != *9999* ]]; then
SRC_URI="https://github.com/dylanaraps/${PN}/archive/${PV}/${P}.tar.gz"
KEYWORDS="amd64 ~arm64 ~mips ~ppc64 x86"
@@ -26,3 +28,13 @@ RDEPEND="sys-apps/pciutils
x11-apps/xrandr
x11-apps/xwininfo
)"
+
+export PREFIX=${EPREFIX}/usr
+
+src_prepare () {
+ if use prefix; then
+ hprefixify neofetch
+ sed -e "/has emerge/s:\${br_prefix}:${EPREFIX}:" -i neofetch
+ fi
+ default
+}
diff --git a/app-misc/neofetch/neofetch-9999.ebuild b/app-misc/neofetch/neofetch-9999.ebuild
index 2b82020241d3..7ab81b16a8a6 100644
--- a/app-misc/neofetch/neofetch-9999.ebuild
+++ b/app-misc/neofetch/neofetch-9999.ebuild
@@ -1,8 +1,10 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
+inherit prefix
+
if [[ ${PV} != *9999* ]]; then
SRC_URI="https://github.com/dylanaraps/${PN}/archive/${PV}/${P}.tar.gz"
KEYWORDS="~amd64 ~arm64 ~mips ~ppc64 ~x86"
@@ -26,3 +28,13 @@ RDEPEND="sys-apps/pciutils
x11-apps/xrandr
x11-apps/xwininfo
)"
+
+export PREFIX=${EPREFIX}/usr
+
+src_prepare () {
+ if use prefix; then
+ hprefixify neofetch
+ sed -e "/has emerge/s:\${br_prefix}:${EPREFIX}:" -i neofetch
+ fi
+ default
+}