[72570] trunk/dports/lang
mfeiri at macports.org
mfeiri at macports.org
Thu Oct 21 01:48:15 PDT 2010
Revision: 72570
http://trac.macports.org/changeset/72570
Author: mfeiri at macports.org
Date: 2010-10-21 01:48:09 -0700 (Thu, 21 Oct 2010)
Log Message:
-----------
lang/clang: new port
Added Paths:
-----------
trunk/dports/lang/clang/
trunk/dports/lang/clang/Portfile
Added: trunk/dports/lang/clang/Portfile
===================================================================
--- trunk/dports/lang/clang/Portfile (rev 0)
+++ trunk/dports/lang/clang/Portfile 2010-10-21 08:48:09 UTC (rev 72570)
@@ -0,0 +1,94 @@
+# $Id$
+
+PortSystem 1.0
+
+name clang
+version 2.8
+categories lang
+platforms darwin
+maintainers mfeiri
+license UIUC/NCSA
+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 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.
+
+homepage http://clang.llvm.org/
+master_sites http://llvm.org/releases/${version}/
+extract.suffix .tgz
+
+worksrcdir llvm-${version}
+distfiles-append llvm-${version}${extract.suffix}
+checksums ${distname}${extract.suffix} \
+ md5 10e14c901fc3728eecbd5b829e011b59 \
+ sha1 94977c84ce136307dbbeade95e67bfe3c25161ff \
+ rmd160 f00956b6de29cc09f3992aeabd140f2189c6cf39 \
+ llvm-${version}${extract.suffix} \
+ md5 220d361b4d17051ff4bb21c64abe05ba \
+ sha1 6d49fe039d28e8664de25491c775cb2c599e30c1 \
+ rmd160 3f5a71d07e105a7cf46eafc7a9006a927035012c
+
+depends_lib port:llvm port:libffi
+
+default_variants +analyzer
+universal_variant no
+build.env-append REQUIRE_RTTI=1
+
+build.target clang-only
+destroot.target install-clang-c
+configure.cppflags
+configure.ldflags
+configure.args --enable-optimized --enable-shared \
+ --enable-bindings=none --enable-libffi
+
+platform darwin {
+ if {${build_arch} == "i386" } {
+ configure.pre_args-append --build=i686-apple-darwin${os.major}
+ } else {
+ configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
+ }
+
+ depends_run-append port:ld64
+
+ # clang uses hardcoded paths to find ld, see lib/Driver/ToolChains.cpp
+ post-destroot {
+ file mkdir ${destroot}${prefix}/libexec/gcc/i686-apple-darwin${os.major}/4.2.1
+ ln -s ../../../../bin/ld ${destroot}${prefix}/libexec/gcc/i686-apple-darwin${os.major}/4.2.1/ld
+ }
+
+}
+
+post-extract {
+ file rename ${workpath}/${distname} ${worksrcpath}/tools/clang
+}
+
+variant analyzer description {Install clang static analyzer} {
+ depends_run-append bin:python:python26 bin:perl:perl5
+ post-destroot {
+ 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.6|g" \
+ ${worksrcpath}/tools/clang/tools/scan-build/set-xcode-analyzer \
+ ${worksrcpath}/tools/clang/tools/scan-view/scan-view
+
+ file rename ${worksrcpath}/tools/clang/tools/scan-build ${destroot}${prefix}/libexec/
+ file rename ${worksrcpath}/tools/clang/tools/scan-view ${destroot}${prefix}/libexec/
+
+ ln -s ${prefix}/libexec/scan-build/scan-build ${destroot}${prefix}/bin/scan-build
+ ln -s ${prefix}/libexec/scan-view/scan-view ${destroot}${prefix}/bin/scan-view
+ ln -s ${prefix}/bin ${destroot}${prefix}/libexec/scan-build/bin
+ }
+}
+
+livecheck.type regex
+livecheck.url http://llvm.org/releases/
+livecheck.regex {'(\d+\.\d+)'}
Property changes on: trunk/dports/lang/clang/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101021/a9b2928c/attachment.html>
More information about the macports-changes
mailing list