1 | # $Id: Portfile,v 1.2 2005/04/08 06:02:08 mww Exp $ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | |
---|
5 | name gcc40 |
---|
6 | version 4.0-20050402 |
---|
7 | revision 1 |
---|
8 | platforms darwin |
---|
9 | categories lang |
---|
10 | maintainers mww@opendarwin.org |
---|
11 | description The GNU compiler collection, beta version |
---|
12 | long_description ${description} |
---|
13 | |
---|
14 | homepage http://gcc.gnu.org/ |
---|
15 | master_sites ftp://ftp.gwdg.de/pub/linux/gcc/snapshots/${version} \ |
---|
16 | ftp://ftp.nluug.nl/mirror/languages/gcc/snapshots/${version} \ |
---|
17 | http://mirrors.rcn.net/pub/sourceware/gcc/snapshots/${version} |
---|
18 | |
---|
19 | distname gcc-${version} |
---|
20 | checksums md5 638325368cd4e7a37dae40bb4eeee902 |
---|
21 | use_bzip2 yes |
---|
22 | |
---|
23 | depends_lib lib:libgmp.3:gmp |
---|
24 | |
---|
25 | set major 4.0 |
---|
26 | |
---|
27 | worksrcdir build |
---|
28 | |
---|
29 | pre-configure { |
---|
30 | file mkdir ${worksrcpath} |
---|
31 | } |
---|
32 | |
---|
33 | configure.cmd ${workpath}/gcc-${version}/configure |
---|
34 | configure.args --enable-languages=c,objc \ |
---|
35 | --libdir=${prefix}/lib/gcc-${major} \ |
---|
36 | --infodir=${prefix}/share/info \ |
---|
37 | --mandir=${prefix}/share/man \ |
---|
38 | --with-system-zlib \ |
---|
39 | --disable-nls \ |
---|
40 | --with-gmp=${prefix} \ |
---|
41 | --with-local-prefix=${prefix} \ |
---|
42 | --program-suffix=-${major} |
---|
43 | |
---|
44 | build.target bootstrap STAGE1_CFLAGS="-force_cpusubtype_ALL" |
---|
45 | |
---|
46 | post-destroot { |
---|
47 | cd ${destroot}${prefix} |
---|
48 | file delete -force share/man/man7 |
---|
49 | file delete -force share/info |
---|
50 | } |
---|
51 | |
---|
52 | variant puredarwin { |
---|
53 | depends_build bin:odas:odcctools |
---|
54 | patch { |
---|
55 | system "perl -pi -e 's,/usr/bin/libtool,${prefix}/bin/odlibtool,;' ${workpath}/gcc-${version}/gcc/config/darwin.h" |
---|
56 | } |
---|
57 | post-patch { |
---|
58 | if { ! [ file exists /usr/lib/libmx.dylib ] } { |
---|
59 | file link -symbolic /usr/lib/libmx.dylib /usr/lib/libSystem.B.dylib |
---|
60 | } |
---|
61 | } |
---|
62 | configure.args-append --with-as=${prefix}/bin/odas \ |
---|
63 | --with-ld=${prefix}/bin/odld |
---|
64 | } |
---|