Ticket #38774: Portfile.diff

File Portfile.diff, 4.2 KB (added by howarth@…, 12 years ago)

Portfile diff to deprecate libstdcxx subport in gcc47 and support the move of libgcc*dylib to libstdcxx subport in gcc48

  • Portfile

    old new  
    66PortGroup compiler_blacklist_versions 1.0
    77
    88name                gcc47
    9 subport             libstdcxx {}
    109epoch               1
    1110
    1211version             4.7.3
    13 revision            0
     12revision            1
    1413platforms           darwin
    1514categories          lang
    1615maintainers         mww openmaintainer
     
    5453depends_skip_archcheck-append gcc_select ld64 cctools
    5554license_noconflict  gmp mpfr ppl libmpc
    5655
    57 patchfiles          ppc_fde_encoding.diff  gcc-PR-53453.patch
     56patchfiles          ppc_fde_encoding.diff  gcc-PR-53453.patch libstdc++_nanosleep.patch
    5857patch.dir           ${workpath}/gcc-${version}
    5958
    6059set major           4.7
     
    9291                    --enable-stage1-checking \
    9392                    --disable-multilib \
    9493                    --enable-lto \
    95                     --enable-libstdcxx-time \
    9694                    --with-as=${prefix}/bin/as \
    9795                    --with-ld=${prefix}/bin/ld \
    9896                    --with-ar=${prefix}/bin/ar \
     
    126124
    127125destroot.target     install install-info-host
    128126
    129 if {${subport} == "libstdcxx"} {
    130     conflicts       libstdcxx-devel
    131 
    132     patchfiles-append  force-static-gcc.patch
    133 
    134     depends_run-delete path:lib/libstdc\\\\+\\\\+.6.dylib:libstdcxx
    135 
    136     configure.args-delete --libdir=${prefix}/lib/${name}
    137 
    138     configure.args-delete --enable-languages=c,c++,objc,obj-c++,lto,fortran,java
    139     configure.args-append --enable-languages=c++
    140 
    141     # http://trac.macports.org/ticket/36116
    142     compiler.blacklist-append {clang < 425}
    143 
    144     configure.args-append --disable-bootstrap
    145     build.target        all
    146 
    147     destroot.target     install-target-libstdc++-v3
    148 
    149     post-destroot {
    150         eval file delete [glob ${destroot}${prefix}/lib/*{a,py}]
    151         file delete -force ${destroot}${prefix}/share/gcc-${major}
    152         file delete -force ${destroot}${prefix}/include/${name}
    153 
    154         # Don't install the linktime symlink.  The compilers will place this
    155         # in their libdir, and we don't want to break other toolchains by having
    156         # them link against this libstdc++ (at least not until it is built on
    157         # top of libc++abi).
    158         file delete ${destroot}${prefix}/lib/libstdc++.dylib
    159 
    160         # For compatibility.  Delete this eventually.
    161         system "touch ${destroot}${prefix}/lib/.libstdcxx"
    162 
    163         if {[variant_isset universal]} {
    164             foreach archdir [glob ${destroot}${prefix}/lib/*/] {
    165                 if {[file exists ${archdir}/libstdc++.6.dylib]} {
    166                     system "install_name_tool -id ${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib"
    167                     system "lipo -create -output ${destroot}${prefix}/lib/libstdc++.6.dylib~ ${destroot}${prefix}/lib/libstdc++.6.dylib ${archdir}/libstdc++.6.dylib && mv ${destroot}${prefix}/lib/libstdc++.6.dylib~ ${destroot}${prefix}/lib/libstdc++.6.dylib"
    168                 }
    169                 file delete -force ${archdir}
    170             }
    171         }
    172     }
    173 } else {
    174127post-destroot {
    175128    file delete -force ${destroot}${prefix}/share/man/man7 \
    176129        ${destroot}${prefix}/share/info
     
    193146
    194147    # http://trac.macports.org/ticket/35770
    195148    eval delete [glob ${destroot}${prefix}/lib/${name}/libstdc++*]
     149    eval delete [glob ${destroot}${prefix}/lib/${name}/libgcc*dylib]
    196150
    197151    ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.dylib
     152    ln -s ${prefix}/lib/libgcc_ext.10.4.dylib ${destroot}${prefix}/lib/${name}/libgcc_ext.10.4.dylib
     153    ln -s ${prefix}/lib/libgcc_ext.10.5.dylib ${destroot}${prefix}/lib/${name}/libgcc_ext.10.5.dylib
     154    ln -s ${prefix}/lib/libgcc_s.1.dylib ${destroot}${prefix}/lib/${name}/libgcc_s.1.dylib
     155    ln -s ${prefix}/lib/libgcc_s.1.dylib ${destroot}${prefix}/lib/${name}/libgcc_s_ppc64.1.dylib
     156    ln -s ${prefix}/lib/libgcc_s.1.dylib ${destroot}${prefix}/lib/${name}/libgcc_s_x86_64.1.dylib
    198157
    199158    # This symlink is provided as a transition aide and will be removed
    200159    # with a future revision of this port.
    201160    ln -s ${prefix}/lib/libstdc++.6.dylib ${destroot}${prefix}/lib/${name}/libstdc++.6.dylib
    202 }
    203161
    204162select.group        gcc
    205163select.file         ${filespath}/mp-${name}