Modified: trunk/dports/lang/llvm-gcc42/Portfile (115439 => 115440)
--- trunk/dports/lang/llvm-gcc42/Portfile 2014-01-02 02:33:33 UTC (rev 115439)
+++ trunk/dports/lang/llvm-gcc42/Portfile 2014-01-02 02:36:50 UTC (rev 115440)
@@ -48,18 +48,24 @@
# incpath.patch : Don't prepend the -isysroot option argument to the compiler's own search paths
# driverdriver-num_infiles.patch : Fix linking with no input files (ie all static archives passed with -l...)
# driverdriver-armcheck.patch : Build fix for the driverdriver when arm support is not available (eg: Tiger)
+# deployment_target.patch : Build fix to correctly get the OS version
patchfiles-append \
werror-local-alloc.patch \
incpath.patch \
driverdriver-num_infiles.patch \
- driverdriver-armcheck.patch
+ driverdriver-armcheck.patch \
+ deployment_target.patch
post-extract {
xinstall -W ${filespath} build_gcc ${worksrcpath}
}
post-patch {
+ # Set our deployment target
+ reinplace "s/@@DEPLOYMENT_TARGET@@/${macosx_deployment_target}/" \
+ ${worksrcpath}/llvmCore/Makefile.rules
+
# Install documentation in a MacPorts location
#reinplace "/^HTMLDIR=/ s:=.*$:=\"${prefix}/share/doc/${name}/html\":" ${worksrcpath}/build_gcc
Added: trunk/dports/lang/llvm-gcc42/files/deployment_target.patch (0 => 115440)
--- trunk/dports/lang/llvm-gcc42/files/deployment_target.patch (rev 0)
+++ trunk/dports/lang/llvm-gcc42/files/deployment_target.patch 2014-01-02 02:36:50 UTC (rev 115440)
@@ -0,0 +1,16 @@
+--- llvmCore/Makefile.rules.orig 2010-03-17 14:29:48.000000000 -0700
++++ llvmCore/Makefile.rules 2014-01-01 17:51:22.000000000 -0800
+@@ -555,11 +555,9 @@ endif
+ #--------------------------------------------------------------------
+
+ ifeq ($(HOST_OS),Darwin)
+- DARWIN_VERSION := `sw_vers -productVersion`
+- # Strip a number like 10.4.7 to 10.4
+- DARWIN_VERSION := $(shell echo $(DARWIN_VERSION)| sed -E 's/(10.[0-9]).*/\1/')
++ DARWIN_VERSION := @@DEPLOYMENT_TARGET@@
+ # Get "4" out of 10.4 for later pieces in the makefile.
+- DARWIN_MAJVERS := $(shell echo $(DARWIN_VERSION)| sed -E 's/10.([0-9]).*/\1/')
++ DARWIN_MAJVERS := $(shell echo $(DARWIN_VERSION) | sed -E 's/10\.//')
+
+ SharedLinkOptions=-Wl,-flat_namespace -Wl,-undefined -Wl,suppress \
+ -dynamiclib