[95835] trunk/dports/lang

vince at macports.org vince at macports.org
Tue Jul 24 04:51:18 PDT 2012


Revision: 95835
          https://trac.macports.org/changeset/95835
Author:   vince at macports.org
Date:     2012-07-24 04:51:17 -0700 (Tue, 24 Jul 2012)
Log Message:
-----------
Original submission tag 3.2.2012-07-17

Added Paths:
-----------
    trunk/dports/lang/eero-devel/
    trunk/dports/lang/eero-devel/Portfile
    trunk/dports/lang/eero-devel/files/
    trunk/dports/lang/eero-devel/files/install_target.patch
    trunk/dports/lang/eero-devel/files/llvm-bin
    trunk/dports/lang/eero-devel/files/mp-clang-3.2
    trunk/dports/lang/eero-devel/files/patch-Makefile.config.in.diff
    trunk/dports/lang/eero-devel/files/patch-Makefile.ocaml.diff
    trunk/dports/lang/eero-devel/files/patch-Makefile_llvm_config.diff
    trunk/dports/lang/eero-devel/files/scan-build-PR-35006.patch
    trunk/dports/lang/eero-devel/files/tiger-shlib-clang.patch
    trunk/dports/lang/eero-devel/files/tiger-shlib.patch
    trunk/dports/lang/eero-devel/files/tiger.patch

Added: trunk/dports/lang/eero-devel/Portfile
===================================================================
--- trunk/dports/lang/eero-devel/Portfile	                        (rev 0)
+++ trunk/dports/lang/eero-devel/Portfile	2012-07-24 11:51:17 UTC (rev 95835)
@@ -0,0 +1,229 @@
+# Much of this Portfile is borrowed from clang-3.2, with adaptations where
+# needed.
+
+PortSystem              1.0
+PortGroup select        1.0
+
+set eero_tag            3.2.2012-07-17
+name                    eero-devel
+version                 ${eero_tag}
+set sub_prefix          ${prefix}/libexec/eero-devel
+
+categories              lang
+platforms               darwin
+maintainers             vince
+
+license                 NCSA
+description             Eero is Objective-C evolved
+long_description        The Eero language is Obj-C but replaces much \
+                        of the underlying C syntax by a more modern \
+                        Python like syntax. Binaries produced are \
+                        100% compatible with standard Obj-C. The Eero \
+                        compiler is based on Clang and thus can \
+                        also compile regular C, C++ and Obj-C.
+                        
+homepage                http://eerolanguage.org
+
+depends_lib             port:libffi
+
+default_variants        +analyzer
+
+worksrcdir              eero-devel
+
+fetch {
+    set ee              "https://nodeload.github.com/eerolanguage/"
+    
+    ui_msg "Fetching eero-llvm tag ${eero_tag}…"
+    curl fetch ${ee}llvm-trunk/tarball/${eero_tag} \
+            ${workpath}/llvm.tgz
+    ui_msg "Now fetching eero-clang tag ${eero_tag}…"
+    curl fetch ${ee}clang-trunk/tarball/${eero_tag} \
+            ${workpath}/clang.tgz
+}
+
+checksum {
+}
+
+extract {
+    system "cd ${workpath} && \
+            tar xfz llvm.tgz && \
+            mv eero* eero-devel && \
+            mv clang.tgz ${worksrcpath}/tools && \
+            cd ${worksrcpath}/tools && \
+            tar xfz clang.tgz && \
+            mv eero* clang"
+}
+
+patchfiles              install_target.patch \
+                        tiger.patch  \
+                        tiger-shlib.patch \
+                        tiger-shlib-clang.patch \
+                        scan-build-PR-35006.patch
+patch.pre_args          -p1
+
+build.env-append        VERBOSE=1 REQUIRE_RTTI=1
+destroot.env-append     VERBOSE=1 REQUIRE_RTTI=1
+configure.cppflags
+configure.ldflags
+configure.pre_args-delete --prefix=${prefix}
+configure.args          --enable-bindings=none --enable-libffi \
+                        --enable-shared --enable-jit \
+                        --enable-optimized --disable-profiling \
+                        --enable-debug-symbols --disable-debug-runtime \
+                        --prefix="${sub_prefix}" \
+						--enable-targets=x86,x86_64,arm,powerpc
+
+# g++-4.0 fails to build some of the newer C++ for ppc
+# Intel looks ok, but I prefer using gcc-4.2 for consistency
+if {${configure.compiler} == "gcc-4.0"} {
+    configure.compiler gcc-4.2
+    if {![file exists ${configure.cc}]} {
+        depends_build-append port:apple-gcc42 port:ld64 port:cctools
+        depends_skip_archcheck-append apple-gcc42 ld64 cctools
+
+        configure.compiler apple-gcc-4.2
+    }
+}
+
+variant mp-ld64 description "uses MacPorts cctools ld64 - currently broken" {
+}
+
+variant universal {
+    build.env-append \
+        UNIVERSAL=1 \
+        UNIVERSAL_ARCH="[get_canonical_archs]"
+    destroot.env-append \
+        UNIVERSAL=1 \
+        UNIVERSAL_ARCH="[get_canonical_archs]"
+
+    post-extract {
+        # workaround a bug in Apple's shipped gcc driver-driver, patched in
+        # ours with driverdriver-num_infiles.patch
+        if {${configure.compiler} == "gcc-4.0" ||
+            ${configure.compiler} == "gcc-4.2"} {
+            system "echo \"static int ___ignoreme;\" > ${worksrcpath}/tools/llvm-shlib/ignore.c"
+        }
+    }
+}
+
+variant assertions description "Enable assertions for error detection (has performance impacts, especially on JIT)" {
+    configure.args-append --enable-assertions
+}
+
+platform darwin {
+	if {[variant_isset mp-ld64]} {
+		depends_run-append      port:ld64
+		depends_skip_archcheck-append ld64
+	}
+
+    if {${build_arch} == "i386" } {
+        configure.pre_args-append --build=i686-apple-darwin${os.major}
+    } elseif {${build_arch} == "ppc" } {
+        configure.pre_args-append --build=powerpc-apple-darwin${os.major}
+    } elseif {${build_arch} == "ppc64" } {
+        configure.pre_args-append --build=powerpc64-apple-darwin${os.major}
+    } else {
+        configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
+    }
+
+    if {[string match "*ppc*" [get_canonical_archs]]} {
+        # http://trac.macports.org/ticket/33987
+        configure.args-append --with-optimize-option=-Os
+    }
+}
+
+platform darwin 8 {
+    # Tiger's DevTools make has issues with the nested ifs in compiler-rt
+    depends_run-append      port:gmake
+    depends_skip_archcheck-append gmake
+    build.cmd               ${prefix}/bin/gmake
+    destroot.cmd            ${prefix}/bin/gmake
+
+    post-configure {
+        reinplace "/^RPATH/s/=.*/=/" ${worksrcpath}/Makefile.config
+    }
+}
+
+variant arm_runtime description {Build and install the arm runtime for iOS development (requires iOS SDK)} {}
+
+variant analyzer description {Install clang static analyzer} {
+    depends_run-append  port:python27 port:perl5
+    post-patch {
+        reinplace "s|/usr/bin/env perl|${prefix}/bin/perl5|g" \
+            ${worksrcpath}/tools/clang/tools/scan-build/ccc-analyzer \
+            ${worksrcpath}/tools/clang/tools/scan-build/c++-analyzer \
+            ${worksrcpath}/tools/clang/tools/scan-build/scan-build
+        reinplace "s|/usr/bin/env python|${prefix}/bin/python2.7|g" \
+            ${worksrcpath}/tools/clang/tools/scan-build/set-xcode-analyzer \
+            ${worksrcpath}/tools/clang/tools/scan-view/scan-view
+    }
+
+    post-destroot {
+        file mkdir ${destroot}${sub_prefix}/libexec
+        file copy ${worksrcpath}/tools/clang/tools/scan-build ${destroot}${sub_prefix}/libexec/scan-build
+        file copy ${worksrcpath}/tools/clang/tools/scan-view ${destroot}${sub_prefix}/libexec/scan-view
+
+        file delete -force ${destroot}${sub_prefix}/libexec/scan-build/.svn
+        file delete -force ${destroot}${sub_prefix}/libexec/scan-view/.svn
+        file delete -force ${destroot}${sub_prefix}/libexec/scan-view/Resources/.svn
+
+        ln -s ${sub_prefix}/libexec/scan-build/scan-build ${destroot}${sub_prefix}/bin/scan-build
+        ln -s ${sub_prefix}/libexec/scan-view/scan-view ${destroot}${sub_prefix}/bin/scan-view
+        ln -s ${sub_prefix}/bin ${destroot}${sub_prefix}/libexec/scan-build/bin
+
+        xinstall -m 755 "${filespath}/llvm-bin" "${destroot}${prefix}/bin/eero-scan-build"
+        reinplace "s:EXEC_PATH:${sub_prefix}/bin/scan-build:" "${destroot}${prefix}/bin/eero-scan-build"
+
+        xinstall -m 755 "${filespath}/llvm-bin" "${destroot}${prefix}/bin/eero-scan-view"
+        reinplace "s:EXEC_PATH:${sub_prefix}/bin/scan-view:" "${destroot}${prefix}/bin/eero-scan-view"
+    }
+}
+
+post-destroot {
+    # rename Clang as Eero
+    file rename ${destroot}${sub_prefix}/bin/clang \
+                ${destroot}${sub_prefix}/bin/eero
+    file delete ${destroot}${sub_prefix}/bin/clang++
+    file link   ${destroot}${sub_prefix}/bin/eero++ \
+                ${destroot}${sub_prefix}/bin/eero
+                
+	# Install just eero binaries, not llvm ones
+    foreach bin [glob ${destroot}${sub_prefix}/bin/*eero*] {
+        set bin_filename [string map \
+		 "${sub_prefix} ${prefix}" ${bin}]
+        set exec_path [string map "${destroot}${sub_prefix} ${sub_prefix}" ${bin}]
+
+        xinstall -m 755 "${filespath}/llvm-bin" "${bin_filename}"
+        reinplace "s:EXEC_PATH:${exec_path}:" "${bin_filename}"
+    }
+    
+    # http://trac.macports.org/ticket/33207
+	# This is borrowed from clang-3.2, but breaks linking with ld64 v.128
+	if {[variant_isset mp-ld64]} {
+		ln -s ${prefix}/libexec/ld64/ld ${destroot}${sub_prefix}/bin/ld
+	}
+
+    system "install_name_tool -id \
+        ${sub_prefix}/lib/libclang.dylib\
+        ${destroot}${sub_prefix}/lib/libclang.dylib"
+        
+    system "install_name_tool -id \
+        ${sub_prefix}/lib/libLLVM-3.2svn.dylib \
+        ${destroot}${sub_prefix}/lib/libLLVM-3.2svn.dylib"
+        
+    system "install_name_tool -change \
+        @executable_path/../lib/libLLVM-3.2svn.dylib \
+        ${sub_prefix}/lib/libLLVM-3.2svn.dylib \
+        ${destroot}${sub_prefix}/lib/libclang.dylib"
+}
+
+pre-activate {
+    # An earlier version of this port accidentally installed ${sub_prefix}/bin/ld
+    # rather than ${destroot}${sub_prefix}/bin/ld
+    set filepath ${sub_prefix}/bin/ld
+    if {[file exists ${filepath}] && [registry_file_registered ${filepath}] == "0"} {
+        if {[catch {delete ${filepath}}]} {
+            ui_warn "Cannot delete ${filepath}; please remove it manually"
+        }
+    }
+}

Added: trunk/dports/lang/eero-devel/files/install_target.patch
===================================================================
--- trunk/dports/lang/eero-devel/files/install_target.patch	                        (rev 0)
+++ trunk/dports/lang/eero-devel/files/install_target.patch	2012-07-24 11:51:17 UTC (rev 95835)
@@ -0,0 +1,13 @@
+--- a/Makefile.orig	2012-01-22 17:34:02.000000000 -0800
++++ b/Makefile	2012-01-22 17:34:14.000000000 -0800
+@@ -70,8 +70,7 @@ ifeq ($(MAKECMDGOALS),install-clang)
+   DIRS := tools/clang/tools/driver tools/clang/lib/Headers \
+           tools/clang/tools/libclang tools/clang/tools/c-index-test \
+-          tools/clang/include/clang-c \
+-          tools/clang/runtime tools/clang/docs \
+-          tools/lto runtime
++          tools/clang/include tools/clang/lib \
++          tools/clang/runtime tools/clang/docs
+   OPTIONAL_DIRS :=
+   NO_INSTALL = 1
+ endif

Added: trunk/dports/lang/eero-devel/files/llvm-bin
===================================================================
--- trunk/dports/lang/eero-devel/files/llvm-bin	                        (rev 0)
+++ trunk/dports/lang/eero-devel/files/llvm-bin	2012-07-24 11:51:17 UTC (rev 95835)
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec EXEC_PATH "${@}"


Property changes on: trunk/dports/lang/eero-devel/files/llvm-bin
___________________________________________________________________
Added: svn:executable
   + *

Added: trunk/dports/lang/eero-devel/files/mp-clang-3.2
===================================================================
--- trunk/dports/lang/eero-devel/files/mp-clang-3.2	                        (rev 0)
+++ trunk/dports/lang/eero-devel/files/mp-clang-3.2	2012-07-24 11:51:17 UTC (rev 95835)
@@ -0,0 +1,5 @@
+bin/c-index-test-mp-3.2
+bin/clang++-mp-3.2
+bin/clang-mp-3.2
+bin/scan-build-mp-3.2
+bin/scan-view-mp-3.2

Added: trunk/dports/lang/eero-devel/files/patch-Makefile.config.in.diff
===================================================================
--- trunk/dports/lang/eero-devel/files/patch-Makefile.config.in.diff	                        (rev 0)
+++ trunk/dports/lang/eero-devel/files/patch-Makefile.config.in.diff	2012-07-24 11:51:17 UTC (rev 95835)
@@ -0,0 +1,11 @@
+--- Makefile.config.in	2010-05-21 21:02:23.000000000 -0500
++++ Makefile.config.in	2010-05-21 21:03:01.000000000 -0500
+@@ -79,7 +79,7 @@
+ PROJ_bindir     := $(PROJ_prefix)/bin
+ PROJ_libdir     := $(PROJ_prefix)/lib
+ PROJ_datadir    := $(PROJ_prefix)/share
+-PROJ_docsdir    := $(PROJ_prefix)/docs/llvm
++PROJ_docsdir    := $(PROJ_prefix)/share/doc/llvm- at PACKAGE_VERSION
+ PROJ_etcdir     := $(PROJ_prefix)/etc/llvm
+ PROJ_includedir := $(PROJ_prefix)/include
+ PROJ_infodir    := $(PROJ_prefix)/info

Added: trunk/dports/lang/eero-devel/files/patch-Makefile.ocaml.diff
===================================================================
--- trunk/dports/lang/eero-devel/files/patch-Makefile.ocaml.diff	                        (rev 0)
+++ trunk/dports/lang/eero-devel/files/patch-Makefile.ocaml.diff	2012-07-24 11:51:17 UTC (rev 95835)
@@ -0,0 +1,11 @@
+--- bindings/ocaml/Makefile.ocaml.ocaml-symlinks	2008-03-10 12:15:32.000000000 -0400
++++ bindings/ocaml/Makefile.ocaml	2008-12-02 16:29:01.000000000 -0500
+@@ -160,7 +160,7 @@
+ 
+ install-deplibs:
+ 	$(Verb) for i in $(DestLibs:$(PROJ_libocamldir)/%=%); do \
+-	  ln -sf "$(PROJ_libdir)/$$i" "$(PROJ_libocamldir)/$$i"; \
++         ln -sf "${OVERRIDE_libdir}/$$i" "$(PROJ_libocamldir)/$$i"; \
+ 	done
+ 
+ uninstall-deplibs:

Added: trunk/dports/lang/eero-devel/files/patch-Makefile_llvm_config.diff
===================================================================
--- trunk/dports/lang/eero-devel/files/patch-Makefile_llvm_config.diff	                        (rev 0)
+++ trunk/dports/lang/eero-devel/files/patch-Makefile_llvm_config.diff	2012-07-24 11:51:17 UTC (rev 95835)
@@ -0,0 +1,11 @@
+--- Makefile.llvm.config.orig	2012-04-07 20:23:29.000000000 +0200
++++ Makefile.llvm.config	2012-04-07 20:23:40.000000000 +0200
+@@ -82,7 +82,7 @@
+ TARGET_OS=Darwin
+ 
+ # Target hardware architecture
+-ARCH=x86
++ARCH=x86_64
+ 
+ # Indicates, whether we're cross-compiling LLVM or not
+ LLVM_CROSS_COMPILING=0

Added: trunk/dports/lang/eero-devel/files/scan-build-PR-35006.patch
===================================================================
--- trunk/dports/lang/eero-devel/files/scan-build-PR-35006.patch	                        (rev 0)
+++ trunk/dports/lang/eero-devel/files/scan-build-PR-35006.patch	2012-07-24 11:51:17 UTC (rev 95835)
@@ -0,0 +1,11 @@
+--- a/tools/clang/tools/scan-build/scan-build.orig	2012-07-12 09:47:19.000000000 -0700
++++ b/tools/clang/tools/scan-build/scan-build	2012-07-12 09:49:15.000000000 -0700
+@@ -1399,6 +1399,8 @@ if (defined $OutputFormat) {
+       Diag "Analysis run complete.\n";
+       Diag "Viewing analysis results in '$HtmlDir' using scan-view.\n";
+       my $ScanView = Cwd::realpath("$RealBin/scan-view");
++      if (! -x $ScanView) { $ScanView = Cwd::realpath("$RealBin/bin/scan-view"); }
++      if (! -x $ScanView) { $ScanView = Cwd::realpath("$RealBin/../scan-view/scan-view"); }
+       if (! -x $ScanView) { $ScanView = "scan-view"; }
+       exec $ScanView, "$HtmlDir";
+     }

Added: trunk/dports/lang/eero-devel/files/tiger-shlib-clang.patch
===================================================================
--- trunk/dports/lang/eero-devel/files/tiger-shlib-clang.patch	                        (rev 0)
+++ trunk/dports/lang/eero-devel/files/tiger-shlib-clang.patch	2012-07-24 11:51:17 UTC (rev 95835)
@@ -0,0 +1,16 @@
+--- llvm-3.0.src.orig/tools/clang/tools/libclang/Makefile	2011-07-09 14:35:58.000000000 -0700
++++ llvm-3.0.src/tools/clang/tools/libclang/Makefile	2012-04-20 10:09:40.000000000 -0700
+@@ -38,9 +38,11 @@ ifeq ($(HOST_OS),Darwin)
+     # Extra options to override libtool defaults.
+     LLVMLibsOptions += -Wl,-dead_strip -Wl,-seg1addr,0xE0000000 
+ 
+-    # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
+     DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
+-    ifneq ($(DARWIN_VERS),8)
++    ifeq ($(DARWIN_VERS),8)
++       LLVMLibsOptions += -Wl,-install_name \
++                          -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"
++    else
+        LLVMLibsOptions += -Wl,-install_name \
+                           -Wl,"@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)"
+     endif

Added: trunk/dports/lang/eero-devel/files/tiger-shlib.patch
===================================================================
--- trunk/dports/lang/eero-devel/files/tiger-shlib.patch	                        (rev 0)
+++ trunk/dports/lang/eero-devel/files/tiger-shlib.patch	2012-07-24 11:51:17 UTC (rev 95835)
@@ -0,0 +1,55 @@
+diff -Naurp llvm-3.0.src.orig/runtime/libprofile/Makefile llvm-3.0.src/runtime/libprofile/Makefile
+--- llvm-3.0.src.orig/runtime/libprofile/Makefile	2011-07-19 16:33:42.000000000 -0700
++++ llvm-3.0.src/runtime/libprofile/Makefile	2012-04-20 10:01:33.000000000 -0700
+@@ -40,10 +40,12 @@ ifeq ($(HOST_OS),Darwin)
+                          -Wl,-dead_strip \
+                          -Wl,-seg1addr -Wl,0xE0000000 
+ 
+-    # Mac OS X 10.4 and earlier tools do not allow a second -install_name on
+-    # command line.
+     DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
+-    ifneq ($(DARWIN_VERS),8)
++    ifeq ($(DARWIN_VERS),8)
++       LLVMLibsOptions    := $(LLVMLibsOptions)  \
++                            -Wl,-dylib_install_name \
++                            -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"
++    else
+        LLVMLibsOptions    := $(LLVMLibsOptions)  \
+                             -Wl,-install_name \
+                             -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"
+diff -Naurp llvm-3.0.src.orig/tools/llvm-shlib/Makefile llvm-3.0.src/tools/llvm-shlib/Makefile
+--- llvm-3.0.src.orig/tools/llvm-shlib/Makefile	2011-10-03 17:30:34.000000000 -0700
++++ llvm-3.0.src/tools/llvm-shlib/Makefile	2012-04-20 10:03:56.000000000 -0700
+@@ -54,9 +54,12 @@ ifeq ($(HOST_OS),Darwin)
+                          -Wl,-dead_strip \
+                          -Wl,-seg1addr -Wl,0xE0000000 
+ 
+-    # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
+     DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
+-    ifneq ($(DARWIN_VERS),8)
++    ifeq ($(DARWIN_VERS),8)
++       LLVMLibsOptions    := $(LLVMLibsOptions)  \
++                            -Wl,-dylib_install_name \
++                            -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"
++    else
+        LLVMLibsOptions    := $(LLVMLibsOptions)  \
+                             -Wl,-install_name \
+                             -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"
+diff -Naurp llvm-3.0.src.orig/tools/lto/Makefile llvm-3.0.src/tools/lto/Makefile
+--- llvm-3.0.src.orig/tools/lto/Makefile	2011-03-28 17:01:39.000000000 -0700
++++ llvm-3.0.src/tools/lto/Makefile	2012-04-20 10:04:25.000000000 -0700
+@@ -49,9 +49,12 @@ ifeq ($(HOST_OS),Darwin)
+                          -Wl,-dead_strip \
+                          -Wl,-seg1addr -Wl,0xE0000000 
+ 
+-    # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
+     DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
+-    ifneq ($(DARWIN_VERS),8)
++    ifeq ($(DARWIN_VERS),8)
++       LLVMLibsOptions    := $(LLVMLibsOptions)  \
++                            -Wl,-dylib_install_name \
++                            -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"
++    else
+        LLVMLibsOptions    := $(LLVMLibsOptions)  \
+                             -Wl,-install_name \
+                             -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"

Added: trunk/dports/lang/eero-devel/files/tiger.patch
===================================================================
--- trunk/dports/lang/eero-devel/files/tiger.patch	                        (rev 0)
+++ trunk/dports/lang/eero-devel/files/tiger.patch	2012-07-24 11:51:17 UTC (rev 95835)
@@ -0,0 +1,32 @@
+diff --git a/lib/Support/Unix/Signals.inc b/lib/Support/Unix/Signals.inc
+index c9ec9fc..8cc4f41 100644
+--- a/lib/Support/Unix/Signals.inc
++++ b/lib/Support/Unix/Signals.inc
+@@ -267,6 +267,15 @@ void llvm::sys::PrintStackTraceOnErrorSignal() {
+   AddSignalHandler(PrintStackTrace, 0);
+ 
+ #if defined(__APPLE__)
++
++/* These aren't defined in the 10.4 SDK, so provide them here */
++#ifndef EXC_MASK_CRASH
++#define EXC_MASK_CRASH 0x400
++#endif
++#ifndef MACH_EXCEPTION_CODES
++#define MACH_EXCEPTION_CODES 0x80000000
++#endif
++
+   // Environment variable to disable any kind of crash dialog.
+   if (getenv("LLVM_DISABLE_CRASH_REPORT")) {
+     mach_port_t self = mach_task_self();
+
+--- a/tools/clang/tools/libclang/CIndex.cpp.orig	2012-04-01 22:38:40.000000000 -0700
++++ b/tools/clang/tools/libclang/CIndex.cpp	2012-04-01 22:39:17.000000000 -0700
+@@ -5754,7 +5754,7 @@ void SetSafetyThreadStackSize(unsigned V
+ 
+ void clang::setThreadBackgroundPriority() {
+   // FIXME: Move to llvm/Support and make it cross-platform.
+-#ifdef __APPLE__
++#if defined(__APPLE__) && defined(PRIO_DARWIN_THREAD) && defined(PRIO_DARWIN_BG)
+   setpriority(PRIO_DARWIN_THREAD, 0, PRIO_DARWIN_BG);
+ #endif
+ }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120724/7737fd5a/attachment-0001.html>


More information about the macports-changes mailing list