Skip to content

Instantly share code, notes, and snippets.

@tochiz
Created July 24, 2011 21:56
Show Gist options
  • Save tochiz/1103158 to your computer and use it in GitHub Desktop.
Save tochiz/1103158 to your computer and use it in GitHub Desktop.
gentoo prefix bootstrap_prefix.sh patch for mac os x lion(for testing)#2
--- Downloads/bootstrap-prefix.sh 2011-07-24 10:35:03.000000000 +0900
+++ bootstrap-prefix.sh 2011-07-25 06:48:34.000000000 +0900
@@ -161,6 +161,34 @@
HOSTCC='gcc -m64'
"
;;
+ i*86-apple-darwin11)
+ if [ ! -d ${PORTDIR}/profiles/prefix/darwin/macos/10.7 ]; then
+ cp -r ${PORTDIR}/profiles/prefix/darwin/macos/10.6 ${PORTDIR}/profiles/prefix/darwin/macos/10.7
+ grep -lr 10.6 ${PORTDIR}/profiles/prefix/darwin/macos/10.7 | xargs sed -i 's/10.6/10.7/g'
+ grep -lr darwin10 ${PORTDIR}/profiles/prefix/darwin/macos/10.7 | xargs sed -i 's/darwin10/darwin11/g'
+ fi
+ profile="${PORTDIR}/profiles/prefix/darwin/macos/10.7/x86"
+ ldflags_make_defaults="LDFLAGS=\"-Wl,-search_paths_first -L${ROOT}/usr/lib -L${ROOT}/lib\""
+ extra_make_globals="
+CC='gcc -m32'
+CXX='g++ -m32'
+HOSTCC='gcc -m32'
+"
+ ;;
+ x86_64-apple-darwin11)
+ if [ ! -d ${PORTDIR}/profiles/prefix/darwin/macos/10.7 ]; then
+ cp -r ${PORTDIR}/profiles/prefix/darwin/macos/10.6 ${PORTDIR}/profiles/prefix/darwin/macos/10.7
+ grep -lr 10.6 ${PORTDIR}/profiles/prefix/darwin/macos/10.7 | xargs sed -i 's/10.6/10.7/g'
+ grep -lr darwin10 ${PORTDIR}/profiles/prefix/darwin/macos/10.7 | xargs sed -i 's/darwin10/darwin11/g'
+ fi
+ profile="${PORTDIR}/profiles/prefix/darwin/macos/10.7/x64"
+ ldflags_make_defaults="LDFLAGS=\"-Wl,-search_paths_first -L${ROOT}/usr/lib -L${ROOT}/lib\""
+ extra_make_globals="
+CC='gcc -m64'
+CXX='g++ -m64'
+HOSTCC='gcc -m64'
+"
+ ;;
i*86-pc-linux-gnu)
profile="${PORTDIR}/profiles/prefix/linux/x86"
ldflags_make_defaults="LDFLAGS=\"-L${ROOT}/usr/lib -Wl,-rpath=${ROOT}/usr/lib -L${ROOT}/lib -Wl,-rpath=${ROOT}/lib\""
@@ -595,6 +623,11 @@
# coreutils completely useless (install failing on everything)
[[ ${A%-*} == "coreutils" ]] && myconf="${myconf} --disable-acl"
+ if [[ ${A%-*} == "coreutils" && ${CHOST} == *-darwin11 ]] ; then
+ sed -i -e '/^#ifndef weak_alias$/a\# undef __stpncpy' lib/stpncpy.c
+ sed -i -e '/^# undef __stpncpy$/a\# undef stpncpy' lib/stpncpy.c
+ fi
+
if [[ ${A%-*} == "coreutils" && ${CHOST} == *-interix* ]] ; then
# Interix doesn't have filesystem listing stuff, but that means all
# other utilities but df aren't useless at all, so don't die
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment