[122798] trunk/dports/lang
jeremyhu at macports.org
jeremyhu at macports.org
Tue Jul 29 23:09:13 PDT 2014
Revision: 122798
https://trac.macports.org/changeset/122798
Author: jeremyhu at macports.org
Date: 2014-07-29 23:09:13 -0700 (Tue, 29 Jul 2014)
Log Message:
-----------
{clang,llvm}-3.6: New port
Added Paths:
-----------
trunk/dports/lang/llvm-3.6/
trunk/dports/lang/llvm-3.6/Portfile
trunk/dports/lang/llvm-3.6/files/
trunk/dports/lang/llvm-3.6/files/0001-Comment-out-SL-cctools-workaround.patch
trunk/dports/lang/llvm-3.6/files/clang-format.patch
trunk/dports/lang/llvm-3.6/files/clang-modernize.patch
trunk/dports/lang/llvm-3.6/files/install_target.patch
trunk/dports/lang/llvm-3.6/files/leopard-no-asan.patch
trunk/dports/lang/llvm-3.6/files/llvm-bin
trunk/dports/lang/llvm-3.6/files/mp-clang-3.6
trunk/dports/lang/llvm-3.6/files/mp-llvm-3.6
trunk/dports/lang/llvm-3.6/files/scan-build-PR-35006.patch
trunk/dports/lang/llvm-3.6/files/snowleopard-cmath.patch
trunk/dports/lang/llvm-3.6/files/tiger-libclang.patch
trunk/dports/lang/llvm-3.6/files/yosemite-deployment-target.patch
Added: trunk/dports/lang/llvm-3.6/Portfile
===================================================================
--- trunk/dports/lang/llvm-3.6/Portfile (rev 0)
+++ trunk/dports/lang/llvm-3.6/Portfile 2014-07-30 06:09:13 UTC (rev 122798)
@@ -0,0 +1,383 @@
+# $Id$
+
+PortSystem 1.0
+PortGroup select 1.0
+PortGroup compiler_blacklist_versions 1.0
+
+set llvm_version 3.6
+set llvm_version_no_dot 36
+name llvm-${llvm_version}
+subport clang-${llvm_version} { }
+set suffix mp-${llvm_version}
+set sub_prefix ${prefix}/libexec/llvm-${llvm_version}
+dist_subdir llvm
+categories lang
+platforms darwin
+license NCSA
+maintainers jeremyhu
+
+if {${subport} == "llvm-${llvm_version}"} {
+ homepage http://llvm.org/
+ description llvm is a next generation compiler infrastructure
+ long_description The LLVM Core libraries provide a modern source- and \
+ target-independent optimizer, along with code \
+ generation support for many popular CPUs (as well as \
+ some less common ones!) These libraries are built \
+ around a well specified code representation known as \
+ the LLVM intermediate representation ("LLVM IR").
+
+ depends_lib port:libffi
+ depends_run bin:perl:perl5 port:llvm_select
+} elseif {${subport} == "clang-${llvm_version}"} {
+ homepage http://clang.llvm.org/
+ description C, C++, Objective C and Objective C++ compiler
+ long_description Clang is an "LLVM native" C/C++/Objective-C compiler, \
+ which aims to deliver amazingly fast compiles (e.g. \
+ about 3x faster than GCC when compiling Objective-C \
+ code in a debug configuration), extremely useful error \
+ and warning messages and to provide a platform for \
+ building great source level tools. The included Clang \
+ Static Analyzer is a tool that automatically finds bugs in \
+ your code, and is a great example of the sort of tool \
+ that can be built using the Clang frontend as a \
+ library to parse C/C++ code.
+
+ depends_lib port:llvm-${llvm_version} port:libffi port:python27
+ depends_run port:clang_select port:ld64
+ depends_extract bin:svn:subversion
+ depends_build port:cctools
+ depends_skip_archcheck-append cctools ld64 subversion
+
+ default_variants +analyzer
+}
+
+fetch.type svn
+svn.revision 214285
+
+set compiler_rt_rev ${svn.revision}
+set libcxx_rev ${svn.revision}
+set clang-modernize_rev ${svn.revision}
+version ${llvm_version}-r${svn.revision}
+worksrcdir trunk
+svn.url http://llvm.org/svn/llvm-project/llvm/trunk
+#worksrcdir release_${llvm_version_no_dot}
+#svn.url http://llvm.org/svn/llvm-project/llvm/branches/release_${llvm_version_no_dot}
+default_variants-append +assertions
+
+#version ${llvm_version}
+#epoch 1
+#master_sites http://llvm.org/releases/${version}
+#extract.suffix .tar.gz
+#distfiles llvm-${version}.src${extract.suffix}
+#worksrcdir llvm-${version}
+
+if {${distfiles} != ""} {
+ if {${subport} == "llvm-${llvm_version}"} {
+ if {[variant_isset polly]} {
+ distfiles-append polly-${version}.src${extract.suffix}
+ }
+ } elseif {${subport} == "clang-${llvm_version}"} {
+ distfiles-append clang-${version}.src${extract.suffix} compiler-rt-${version}.src${extract.suffix} libcxx-${version}.src${extract.suffix} clang-tools-extra-${version}.src${extract.suffix}
+ }
+}
+
+patchfiles install_target.patch
+
+patch.pre_args -p1
+
+if {${subport} == "clang-${llvm_version}"} {
+ patchfiles-append scan-build-PR-35006.patch \
+ 0001-Comment-out-SL-cctools-workaround.patch \
+ clang-format.patch \
+ clang-modernize.patch \
+ yosemite-deployment-target.patch \
+ snowleopard-cmath.patch
+
+ build.target clang-only
+ destroot.target install-clang
+}
+
+build.env-append VERBOSE=1 \
+ REQUIRES_RTTI=1
+destroot.env-append VERBOSE=1 \
+ REQUIRES_RTTI=1
+configure.pre_args-delete --prefix=${prefix}
+configure.args --enable-bindings=none --enable-libffi --enable-shared --enable-jit \
+ --enable-optimized --disable-profiling --enable-pic \
+ --enable-debug-symbols --disable-debug-runtime \
+ --prefix="${sub_prefix}"
+
+if {${subport} == "llvm-${llvm_version}"} {
+ select.group llvm
+ select.file ${filespath}/mp-${subport}
+} elseif {${subport} == "clang-${llvm_version}"} {
+ select.group clang
+ select.file ${filespath}/mp-${subport}
+
+ configure.args-append --with-python=${prefix}/bin/python2.7
+}
+
+# llvm-3.5 and later requires a C++11 runtime
+# XCode 4.3's clang (318.x) fails per https://trac.macports.org/ticket/44161
+compiler.blacklist *gcc* {clang < 421}
+
+platform darwin {
+ # Note that we are forcing this choice. This means that anything linking
+ # against llvm-3.5 needs to also be using libc++. This is possibly
+ # problematic, but luckily there is just a limited set of such dependents.
+
+ configure.cxx_stdlib libc++
+ depends_lib-append port:libcxx
+
+ pre-fetch {
+ if {![file exists /usr/lib/libc++.dylib]} {
+ ui_error "$name requires a C++11 runtime, which your configuration does not allow"
+ error "unsupported configuration"
+ }
+ }
+}
+
+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" ||
+ ${configure.compiler} == "llvm-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 {${build_arch} eq "i386"} {
+ configure.pre_args-append --build=i686-apple-darwin${os.major}
+ } elseif {${build_arch} eq "ppc"} {
+ configure.pre_args-append --build=powerpc-apple-darwin${os.major}
+ } elseif {${build_arch} eq "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
+ configure.optflags -Os
+ }
+
+ if {${subport} == "clang-${llvm_version}" && ${os.major} <= 9} {
+ patchfiles-append leopard-no-asan.patch
+ }
+
+ # TODO: The llvm build system sets a 10.1 deployment target on Yosemite
+ if {[vercmp ${macosx_deployment_target} 10.10] >= 0} {
+ macosx_deployment_target 10.9
+ }
+
+ if {${os.major} < 10} {
+ post-patch {
+ reinplace "/TARGETS_TO_BUILD=/s/R600//" ${worksrcpath}/configure
+ }
+ }
+
+ if {${os.major} < 9} {
+ # Tiger's DevTools make has issues with the nested ifs in compiler-rt
+ depends_run-append port:gmake
+ build.cmd ${prefix}/bin/gmake
+
+ post-configure {
+ reinplace "/^RPATH/s/=.*/=/" ${worksrcpath}/Makefile.config
+ }
+ }
+}
+
+post-extract {
+ if {${subport} == "llvm-${llvm_version}"} {
+ if {[variant_isset polly]} {
+ if {${worksrcdir} == "trunk"} {
+ system "cd ${worksrcpath}/tools && svn co -r ${svn.revision} http://llvm.org/svn/llvm-project/polly/trunk polly"
+ } elseif {${worksrcdir} == "release_${llvm_version_no_dot}" } {
+ system "cd ${worksrcpath}/tools && svn co -r ${svn.revision} http://llvm.org/svn/llvm-project/polly/branches/release_${llvm_version_no_dot} polly"
+ } else {
+ file rename ${workpath}/polly-${llvm_version} ${worksrcpath}/tools/polly
+ }
+ }
+ } elseif {${subport} == "clang-${llvm_version}"} {
+ if {${worksrcdir} == "trunk"} {
+ system "cd ${worksrcpath}/tools && svn co -r ${svn.revision} http://llvm.org/svn/llvm-project/cfe/trunk clang"
+ system "cd ${worksrcpath}/projects && svn co -r ${compiler_rt_rev} http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt"
+ system "cd ${worksrcpath}/projects && svn co -r ${libcxx_rev} http://llvm.org/svn/llvm-project/libcxx/trunk libcxx"
+ system "cd ${worksrcpath}/tools/clang/tools && svn co -r ${clang-modernize_rev} http://llvm.org/svn/llvm-project/clang-tools-extra/trunk extra"
+ } elseif {${worksrcdir} == "release_${llvm_version_no_dot}" } {
+ system "cd ${worksrcpath}/tools && svn co -r ${svn.revision} http://llvm.org/svn/llvm-project/cfe/branches/release_${llvm_version_no_dot} clang"
+ system "cd ${worksrcpath}/projects && svn co -r ${compiler_rt_rev} http://llvm.org/svn/llvm-project/compiler-rt/branches/release_${llvm_version_no_dot} compiler-rt"
+ system "cd ${worksrcpath}/projects && svn co -r ${libcxx_rev} http://llvm.org/svn/llvm-project/libcxx/branches/release_${llvm_version_no_dot} libcxx"
+ system "cd ${worksrcpath}/tools/clang/tools && svn co -r ${clang-modernize_rev} http://llvm.org/svn/llvm-project/clang-tools-extra/branches/release_${llvm_version_no_dot} extra"
+ } else {
+ file rename ${workpath}/clang-${llvm_version} ${worksrcpath}/tools/clang
+ file rename ${workpath}/compiler-rt-${llvm_version} ${worksrcpath}/projects/compiler-rt
+ file rename ${workpath}/libcxx-${llvm_version} ${worksrcpath}/projects/libcxx
+ file rename ${workpath}/clang-tools-extra-${llvm_version} ${worksrcpath}/tools/clang/tools/extra
+ }
+ }
+}
+
+post-patch {
+ if {${subport} == "clang-${llvm_version}"} {
+ # http://trac.macports.org/ticket/33272
+ if {![variant_isset arm_runtime]} {
+ reinplace {/^SubDirs/ s/arm//} ${worksrcpath}/projects/compiler-rt/lib/Makefile.mk
+ reinplace {/^UniversalArchs/ s/arm[^ )]* *//g} ${worksrcpath}/projects/compiler-rt/make/platform/clang_darwin.mk
+
+ reinplace {/cc_kext_ios5/ s/^/#/} ${worksrcpath}/projects/compiler-rt/make/platform/clang_darwin.mk
+ reinplace {s/cc_kext_ios5.a//} ${worksrcpath}/tools/clang/runtime/compiler-rt/Makefile
+ }
+
+ reinplace {s/VERBOSE := 0/VERBOSE := 1/} ${worksrcpath}/projects/compiler-rt/make/config.mk
+
+ reinplace "s|@@PREFIX@@|${prefix}|g" \
+ ${worksrcpath}/projects/compiler-rt/make/platform/clang_darwin.mk \
+ ${worksrcpath}/projects/compiler-rt/make/platform/clang_macho_embedded.mk
+ }
+}
+
+post-destroot {
+ file mkdir ${destroot}${prefix}/share/doc
+ file rename ${destroot}${sub_prefix}/docs/llvm ${destroot}${prefix}/share/doc/${subport}
+
+ foreach bin [glob ${destroot}${sub_prefix}/bin/*] {
+ set bin_filename [string map "${sub_prefix} ${prefix}" ${bin}]-${suffix}
+ 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}"
+ }
+
+ if {${subport} == "llvm-${llvm_version}"} {
+ # r156389 (a5d2435409858728970202226d0bbbee508fe408) temporarilary removed llvm man pages
+ #foreach man [glob ${destroot}${sub_prefix}/share/man/man1/*.1] {
+ # set basename [string map "${destroot}${sub_prefix}/share/man/man1/ {}" ${man}]
+ # file rename ${man} ${destroot}${prefix}/share/man/man1/[string map ".1 -${suffix}.1" ${basename}]
+ #}
+
+ foreach liba [glob ${destroot}${sub_prefix}/lib/*dylib] {
+ set liba_nodr [string map "${destroot} {}" ${liba}]
+ system "install_name_tool -id ${liba_nodr} ${liba}"
+
+ foreach libb [glob ${destroot}${sub_prefix}/lib/*dylib] {
+ set libb_base [string map "${destroot}${sub_prefix}/lib/ {}" ${libb}]
+ set libb_nodr [string map "${destroot} {}" ${libb}]
+
+ system "install_name_tool -change @executable_path/../lib/${libb_base} ${libb_nodr} ${liba}"
+ system "install_name_tool -change @rpath/${libb_base} ${libb_nodr} ${liba}"
+ }
+ }
+ } elseif {${subport} == "clang-${llvm_version}"} {
+ system "ditto ${worksrcpath}/projects/libcxx/include ${destroot}${sub_prefix}/lib/c++/v1"
+
+ # http://trac.macports.org/ticket/33207
+ 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 -change @executable_path/../lib/libLLVM-${llvm_version}svn.dylib ${sub_prefix}/lib/libLLVM-${llvm_version}svn.dylib ${destroot}${sub_prefix}/lib/libclang.dylib"
+ system "install_name_tool -change @executable_path/../lib/libLLVM-${llvm_version}.dylib ${sub_prefix}/lib/libLLVM-${llvm_version}.dylib ${destroot}${sub_prefix}/lib/libclang.dylib"
+ system "install_name_tool -change @rpath/libLLVM-${llvm_version}svn.dylib ${sub_prefix}/lib/libLLVM-${llvm_version}svn.dylib ${destroot}${sub_prefix}/lib/libclang.dylib"
+ system "install_name_tool -change @rpath/libLLVM-${llvm_version}.dylib ${sub_prefix}/lib/libLLVM-${llvm_version}.dylib ${destroot}${sub_prefix}/lib/libclang.dylib"
+
+ if {${os.major} > 9} {
+ # http://trac.macports.org/ticket/38527
+ system "install_name_tool -id ${sub_prefix}/lib/clang/${llvm_version}.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib ${destroot}${sub_prefix}/lib/clang/${llvm_version}.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib"
+ }
+ }
+}
+
+if {${subport} == "llvm-${llvm_version}"} {
+ variant polly description {Provide the polly polyhedral optimizer} {
+ depends_lib-append port:isl-devel port:gmp port:cloog-devel
+ }
+
+ variant ocaml description {Enable generation of OCaml binding} {
+ depends_lib-append port:ocaml
+
+ configure.args-delete --enable-bindings=none
+ configure.args-append --enable-bindings=ocaml
+
+ destroot.args-append OVERRIDE_libdir=${sub_prefix}/lib
+ }
+} elseif {${subport} == "clang-${llvm_version}"} {
+ variant arm_runtime description {Build and install the arm runtime for iOS development (requires iOS SDK)} {}
+
+ # The iOS SDK was shipped with all Xcode releases after 4.0
+ if {[info exists xcodeversion] && [vercmp "4.0" ${xcodeversion}] <= 0} {
+ default_variants-append +arm_runtime
+ }
+
+ variant analyzer description {Install clang static analyzer} {
+ depends_run-append 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/scan-build-${suffix}"
+ reinplace "s:EXEC_PATH:${sub_prefix}/bin/scan-build:" "${destroot}${prefix}/bin/scan-build-${suffix}"
+
+ xinstall -m 755 "${filespath}/llvm-bin" "${destroot}${prefix}/bin/scan-view-${suffix}"
+ reinplace "s:EXEC_PATH:${sub_prefix}/bin/scan-view:" "${destroot}${prefix}/bin/scan-view-${suffix}"
+ }
+ }
+
+
+ post-patch {
+ reinplace "s|@CLANG_FORMAT_PATH@|${prefix}/bin/clang-format-${suffix}|g" \
+ ${worksrcpath}/tools/clang/tools/clang-format/clang-format-bbedit.applescript \
+ ${worksrcpath}/tools/clang/tools/clang-format/clang-format-diff.py \
+ ${worksrcpath}/tools/clang/tools/clang-format/clang-format-sublime.py \
+ ${worksrcpath}/tools/clang/tools/clang-format/clang-format.el \
+ ${worksrcpath}/tools/clang/tools/clang-format/clang-format.py
+ }
+
+ post-destroot {
+ file mkdir ${destroot}${sub_prefix}/libexec
+ file copy ${worksrcpath}/tools/clang/tools/clang-format ${destroot}${sub_prefix}/libexec/clang-format
+
+ file delete -force ${destroot}${sub_prefix}/libexec/clang-format/.svn
+ file delete -force ${destroot}${sub_prefix}/libexec/clang-format/Makefile
+ file delete -force ${destroot}${sub_prefix}/libexec/clang-format/Release+Debug+Asserts
+ file delete -force ${destroot}${sub_prefix}/libexec/clang-format/CMakeLists.txt
+ file delete -force ${destroot}${sub_prefix}/libexec/clang-format/ClangFormat.cpp
+ }
+}
+
+livecheck.type none
Property changes on: trunk/dports/lang/llvm-3.6/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/lang/llvm-3.6/files/0001-Comment-out-SL-cctools-workaround.patch
===================================================================
--- trunk/dports/lang/llvm-3.6/files/0001-Comment-out-SL-cctools-workaround.patch (rev 0)
+++ trunk/dports/lang/llvm-3.6/files/0001-Comment-out-SL-cctools-workaround.patch 2014-07-30 06:09:13 UTC (rev 122798)
@@ -0,0 +1,57 @@
+--- a/projects/compiler-rt/make/platform/clang_darwin.mk
++++ a/projects/compiler-rt/make/platform/clang_darwin.mk
+@@ -47,11 +47,11 @@ XCRunSdkPath = \
+
+ CC := $(call XCRun,clang)
+ LD := $(shell $(CC) -print-prog-name=ld)
+-AR := $(call XCRun,ar)
+-RANLIB := $(call XCRun,ranlib)
+-STRIP := $(call XCRun,strip)
+-LIPO := $(call XCRun,lipo)
+-DSYMUTIL := $(call XCRun,dsymutil)
++AR := @@PREFIX@@/bin/ar
++RANLIB := @@PREFIX@@/bin/ranlib
++STRIP := @@PREFIX@@/bin/strip
++LIPO := @@PREFIX@@/bin/lipo
++DSYMUTIL := @@PREFIX@@/bin/dsymutil
+
+ Configs :=
+ UniversalArchs :=
+@@ -83,12 +83,12 @@ UniversalArchs.ubsan_osx := $(call Check
+ # object files. If we are on that platform, strip out all ARM archs. We still
+ # build the libraries themselves so that Clang can find them where it expects
+ # them, even though they might not have an expected slice.
+-ifneq ($(shell test -x /usr/bin/sw_vers && sw_vers -productVersion | grep 10.6),)
+-UniversalArchs.ios := $(filter-out armv7, $(UniversalArchs.ios))
+-UniversalArchs.cc_kext := $(filter-out armv7, $(UniversalArchs.cc_kext))
+-UniversalArchs.cc_kext_ios5 := $(filter-out armv7, $(UniversalArchs.cc_kext_ios5))
+-UniversalArchs.profile_ios := $(filter-out armv7, $(UniversalArchs.profile_ios))
+-endif
++#ifneq ($(shell test -x /usr/bin/sw_vers && sw_vers -productVersion | grep 10.6),)
++#UniversalArchs.ios := $(filter-out armv7, $(UniversalArchs.ios))
++#UniversalArchs.cc_kext := $(filter-out armv7, $(UniversalArchs.cc_kext))
++#UniversalArchs.cc_kext_ios5 := $(filter-out armv7, $(UniversalArchs.cc_kext_ios5))
++#UniversalArchs.profile_ios := $(filter-out armv7, $(UniversalArchs.profile_ios))
++#endif
+
+ # If RC_SUPPORTED_ARCHS is defined, treat it as a list of the architectures we
+ # are intended to support and limit what we try to build to that.
+--- a/projects/compiler-rt/make/platform/clang_macho_embedded.mk 2014-03-03 10:11:37.000000000 -0800
++++ a/projects/compiler-rt/make/platform/clang_macho_embedded.mk 2014-03-03 12:08:37.000000000 -0800
+@@ -33,11 +33,11 @@ XCRun = \
+ ###
+
+ CC := $(call XCRun,clang)
+-AR := $(call XCRun,ar)
+-RANLIB := $(call XCRun,ranlib)
+-STRIP := $(call XCRun,strip)
+-LIPO := $(call XCRun,lipo)
+-DSYMUTIL := $(call XCRun,dsymutil)
++AR := @@PREFIX@@/bin/ar
++RANLIB := @@PREFIX@@/bin/ranlib
++STRIP := @@PREFIX@@/bin/strip
++LIPO := @@PREFIX@@/bin/lipo
++DSYMUTIL := @@PREFIX@@/bin/dsymutil
+
+ Configs :=
+ UniversalArchs :=
Added: trunk/dports/lang/llvm-3.6/files/clang-format.patch
===================================================================
--- trunk/dports/lang/llvm-3.6/files/clang-format.patch (rev 0)
+++ trunk/dports/lang/llvm-3.6/files/clang-format.patch 2014-07-30 06:09:13 UTC (rev 122798)
@@ -0,0 +1,70 @@
+--- a/tools/clang/tools/clang-format/clang-format-bbedit.applescript 2011-07-09 14:35:58.000000000 -0700
++++ b/tools/clang/tools/clang-format/clang-format-bbedit.applescript 2012-04-20 10:09:40.000000000 -0700
+@@ -15,7 +15,7 @@ ifeq ($(HOST_OS),Darwin)
+ end tell
+
+ set filePath to urlToPOSIXPath(fileURL)
+-set newContents to do shell script "/path/to/clang-format -offset=" & selectionOffset & " -length=" & selectionLength & " " & quoted form of filePath
++set newContents to do shell script "@CLANG_FORMAT_PATH@ -offset=" & selectionOffset & " -length=" & selectionLength & " " & quoted form of filePath
+
+ tell application "BBEdit"
+ -- "set contents of text document 1 to newContents" scrolls to the bottom while
+--- a/tools/clang/tools/clang-format/clang-format-diff.py 2011-07-09 14:35:58.000000000 -0700
++++ b/tools/clang/tools/clang-format/clang-format-diff.py 2012-04-20 10:09:40.000000000 -0700
+@@ -15,7 +15,7 @@ ifeq ($(HOST_OS),Darwin)
+
+
+ # Change this to the full path if clang-format is not on the path.
+-binary = 'clang-format'
++binary = '@CLANG_FORMAT_PATH@'
+
+
+ def main():
+
+--- a/tools/clang/tools/clang-format/clang-format.el 2011-07-09 14:35:58.000000000 -0700
++++ b/tools/clang/tools/clang-format/clang-format.el 2012-04-20 10:09:40.000000000 -0700
+@@ -13,7 +13,7 @@ ifeq ($(HOST_OS),Darwin)
+
+ ;; *Location of the clang-format binary. If it is on your PATH, a full path name
+ ;; need not be specified.
+-(defvar clang-format-binary "clang-format")
++(defvar clang-format-binary "@CLANG_FORMAT_PATH@")
+
+ (defun clang-format-region ()
+ "Use clang-format to format the currently active region."
+--- a/tools/clang/tools/clang-format/clang-format.py 2011-07-09 14:35:58.000000000 -0700
++++ b/tools/clang/tools/clang-format/clang-format.py 2012-04-20 10:09:40.000000000 -0700
+@@ -24,7 +24,7 @@ ifeq ($(HOST_OS),Darwin)
+ import vim
+
+ # Change this to the full path if clang-format is not on the path.
+-binary = 'clang-format'
++binary = '@CLANG_FORMAT_PATH@'
+
+ # Change this to format according to other formatting styles. See the output of
+ # 'clang-format --help' for a list of supported styles. The default looks for
+
+--- a/tools/clang/tools/clang-format/clang-format-sublime.py2011-07-09 14:35:58.000000000 -0700
++++ b/tools/clang/tools/clang-format/clang-format-sublime.py 2012-04-20 10:09:40.000000000 -0700
+@@ -18,7 +18,7 @@ ifeq ($(HOST_OS),Darwin)
+ import subprocess
+
+ # Change this to the full path if clang-format is not on the path.
+-binary = 'clang-format'
++binary = '@CLANG_FORMAT_PATH@'
+
+ # Change this to format according to other formatting styles. See the output of
+ # 'clang-format --help' for a list of supported styles. The default looks for
+--- a/Makefile 2013-10-02 08:42:23.000000000 -0700
++++ b/Makefile 2013-10-24 10:57:33.000000000 -0700
+@@ -70,8 +70,9 @@ 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/runtime tools/clang/docs \
+- tools/clang/include tools/clang/lib
++ tools/clang/include tools/clang/lib \
++ tools/clang/tools/clang-format
+ OPTIONAL_DIRS :=
+ NO_INSTALL = 1
+ endif
Added: trunk/dports/lang/llvm-3.6/files/clang-modernize.patch
===================================================================
--- trunk/dports/lang/llvm-3.6/files/clang-modernize.patch (rev 0)
+++ trunk/dports/lang/llvm-3.6/files/clang-modernize.patch 2014-07-30 06:09:13 UTC (rev 122798)
@@ -0,0 +1,13 @@
+--- a/Makefile 2014-05-29 08:40:41.000000000 -0500
++++ b/Makefile 2014-05-29 08:41:52.000000000 -0500
+@@ -72,7 +72,9 @@
+ tools/clang/tools/c-index-test \
+ tools/clang/runtime tools/clang/docs \
+ tools/clang/include tools/clang/lib \
+- tools/clang/tools/clang-format
++ tools/clang/tools/clang-format \
++ tools/clang/tools/extra/clang-modernize \
++ tools/clang/tools/extra/clang-apply-replacements
+ OPTIONAL_DIRS :=
+ NO_INSTALL = 1
+ endif
Added: trunk/dports/lang/llvm-3.6/files/install_target.patch
===================================================================
--- trunk/dports/lang/llvm-3.6/files/install_target.patch (rev 0)
+++ trunk/dports/lang/llvm-3.6/files/install_target.patch 2014-07-30 06:09:13 UTC (rev 122798)
@@ -0,0 +1,13 @@
+--- a/Makefile 2013-10-02 08:42:23.000000000 -0700
++++ b/Makefile 2013-10-24 10:57:33.000000000 -0700
+@@ -70,9 +70,8 @@ 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
++ tools/clang/include tools/clang/lib
+ OPTIONAL_DIRS :=
+ NO_INSTALL = 1
+ endif
Added: trunk/dports/lang/llvm-3.6/files/leopard-no-asan.patch
===================================================================
--- trunk/dports/lang/llvm-3.6/files/leopard-no-asan.patch (rev 0)
+++ trunk/dports/lang/llvm-3.6/files/leopard-no-asan.patch 2014-07-30 06:09:13 UTC (rev 122798)
@@ -0,0 +1,27 @@
+Index: llvm-3.3/projects/compiler-rt/make/platform/clang_darwin.mk
+===================================================================
+--- llvm-3.3/projects/compiler-rt/make/platform/clang_darwin.mk (revision 185755)
++++ llvm-3.3/projects/compiler-rt/make/platform/clang_darwin.mk (working copy)
+@@ -81,8 +81,8 @@ Configs += profile_ios
+ UniversalArchs.profile_ios := $(call CheckArches,i386 x86_64 armv7,profile_ios)
+
+ # Configurations which define the ASAN support functions.
+-Configs += asan_osx_dynamic
+-UniversalArchs.asan_osx_dynamic := $(call CheckArches,i386 x86_64,asan_osx_dynamic)
++#Configs += asan_osx_dynamic
++#UniversalArchs.asan_osx_dynamic := $(call CheckArches,i386 x86_64,asan_osx_dynamic)
+
+ Configs += ubsan_osx
+ UniversalArchs.ubsan_osx := $(call CheckArches,i386 x86_64,ubsan_osx)
+Index: llvm-3.3/tools/clang/runtime/compiler-rt/Makefile
+===================================================================
+--- llvm-3.4/tools/clang/runtime/compiler-rt/Makefile (revision 185755)
++++ llvm-3.4/tools/clang/runtime/compiler-rt/Makefile (working copy)
+@@ -77,7 +77,6 @@ ifeq ($(OS),Darwin)
+ RuntimeDirs += darwin
+ RuntimeLibrary.darwin.Configs := \
+ eprintf.a 10.4.a osx.a ios.a cc_kext.a cc_kext_ios5.a \
+- asan_osx_dynamic.dylib \
+ profile_osx.a profile_ios.a \
+ ubsan_osx.a
+ endif
Added: trunk/dports/lang/llvm-3.6/files/llvm-bin
===================================================================
--- trunk/dports/lang/llvm-3.6/files/llvm-bin (rev 0)
+++ trunk/dports/lang/llvm-3.6/files/llvm-bin 2014-07-30 06:09:13 UTC (rev 122798)
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec EXEC_PATH "${@}"
Property changes on: trunk/dports/lang/llvm-3.6/files/llvm-bin
___________________________________________________________________
Added: svn:executable
+ *
Added: trunk/dports/lang/llvm-3.6/files/mp-clang-3.6
===================================================================
--- trunk/dports/lang/llvm-3.6/files/mp-clang-3.6 (rev 0)
+++ trunk/dports/lang/llvm-3.6/files/mp-clang-3.6 2014-07-30 06:09:13 UTC (rev 122798)
@@ -0,0 +1,7 @@
+-
+bin/clang++-mp-3.6
+bin/clang-mp-3.6
+bin/clang-format-mp-3.6
+bin/clang-modernize-mp-3.6
+bin/scan-build-mp-3.6
+bin/scan-view-mp-3.6
Added: trunk/dports/lang/llvm-3.6/files/mp-llvm-3.6
===================================================================
--- trunk/dports/lang/llvm-3.6/files/mp-llvm-3.6 (rev 0)
+++ trunk/dports/lang/llvm-3.6/files/mp-llvm-3.6 2014-07-30 06:09:13 UTC (rev 122798)
@@ -0,0 +1,30 @@
+bin/bugpoint-mp-3.6
+bin/llc-mp-3.6
+bin/lli-mp-3.6
+bin/llvm-ar-mp-3.6
+bin/llvm-as-mp-3.6
+bin/llvm-bcanalyzer-mp-3.6
+bin/llvm-config-mp-3.6
+bin/llvm-cov-mp-3.6
+bin/llvm-diff-mp-3.6
+bin/llvm-dis-mp-3.6
+bin/llvm-dwarfdump-mp-3.6
+bin/llvm-extract-mp-3.6
+-
+bin/llvm-link-mp-3.6
+bin/llvm-mc-mp-3.6
+bin/llvm-mcmarkup-mp-3.6
+bin/llvm-nm-mp-3.6
+bin/llvm-objdump-mp-3.6
+-
+bin/llvm-ranlib-mp-3.6
+bin/llvm-rtdyld-mp-3.6
+bin/llvm-size-mp-3.6
+-
+bin/llvm-stress-mp-3.6
+bin/llvm-symbolizer-mp-3.6
+bin/llvm-tblgen-mp-3.6
+-
+bin/macho-dump-mp-3.6
+bin/opt-mp-3.6
+bin/llvm-tblgen-mp-3.6
Added: trunk/dports/lang/llvm-3.6/files/scan-build-PR-35006.patch
===================================================================
--- trunk/dports/lang/llvm-3.6/files/scan-build-PR-35006.patch (rev 0)
+++ trunk/dports/lang/llvm-3.6/files/scan-build-PR-35006.patch 2014-07-30 06:09:13 UTC (rev 122798)
@@ -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/llvm-3.6/files/snowleopard-cmath.patch
===================================================================
--- trunk/dports/lang/llvm-3.6/files/snowleopard-cmath.patch (rev 0)
+++ trunk/dports/lang/llvm-3.6/files/snowleopard-cmath.patch 2014-07-30 06:09:13 UTC (rev 122798)
@@ -0,0 +1,25 @@
+--- a/projects/libcxx/include/cmath 2013-08-29 16:50:48.000000000 -0700
++++ b/projects/libcxx/include/cmath 2014-04-13 19:01:12.000000000 -0700
+@@ -301,6 +301,22 @@ long double truncl(long double x);
+ #include <math.h>
+ #include <type_traits>
+
++#ifdef __APPLE__
++#include <Availability.h>
++#if __MAC_OS_X_VERSION_MAX_ALLOWED < 1070
++/* These prototypes are incorrectly omitted from <math.h> on Snow Leopard despite being available */
++extern "C" {
++ extern long long int llrintl(long double);
++ extern long long int llrint(double);
++ extern long long int llrintf(float);
++
++ extern long long int llroundl(long double);
++ extern long long int llround(double);
++ extern long long int llroundf(float);
++}
++#endif
++#endif // __APPLE__
++
+ #ifdef _LIBCPP_MSVCRT
+ #include "support/win32/math_win32.h"
+ #endif
Added: trunk/dports/lang/llvm-3.6/files/tiger-libclang.patch
===================================================================
Added: trunk/dports/lang/llvm-3.6/files/yosemite-deployment-target.patch
===================================================================
--- trunk/dports/lang/llvm-3.6/files/yosemite-deployment-target.patch (rev 0)
+++ trunk/dports/lang/llvm-3.6/files/yosemite-deployment-target.patch 2014-07-30 06:09:13 UTC (rev 122798)
@@ -0,0 +1,31 @@
+--- a/tools/clang/lib/Basic/Targets.cpp
++++ b/tools/clang/lib/Basic/Targets.cpp
+@@ -155,12 +155,22 @@ static void getDarwinDefines(MacroBuilde
+ // revision numbers). So, we limit them to the maximum representable
+ // version.
+ assert(Maj < 100 && Min < 100 && Rev < 100 && "Invalid version!");
+- char Str[5];
+- Str[0] = '0' + (Maj / 10);
+- Str[1] = '0' + (Maj % 10);
+- Str[2] = '0' + std::min(Min, 9U);
+- Str[3] = '0' + std::min(Rev, 9U);
+- Str[4] = '\0';
++ char Str[7];
++ if (Maj < 10 || Maj == 10 && Min < 10) {
++ Str[0] = '0' + (Maj / 10);
++ Str[1] = '0' + (Maj % 10);
++ Str[2] = '0' + std::min(Min, 9U);
++ Str[3] = '0' + std::min(Rev, 9U);
++ Str[4] = '\0';
++ } else {
++ Str[0] = '0' + (Maj / 10);
++ Str[1] = '0' + (Maj % 10);
++ Str[2] = '0' + (Min / 10);
++ Str[3] = '0' + (Min % 10);
++ Str[4] = '0' + (Rev / 10);
++ Str[5] = '0' + (Rev % 10);
++ Str[6] = '\0';
++ }
+ Builder.defineMacro("__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__", Str);
+ }
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140729/8a5b3f33/attachment-0001.html>
More information about the macports-changes
mailing list