Ticket #38732: Portfile.diff

File Portfile.diff, 7.0 KB (added by howarth@…, 11 years ago)

Portfile diff implementing move of libgcc*dylib into libstdcxx

  • Portfile

    old new  
    55PortGroup compiler_blacklist_versions 1.0
    66
    77name                gcc48
    8 subport             libstdcxx-devel {}
     8subport             libstdcxx {}
    99
    10 # Remove the revision in libstdcxx-devel when bumping
    11 version             4.8-20130404
    12 revision            1
     10version             4.8.0
    1311platforms           darwin
    1412categories          lang
    1513maintainers         mww openmaintainer
    1614# an exception in the license allows dependents to not be GPL
    1715license             {GPL-3+ Permissive}
    18 description         The GNU compiler collection, prerelease BETA
     16description         The GNU compiler collection
    1917long_description    The GNU compiler collection, including front ends for \
    20                     C, C++, Objective-C, Objective-C++, Fortran and Java. \
    21                     This is a prerelease BETA version!
     18                    C, C++, Objective-C, Objective-C++, Fortran and Java.
    2219
    2320homepage            http://gcc.gnu.org/
    24 master_sites        http://gcc.petsads.us/snapshots/${version} \
    25                     ftp://ftp.gwdg.de/pub/linux/gcc/snapshots/${version}/ \
    26                     ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/snapshots/${version}/ \
    27                     ftp://gcc.gnu.org/pub/gcc/snapshots/${version}/ \
    28                     http://mirrors-us.seosue.com/gcc/snapshots/${version}/ \
    29                     http://gcc.skazkaforyou.com/snapshots/${version}/
     21master_sites        ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/releases/gcc-${version}/:gcc \
     22                    ftp://ftp.gwdg.de/pub/linux/gcc/releases/gcc-${version}/:gcc \
     23                    ftp://gcc.ftp.nluug.nl/mirror/languages/gcc/releases/gcc-${version}/:gcc \
     24                    ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/:gcc \
     25                    gnu:gcc/gcc-${version}:gcc \
     26                    ftp://sourceware.org/pub/java/:ecj \
     27                    http://mirrors.kernel.org/sources.redhat.com/java/:ecj \
     28                    http://www.mirrorservice.org/sites/sources.redhat.com/pub/java/:ecj \
     29                    http://ftp-stud.fht-esslingen.de/pub/Mirrors/sourceware.org/java/:ecj
    3030
    3131distname            gcc-${version}
    3232
    33 checksums           rmd160  b5ac698129f3be6c4a6e6424b71ee51041ce9bb9 \
    34                     sha256  428088223bec4ab6b832196ac84da1ae25ac72bf26403b49851a20a19d4d915e
     33set ecj             ecj-4.5.jar
    3534
    36 supported_archs     i386 x86_64
     35checksums           gcc-${version}.tar.bz2 \
     36                    rmd160  0000f2af2aa4daa32108ba4725938833684f6937 \
     37                    sha256  b037fe5132b71ecad2ea7141ec92292b5d32427bf90fd90cde432b1d5abacc2c \
     38                    ${ecj} \
     39                    rmd160  d3f4da657f086b6423f74e93f001132f4855368a \
     40                    sha256  98fd128f1d374d9e42fd9d4836bdd249c6d511ebc6c0df17fbc1b9df96c3d781
    3741
    3842use_bzip2           yes
    3943
     44distfiles           [suffix ${distname}]:gcc ${ecj}:ecj
     45
     46extract.only        [suffix ${distname}]
     47
    4048depends_lib         port:gmp port:mpfr port:libiconv port:libmpc port:ppl port:cloog
    41 depends_run         port:gcc_select port:ld64 port:cctools port:libstdcxx-devel
     49depends_run         port:gcc_select port:ld64 port:cctools path:lib/libstdc\\\\+\\\\+.6.dylib:libstdcxx
    4250
    4351depends_skip_archcheck-append gcc_select ld64 cctools
    4452license_noconflict  gmp mpfr ppl libmpc
    4553
     54patchfiles          skip-libffi-install.patch
    4655patch.dir           ${workpath}/gcc-${version}
    4756
    4857set major           4.8
     
    5160
    5261post-extract {
    5362    file mkdir ${worksrcpath}
     63    copy ${distpath}/${ecj} ${workpath}/${distname}/ecj.jar
    5464}
    5565
    5666platform darwin {
     
    5868}
    5969
    6070configure.cmd       ../gcc-${version}/configure
    61 configure.args      --enable-languages=c,c++,objc,obj-c++,fortran,java \
     71configure.args      --enable-languages=c,c++,objc,obj-c++,lto,fortran,java \
    6272                    --libdir=${prefix}/lib/${name} \
    6373                    --includedir=${prefix}/include/${name} \
    6474                    --infodir=${prefix}/share/info \
    6575                    --mandir=${prefix}/share/man \
    6676                    --datarootdir=${prefix}/share/gcc-${major} \
     77                    --with-libiconv-prefix=${prefix} \
    6778                    --with-local-prefix=${prefix} \
    6879                    --with-system-zlib \
    6980                    --disable-nls \
     
    7889                    --enable-stage1-checking \
    7990                    --disable-multilib \
    8091                    --enable-lto \
    81                     --enable-libstdcxx-time \
    8292                    --with-as=${prefix}/bin/as \
    8393                    --with-ld=${prefix}/bin/ld \
    8494                    --with-ar=${prefix}/bin/ar \
     
    110120
    111121destroot.target     install install-info-host
    112122
    113 if {${subport} == "libstdcxx-devel"} {
    114     conflicts       libstdcxx
    115 
    116     patchfiles-append  force-static-gcc.patch
     123if {${subport} == "libstdcxx"} {
     124    conflicts       libstdcxx-devel
    117125
    118     depends_run-delete port:${subport}
     126    depends_run-delete path:lib/libstdc\\\\+\\\\+.6.dylib:libstdcxx
    119127
    120128    configure.args-delete --libdir=${prefix}/lib/${name}
    121129
    122130    configure.args-delete --enable-languages=c,c++,objc,obj-c++,lto,fortran,java
    123     configure.args-append --enable-languages=c++
     131    configure.args-append --enable-languages=c,c++
    124132
    125133    # http://trac.macports.org/ticket/36116
    126134    compiler.blacklist-append {clang < 425}
    127135
    128     configure.args-append --disable-bootstrap
    129     build.target        all
     136    build.target
    130137
    131138    destroot.target     install-target-libstdc++-v3
    132139
    133140    post-destroot {
    134141        eval file delete [glob ${destroot}${prefix}/lib/*{a,py}]
    135         eval file delete [glob ${destroot}${prefix}/lib/libgcc*]
    136142        file delete -force ${destroot}${prefix}/lib/gcc
    137143        file delete -force ${destroot}${prefix}/share/gcc-${major}
    138144        file delete -force ${destroot}${prefix}/include/${name}
     
    179185
    180186    # http://trac.macports.org/ticket/35770
    181187    eval delete [glob ${destroot}${prefix}/lib/${name}/libstdc++*]
     188    eval delete [glob ${destroot}${prefix}/lib/${name}/libgcc*dylib]
    182189
    183190    ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.dylib
     191    ln -s ${prefix}/lib/libgcc_ext.10.4.dylib ${destroot}${prefix}/lib/${name}/libgcc_ext.10.4.dylib
     192    ln -s ${prefix}/lib/libgcc_ext.10.5.dylib ${destroot}${prefix}/lib/${name}/libgcc_ext.10.5.dylib
     193    ln -s ${prefix}/lib/libgcc_s.1.dylib ${destroot}${prefix}/lib/${name}/libgcc_s.1.dylib
     194    ln -s ${prefix}/lib/libgcc_s.1.dylib ${destroot}${prefix}/lib/${name}/libgcc_s_ppc64.1.dylib
     195    ln -s ${prefix}/lib/libgcc_s.1.dylib ${destroot}${prefix}/lib/${name}/libgcc_s_x86_64.1.dylib
    184196
    185197    # This symlink is provided as a transition aide and will be removed
    186198    # with a future revision of this port.
     
    215227configure.universal_args
    216228
    217229livecheck.type      regex
    218 livecheck.url       ftp://gcc.gnu.org/pub/gcc/snapshots/
    219 livecheck.regex     LATEST-4.8 -> (4.8-\[0-9\]+)
     230livecheck.url       http://gcc.gnu.org/gcc-4.8/
     231livecheck.regex     GCC (4\\.8\\.\[0-9\])