[25716] trunk/dports/lang
source_changes at macosforge.org
source_changes at macosforge.org
Tue May 29 06:06:50 PDT 2007
Revision: 25716
http://trac.macosforge.org/projects/macports/changeset/25716
Author: erickt at macports.org
Date: 2007-05-29 06:06:49 -0700 (Tue, 29 May 2007)
Log Message:
-----------
updating llvm to 2.0 and adding llvm-gcc4 version 2.0
Modified Paths:
--------------
trunk/dports/lang/llvm/Portfile
Added Paths:
-----------
trunk/dports/lang/llvm-gcc4/
trunk/dports/lang/llvm-gcc4/Portfile
Modified: trunk/dports/lang/llvm/Portfile
===================================================================
--- trunk/dports/lang/llvm/Portfile 2007-05-29 08:45:39 UTC (rev 25715)
+++ trunk/dports/lang/llvm/Portfile 2007-05-29 13:06:49 UTC (rev 25716)
@@ -2,110 +2,60 @@
PortSystem 1.0
-name llvm
-version 1.7
-categories lang
-platforms darwin
-maintainers nomaintainer at macports.org
-description llvm is a next generation compiler infrastructure
-long_description llvm brings tools to work on the llvm intermediate \
- language incl. a C and C++ frontend.
+name llvm
+version 2.0
+categories lang
+platforms darwin
+maintainers erickt at macports.org
+description llvm is a next generation compiler infrastructure
+long_description llvm brings tools to work on the llvm intermediate \
+ language incl. a C and C++ frontend.
-homepage http://llvm.org/
-master_sites http://llvm.org/releases/${version}/
+homepage http://llvm.org/
+master_sites http://llvm.org/releases/${version}/
-set dllvm llvm-${version}.tar.gz
-set dcfront cfrontend-${version}.source.tar.gz
-set dgccppc llvm-gcc4-${version}.powerpc-apple-darwin8.6.0.tar.gz
-set dgcci386 llvm-gcc4-${version}.i686-apple-darwin8.6.1.tar.gz
+checksums md5 6f88002301a25f31a492052695f6138e \
+ sha1 530382974a3d8ab2343e426af2085d08aa430f3b \
+ rmd160 72f0a5fb3921880786f4dc4263100d84188d0037
-distfiles ${dllvm} ${dcfront}
+depends_build bin:flex:flex \
+ bin:bison:bison
-checksums ${dllvm} sha1 16aeb0ceb611d44be7aa2f0d88b8758f9f4d7c2f \
- ${dcfront} sha1 778d96bbdf279c0758b5c8ea462f8dabb18ca32e \
- ${dgccppc} sha1 91ecdbe7322da3ced5e99ad8441b3afb5bc2c596 \
- ${dgcci386} sha1 b24fc165f2ff0f9df5d6092275162b6d811c2687
+worksrcdir build
-platform powerpc {
- distfiles-append ${dgccppc}
+pre-configure {
+ file mkdir ${workpath}/build
}
-# i386 is untested, though this is "just" the bootstrap compiler
-platform i386 {
- distfiles-append ${dgcci386}
-}
+configure.cmd ../llvm-${version}/configure
-post-extract {
- system "cd ${workpath} && ln -s llvm-gcc* llvm-gcc"
- system "cd ${workpath}/llvm-gcc/bin && ln -s gcc llvm-gcc"
- system "cd ${workpath}/llvm-gcc/bin && ln -s g++ llvm-g++"
- system "cd ${workpath}/cfrontend && mkdir build install"
-}
-
-set llvmprefix ${prefix}/lib/llvm
-set tmpdir ${workpath}/tmpdir
-
-configure.pre_args --prefix=${llvmprefix}
-configure.args --with-llvmgccdir=${workpath}/llvm-gcc/
-
-worksrcdir llvm
-
build {
- # build llvm
- system "cd ${worksrcpath} && make all"
-
- # configure, build && install gcc frontend
- system "cd ${workpath}/cfrontend/build \
- && CFEINSTALL=${workpath}/cfrontend/install \
- ../src/configure --prefix=${llvmprefix} --disable-threads \
- --disable-nls --disable-shared --enable-languages=c,c++ \
- --program-prefix=llvm-"
- system "cd ${workpath}/cfrontend/build && make all"
- system "mkdir -p ${tmpdir}"
- system "cd ${workpath}/cfrontend/build && make install DESTDIR=${tmpdir}"
-
- # back to llvm backend
- system "cd ${worksrcpath} && ./configure --prefix=${llvmprefix} \
- --with-llvmgccdir=${tmpdir}${llvmprefix}"
- system "cd ${worksrcpath} && make all"
+ cd ${workpath}/build
+ system "make tools-only ENABLE_OPTIMIZED=1"
}
-set ranlib ${worksrcpath}/Release/bin/llvm-ranlib
-destroot {
- # install llvm
- system "cd ${worksrcpath} \
- && make -C runtime install-bytecode DESTDIR=${destroot}"
+destroot.destdir PROJ_prefix=${destroot}${prefix} \
+ PROJ_bindir=${destroot}${prefix}/bin \
+ PROJ_libdir=${destroot}${prefix}/lib \
+ PROJ_datadir=${destroot}${prefix}/share/llvm \
+ PROJ_docsdir=${destroot}${prefix}/share/llvm/docs \
+ PROJ_etcdir=${destroot}${prefix}/etc/llvm \
+ PROJ_includedir=${destroot}${prefix}/include \
+ PROJ_infodir=${destroot}${prefix}/share/info \
+ PROJ_mandir=${destroot}${prefix}/share/man
- # install llvm
- xinstall -m 755 -d ${destroot}${llvmprefix}/bin ${destroot}${llvmprefix}/lib
- system "cd ${worksrcpath}/Release/bin \
- && cp * ${destroot}${llvmprefix}/bin"
- system "cd ${worksrcpath}/Release/lib \
- && cp * ${destroot}${llvmprefix}/lib"
+post-destroot {
+ file mkdir ${destroot}${prefix}/lib/llvm
+ file mkdir ${destroot}${prefix}/lib/llvm/src
+ file mkdir ${destroot}${prefix}/lib/llvm/obj
- # install cfrontend
- system "cd ${workpath}/cfrontend/build && make install DESTDIR=${destroot}"
+ file copy ${workpath}/llvm-${version}/include ${destroot}${prefix}/lib/llvm/src
+ file copy ${workpath}/build/include ${destroot}${prefix}/lib/llvm/obj
+ file copy ${workpath}/build/Release ${destroot}${prefix}/lib/llvm/obj
- # ranlib all libs
- system "find ${destroot}${llvmprefix} -name \\.a -exec ${ranlib} \{\} \\;"
+ reinplace "s|${workpath}/build/\.\./llvm-${version}|${prefix}/lib/llvm/src|g" ${destroot}${prefix}/bin/llvm-config
+ reinplace "s|${workpath}/build|${prefix}/lib/llvm/obj|g" ${destroot}${prefix}/bin/llvm-config
- # symlink tools into place
- foreach bin {ar as bcanalyzer c++ cpp db dis extract g++ gcc gccbug gcov ld link nm prof ranlib stub} {
- system "cd ${destroot}${prefix}/bin \
- && ln -s ../lib/llvm/bin/llvm-${bin} llvm-${bin}"
- }
- foreach bin {llc lli analyze bugpoint burg fpcmp llvmc gccas gccld} {
- system "cd ${destroot}${prefix}/bin \
- && ln -s ../lib/llvm/bin/${bin} ${bin}"
- }
+ reinplace "s|${workpath}/build/\.\./llvm-${version}|${prefix}/lib/llvm/src|g" ${destroot}${prefix}/lib/llvm/obj/Release/bin/llvm-config
+ reinplace "s|${workpath}/build|${prefix}/lib/llvm/obj|g" ${destroot}${prefix}/lib/llvm/obj/Release/bin/llvm-config
}
-
-post-destroot {
- # put manpages into place
- system "cd ${destroot}${llvmprefix}/man/man1 \
- && mv llvm-g++.1 llvm-gcc.1 ${destroot}${prefix}/share/man/man1/"
-
- # delete superflous manpages, info files
- system "rm -rf ${destroot}${llvmprefix}/man"
- system "rm -rf ${destroot}${llvmprefix}/info"
-}
Added: trunk/dports/lang/llvm-gcc4/Portfile
===================================================================
--- trunk/dports/lang/llvm-gcc4/Portfile (rev 0)
+++ trunk/dports/lang/llvm-gcc4/Portfile 2007-05-29 13:06:49 UTC (rev 25716)
@@ -0,0 +1,77 @@
+PortSystem 1.0
+
+name llvm-gcc4
+version 2.0
+categories lang
+platforms darwin
+maintainers erickt at macports.org
+description llvm is a next generation compiler infrastructure
+long_description llvm brings tools to work on the llvm intermediate \
+ language incl. a C and C++ frontend.
+
+homepage http://llvm.org/
+master_sites http://llvm.org/releases/${version}/
+
+distname ${name}-${version}.source
+checksums md5 648b6e1e73d770bbef2712b16a993548 \
+ sha1 4731bd86094fae2799bfd7f2760a4a3b05e14e43 \
+ rmd160 05eafd609990684a999f332bff782627cbe5cb50
+
+depends_lib port:llvm
+
+worksrcdir build
+
+pre-configure {
+ file mkdir ${workpath}/build
+}
+
+configure.cmd ../llvm-gcc4-${version}.source/configure
+
+configure.args-append --enable-llvm=${prefix}/lib/llvm/obj \
+ --enable-languages=c,c++,objc,obj-c++ \
+ --libdir=${prefix}/lib/${name} \
+ --libexecdir=${prefix}/libexec/${name} \
+ --includedir=${prefix}/include/${name} \
+ --infodir=${prefix}/share/info \
+ --mandir=${prefix}/share/man \
+ --with-local-prefix=${prefix} \
+ --program-prefix=llvm- \
+ --disable-nls
+
+destroot.destdir prefix=${destroot}${prefix} \
+ libdir=${destroot}${prefix}/lib/${name} \
+ libexecdir=${destroot}${prefix}/libexec/${name} \
+ includedir=${destroot}${prefix}/include/${name} \
+ infodir=${destroot}${prefix}/share/info \
+ mandir=${destroot}${prefix}/share/man
+
+post-destroot {
+ cd ${destroot}${prefix}
+ file delete -force share/man/man7
+ file delete -force share/info
+ file delete -force bin/gccld
+ file delete -force bin/gccas
+}
+
+variant darwin {
+ post-extract {
+ system "rm -rf ${workpath}/llvm-gcc4-${version}.source/libstdc++-v3"
+ }
+
+ configure.args-append --with-gxx-include-dir=/usr/include/c++/4.0.0
+}
+
+variant powerpc {
+ set triple powerpc-apple-darwin8
+
+ configure.env-append TRIPLE=${triple}
+ configure.post_args --build=${triple} --host=${triple} --target=${triple}
+}
+
+variant x86 {
+ set triple i686-apple-darwin8
+
+ configure.env-append TRIPLE=${triple} \
+ TARGETOPTIONS="--with-arch=nocona --with-tune=generic"
+ configure.post_args --build=${triple} --host=${triple} --target=${triple}
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070529/b4e19a90/attachment.html
More information about the macports-changes
mailing list