Ticket #49227: gcc5.5.0-java.diff

File gcc5.5.0-java.diff, 2.7 KB (added by nortcele, 7 years ago)

Patch to add java compilation to gcc5.5.0

  • Portfile

    old new  
    2222                    ftp://ftp.gwdg.de/pub/linux/gcc/releases/gcc-${version}/ \
    2323                    ftp://gcc.ftp.nluug.nl/mirror/languages/gcc/releases/gcc-${version}/ \
    2424                    ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/ \
    25                     gnu:gcc/gcc-${version}
     25                    gnu:gcc/gcc-${version} \
     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
     30
     31set ecj             ecj-4.9.jar
    2632
    2733distname            gcc-${version}
    2834use_xz              yes
    2935
    30 checksums           rmd160  63fdc006c2289f81df664d1fd9b4124f71732e7b \
    31                     sha256  530cea139d82fe542b358961130c69cfde8b3d14556370b65823d2f91f0ced87
     36distfiles           ${distname}${extract.suffix}:gcc \
     37                    ${ecj}:ecj
     38
     39extract.only        ${distname}${extract.suffix}
     40
     41checksums           ${distname}${extract.suffix} \
     42                    rmd160  63fdc006c2289f81df664d1fd9b4124f71732e7b \
     43                    sha256  530cea139d82fe542b358961130c69cfde8b3d14556370b65823d2f91f0ced87 \
     44                    ${ecj} \
     45                    rmd160  eb1b19d9ac0e9e265bf993f38b9576e3c710e91e \
     46                    sha256  9506e75b862f782213df61af67338eb7a23c35ff425d328affc65585477d34cd
    3247
    3348depends_lib         port:cctools \
    3449                    port:gmp \
     
    4459depends_skip_archcheck-append gcc_select ld64 cctools
    4560license_noconflict  gmp mpfr ppl libmpc
    4661
     62# Provide linkage for MacPorts libiconv in gcj
     63patchfiles-append   gcj-libiconv-linkage.patch
     64
    4765set major           [lindex [split ${version} .-] 0]
    4866
     67post-extract {
     68    copy ${distpath}/${ecj} ${worksrcpath}/ecj.jar
     69}
     70
    4971platform darwin {
     72    if {${os.major} > 14} {
     73        # Hack around boehm-gc and associated gcj failures from recompilation
     74        # of libunwind.dylib with Apple Clang in macOS > 10.11 by reducing
     75        # alignment to 2
     76        patchfiles-append   boehm-gc-darwin15-hack.patch
     77    }
    5078    configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
    5179}
    5280
     
    6391                    --disable-nls \
    6492                    --program-suffix=-mp-${major} \
    6593                    --with-gxx-include-dir=${prefix}/include/${name}/c++/ \
     94                    --with-libiconv-prefix=${prefix} \
    6695                    --with-gmp=${prefix} \
    6796                    --with-mpfr=${prefix} \
    6897                    --with-mpc=${prefix} \