| 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 5564 |
|---|
| 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 cc919b07776db1a209ccaa48b0e19da7 |
|---|
| 18 | |
|---|
| 19 | # Unset for macports |
|---|
| 20 | set prefix /usr |
|---|
| 21 | |
|---|
| 22 | post-extract { |
|---|
| 23 | file mkdir ${worksrcpath}/debug |
|---|
| 24 | file mkdir ${workpath}/destroot |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | post-patch { |
|---|
| 28 | reinplace "s|MAKEFLAGS=\$\{LOCAL_MAKEFLAGS-\"-j \$SYSCTL\"\}|MAKEFLAGS=\$\{LOCAL_MAKEFLAGS-\"-j 4\"\}|" ${worksrcpath}/build_gcc |
|---|
| 29 | reinplace "s|MAKEINFO=\$\(MAKEINFO\) \$\(MAKEINFOFLAGS\)|MAKEINFO=makeinfo \$\(MAKEINFOFLAGS\)|" ${worksrcpath}/Makefile.in |
|---|
| 30 | } |
|---|
| 31 | |
|---|
| 32 | use_configure no |
|---|
| 33 | # This will automatically build gcc 4.2 with c++ and obj-c++ support |
|---|
| 34 | build.cmd ${worksrcpath}/build_gcc \"ppc i386\" \"ppc i386\" \ |
|---|
| 35 | ${worksrcpath} ${prefix} ${workpath}/destroot ${worksrcpath}/debug |
|---|
| 36 | |
|---|
| 37 | destroot {} |
|---|
| 38 | |
|---|
| 39 | platform darwin 9 { |
|---|
| 40 | # So I can use pkgs on 10.4 if built on 10.5 |
|---|
| 41 | post-destroot { |
|---|
| 42 | system "cd ${destroot}${prefix}/libexec/gcc;ln -s i686-apple-darwin9 i686-apple-darwin8" |
|---|
| 43 | system "cd ${destroot}${prefix}/libexec/gcc;ln -s powerpc-apple-darwin9 powerpc-apple-darwin8" |
|---|
| 44 | system "cd ${destroot}${prefix}/lib/gcc;ln -s i686-apple-darwin9 i686-apple-darwin8" |
|---|
| 45 | system "cd ${destroot}${prefix}/lib/gcc;ln -s powerpc-apple-darwin9 powerpc-apple-darwin8" |
|---|
| 46 | # Delete docs dir because installing to the wrong location irks me and I don't want to fix it |
|---|
| 47 | # Bonus points to whoever reinplaces to correct location |
|---|
| 48 | system "rm -r ${destroot}/Developer" |
|---|
| 49 | } |
|---|
| 50 | } |
|---|
| 51 | |
|---|
| 52 | destroot.violate_mtree yes |
|---|
| 53 | |
|---|
| 54 | livecheck.check moddate |
|---|
| 55 | livecheck.url ${master_sites} |
|---|
| 56 | |
|---|