p/p/l-s/profile.bashrc: prefixify glibc hardcoded /etc/ld.so.preload
authorBenda Xu <heroxbd@gentoo.org>
Thu, 26 May 2016 02:49:32 +0000 (11:49 +0900)
committerBenda Xu <heroxbd@gentoo.org>
Thu, 26 May 2016 04:02:49 +0000 (13:02 +0900)
  prefixify python's h2py calls.

profiles/prefix/linux-standalone/profile.bashrc

index c4a885c39f73325ebf7ee72038a603f77663b0be..121ac7b6b9bf58369b69da5c590c67ce907ad87c 100644 (file)
@@ -1,3 +1,4 @@
+# -*- mode: shell-script; -*-
 # RAP specific patches that is pending upstream.
 # binutils: http://article.gmane.org/gmane.comp.gnu.binutils/67593
 
@@ -36,7 +37,7 @@ if [[ ${CATEGORY}/${PN} == sys-libs/glibc && ${EBUILD_PHASE} == configure ]]; th
     einfo "Prefixifying hardcoded path"
     
     for f in libio/iopopen.c \
-                shadow/lckpwdf.c resolv/{netdb,resolv}.h \
+                shadow/lckpwdf.c resolv/{netdb,resolv}.h elf/rtld.c \
                 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}
@@ -53,3 +54,12 @@ if [[ ${CATEGORY}/${PN} == sys-libs/glibc && ${EBUILD_PHASE} == configure ]]; th
        nss/db-Makefile || eerror "Please file a bug about this"
     eend $?
 fi
+
+if [[ ${CATEGORY}/${PN} == dev-lang/python && ${EBUILD_PHASE} == configure ]]; then
+    # Guide h2py to look into glibc of Prefix
+    ebegin "Guide h2py to look into Prefix"
+    export include="${EPREFIX}"/usr/include
+    sed -i -r \
+       -e "s,/usr/include,\"${EPREFIX}\"/usr/include,g" "${S}"/Lib/plat-linux*/regen
+    eend $?
+fi