aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarv Cool2012-04-04 16:27:26 +0200
committerAdam Vandenberg2012-04-08 19:31:39 -0700
commit0ea048dbcc9fb5d82ba89f8cd83bc5a82d31ec1f (patch)
treeead7939b317fe14f30a8669aa39ed910fb434201
parent4574cd4a3e340f06788991fcf5d3916b49d39314 (diff)
downloadhomebrew-0ea048dbcc9fb5d82ba89f8cd83bc5a82d31ec1f.tar.bz2
sml-nj: add patch for Lion
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
-rw-r--r--Library/Formula/smlnj.rb35
1 files changed, 35 insertions, 0 deletions
diff --git a/Library/Formula/smlnj.rb b/Library/Formula/smlnj.rb
index 5f667507a..dcefc530e 100644
--- a/Library/Formula/smlnj.rb
+++ b/Library/Formula/smlnj.rb
@@ -27,6 +27,14 @@ request heap2asm
EOS
end
+ # fixes the install.sh script to use the correct SDK for Lion. See:
+ # https://smlnj-gforge.cs.uchicago.edu/tracker/index.php?func=detail&aid=89&group_id=33&atid=215
+ # https://github.com/mxcl/homebrew/issues/11370
+ # https://github.com/mxcl/homebrew/pull/11443
+ def patches
+ DATA
+ end
+
def install
ENV.deparallelize
# smlnj is much easier to build if we do so in the directory where it
@@ -55,3 +63,30 @@ EOS
EOS
end
end
+
+__END__
+diff --git a/install.sh b/install.sh
+index ea5f8c3..0108774 100755
+--- a/install.sh
++++ b/install.sh
+@@ -290,6 +290,11 @@ case $ARCH in
+ esac
+
+ case $OPSYS in
++ darwin)
++ # finding the correct SDK
++ SDKVERSION=`/usr/bin/sw_vers -productVersion | grep -o ^[0-9][0-9]\.[0-9]`
++ EXTRA_DEFS="SDK=-isysroot /Developer/SDKs/MacOSX$SDKVERSION.sdk -mmacosx-version-min=$SDKVERSION"
++ ;;
+ solaris)
+ MAKE=/usr/ccs/bin/make
+ ;;
+@@ -338,7 +343,7 @@ else
+ "$CONFIGDIR"/unpack "$ROOT" runtime
+ cd "$BASEDIR"/runtime/objs
+ echo $this: Compiling the run-time system.
+- $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS
++ $MAKE -f mk.$ARCH-$OPSYS "$EXTRA_DEFS"
+ if [ -x run.$ARCH-$OPSYS ]; then
+ mv run.$ARCH-$OPSYS "$RUNDIR"
+ if [ -f runx.$ARCH-$OPSYS ]; then