1 | # $Id: Portfile,v 1.6 2005/04/23 17:35:00 gwright Exp $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name gcc40 |
---|
6 | version 4.0.0 |
---|
7 | revision 1 |
---|
8 | platforms darwin |
---|
9 | categories lang |
---|
10 | maintainers mww@opendarwin.org |
---|
11 | description The GNU compiler collection |
---|
12 | long_description The GNU compiler collection, including front ends for C, \ |
---|
13 | C++, Objective-C, Java and Fortran95. |
---|
14 | |
---|
15 | homepage http://gcc.gnu.org/ |
---|
16 | master_sites ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/ \ |
---|
17 | gnu:/gcc/gcc-${version} |
---|
18 | |
---|
19 | distname gcc-${version} |
---|
20 | checksums md5 55ee7df1b29f719138ec063c57b89db6 |
---|
21 | use_bzip2 yes |
---|
22 | |
---|
23 | depends_lib port:gmp \ |
---|
24 | port:mpfr |
---|
25 | |
---|
26 | set major 4.0 |
---|
27 | |
---|
28 | worksrcdir build |
---|
29 | |
---|
30 | pre-configure { |
---|
31 | file mkdir ${worksrcpath} |
---|
32 | } |
---|
33 | |
---|
34 | configure.cmd ${workpath}/gcc-${version}/configure |
---|
35 | configure.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 | |
---|
47 | build.target bootstrap STAGE1_CFLAGS="-force_cpusubtype_ALL" |
---|
48 | |
---|
49 | post-destroot { |
---|
50 | cd ${destroot}${prefix} |
---|
51 | file delete -force share/man/man7 |
---|
52 | file delete -force share/info |
---|
53 | } |
---|
54 | |
---|
55 | variant 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 | } |
---|