p/p/linux-standalone/profile.bashrc: move glibc RAP tricks to profiles
authorBenda Xu <heroxbd@gentoo.org>
Wed, 25 May 2016 02:15:04 +0000 (11:15 +0900)
committerBenda Xu <heroxbd@gentoo.org>
Wed, 25 May 2016 02:28:40 +0000 (11:28 +0900)
Upstream-Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=20138

profiles/prefix/linux-standalone/profile.bashrc

index 369b595143af8e556dd1ef9ba9c181af19c98944..c4a885c39f73325ebf7ee72038a603f77663b0be 100644 (file)
@@ -30,3 +30,26 @@ if [[ ${CATEGORY}/${PN} == sys-devel/binutils && ${EBUILD_PHASE} == prepare ]];
        ld/configure.tgt || eerror "Please file a bug about this"
     eend $?
 fi
+
+if [[ ${CATEGORY}/${PN} == sys-libs/glibc && ${EBUILD_PHASE} == configure ]]; then
+    cd "${S}"
+    einfo "Prefixifying hardcoded path"
+    
+    for f in libio/iopopen.c \
+                shadow/lckpwdf.c resolv/{netdb,resolv}.h \
+                nis/nss_compat/compat-{grp,initgroups,{,s}pwd}.c \
+                nss/{bug-erange,nss_files/files-init{,groups}}.c \
+                sysdeps/{{generic,unix/sysv/linux}/paths.h,posix/system.c}
+    do
+       ebegin "  Updating $f"
+       sed -i -r \
+           -e "s,([:\"])/(etc|usr|bin|var),\1${EPREFIX}/\2,g" \
+           $f || eerror "Please file a bug about this"
+       eend $?
+    done
+    ebegin "  Updating nss/db-Makefile"
+    sed -i -r \
+       -e "s,/(etc|var),${EPREFIX}/\1,g" \
+       nss/db-Makefile || eerror "Please file a bug about this"
+    eend $?
+fi