app-shells/bash: prefixify hard-coded path names.
authorBenda Xu <heroxbd@gentoo.org>
Mon, 24 Oct 2016 00:35:36 +0000 (09:35 +0900)
committerBenda Xu <heroxbd@gentoo.org>
Mon, 24 Oct 2016 00:35:36 +0000 (09:35 +0900)
Bug: 595142

Package-Manager: portage-2.3.0

app-shells/bash/bash-4.4-r1.ebuild

index 3a1e9b0a4c6cafdf2c96237bca428f01181e612d..caed46fb36c284941249aac7a6286515a2ab91f2 100644 (file)
@@ -4,7 +4,7 @@
 
 EAPI="5"
 
-inherit eutils flag-o-matic toolchain-funcs multilib
+inherit eutils flag-o-matic toolchain-funcs multilib prefix
 
 # Official patchlevel
 # See ftp://ftp.cwru.edu/pub/bash/bash-4.3-patches/
@@ -84,6 +84,9 @@ src_prepare() {
                sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die
        fi
 
+       # Prefixify hardcoded path names. No-op for non-prefix.
+       hprefixify pathnames.h.in
+
        # Avoid regenerating docs after patches #407985
        sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die
        touch -r . doc/*
@@ -176,7 +179,7 @@ src_install() {
 
        insinto /etc/bash
        doins "${FILESDIR}"/bash_logout
-       doins "${FILESDIR}"/bashrc
+       doins "$(prefixify_ro "${FILESDIR}"/bashrc)"
        keepdir /etc/bash/bashrc.d
        insinto /etc/skel
        for f in bash{_logout,_profile,rc} ; do