public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/neofetch/
Date: Fri,  5 Feb 2021 07:00:47 +0000 (UTC)	[thread overview]
Message-ID: <1612508444.bb7b6b0caf02195a62ba5aeefade48dab6bf421f.sam@gentoo> (raw)

commit:     bb7b6b0caf02195a62ba5aeefade48dab6bf421f
Author:     WuYiyang <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Fri Feb  5 06:05:22 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb  5 07:00:44 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb7b6b0c

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 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/19341
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-misc/neofetch/neofetch-7.1.0.ebuild | 14 +++++++++++++-
 app-misc/neofetch/neofetch-9999.ebuild  | 14 +++++++++++++-
 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 1b5936a8511..8c04178cf5f 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 2b82020241d..7ab81b16a8a 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
+}


             reply	other threads:[~2021-02-05  7:00 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-05  7:00 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-02-09 13:04 [gentoo-commits] repo/gentoo:master commit in: app-misc/neofetch/ Joonas Niilola
2024-01-03  6:22 Sam James
2023-07-24  4:09 Benda XU
2023-07-08  2:40 Benda XU
2023-06-21  4:41 Arthur Zamarin
2023-03-08 16:31 Joshua Kinard
2022-10-01  6:19 Arthur Zamarin
2022-07-09 10:23 Arthur Zamarin
2022-05-13 22:52 Andreas K. Hüttel
2022-05-05 10:06 WANG Xuerui
2022-05-05 10:06 WANG Xuerui
2022-04-09 19:33 Arthur Zamarin
2022-04-09 19:23 Arthur Zamarin
2022-04-02  7:40 Arthur Zamarin
2022-01-10 10:36 Arthur Zamarin
2021-10-16 14:57 Yixun Lan
2021-10-11  4:18 Sam James
2021-04-28  6:42 Joonas Niilola
2021-02-05  7:03 Sam James
2021-02-05  7:00 Sam James
2020-12-29  9:57 Sam James
2020-12-29  9:56 Sam James
2020-12-29  9:55 Sam James
2020-12-29  9:54 Sam James
2020-08-03  1:19 Craig Andrews
2020-07-18  0:55 Sam James
2020-03-09  2:23 Craig Andrews
2019-12-26 12:12 Georgy Yakovlev
2019-12-26 12:12 Georgy Yakovlev
2019-09-03  1:28 Craig Andrews
2019-05-14 16:53 Johannes Huber
2019-05-13  0:38 Thomas Deutschmann
2019-05-03 13:09 Mikle Kolyada
2019-05-01  8:44 Johannes Huber
2019-01-08 17:57 Craig Andrews
2019-01-08 14:38 Craig Andrews
2018-12-16  1:14 Joshua Kinard
2018-10-19 17:31 Johannes Huber
2018-10-19 17:31 Johannes Huber
2018-10-09 21:24 Thomas Deutschmann
2018-10-07 12:05 Mikle Kolyada
2018-09-23  7:14 Benda XU
2018-09-10  7:57 Benda XU
2018-06-22 16:25 Johannes Huber
2018-06-22 16:25 Johannes Huber
2018-06-14 21:00 Johannes Huber
2018-06-14 21:00 Johannes Huber
2018-05-19 20:37 Johannes Huber
2018-05-11 19:02 Mikle Kolyada
2018-05-11 19:02 Mikle Kolyada
2018-05-11 18:21 Johannes Huber
2018-05-11 18:10 Mikle Kolyada
2018-05-10 14:09 Johannes Huber
2018-05-10 14:09 Johannes Huber
2018-05-10 14:09 Johannes Huber
2018-04-07 16:42 Patrice Clement
2018-04-07 16:42 Patrice Clement
2018-04-07 16:42 Patrice Clement
2018-01-05 14:06 Jonas Stein
2017-12-19  4:41 Jason Zaman
2017-09-14 22:06 Patrice Clement
2017-09-14 22:06 Patrice Clement
2017-06-23 13:50 Michał Górny
2017-06-23 13:50 Michał Górny
2017-05-07 13:29 Michał Górny
2017-03-12 18:52 Patrice Clement
2017-03-12 18:52 Patrice Clement
2017-01-25 23:29 Patrice Clement
2016-12-11 15:29 Michał Górny
2016-12-04 22:32 Patrice Clement
2016-12-03  6:53 Benda XU
2016-11-06 20:15 David Seifert
2016-11-03 21:06 Patrice Clement
2016-10-09  7:58 Patrice Clement

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1612508444.bb7b6b0caf02195a62ba5aeefade48dab6bf421f.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox