# $Id$ PortSystem 1.0 name llvm version 2.5 revision 0 categories lang platforms darwin use_parallel_build yes maintainers erickt openmaintainer 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 ${homepage}releases/${version}/ checksums md5 55df2ea8665c8094ad2ef85187b9fc74 \ sha1 67f4bace9e64cc39255583aa837470d9b9de0aa5 \ rmd160 2c904b8d0bcce565ed11114b921321a0404e23fe depends_build bin:flex:flex \ bin:bison:bison configure.dir ${workpath}/build build.dir ${configure.dir} destroot.dir ${configure.dir} post-extract { file mkdir ${configure.dir} } patchfiles patch-Makefile.config.in.diff \ patch-Makefile.ocaml.diff configure.cppflags configure.ldflags configure.cmd ${worksrcpath}/configure configure.args --enable-optimized --enable-jit post-destroot { file mkdir ${destroot}${prefix}/lib/llvm file mkdir ${destroot}${prefix}/lib/llvm/src file mkdir ${destroot}${prefix}/lib/llvm/obj file copy ${worksrcpath}/include ${destroot}${prefix}/lib/llvm/src file copy ${configure.dir}/include ${destroot}${prefix}/lib/llvm/obj file copy ${configure.dir}/Release ${destroot}${prefix}/lib/llvm/obj reinplace "s|${worksrcpath}|${prefix}/lib/llvm/src|g" ${destroot}${prefix}/bin/llvm-config \ ${destroot}${prefix}/lib/llvm/obj/Release/bin/llvm-config reinplace "s|${configure.dir}|${prefix}/lib/llvm/obj|g" ${destroot}${prefix}/bin/llvm-config \ ${destroot}${prefix}/lib/llvm/obj/Release/bin/llvm-config fs-traverse item ${destroot} { if {[file isfile ${item}] && ".dir" == [file tail ${item}]} { delete ${item} } } } variant ocaml description {Enable generation of OCaml binding} { depends_build-append port:ocaml depends_lib-append port:ocaml configure.args-delete --enable-bindings=none configure.args-append --enable-bindings=ocaml destroot.args-append OVERRIDE_libdir=${prefix}/lib } variant pic description {Enable generation of position independent code} { configure.args-append --enable-pic }