# $Id: Portfile 35833 2008-04-07 21:36:27Z ryandesign@macports.org $ PortSystem 1.0 name apple-gcc42 version 5566 categories lang platforms darwin maintainers mww description Apple's version of gcc 4.2 long_description Apple's version of the GNU compiler collection, \ version 4.2. Supports C and Objective-C. homepage http://developer.apple.com/documentation/DeveloperTools/gcc-4.2/gcc/ master_sites http://www.opensource.apple.com/darwinsource/tarballs/other/ distname gcc_42-${version} checksums md5 4b67fc26c61100ae97f462638ecf8e6e \ sha1 d86d5a6c12d188d8b172b95170e08abf055fc13c \ rmd160 8a9c6f09ca61fe07d4f61436a16fa9182c904a6a # The prefix is set to /usr because parts of the script are hardcoded to expect it set build_prefix /usr post-extract { file mkdir ${worksrcpath}/debug file mkdir ${destroot} } post-patch { reinplace "s|MAKEINFO=\$\(MAKEINFO\) \$\(MAKEINFOFLAGS\)|MAKEINFO=makeinfo \$\(MAKEINFOFLAGS\)|" ${worksrcpath}/Makefile.in } use_configure no # first parameter: space-separated list of archs compiler will run on # second parameter: space-separated list of archs compiler will generate code for # third parameter: path to the compiler sources # fourth parameter: location compiler will be installed to. /usr is expected # fifth parameter: place compiler will be copied once it's built # sixth parameter: a directory to place information helpful in debugging compiler # This build.cmd line will build gcc 4.2 with c++ and obj-c++ support build.cmd ${worksrcpath}/build_gcc \ \"${configure.universal_archs}\" \"${configure.universal_archs}\" \ ${worksrcpath} ${build_prefix} ${destroot} ${worksrcpath}/debug destroot {} platform darwin 8 { destroot.violate_mtree yes # Delete docs and not violate_mtree #system "rm -rf ${destroot}/Developer" } platform darwin 9 { post-destroot { # This documentation is already installed in Xcode for 10.5 system "rm -rf ${destroot}/Developer" } } post-destroot { system "mkdir -p ${destroot}${prefix}" system "rm -rf ${destroot}${prefix}/*" system "mv -f ${destroot}${build_prefix}/* ${destroot}${prefix}" system "rmdir ${destroot}${build_prefix}" } livecheck.check regex livecheck.regex gcc_42-(\\d+)\\.tar