Ticket #16666: Portfile.3

File Portfile.3, 1.9 KB (added by illogic-al@…, 16 years ago)

New apple-gcc42 Portfile

Line 
1# $Id: Portfile 35833 2008-04-07 21:36:27Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name                apple-gcc42
6version             5564
7categories          lang
8platforms           darwin
9maintainers         mww
10description         Apple's version of gcc 4.2
11long_description    Apple's version of the GNU compiler collection, \
12                    version 4.2. Supports C and Objective-C.
13
14homepage            http://developer.apple.com/documentation/DeveloperTools/gcc-4.2/gcc/
15master_sites        http://www.opensource.apple.com/darwinsource/tarballs/other/
16distname            gcc_42-${version}
17checksums           md5 cc919b07776db1a209ccaa48b0e19da7
18
19# The prefix is set to /usr because parts of the script are hardcoded to expect it
20set build_prefix      /usr
21
22post-extract {
23    file mkdir ${worksrcpath}/debug
24    file mkdir ${destroot}
25}
26
27post-patch {
28    reinplace "s|MAKEINFO=\$\(MAKEINFO\) \$\(MAKEINFOFLAGS\)|MAKEINFO=makeinfo \$\(MAKEINFOFLAGS\)|" ${worksrcpath}/Makefile.in
29}
30
31use_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
40build.cmd   ${worksrcpath}/build_gcc \
41            \"${configure.universal_archs}\" \"${configure.universal_archs}\" \
42            ${worksrcpath} ${build_prefix} ${destroot} ${worksrcpath}/debug
43
44destroot {}
45
46pre-activate {
47    system "mkdir -p ${destroot}${prefix}"
48    system "mv -f ${destroot}${build_prefix}/* ${destroot}${prefix}"
49    system "rmdir ${destroot}${build_prefix}"
50}
51
52destroot.violate_mtree yes
53
54livecheck.check         moddate
55livecheck.url           ${master_sites}
56