* [gentoo-commits] proj/portage:prefix commit in: /, bin/, cnf/
@ 2024-01-18 11:51 Fabian Groffen
0 siblings, 0 replies; only message in thread
From: Fabian Groffen @ 2024-01-18 11:51 UTC (permalink / raw
To: gentoo-commits
commit: 517d319de6dfb1b97903e09a46f8b0f85bbd853e
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 18 11:49:46 2024 +0000
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Thu Jan 18 11:49:46 2024 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=517d319d
buildsys: only use hprefixy in subst-install where meson does
Get expansions to work similar/the same to meson's install.
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
bin/Makefile.in | 2 +-
cnf/Makefile.in | 2 +-
subst-install.in | 13 ++++++++++---
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/bin/Makefile.in b/bin/Makefile.in
index d91a635e87..3f0e54190a 100644
--- a/bin/Makefile.in
+++ b/bin/Makefile.in
@@ -14,7 +14,7 @@ portagegroup = @portagegroup@
PORTAGE_BIN = @PORTAGE_BASE@/bin
LN_S = @LN_S@
INSTALL = @INSTALL@
-INSTALL_subst = $(top_builddir)/subst-install
+INSTALL_subst = $(top_builddir)/subst-install --hprefixify
usr_binprogs = \
ebuild \
diff --git a/cnf/Makefile.in b/cnf/Makefile.in
index 6cf3fc6904..803382bd3f 100644
--- a/cnf/Makefile.in
+++ b/cnf/Makefile.in
@@ -12,7 +12,7 @@ portageuser = @portageuser@
portagegroup = @portagegroup@
INSTALL = @INSTALL@
-INSTALL_subst = ${top_builddir}/subst-install
+INSTALL_subst = ${top_builddir}/subst-install --hprefixify
LN_S = @LN_S@
all:
diff --git a/subst-install.in b/subst-install.in
index 318e113e1c..07576eede7 100644
--- a/subst-install.in
+++ b/subst-install.in
@@ -19,7 +19,6 @@ portageuser=${portageuser//\\/\\\\\\\\}
# there are many ways to do this all dynamic, but we only care for raw
# speed here, so let configure fill in this list and be done with it
at='@'
-dirs='/(usr|lib(|[onx]?32|n?64)|etc|bin|sbin|var|opt|run)'
sedexp=(
-r
-e "s,${at}PORTAGE_BASE${at},@PORTAGE_BASE@,g"
@@ -30,6 +29,7 @@ sedexp=(
-e "s,${at}PORTAGE_MV${at},@PORTAGE_MV@,g"
-e "s,${at}PREFIX_PORTAGE_PYTHON${at},@PREFIX_PORTAGE_PYTHON@,g"
-e "s,${at}EPREFIX${at},@PORTAGE_EPREFIX@,g"
+ -e "s,${at}INSTALL_TYPE${at},SYSTEM,g"
-e "s,${at}datadir${at},@datadir@,g"
-e "s,${at}portagegroup${at},${portagegroup},g"
-e "s,${at}portageuser${at},${portageuser},g"
@@ -37,10 +37,17 @@ sedexp=(
-e "s,${at}rootuid${at},@rootuid@,g"
-e "s,${at}rootuser${at},${rootuser},g"
-e "s,${at}sysconfdir${at},@sysconfdir@,g"
- -e 's,([^[:alnum:]}\)\.])'"${dirs}"',\1@PORTAGE_EPREFIX@/\2,g'
- -e 's,^'"${dirs}"',@PORTAGE_EPREFIX@/\1,'
)
+if [[ $1 == --hprefixify ]] ; then
+ shift
+ dirs='/(usr|lib(|[onx]?32|n?64)|etc|bin|sbin|var|opt|run)'
+ sedexp+=(
+ -e 's,([^[:alnum:]}\)\.])'"${dirs}"',\1@PORTAGE_EPREFIX@/\2,g'
+ -e 's,^'"${dirs}"',@PORTAGE_EPREFIX@/\1,'
+ )
+fi
+
sources=( )
target=
args=( "$@" )
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-18 11:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-18 11:51 [gentoo-commits] proj/portage:prefix commit in: /, bin/, cnf/ Fabian Groffen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox