| 1 | # $Id: Portfile 35833 2008-04-07 21:36:27Z ryandesign@macports.org $ |
|---|
| 2 | |
|---|
| 3 | PortSystem 1.0 |
|---|
| 4 | |
|---|
| 5 | name apple-gcc42 |
|---|
| 6 | version 5566 |
|---|
| 7 | categories lang |
|---|
| 8 | platforms darwin |
|---|
| 9 | maintainers mww |
|---|
| 10 | description Apple's version of gcc 4.2 |
|---|
| 11 | long_description Apple's version of the GNU compiler collection, \ |
|---|
| 12 | version 4.2. Supports C and Objective-C. |
|---|
| 13 | |
|---|
| 14 | homepage http://developer.apple.com/documentation/DeveloperTools/gcc-4.2/gcc/ |
|---|
| 15 | master_sites http://www.opensource.apple.com/darwinsource/tarballs/other/ |
|---|
| 16 | distname gcc_42-${version} |
|---|
| 17 | checksums md5 4b67fc26c61100ae97f462638ecf8e6e \ |
|---|
| 18 | sha1 d86d5a6c12d188d8b172b95170e08abf055fc13c \ |
|---|
| 19 | rmd160 8a9c6f09ca61fe07d4f61436a16fa9182c904a6a |
|---|
| 20 | |
|---|
| 21 | # The prefix is set to /usr because parts of the script are hardcoded to expect it |
|---|
| 22 | set build_prefix /usr |
|---|
| 23 | |
|---|
| 24 | post-extract { |
|---|
| 25 | file mkdir ${worksrcpath}/debug |
|---|
| 26 | file mkdir ${destroot} |
|---|
| 27 | } |
|---|
| 28 | |
|---|
| 29 | post-patch { |
|---|
| 30 | reinplace "s|MAKEINFO=\$\(MAKEINFO\) \$\(MAKEINFOFLAGS\)|MAKEINFO=makeinfo \$\(MAKEINFOFLAGS\)|" ${worksrcpath}/Makefile.in |
|---|
| 31 | } |
|---|
| 32 | |
|---|
| 33 | use_configure no |
|---|
| 34 | |
|---|
| 35 | # first parameter: space-separated list of archs compiler will run on |
|---|
| 36 | # second parameter: space-separated list of archs compiler will generate code for |
|---|
| 37 | # third parameter: path to the compiler sources |
|---|
| 38 | # fourth parameter: location compiler will be installed to. /usr is expected |
|---|
| 39 | # fifth parameter: place compiler will be copied once it's built |
|---|
| 40 | # sixth parameter: a directory to place information helpful in debugging compiler |
|---|
| 41 | # This build.cmd line will build gcc 4.2 with c++ and obj-c++ support |
|---|
| 42 | build.cmd ${worksrcpath}/build_gcc \ |
|---|
| 43 | \"${configure.universal_archs}\" \"${configure.universal_archs}\" \ |
|---|
| 44 | ${worksrcpath} ${build_prefix} ${destroot} ${worksrcpath}/debug |
|---|
| 45 | |
|---|
| 46 | destroot {} |
|---|
| 47 | |
|---|
| 48 | platform darwin 8 { |
|---|
| 49 | destroot.violate_mtree yes |
|---|
| 50 | # Delete docs and not violate_mtree |
|---|
| 51 | #system "rm -rf ${destroot}/Developer" |
|---|
| 52 | } |
|---|
| 53 | |
|---|
| 54 | platform darwin 9 { |
|---|
| 55 | post-destroot { |
|---|
| 56 | # This documentation is already installed in Xcode for 10.5 |
|---|
| 57 | system "rm -rf ${destroot}/Developer" |
|---|
| 58 | } |
|---|
| 59 | } |
|---|
| 60 | |
|---|
| 61 | post-destroot { |
|---|
| 62 | system "mkdir -p ${destroot}${prefix}" |
|---|
| 63 | system "rm -rf ${destroot}${prefix}/*" |
|---|
| 64 | system "mv -f ${destroot}${build_prefix}/* ${destroot}${prefix}" |
|---|
| 65 | system "rmdir ${destroot}${build_prefix}" |
|---|
| 66 | } |
|---|
| 67 | |
|---|
| 68 | livecheck.check regex |
|---|
| 69 | livecheck.regex gcc_42-(\\d+)\\.tar |
|---|
| 70 | |
|---|
| 71 | |
|---|