Ticket #37479: Portfile.patch

File Portfile.patch, 5.2 KB (added by internetzel, 11 years ago)

add subport apple-gcc42-4.2.4 (conflicting mutually with apple-gcc42)

  • Portfile

    old new  
    44PortGroup select 1.0
    55
    66name                    apple-gcc42
     7subport                 apple-gcc42-4.2.4 {}
    78version                 5666.3
    8 set gcc_version         4.2.1
    99revision                9
    1010categories              lang
    1111platforms               darwin
     12installs_libs   no
     13
     14if {${subport} == "apple-gcc42"} {
     15conflicts               apple-gcc42-4.2.4
     16set gcc_version         4.2.1
    1217license         GPL-2
    1318maintainers             jeremyhu openmaintainer
    14 installs_libs   no
    1519
    1620description             Apple's version of gcc 4.2
    1721long_description        Apple's version of the GNU compiler collection, \
    1822                        version 4.2. Supports C, Objective-C, anc C++
     23} elseif {${subport} == "apple-gcc42-4.2.4"} {
     24conflicts               apple-gcc42
     25set gcc_version         4.2.4
     26license         GPL-3
     27maintainers             openmaintainer
     28
     29description             Apple's version of gcc 4.2, merged with GNU gcc 4.2.4
     30long_description        Apple's version of the GNU compiler collection, \
     31                        version 4.2. Supports C, Objective-C, anc C++. \
     32                        Missing bug fixes from GNU gcc 4.2.2 up to 4.2.4 \
     33                        are applied to this release
     34}
    1935
    2036homepage                http://opensource.apple.com/
    21 master_sites            gnu:/gcc/gcc-4.2.1:gnu \
     37master_sites            gnu:/gcc/gcc-${gcc_version}:gnu \
    2238                        http://opensource.apple.com/tarballs/gcc/:apple
    2339
    2440distname                gcc-${version}
     
    4460#                    sha1    4615c85ef9010304bf412adc2f2c33d256e177fd \
    4561#                    rmd160  bb4b256f7e7779361214593343821a127ee78d1a
    4662
     63#                    gcc-fortran-4.2.4.tar.bz2 \
     64#                    md5     d8896f33f91eca12135df2c1e5aa0887 \
     65#                    sha1    ? \
     66#                    rmd160  ? \
     67#                    gcc-java-4.2.4.tar.bz2 \
     68#                    md5     dd05ac72f8563c98af6946f9334668f1 \
     69#                    sha1    ? \
     70#                    rmd160  ?
     71
    4772# Needed for gfortran:
    4873#files/other_langs.patch:
    4974#+  --with-gmp=$DEST_ROOT \
     
    84109        driverdriver-num_infiles.patch \
    85110        driverdriver-armcheck.patch
    86111
     112if {${subport} == "apple-gcc42-4.2.4"} {
     113    patchfiles-append    gcc-4.2.1-4.2.4.patch
     114}
     115
    87116# gcj fails to build:
    88117# gcc/java/lang.c: In function 'java_init':
    89118# gcc/java/lang.c:378: error: 'force_align_functions_log' undeclared (first use in this function)
     
    226255destroot {}
    227256post-destroot {
    228257    if {[string match "*i386*" ${build_targets}]} {
    229         delete ${destroot}${prefix}/libexec/${name}/gcc/i686-apple-darwin${os.major}/4.2.1/as
    230         ln -s ../../../../../bin/as ${destroot}${prefix}/libexec/${name}/gcc/i686-apple-darwin${os.major}/4.2.1/as
    231         delete ${destroot}${prefix}/libexec/${name}/gcc/i686-apple-darwin${os.major}/4.2.1/ld
    232         ln -s ../../../../../bin/ld ${destroot}${prefix}/libexec/${name}/gcc/i686-apple-darwin${os.major}/4.2.1/ld
     258        delete ${destroot}${prefix}/libexec/${name}/gcc/i686-apple-darwin${os.major}/${gcc_version}/as
     259        ln -s ../../../../../bin/as ${destroot}${prefix}/libexec/${name}/gcc/i686-apple-darwin${os.major}/${gcc_version}/as
     260        delete ${destroot}${prefix}/libexec/${name}/gcc/i686-apple-darwin${os.major}/${gcc_version}/ld
     261        ln -s ../../../../../bin/ld ${destroot}${prefix}/libexec/${name}/gcc/i686-apple-darwin${os.major}/${gcc_version}/ld
    233262
    234263        # http://trac.macports.org/ticket/35770
    235         delete  ${destroot}${prefix}/lib/${name}/gcc/i686-apple-darwin${os.major}/4.2.1/libstdc++.dylib
    236         ln -s /usr/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/gcc/i686-apple-darwin${os.major}/4.2.1/libstdc++.dylib
     264        delete  ${destroot}${prefix}/lib/${name}/gcc/i686-apple-darwin${os.major}/${gcc_version}/libstdc++.dylib
     265        ln -s /usr/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/gcc/i686-apple-darwin${os.major}/${gcc_version}/libstdc++.dylib
    237266    }
    238267
    239268    if {[string match "*ppc*" ${build_targets}]} {
    240         delete ${destroot}${prefix}/libexec/${name}/gcc/powerpc-apple-darwin${os.major}/4.2.1/as
    241         ln -s ../../../../../bin/as ${destroot}${prefix}/libexec/${name}/gcc/powerpc-apple-darwin${os.major}/4.2.1/as
    242         delete ${destroot}${prefix}/libexec/${name}/gcc/powerpc-apple-darwin${os.major}/4.2.1/ld
    243         ln -s ../../../../../bin/ld ${destroot}${prefix}/libexec/${name}/gcc/powerpc-apple-darwin${os.major}/4.2.1/ld
     269        delete ${destroot}${prefix}/libexec/${name}/gcc/powerpc-apple-darwin${os.major}/${gcc_version}/as
     270        ln -s ../../../../../bin/as ${destroot}${prefix}/libexec/${name}/gcc/powerpc-apple-darwin${os.major}/${gcc_version}/as
     271        delete ${destroot}${prefix}/libexec/${name}/gcc/powerpc-apple-darwin${os.major}/${gcc_version}/ld
     272        ln -s ../../../../../bin/ld ${destroot}${prefix}/libexec/${name}/gcc/powerpc-apple-darwin${os.major}/${gcc_version}/ld
    244273
    245274        # http://trac.macports.org/ticket/35770
    246         delete  ${destroot}${prefix}/lib/${name}/gcc/powerpc-apple-darwin${os.major}/4.2.1/libstdc++.dylib
    247         ln -s /usr/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/gcc/powerpc-apple-darwin${os.major}/4.2.1/libstdc++.dylib
     275        delete  ${destroot}${prefix}/lib/${name}/gcc/powerpc-apple-darwin${os.major}/${gcc_version}/libstdc++.dylib
     276        ln -s /usr/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/gcc/powerpc-apple-darwin${os.major}/${gcc_version}/libstdc++.dylib
    248277    }
    249278}
    250279