--- pari-2.1.7.ebuild 2006-01-21 14:51:49.000000000 +0000 +++ pari-2.1.7-r1.ebuild 2006-01-21 15:42:41.000000000 +0000 @@ -19,6 +19,9 @@ unpack ${A} cd ${S} epatch ${FILESDIR}/docs.patch + + # remove exec stacks for x86; see bug #117434 + epatch ${FILESDIR}/pari-non-exec-stack-x86-gentoo.patch } src_compile() { @@ -40,6 +43,14 @@ #we also need to force -fPIC throughout on amd64 if [ "${ARCH}" = "amd64" ] && ! is-flag -fPIC; then append-flags -fPIC; fi + # fix up build scripts to get rid of insecure RUNPATHS + # see bug #117434 + sed -e "s|\$runpathprefix \$TOP/\$objdir:\$tmp||" \ + -e "s|\$runpathprefix \$tmp||" -i config/Makefile.SH || \ + die "Failed to fix Makefile.SH" + sed -e "s|-L\$libdir|-L./|" -i Configure || \ + die "Failed to fix Configure" + ./Configure \ --host=${myhost} \ --prefix=/usr \