1 | # $Id: Portfile,v 1.10 2006/05/30 16:34:07 mww Exp $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name gcc42 |
---|
6 | version 4.2-20060729 |
---|
7 | revision 1 |
---|
8 | platforms darwin |
---|
9 | categories lang |
---|
10 | maintainers mww@opendarwin.org |
---|
11 | description The GNU compiler collection, prerelease BETA |
---|
12 | long_description The GNU compiler collection, including front ends for C, \ |
---|
13 | C++, Objective-C, Objective-C++, Java and Fortran95, \ |
---|
14 | prerelease BETA version. |
---|
15 | |
---|
16 | homepage http://gcc.gnu.org/ |
---|
17 | master_sites ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/snapshots/${version}/ \ |
---|
18 | ftp://ftp.gwdg.de/pub/linux/gcc/snapshots/${version}/ \ |
---|
19 | ftp://gcc.gnu.org/pub/gcc/snapshots/${version}/ |
---|
20 | |
---|
21 | set dcore gcc-core-${version}.tar.bz2 |
---|
22 | set dfort gcc-fortran-${version}.tar.bz2 |
---|
23 | set dcxx gcc-g++-${version}.tar.bz2 |
---|
24 | set djava gcc-java-${version}.tar.bz2 |
---|
25 | set dobjc gcc-objc-${version}.tar.bz2 |
---|
26 | distfiles ${dcore} ${dfort} ${dcxx} ${djava} ${dobjc} |
---|
27 | |
---|
28 | checksums ${dcore} sha1 be3b0632283b1c117f7a20964aa462184c35b19d \ |
---|
29 | ${dfort} sha1 df25b05af2da2fd0ea7e0d59f2fbb5816640f463 \ |
---|
30 | ${dcxx} sha1 dfce7384ec5941b625f3e5238b8b26e1aac6b6a7 \ |
---|
31 | ${djava} sha1 3801bb518b19b4109d0ee9db638e87f7bee659b5 \ |
---|
32 | ${dobjc} sha1 cb3677708f8a86bebb29712c932eedcc534f4ccf |
---|
33 | |
---|
34 | use_bzip2 yes |
---|
35 | |
---|
36 | depends_lib port:gmp port:mpfr port:libiconv port:odcctools |
---|
37 | |
---|
38 | set major 4.2 |
---|
39 | |
---|
40 | worksrcdir build |
---|
41 | |
---|
42 | patch { |
---|
43 | reinplace "s|/usr/bin/libtool|${prefix}/bin/odlibtool|g" \ |
---|
44 | ${workpath}/gcc-${version}/gcc/config/darwin.h |
---|
45 | } |
---|
46 | |
---|
47 | pre-configure { |
---|
48 | file mkdir ${worksrcpath} |
---|
49 | } |
---|
50 | |
---|
51 | configure.cmd ../gcc-${version}/configure |
---|
52 | configure.args --enable-languages=c,c++,java,objc,obj-c++,fortran \ |
---|
53 | --libdir=${prefix}/lib/${name} \ |
---|
54 | --includedir=${prefix}/include/${name} \ |
---|
55 | --infodir=${prefix}/share/info \ |
---|
56 | --mandir=${prefix}/share/man \ |
---|
57 | --with-local-prefix=${prefix} \ |
---|
58 | --with-system-zlib \ |
---|
59 | --disable-nls \ |
---|
60 | --program-suffix=-dp-${major} \ |
---|
61 | --with-gxx-include-dir=${prefix}/include/${name}/c++/ \ |
---|
62 | --with-gmp=${prefix} \ |
---|
63 | --with-mpfr=${prefix} \ |
---|
64 | --with-as=${prefix}/bin/odas \ |
---|
65 | --with-ld=${prefix}/bin/odld \ |
---|
66 | --with-ar=${prefix}/bin/odar |
---|
67 | |
---|
68 | build.target bootstrap |
---|
69 | build.args -j 2 |
---|
70 | |
---|
71 | post-destroot { |
---|
72 | file delete -force ${destroot}${prefix}/share/man/man7 \ |
---|
73 | ${destroot}${prefix}/share/info |
---|
74 | } |
---|
75 | |
---|
76 | #platform darwin 7 { |
---|
77 | # configure.env CFLAGS=-force_cpusubtype_ALL \ |
---|
78 | # BOOT_CFLAGS="-g -O2 -force_cpusubtype_ALL" |
---|
79 | # build.args-append XCFLAGS=-force_cpusubtype_ALL |
---|
80 | #} |
---|
81 | |
---|
82 | platform darwin 8 { |
---|
83 | configure.env CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0 |
---|
84 | } |
---|
85 | |
---|
86 | platform powerpc { |
---|
87 | configure.args-append --disable-multilib |
---|
88 | post-destroot { |
---|
89 | system "cd ${destroot}${prefix}/include/${name} && \ |
---|
90 | cp ../../lib/${name}/gcc/*/4.2.0/include/libffi/ffitarget.h ." |
---|
91 | } |
---|
92 | } |
---|
93 | |
---|