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 | # The prefix is set to /usr because parts of the script are hardcoded to expect it |
---|
20 | set build_prefix /usr |
---|
21 | |
---|
22 | post-extract { |
---|
23 | file mkdir ${worksrcpath}/debug |
---|
24 | file mkdir ${destroot} |
---|
25 | } |
---|
26 | |
---|
27 | post-patch { |
---|
28 | reinplace "s|MAKEINFO=\$\(MAKEINFO\) \$\(MAKEINFOFLAGS\)|MAKEINFO=makeinfo \$\(MAKEINFOFLAGS\)|" ${worksrcpath}/Makefile.in |
---|
29 | } |
---|
30 | |
---|
31 | use_configure no |
---|
32 | |
---|
33 | # first parameter: space-separated list of archs compiler will run on |
---|
34 | # second parameter: space-separated list of archs compiler will generate code for |
---|
35 | # third parameter: path to the compiler sources |
---|
36 | # fourth parameter: location compiler will be installed to. /usr is expected |
---|
37 | # fifth parameter: place compiler will be copied once it's built |
---|
38 | # sixth parameter: a directory to place information helpful in debugging compiler |
---|
39 | # This build.cmd line will build gcc 4.2 with c++ and obj-c++ support |
---|
40 | build.cmd ${worksrcpath}/build_gcc \ |
---|
41 | \"${configure.universal_archs}\" \"${configure.universal_archs}\" \ |
---|
42 | ${worksrcpath} ${build_prefix} ${destroot} ${worksrcpath}/debug |
---|
43 | |
---|
44 | destroot {} |
---|
45 | |
---|
46 | platform darwin 8 { |
---|
47 | destroot.violate_mtree yes |
---|
48 | # Delete docs and not violate_mtree |
---|
49 | #system "rm -rf ${destroot}/Developer" |
---|
50 | } |
---|
51 | |
---|
52 | platform darwin 9 { |
---|
53 | post-destroot { |
---|
54 | # This documentation is already installed in Xcode for 10.5 |
---|
55 | system "rm -rf ${destroot}/Developer" |
---|
56 | } |
---|
57 | } |
---|
58 | |
---|
59 | post-destroot { |
---|
60 | system "mkdir -p ${destroot}${prefix}" |
---|
61 | system "rm -rf ${destroot}${prefix}/*" |
---|
62 | system "mv -f ${destroot}${build_prefix}/* ${destroot}${prefix}" |
---|
63 | system "rmdir ${destroot}${build_prefix}" |
---|
64 | } |
---|
65 | |
---|
66 | livecheck.check moddate |
---|
67 | livecheck.url ${master_sites} |
---|
68 | |
---|