--- bootstrap-prefix.sh.orig 2013-12-30 08:06:15.000000000 -0600 +++ bootstrap-prefix.sh 2014-01-01 15:00:32.000000000 -0600 @@ -1115,6 +1115,11 @@ pkgs=( ${pkgs[@]} sys-apps/darwin-miscutils sys-libs/csu ) case "$(gcc --version)" in *"(GCC) 4.2.1 "*|*"Apple LLVM version 5.0"*) + # The next 3 lines are a nasty hack to + # workaround bug 491098 + echo "post_src_prepare() { epatch_user; }" >> "${PORTDIR}/profiles/prefix/profile.bashrc" + mkdir -p "${EPREFIX}"/etc/portage/patches/sys-devel/gcc-apple + "${EPREFIX}"/tmp/usr/bin/wget ${GENTOO_MIRRORS}/experimental/prefix/patches/gcc-apple-4.2.1-inline.patch -O "${EPREFIX}"/etc/portage/patches/sys-devel/gcc-apple/gcc-apple-4.2.1-inline.patch pkgs=( ${pkgs[@]} sys-devel/binutils-apple ) ;; *"(GCC) 4.0.1 "*) @@ -1202,6 +1207,10 @@ esac emerge_pkgs --nodeps "${pkgs[@]}" || return 1 + rm -rf "${EPREFIX}"/etc/portage/patches + # Ensure GNU sed + "${EPREFIX}"/tmp/usr/bin/sed -i '/epatch_user/d' \ + "${PORTDIR}/profiles/prefix/profile.bashrc" # --oneshot local pkgs=(