New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #16666: apple-gcc42.diff

File apple-gcc42.diff, 2.2 KB (added by ryandesign@…, 3 years ago)

Portfile.2 expressed as a diff against the current Portfile

  • Portfile

     
    33PortSystem 1.0 
    44 
    55name                    apple-gcc42 
    6 version                 5531 
     6version                 5564 
    77categories              lang 
    88platforms               darwin 
    99maintainers             mww 
     
    1212                        version 4.2. Supports C and Objective-C. 
    1313 
    1414homepage                http://developer.apple.com/documentation/DeveloperTools/gcc-4.2/gcc/ 
    15 master_sites            http://www.opensource.apple.com/darwinsource/tarballs/other/ 
     15master_sites    http://www.opensource.apple.com/darwinsource/tarballs/other/ 
    1616distname                gcc_42-${version} 
    17 checksums               sha1 b8635f310393c17e6494fef0358ee944e03aa5c1 
     17checksums               md5 cc919b07776db1a209ccaa48b0e19da7 
    1818 
    19 post-extract { file mkdir ${workpath}/build } 
     19set prefix      ${prefix} 
    2020 
    21 set nprefix ${prefix}/lib/${name} 
     21post-extract {  
     22                file mkdir ${worksrcpath}/debug 
     23                file mkdir ${workpath}/destroot 
     24} 
    2225 
    23 # try to avoid non-Apple programs at all costs (rather volatile build) 
    24 configure.dir           ${workpath}/build 
    25 configure.cmd           ${worksrcpath}/configure 
    26 configure.pre_args      --prefix=${nprefix} 
    27 # C++ support breaks the build 
    28 configure.args          --enable-languages=c,objc \ 
    29                         --program-suffix=-apple-4.2 
    30 configure.cflags 
    31 configure.ldflags 
    32 configure.cppflags 
    33 configure.env           PATH="/bin:/usr/bin:/sbin:/usr/sbin" 
    34  
    35 build.dir               ${configure.dir} 
    36  
    37 destroot.dir            ${build.dir} 
    38  
    39 post-destroot { 
    40         file delete -force \ 
    41                 ${destroot}${nprefix}/man ${destroot}${nprefix}/info 
    42         system "cd ${destroot}${prefix}/bin && ln -sf ${nprefix}/bin/gcc-apple-4.2 && ln -sf ${nprefix}/bin/cpp-apple-4.2" 
     26post-patch { 
     27            reinplace "s|MAKEINFO=\$\(MAKEINFO\) \$\(MAKEINFOFLAGS\)|MAKEINFO=makeinfo \$\(MAKEINFOFLAGS\)|" ${worksrcpath}/Makefile.in 
    4328} 
    4429 
     30use_configure   no 
     31# This will automatically build gcc 4.2 with c++ and obj-c++ support 
     32build.cmd               ${worksrcpath}/build_gcc \"[strsed ${configure.universal_archs} "g| |;|"]\" \"[strsed ${configure.universal_archs} "g| |;|"]\" \ 
     33                ${worksrcpath} ${prefix} ${workpath}/destroot ${worksrcpath}/debug 
     34 
     35destroot        {} 
     36 
     37destroot.violate_mtree yes 
     38 
    4539livecheck.check         moddate 
    4640livecheck.url           ${master_sites} 
    4741