source: trunk/dports/lang/gcc46/Portfile @ 87835

Last change on this file since 87835 was 87835, checked in by adfernandes@…, 8 years ago

lang/gcc46: remove --enable-fully-dynamic-string as per #31171 and openmaintainer

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.4 KB
Line 
1# $Id: Portfile 87835 2011-12-07 20:05:52Z adfernandes@macports.org $
2
3PortSystem 1.0
4PortGroup select 1.0
5
6name                    gcc46
7version                 4.6.2
8platforms               darwin
9categories              lang
10maintainers             mww openmaintainer
11# an exception in the license allows dependents to not be GPL
12license                 {GPL-3+ Permissive}
13description             The GNU compiler collection
14long_description        The GNU compiler collection, including front ends for \
15                        C, C++, Objective-C, Objective-C++ and Fortran.
16
17homepage                http://gcc.gnu.org/
18master_sites            ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/releases/gcc-${version}/:gcc \
19                        ftp://ftp.gwdg.de/pub/linux/gcc/releases/gcc-${version}/:gcc \
20                        ftp://gcc.ftp.nluug.nl/mirror/languages/gcc/releases/gcc-${version}/:gcc \
21                        ftp://gcc.gnu.org/pub/gcc/releases/gcc-${version}/:gcc \
22                        gnu:/gcc/gcc-${version}:gcc \
23                        ftp://sourceware.org/pub/java/:ecj \
24                        http://mirrors.kernel.org/sources.redhat.com/java/:ecj \
25                        http://www.mirrorservice.org/sites/sources.redhat.com/pub/java/:ecj \
26                        http://ftp-stud.fht-esslingen.de/pub/Mirrors/sourceware.org/java/:ecj
27
28set ecj                 ecj-4.5.jar
29set gcc                 gcc-${version}.tar.bz2
30distfiles               ${gcc}:gcc ${ecj}:ejc
31extract.only            ${gcc}
32
33checksums           gcc-4.6.2.tar.bz2 \
34                    rmd160  e7041933b39629f9524848dcf81a1a4c02a225c6 \
35                    sha256  60b05463dfe18d40d68fb8a71b25b408a01f86cc6ceaf5e6b22238b6b0f450c2 \
36                    ecj-4.5.jar \
37                    md5     d7cd6a27c8801e66cbaa964a039ecfdb \
38                    sha1    58c1d79c64c8cd718550f32a932ccfde8d1e6449 \
39                    rmd160  d3f4da657f086b6423f74e93f001132f4855368a
40
41use_bzip2               yes
42
43depends_lib             port:gmp port:mpfr port:libiconv port:libmpc port:ppl
44depends_run             port:gcc_select
45
46set major               4.6
47
48worksrcdir              build
49
50post-extract {
51        file mkdir ${worksrcpath}
52        copy ${distpath}/${ecj} ${workpath}/gcc-${version}/ecj.jar
53}
54
55# the generated compiler doesn't accept -arch
56configure.cc_archflags
57configure.cxx_archflags
58configure.objc_archflags
59configure.ld_archflags
60platform darwin {
61    configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
62}
63
64configure.cmd   ../gcc-${version}/configure
65# 'java' and 'go' lead to compilation errors on 10.5/XCode 3.x
66configure.args  --enable-languages=c,c++,objc,obj-c++,lto,fortran \
67                --libdir=${prefix}/lib/${name} \
68                --includedir=${prefix}/include/${name} \
69                --infodir=${prefix}/share/info \
70                --mandir=${prefix}/share/man \
71                --datarootdir=${prefix}/share/gcc-${major} \
72                --with-local-prefix=${prefix} \
73                --with-libiconv-prefix=${prefix} \
74                --with-system-zlib \
75                --disable-nls \
76                --program-suffix=-mp-${major} \
77                --with-gxx-include-dir=${prefix}/include/${name}/c++/ \
78                --with-gmp=${prefix} \
79                --with-mpfr=${prefix} \
80                --with-mpc=${prefix} \
81                --with-ppl=${prefix} \
82                --enable-stage1-checking \
83                --disable-multilib
84# do NOT use MacPorts binutils -- they do not work
85configure.env-append    AR_FOR_TARGET=/usr/bin/ar \
86                        AS_FOR_TARGET=/usr/bin/as \
87                        LD_FOR_TARGET=/usr/bin/ld \
88                        NM_FOR_TARGET=/usr/bin/nm \
89                        OBJDUMP_FOR_TARGET=/usr/bin/objdump \
90                        RANLIB_FOR_TARGET=/usr/bin/ranlib \
91                        STRIP_FOR_TARGET=/usr/bin/strip \
92                        OTOOL=/usr/bin/otool \
93                        OTOOL64=/usr/bin/otool
94
95# http://trac.macports.org/ticket/29104
96if {${configure.compiler} == "llvm-gcc-4.2"} {
97    configure.compiler clang
98}
99
100build.target    bootstrap
101use_parallel_build      yes
102
103destroot.target install install-info-host
104
105post-destroot {
106        file delete -force ${destroot}${prefix}/share/man/man7 \
107                ${destroot}${prefix}/share/info
108        # install/copy ffitarget.h only if we have it
109        if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
110                file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
111        }
112}
113
114select.group    gcc
115select.file     ${filespath}/mp-${name}
116
117platform darwin 8 {
118        # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45248
119        configure.args-append --with-dwarf2
120}
121
122platform powerpc {
123    configure.universal_archs ppc ppc64
124}
125platform i386 {
126    configure.universal_archs i386 x86_64
127}
128configure.universal_cflags
129configure.universal_cxxflags
130configure.universal_ldflags
131configure.universal_args
132variant universal {
133    configure.args-delete --disable-multilib
134}
135
136variant cloog description {enable the CLOOG Graphite loop optimizations} {
137    configure.args-append   --with-cloog=${prefix} --enable-cloog-backend=isl
138    depends.lib-append      port:cloog
139}
140
141livecheck.type  regex
142livecheck.url   http://gcc.gnu.org/gcc-4.6/
143livecheck.regex GCC (4\\.6\\.\[0-9\])
Note: See TracBrowser for help on using the repository browser.