Ticket #16666: Portfile.5

File Portfile.5, 2.4 KB (added by jm@…, 16 years ago)
Line 
1# $Id: Portfile 35833 2008-04-07 21:36:27Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name                apple-gcc42
6version             5566
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     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
22set build_prefix      /usr
23
24post-extract {
25    file mkdir ${worksrcpath}/debug
26    file mkdir ${destroot}
27}
28
29post-patch {
30    reinplace "s|MAKEINFO=\$\(MAKEINFO\) \$\(MAKEINFOFLAGS\)|MAKEINFO=makeinfo \$\(MAKEINFOFLAGS\)|" ${worksrcpath}/Makefile.in
31}
32
33use_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
42build.cmd   ${worksrcpath}/build_gcc \
43            \"${configure.universal_archs}\" \"${configure.universal_archs}\" \
44            ${worksrcpath} ${build_prefix} ${destroot} ${worksrcpath}/debug
45
46destroot {}
47
48platform darwin 8 {
49    destroot.violate_mtree yes
50    # Delete docs and not violate_mtree
51    #system "rm -rf ${destroot}/Developer"
52}
53
54platform 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
61post-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
68livecheck.check         regex
69livecheck.regex         gcc_42-(\\d+)\\.tar
70
71