Ticket #16666: Portfile.4

File Portfile.4, 2.2 KB (added by illogic-al@…, 15 years ago)

Final portfile. Compiles apple gcc4.2 with c++ and objc++ compiler.

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
46platform darwin 8 {
47    destroot.violate_mtree yes
48    # Delete docs and not violate_mtree
49    #system "rm -rf ${destroot}/Developer"
50}
51
52platform 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
59post-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
66livecheck.check         moddate
67livecheck.url           ${master_sites}
68