Ticket #24112: Portfile.diff

File Portfile.diff, 4.8 KB (added by macports@…, 14 years ago)
  • /Users/mfeiri/Desktop/macports_patches/

    old new  
    88categories              lang
    99platforms               darwin
    1010use_parallel_build      yes
    11 maintainers             erickt openmaintainer
     11maintainers             feiri.de:macports erickt openmaintainer
     12license                 University of Illinois/NCSA Open Source License
    1213description             llvm is a next generation compiler infrastructure
    1314long_description        llvm brings tools to work on the llvm intermediate \
    1415                        language incl. a C and C++ frontend.
     
    1617homepage                http://llvm.org/
    1718master_sites            ${homepage}releases/${version}/
    1819
    19 checksums               md5     34a11e807add0f4555f691944e1a404a \
    20                         sha1    547471147cbf6d3e49539e01196ffada2c79c250 \
    21                         rmd160  24d58cb052ab5879aae59eaf4885ec41186ee22a
     20checksums               ${distname}${extract.suffix} \
     21                            md5     34a11e807add0f4555f691944e1a404a \
     22                            sha1    547471147cbf6d3e49539e01196ffada2c79c250 \
     23                            rmd160  24d58cb052ab5879aae59eaf4885ec41186ee22a \
     24                        clang-${version}${extract.suffix} \
     25                            md5     09d696bf23bb4a3cf6af3c7341cdd946 \
     26                            sha1    188f29ad3b2c64fcdc791aa34b323ed06452d7ae \
     27                            rmd160  b7e44abbf28902ff8e3fd4578a5ff9dd34f40817
    2228
    23 depends_lib             path:bin/perl:perl5
     29depends_run             bin:perl:perl5
    2430
     31default_variants        +clang +checker
    2532universal_variant       no
    2633
    2734configure.dir           ${workpath}/build
     
    4350                        --disable-assertions
    4451
    4552if {[info exists build_arch] && ${os.platform} == "darwin"} {
    46     configure.args-append --build=${build_arch}-apple-darwin${os.major}
     53    if {${build_arch} == "i386" } {
     54        configure.pre_args-append --build=$i686-apple-darwin${os.major}
     55    } else {
     56        configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
     57    }
    4758}
    4859
    4960post-destroot {
     
    5970                                                                ${destroot}${prefix}/lib/llvm/obj/Release-Asserts/bin/llvm-config
    6071    reinplace "s|${configure.dir}|${prefix}/lib/llvm/obj|g"     ${destroot}${prefix}/bin/llvm-config \
    6172                                                                ${destroot}${prefix}/lib/llvm/obj/Release-Asserts/bin/llvm-config
    62 
    63     fs-traverse item ${destroot} {
    64         if {[file isfile ${item}] && ".dir" == [file tail ${item}]} {
    65             delete ${item}
    66         }
    67     }
    6873}
    6974
    7075variant ocaml description {Enable generation of OCaml binding} {
     
    8590    configure.args-append --enable-targets=host-only
    8691}
    8792
     93variant clang description {Install clang frontend} {
     94    distfiles-append    clang-${version}${extract.suffix}
     95    post-extract {
     96        move ${workpath}/clang-${version} ${worksrcpath}/tools/clang
     97    }
     98}
     99
     100variant checker requires clang description {Install checker tools} {
     101    depends_run-append  bin:python:python26
     102    post-destroot {
     103        reinplace "s|/usr/bin/env perl|${prefix}/bin/perl|g" ${worksrcpath}/tools/clang/utils/ccc-analyzer
     104        reinplace "s|/usr/bin/env perl|${prefix}/bin/perl|g" ${worksrcpath}/tools/clang/utils/scan-build
     105        reinplace "s|/usr/bin/env python|${prefix}/bin/python|g" ${worksrcpath}/tools/clang/tools/scan-view/scan-view
     106        xinstall -W ${worksrcpath}/tools/clang/utils \
     107            scanview.css \
     108            ccc-analyzer \
     109            scan-build \
     110            sorttable.js \
     111            ${destroot}${prefix}/bin
     112        xinstall -W ${worksrcpath}/tools/clang/tools/scan-view \
     113            Reporter.py \
     114            ScanView.py \
     115            scan-view \
     116            startfile.py \
     117            ${destroot}${prefix}/bin
     118        file mkdir ${destroot}${prefix}/bin/Resources
     119        xinstall -W ${worksrcpath}/tools/clang/tools/scan-view/Resources \
     120            FileRadar.scpt \
     121            GetRadarVersion.scpt \
     122            bugcatcher.ico \
     123            ${destroot}${prefix}/bin/Resources
     124    }
     125}
     126
     127# installing libLTO globally is a viable workaround on darwin 9 and 10
     128# a proper solution would depend on updated odcctools or a port of ld64
     129# see http://trac.macports.org/ticket/19679 for more information
     130variant lto description {Enable link time optimizations} {
     131    #depends_run-append  port:odcctools
     132    #depends_run-append  port:ld64
     133    post-destroot {
     134        file mkdir ${destroot}/usr/lib
     135        ln -s ${prefix}/lib/libLTO.dylib ${destroot}/usr/lib/libLTO.dylib
     136    }
     137}
     138
    88139livecheck.type  regex
    89140livecheck.url   ${homepage}releases/
    90 livecheck.regex {'(\d+(?:\.\d+)*)'}
     141livecheck.regex {'(\d+\.\d+)'}