From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1248206-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D35D21382C5 for <garchives@archives.gentoo.org>; Fri, 5 Feb 2021 07:00:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CA445E08F0; Fri, 5 Feb 2021 07:00:50 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B4699E08F0 for <gentoo-commits@lists.gentoo.org>; Fri, 5 Feb 2021 07:00:50 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2D351342B80 for <gentoo-commits@lists.gentoo.org>; Fri, 5 Feb 2021 07:00:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A333149 for <gentoo-commits@lists.gentoo.org>; Fri, 5 Feb 2021 07:00:47 +0000 (UTC) From: "Sam James" <sam@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" <sam@gentoo.org> Message-ID: <1612508444.bb7b6b0caf02195a62ba5aeefade48dab6bf421f.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/neofetch/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-misc/neofetch/neofetch-7.1.0.ebuild app-misc/neofetch/neofetch-9999.ebuild X-VCS-Directories: app-misc/neofetch/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: bb7b6b0caf02195a62ba5aeefade48dab6bf421f X-VCS-Branch: master Date: Fri, 5 Feb 2021 07:00:47 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6b9f33d3-0789-4269-9e59-373076a6106a X-Archives-Hash: dcec99b50c4ebb7a2f8e40db9c575a6e 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 +}