Ticket #2920: Portfile.2

File Portfile.2, 1.6 KB (added by yves@…, 19 years ago)

Portfile that's darwin 8 aware

Line 
1# $Id: Portfile,v 1.6 2005/04/23 17:35:00 gwright Exp $
2
3PortSystem 1.0
4
5name                    gcc40
6version                 4.0.0
7revision                1
8platforms               darwin
9categories              lang
10maintainers             mww@opendarwin.org
11description             The GNU compiler collection
12long_description        The GNU compiler collection, including front ends for C, \
13                                C++, Objective-C, Java and Fortran95.
14
15homepage                http://gcc.gnu.org/
16master_sites    ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/ \
17                                gnu:/gcc/gcc-${version}
18
19distname                gcc-${version}
20checksums               md5 55ee7df1b29f719138ec063c57b89db6
21use_bzip2               yes
22
23depends_lib             port:gmp \
24                                port:mpfr
25
26set major               4.0
27
28worksrcdir              build
29
30pre-configure {
31        file mkdir ${worksrcpath}
32}
33
34configure.cmd   ${workpath}/gcc-${version}/configure
35configure.args  --enable-languages=c,c++,java,objc,f95 \
36                                --libdir=${prefix}/lib/gcc-${major} \
37                                --infodir=${prefix}/share/info \
38                                --mandir=${prefix}/share/man \
39                                --with-local-prefix=${prefix} \
40                                --with-system-zlib \
41                                --disable-nls \
42                                --program-suffix=-dp-${major} \
43                                --with-gxx-include-dir=${prefix}/include/gcc-${major}/c++/ \
44                                --with-gmp=${prefix} \
45                                --with-mpfr=${prefix}
46
47build.target    bootstrap STAGE1_CFLAGS="-force_cpusubtype_ALL"
48
49post-destroot {
50        cd ${destroot}${prefix}
51        file delete -force share/man/man7
52        file delete -force share/info
53}
54
55variant darwin_7 {
56        depends_build   port:odcctools
57
58        patch {
59                reinplace "s|/usr/bin/libtool|${prefix}/bin/odlibtool|g" \
60                        ${workpath}/gcc-${version}/gcc/config/darwin.h
61        }
62
63        configure-args-append   --with-as=${prefix}/bin/odas \
64                                                        --with-ld=${prefix}/bin/odld \
65                                                        --with-ar=${prefix}/bin/odar
66}