1 | # $Id$ |
---|
2 | |
---|
3 | PortSystem 1.0 |
---|
4 | PortGroup select 1.0 |
---|
5 | |
---|
6 | name gcc46 |
---|
7 | epoch 1 |
---|
8 | version 4.6.1 |
---|
9 | platforms darwin |
---|
10 | categories lang |
---|
11 | maintainers mww |
---|
12 | license GPLv3 |
---|
13 | description The GNU compiler collection |
---|
14 | long_description The GNU compiler collection, including front ends for \ |
---|
15 | C, C++, Objective-C, Objective-C++ |
---|
16 | |
---|
17 | homepage http://gcc.gnu.org/ |
---|
18 | master_sites \ |
---|
19 | http://fileboar.com/gcc/releases/gcc-${version}/:gcc \ |
---|
20 | http://mirrors-us.seosue.com/gcc/releases/gcc-${version}/:gcc \ |
---|
21 | ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/releases/gcc-${version}/:gcc \ |
---|
22 | ftp://ftp.gwdg.de/pub/linux/gcc/releases/gcc-${version}/:gcc \ |
---|
23 | ftp://gcc.ftp.nluug.nl/mirror/languages/gcc/releases/gcc-${version}/:gcc \ |
---|
24 | ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/:gcc \ |
---|
25 | gnu:/gcc/gcc-${version}:gcc |
---|
26 | |
---|
27 | set dcore gcc-core-${version}.tar.bz2 |
---|
28 | set dcxx gcc-g++-${version}.tar.bz2 |
---|
29 | set dobjc gcc-objc-${version}.tar.bz2 |
---|
30 | distfiles ${dcore}:gcc ${dcxx}:gcc ${dobjc}:gcc |
---|
31 | extract.only ${dcore} ${dcxx} ${dobjc} |
---|
32 | |
---|
33 | checksums gcc-core-${version}.tar.bz2 \ |
---|
34 | md5 0c0e7e35d2215e19de9c97efba507553 \ |
---|
35 | gcc-g++-${version}.tar.bz2 \ |
---|
36 | md5 0d75ca7ca35b1e7f252223f9d23a6ad1 \ |
---|
37 | gcc-objc-${version}.tar.bz2 \ |
---|
38 | md5 cbf0d4b701827922cf37ba6a4ace0079 |
---|
39 | |
---|
40 | use_bzip2 yes |
---|
41 | |
---|
42 | depends_lib port:gmp port:mpfr port:libiconv port:libmpc |
---|
43 | depends_run port:gcc_select |
---|
44 | |
---|
45 | set major 4.6 |
---|
46 | |
---|
47 | worksrcdir build |
---|
48 | |
---|
49 | # the generated compiler doesn't accept -arch |
---|
50 | configure.cc_archflags |
---|
51 | configure.cxx_archflags |
---|
52 | configure.objc_archflags |
---|
53 | configure.ld_archflags |
---|
54 | platform darwin { |
---|
55 | configure.pre_args-append --build=${build_arch}-apple-darwin${os.major} |
---|
56 | } |
---|
57 | |
---|
58 | pre-configure { |
---|
59 | file mkdir ${worksrcpath} |
---|
60 | } |
---|
61 | |
---|
62 | configure.cmd ../gcc-${version}/configure |
---|
63 | configure.args --enable-languages=c,c++,objc,obj-c++ \ |
---|
64 | --libdir=${prefix}/lib/${name} \ |
---|
65 | --includedir=${prefix}/include/${name} \ |
---|
66 | --infodir=${prefix}/share/info \ |
---|
67 | --mandir=${prefix}/share/man \ |
---|
68 | --datarootdir=${prefix}/share/gcc-${major} \ |
---|
69 | --with-local-prefix=${prefix} \ |
---|
70 | --with-system-zlib \ |
---|
71 | --disable-nls \ |
---|
72 | --program-suffix=-mp-${major} \ |
---|
73 | --with-gxx-include-dir=${prefix}/include/${name}/c++/ \ |
---|
74 | --with-gmp=${prefix} \ |
---|
75 | --with-mpfr=${prefix} \ |
---|
76 | --with-mpc=${prefix} \ |
---|
77 | --enable-stage1-checking \ |
---|
78 | --disable-multilib |
---|
79 | # do NOT use MacPorts binutils -- they do not work |
---|
80 | configure.env-append AR_FOR_TARGET=/usr/bin/ar \ |
---|
81 | AS_FOR_TARGET=/usr/bin/as \ |
---|
82 | LD_FOR_TARGET=/usr/bin/ld \ |
---|
83 | NM_FOR_TARGET=/usr/bin/nm \ |
---|
84 | OBJDUMP_FOR_TARGET=/usr/bin/objdump \ |
---|
85 | RANLIB_FOR_TARGET=/usr/bin/ranlib \ |
---|
86 | STRIP_FOR_TARGET=/usr/bin/strip |
---|
87 | |
---|
88 | build.target bootstrap |
---|
89 | use_parallel_build yes |
---|
90 | |
---|
91 | destroot.target install install-info-host |
---|
92 | |
---|
93 | post-destroot { |
---|
94 | file delete -force ${destroot}${prefix}/share/man/man7 \ |
---|
95 | ${destroot}${prefix}/share/info |
---|
96 | # install/copy ffitarget.h only if we have it |
---|
97 | if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} { |
---|
98 | file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/ |
---|
99 | } |
---|
100 | } |
---|
101 | |
---|
102 | select.group gcc |
---|
103 | select.file ${filespath}/mp-${name} |
---|
104 | |
---|
105 | platform darwin 8 { |
---|
106 | # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45248 |
---|
107 | configure.args-append --with-dwarf2 |
---|
108 | } |
---|
109 | platform darwin 10 { |
---|
110 | configure.args-append --enable-fully-dynamic-string |
---|
111 | } |
---|
112 | |
---|
113 | platform powerpc { |
---|
114 | configure.universal_archs ppc ppc64 |
---|
115 | } |
---|
116 | platform i386 { |
---|
117 | configure.universal_archs i386 x86_64 |
---|
118 | } |
---|
119 | configure.universal_cflags |
---|
120 | configure.universal_cxxflags |
---|
121 | configure.universal_ldflags |
---|
122 | configure.universal_args |
---|
123 | variant universal { |
---|
124 | configure.args-delete --disable-multilib |
---|
125 | } |
---|
126 | |
---|
127 | livecheck.type regex |
---|
128 | livecheck.url http://gcc.gnu.org/gcc-4.6/ |
---|
129 | livecheck.regex GCC (4\\.6\\.\[0-9\]) |
---|