Ticket #49227: Portfile.diff

File Portfile.diff, 2.8 KB (added by howarth.at.macports@…, 8 years ago)

modify Portfile.diff to only apply boehm-gc-darwin15-hack.patch when building on darwin15 or later

  • Portfile

    old new  
    1010
    1111epoch               2
    1212version             5.3.0
     13revision            1
    1314platforms           darwin
    1415categories          lang
    1516maintainers         mww openmaintainer
     
    2425                    ftp://ftp.gwdg.de/pub/linux/gcc/releases/gcc-${version}/ \
    2526                    ftp://gcc.ftp.nluug.nl/mirror/languages/gcc/releases/gcc-${version}/ \
    2627                    ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/ \
    27                     gnu:gcc/gcc-${version}
     28                    gnu:gcc/gcc-${version} \
     29                    ftp://sourceware.org/pub/java/
    2830
    2931distname            gcc-${version}
    3032use_bzip2           yes
    3133
    32 checksums           rmd160  b06fec59ceb37aeb042bdb9e1703e53d0834d085 \
    33                     sha256  b84f5592e9218b73dbae612b5253035a7b34a9a1f7688d2e1bfaaf7267d5c4db
     34distfiles           gcc-${version}.tar.bz2 \
     35                    ecj-4.9.jar
     36
     37checksums           gcc-${version}.tar.bz2 \
     38                    rmd160  b06fec59ceb37aeb042bdb9e1703e53d0834d085 \
     39                    sha256  b84f5592e9218b73dbae612b5253035a7b34a9a1f7688d2e1bfaaf7267d5c4db \
     40                    ecj-4.9.jar \
     41                    rmd160  eb1b19d9ac0e9e265bf993f38b9576e3c710e91e \
     42                    sha256  9506e75b862f782213df61af67338eb7a23c35ff425d328affc65585477d34cd
    3443
    3544depends_lib         port:cctools \
    3645                    port:gmp \
     
    4857# <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63810>).
    4958patchfiles-append   macosx-version-min.patch
    5059
     60# Provide linkage for MacPorts libiconv in gcj
     61patchfiles-append   gcj-libiconv-linkage.patch
     62
     63extract.only        gcc-${version}.tar.bz2
     64
    5165set major           [lindex [split ${version} .-] 0]
    5266
    5367platform darwin {
     68    if {${os.major} > 14} {
     69    # Hack around boehm-gc and associated gcj failures from recompilation
     70    # of libunwind.dylib with Apple Clang 7.0 in El Capitan by reducing
     71    # alignment to 2
     72    patchfiles-append   boehm-gc-darwin15-hack.patch
     73    }
    5474    configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
    5575}
    5676
     
    6787                    --disable-nls \
    6888                    --program-suffix=-mp-${major} \
    6989                    --with-gxx-include-dir=${prefix}/include/${name}/c++/ \
     90                    --with-libiconv-prefix=${prefix} \
    7091                    --with-gmp=${prefix} \
    7192                    --with-mpfr=${prefix} \
    7293                    --with-mpc=${prefix} \
     
    91112                    OTOOL=${prefix}/bin/otool \
    92113                    OTOOL64=${prefix}/bin/otool
    93114
     115post-extract {
     116    copy ${distpath}/ecj-4.9.jar ${worksrcpath}/ecj.jar
     117}
     118
    94119pre-configure {
    95120    configure.args-append --with-pkgversion="MacPorts ${name} ${version}_${revision}${portvariants}"
    96121