1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name gcc43 |
---|
7 | version 4.3.2 |
---|
8 | revision 1 |
---|
9 | platforms darwin |
---|
10 | categories lang |
---|
11 | maintainers mww |
---|
12 | description The GNU compiler collection |
---|
13 | long_description The GNU compiler collection, including front ends for \ |
---|
14 | C, C++, Ada, Objective-C, Objective-C++, Java and Fortran95. |
---|
15 | |
---|
16 | homepage http://gcc.gnu.org/ |
---|
17 | master_sites ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/releases/gcc-${version}/ \ |
---|
18 | ftp://ftp.gwdg.de/pub/linux/gcc/releases/gcc-${version}/ \ |
---|
19 | ftp://gcc.ftp.nluug.nl/mirror/languages/gcc/releases/gcc-${version}/ \ |
---|
20 | ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/ \ |
---|
21 | gnu:/gcc/gcc-${version} |
---|
22 | |
---|
23 | set dcore gcc-core-${version}.tar.bz2 |
---|
24 | set dada gcc-ada-${version}.tar.bz2 |
---|
25 | set dfort gcc-fortran-${version}.tar.bz2 |
---|
26 | set dcxx gcc-g++-${version}.tar.bz2 |
---|
27 | set djava gcc-java-${version}.tar.bz2 |
---|
28 | set dobjc gcc-objc-${version}.tar.bz2 |
---|
29 | distfiles ${dcore} ${dada} ${dfort} ${dcxx} ${djava} ${dobjc} |
---|
30 | |
---|
31 | checksums ${dcore} sha1 8137e6f12fea6730873ab6230e6f6a768443de83 \ |
---|
32 | ${dada} sha1 f5c4b2d7a35e55ee801ec1915a824d403f2367fd \ |
---|
33 | ${dfort} sha1 1d200514f87dc913fb632e379d2c452937b9b04e \ |
---|
34 | ${dcxx} sha1 373245dcf103550980510874bb8c0cd1a6271ae5 \ |
---|
35 | ${djava} sha1 d98caa7c1a7f031df824793327c364733a3cab42 \ |
---|
36 | ${dobjc} sha1 3377f5e91d1fa68993447894369ba5cbe2741157 |
---|
37 | |
---|
38 | use_bzip2 yes |
---|
39 | |
---|
40 | depends_lib port:gmp port:mpfr port:libiconv |
---|
41 | |
---|
42 | set major 4.3 |
---|
43 | |
---|
44 | worksrcdir build |
---|
45 | |
---|
46 | pre-configure { |
---|
47 | file mkdir ${worksrcpath} |
---|
48 | } |
---|
49 | |
---|
50 | configure.cmd ../gcc-${version}/configure |
---|
51 | configure.args --enable-languages=c,c++,objc,obj-c++,java,fortran \ |
---|
52 | --libdir=${prefix}/lib/${name} \ |
---|
53 | --includedir=${prefix}/include/${name} \ |
---|
54 | --infodir=${prefix}/share/info \ |
---|
55 | --mandir=${prefix}/share/man \ |
---|
56 | --with-local-prefix=${prefix} \ |
---|
57 | --with-system-zlib \ |
---|
58 | --disable-nls \ |
---|
59 | --program-suffix=-mp-${major} \ |
---|
60 | --with-gxx-include-dir=${prefix}/include/${name}/c++/ \ |
---|
61 | --with-gmp=${prefix} \ |
---|
62 | --with-mpfr=${prefix} |
---|
63 | # do NOT use MacPorts binutils -- they do not work |
---|
64 | configure.env-append AR_FOR_TARGET=/usr/bin/ar \ |
---|
65 | AS_FOR_TARGET=/usr/bin/as \ |
---|
66 | LD_FOR_TARGET=/usr/bin/ld \ |
---|
67 | NM_FOR_TARGET=/usr/bin/nm \ |
---|
68 | OBJDUMP_FOR_TARGET=/usr/bin/objdump \ |
---|
69 | RANLIB_FOR_TARGET=/usr/bin/ranlib \ |
---|
70 | STRIP_FOR_TARGET=/usr/bin/strip |
---|
71 | |
---|
72 | use_parallel_build yes |
---|
73 | |
---|
74 | destroot.target install install-info-host |
---|
75 | # install-info # errors on objc-info files |
---|
76 | |
---|
77 | post-destroot { |
---|
78 | # move manuals to gcc43-specific directory |
---|
79 | xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/man/man7 |
---|
80 | xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/info |
---|
81 | eval xinstall -m 0644 [glob ${destroot}${prefix}/share/man/man7/*] ${destroot}${prefix}/share/gcc43/man/man7 |
---|
82 | eval xinstall -m 0644 [glob ${destroot}${prefix}/share/info/*] ${destroot}${prefix}/share/gcc43/info |
---|
83 | # install/copy ffitarget.h only if we have it |
---|
84 | if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} { |
---|
85 | file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/ |
---|
86 | } |
---|
87 | # install select file for gcc_select |
---|
88 | xinstall -m 755 -d ${destroot}${prefix}/etc/select/gcc |
---|
89 | xinstall -m 444 ${filespath}/mp-gcc43 ${destroot}${prefix}/etc/select/gcc/ |
---|
90 | } |
---|
91 | |
---|
92 | #platform darwin 7 { |
---|
93 | # configure.cflags-append -force_cpusubtype_ALL |
---|
94 | # configure.env BOOT_CFLAGS="-g -O2 -force_cpusubtype_ALL" |
---|
95 | # build.args-append XCFLAGS=-force_cpusubtype_ALL |
---|
96 | #} |
---|
97 | |
---|
98 | platform powerpc { |
---|
99 | configure.args-append --disable-multilib |
---|
100 | } |
---|
101 | |
---|
102 | # Java support does not compile on 10.4 |
---|
103 | platform darwin 8 { |
---|
104 | configure.args-delete --enable-languages=c,c++,ada,objc,obj-c++,java,fortran |
---|
105 | configure.args-append --enable-languages=c,c++,ada,objc,obj-c++,fortran |
---|
106 | } |
---|
107 | |
---|
108 | # odcctools currently do not compile for x64 - move to variant for the time being |
---|
109 | #variant odcctools \ |
---|
110 | # description "Use the odcctools instead of the system provided ones - does not work for x64 currently!" { |
---|
111 | # depends_lib-append port:odcctools |
---|
112 | # patch { |
---|
113 | # reinplace "s|/usr/bin/libtool|${prefix}/bin/odlibtool|g" \ |
---|
114 | # ${workpath}/gcc-${version}/gcc/config/darwin.h |
---|
115 | # } |
---|
116 | # configure.args-append --with-as=${prefix}/bin/odas \ |
---|
117 | # --with-ld=${prefix}/bin/odld \ |
---|
118 | # --with-ar=${prefix}/bin/odar |
---|
119 | #} |
---|
120 | |
---|
121 | # |
---|
122 | # Ada is the only language apart from C which is self hosted - meaning: you need |
---|
123 | # an ada compiler to compile ada. hence it is just a variant. |
---|
124 | # |
---|
125 | variant macada \ |
---|
126 | description "Adds Ada support using the MacAda compiler to bootstrap!" { |
---|
127 | configure.args-delete --enable-languages=c,c++,objc,obj-c++,java,fortran |
---|
128 | configure.args-append --enable-languages=c,c++,ada,objc,obj-c++,java,fortran |
---|
129 | configure.cc /usr/local/ada-4.3/bin/gcc |
---|
130 | configure.cpp /usr/local/ada-4.3/bin/cpp |
---|
131 | configure.cxx /usr/local/ada-4.3/bin/g++ |
---|
132 | configure.objc /usr/local/ada-4.3/bin/gcc |
---|
133 | configure.env-append PATH=/usr/local/ada-4.3/bin:$env(PATH) |
---|
134 | configure.env-append GNATMAKE=/usr/local/ada-4.3/bin/gnatmake |
---|
135 | configure.env-append GNATBIND=/usr/local/ada-4.3/bin/gnatbind |
---|
136 | } |
---|
137 | |
---|
138 | variant ada \ |
---|
139 | description "Adds Ada support using the MacPorts Ada compiler to bootstrap!" { |
---|
140 | configure.args-delete --enable-languages=c,c++,objc,obj-c++,java,fortran |
---|
141 | configure.args-append --enable-languages=c,c++,ada,objc,obj-c++,java,fortran |
---|
142 | configure.cc /opt/local/bin/gcc-mp-4.3 |
---|
143 | configure.cpp /opt/local/bin/cpp-mp-4.3 |
---|
144 | configure.cxx /opt/local/bin/g++-mp-4.3 |
---|
145 | configure.objc /opt/local/bin/gcc-mp-4.3 |
---|
146 | configure.env-append PATH=/opt/local/bin:$env(PATH) |
---|
147 | configure.env-append GNATMAKE=/opt/local/bin/gnatmake |
---|
148 | configure.env-append GNATBIND=/opt/local/bin/gnatbind |
---|
149 | } |
---|
150 | |
---|
151 | livecheck.check regex |
---|
152 | livecheck.url http://gcc.gnu.org/gcc-4.3/ |
---|
153 | livecheck.regex GCC (4\\.3\\.\[0-9\]) |
---|
154 | |
---|
155 | #vim: set nowrap tabstop=4 shiftwidth=4 softtabstop=4 expandtab : |
---|
156 | #vim: set textwidth=0 filetype=tcl foldmethod=marker nospell : |
---|