commit: 29864f98c706f014c0fadbfbb0e59057a730d384
parent 152eb23d9de60e5466a0759d38913ea9e06e13cf
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Fri, 6 Dec 2024 12:44:54 +0100
sys-apps/utils-std: add system USE flag
Diffstat:
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/sys-apps/utils-std/metadata.xml b/sys-apps/utils-std/metadata.xml
@@ -5,4 +5,7 @@
<email>contact@hacktivis.me</email>
<name>Haelwenn (lanodan) Monnier</name>
</maintainer>
+ <use>
+ <flag name="system">Install utils-std as system utilities in /usr</flag>
+ </use>
</pkgmetadata>
diff --git a/sys-apps/utils-std/utils-std-9999.ebuild b/sys-apps/utils-std/utils-std-9999.ebuild
@@ -10,10 +10,16 @@ HOMEPAGE="https://hacktivis.me/git/utils-std"
EGIT_REPO_URI="https://hacktivis.me/git/utils-std.git"
LICENSE="MPL-2.0"
SLOT="0"
-IUSE="test static"
+IUSE="test static system"
RESTRICT="!test? ( test )"
+RDEPEND="
+ system? (
+ !sys-apps/coreutils[system(+)]
+ !sys-apps/diffutils[system(+)]
+ )
+"
BDEPEND="
app-alternatives/yacc
test? ( dev-util/cram )
@@ -24,14 +30,14 @@ src_configure() {
use static && export LDSTATIC="-static-pie"
- ./configure PREFIX='/opt/lanodan'
+ ./configure PREFIX=$(usex system '/usr' '/opt/lanodan')
}
src_install() {
emake install DESTDIR="${D}"
# before 50baselayout
- newenvd - 40lanodan <<-EOF
+ use system || newenvd - 40lanodan <<-EOF
PATH="/opt/lanodan/bin:/opt/lanodan/sbin"
ROOTPATH="/opt/lanodan/bin:/opt/lanodan/sbin"
MANPATH="/opt/lanodan/share/man"