commit:     2e532c0afb904d63c70525fd387431c42cee6f82
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 15 07:11:35 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Aug 15 07:11:35 2017 +0000
URL:        https://gitweb.gentoo.org/proj/elt-patches.git/commit/?id=2e532c0a

Support substituting functions.sh path as well, to fix Prefix

Bug: https://bugs.gentoo.org/627824

 Makefile    | 5 ++++-
 eltpatch.in | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 05a8b7e..90ddc87 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,9 @@
 # Distributed under the terms of the GNU General Public License v2
 
 DESTDIR =
-prefix = /usr
+rootprefix =
+gentoofuncs = $(rootprefix)/lib/gentoo/functions.sh
+prefix = $(rootprefix)/usr
 bindir = $(prefix)/bin
 libdirname = lib
 datadir = $(prefix)/share
@@ -16,6 +18,7 @@ eltpatch: eltpatch.in
        rm -f $@ [email protected]
        sed -e 's^@ELT_patchdir@^$(patchdir)^' \
                -e 's^@ELT_libdir@^$(libdirname)^' \
+               -e 's^@ELT_gentoofuncs@^$(gentoofuncs)^' \
                $< > [email protected]
        chmod +x [email protected]
        mv [email protected] $@

diff --git a/eltpatch.in b/eltpatch.in
index 7dae4bb..a4e87d2 100644
--- a/eltpatch.in
+++ b/eltpatch.in
@@ -2,7 +2,7 @@
 # Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-source "/lib/gentoo/functions.sh" || exit 1
+source "@ELT_gentoofuncs@" || exit 1
 
 die() {
        eerror "${@}"

Reply via email to