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

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

add openmaintainer

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.3 KB
Line 
1# $Id: Portfile 82555 2011-08-15 19:31:16Z mww@macports.org $
2
3PortSystem 1.0
4PortGroup select 1.0
5
6name                    gcc46
7version                 4.6-20110325
8revision                1
9platforms               darwin
10categories              lang
11maintainers             mww openmaintainer
12license                 GPLv3
13description             The GNU compiler collection, prerelease BETA
14long_description        The GNU compiler collection, including front ends for \
15                        C, C++, Objective-C and Objective-C++. This is a \
16                        prerelease BETA version and does not have all \
17                        available language front ends enabled.
18
19homepage                http://gcc.gnu.org/
20master_sites            ftp://ftp.gwdg.de/pub/linux/gcc/snapshots/${version}/:gcc \
21                        ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/snapshots/${version}/:gcc \
22                        ftp://gcc.gnu.org/pub/gcc/snapshots/${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 dcore               gcc-core-${version}.tar.bz2
29set dfort               gcc-fortran-${version}.tar.bz2
30set dcxx                gcc-g++-${version}.tar.bz2
31set djava               gcc-java-${version}.tar.bz2
32set dobjc               gcc-objc-${version}.tar.bz2
33set ecj                 ecj-4.5.jar
34distfiles               ${dcore}:gcc ${dfort}:gcc ${dcxx}:gcc ${djava}:gcc ${dobjc}:gcc ${ecj}:ecj
35extract.only            ${dcore} ${dfort} ${dcxx} ${djava} ${dobjc}
36
37checksums           gcc-core-${version}.tar.bz2 \
38                    md5     248d44becf2a44003c6418b34790e991 \
39                    sha1    44d90a72938dae3f030e0d9add80d3bc5611c035 \
40                    rmd160  185b83d1f7d9fadf2467558c4f7e61265484ab0a \
41                    gcc-fortran-${version}.tar.bz2 \
42                    md5     54d8384ca06094fd22f7916cceef6c2a \
43                    sha1    b23551b2733cd7cec32fc99fb1543176102cc064 \
44                    rmd160  52392d790deb828ee9564ccd1e5bb56093a6f1a8 \
45                    gcc-g++-${version}.tar.bz2 \
46                    md5     ccf12496a86e8be199f0df921ebda353 \
47                    sha1    c7b2e57bc00f00abf7de6260a9c291255fc3819a \
48                    rmd160  54426dd2c2d9da2420a8810eef661af59387de82 \
49                    gcc-java-${version}.tar.bz2 \
50                    md5     847c0a3d625e1b8ef3deb002d80210d9 \
51                    sha1    200182e4c46acd50480eba3f93ec0ae641d70a18 \
52                    rmd160  41fdbe02af2e5b6d203b0043acba54f23e67e488 \
53                    gcc-objc-${version}.tar.bz2 \
54                    md5     7ab165c510808682773d68272f266375 \
55                    sha1    64a9f4faa6346087d21cecaba159900e5fd58307 \
56                    rmd160  afef759e65f3f9a7ace1164b15fa7fdf21cdf245 \
57                    ecj-4.5.jar \
58                    md5     d7cd6a27c8801e66cbaa964a039ecfdb \
59                    sha1    58c1d79c64c8cd718550f32a932ccfde8d1e6449 \
60                    rmd160  d3f4da657f086b6423f74e93f001132f4855368a
61
62use_bzip2               yes
63
64depends_lib             port:gmp port:mpfr port:libiconv port:libmpc
65depends_run             port:gcc_select
66
67set major               4.6
68
69worksrcdir              build
70
71post-extract {
72        file mkdir ${worksrcpath}
73        copy ${distpath}/${ecj} ${workpath}/gcc-${version}/ecj.jar
74}
75
76# the generated compiler doesn't accept -arch
77configure.cc_archflags
78configure.cxx_archflags
79configure.objc_archflags
80configure.ld_archflags
81platform darwin {
82    configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
83}
84
85configure.cmd   ../gcc-${version}/configure
86configure.args  --enable-languages=c,c++,objc,obj-c++ \
87                --libdir=${prefix}/lib/${name} \
88                --includedir=${prefix}/include/${name} \
89                --infodir=${prefix}/share/info \
90                --mandir=${prefix}/share/man \
91                --datarootdir=${prefix}/share/gcc-${major} \
92                --with-local-prefix=${prefix} \
93                --with-system-zlib \
94                --disable-nls \
95                --program-suffix=-mp-${major} \
96                --with-gxx-include-dir=${prefix}/include/${name}/c++/ \
97                --with-gmp=${prefix} \
98                --with-mpfr=${prefix} \
99                --with-mpc=${prefix} \
100                --enable-stage1-checking \
101                --disable-multilib
102# do NOT use MacPorts binutils -- they do not work
103configure.env-append    AR_FOR_TARGET=/usr/bin/ar \
104                        AS_FOR_TARGET=/usr/bin/as \
105                        LD_FOR_TARGET=/usr/bin/ld \
106                        NM_FOR_TARGET=/usr/bin/nm \
107                        OBJDUMP_FOR_TARGET=/usr/bin/objdump \
108                        RANLIB_FOR_TARGET=/usr/bin/ranlib \
109                        STRIP_FOR_TARGET=/usr/bin/strip
110
111# http://trac.macports.org/ticket/29104
112if {${configure.compiler} == "llvm-gcc-4.2"} {
113    configure.compiler clang
114}
115
116build.target    bootstrap
117use_parallel_build      yes
118
119destroot.target install install-info-host
120
121post-destroot {
122        file delete -force ${destroot}${prefix}/share/man/man7 \
123                ${destroot}${prefix}/share/info
124        # install/copy ffitarget.h only if we have it
125        if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
126                file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
127        }
128}
129
130select.group    gcc
131select.file     ${filespath}/mp-${name}
132
133platform darwin 10 {
134        configure.args-append --enable-fully-dynamic-string
135}
136
137platform darwin 11 {
138        configure.args-append --enable-fully-dynamic-string
139}
140
141# due to popular request - untested for the BETA; will be removed as soon as other languages than C compile successfuly
142variant gfortran conflicts java \
143        description "Enables Fortran/gfortran; this language will be enabled in the final version - this variant is completely untested!" {
144        configure.args-delete --enable-languages=c,c++,objc,obj-c++
145        configure.args-append --enable-languages=c,c++,objc,obj-c++,fortran
146}
147
148# due to popular request - untested for the BETA; will be removed as soon as other languages than C compile successfuly
149variant java conflicts gfortran \
150        description "Enables Java/gcj; this language will be enabled in the final version - this variant is completely untested!" {
151        configure.args-delete --enable-languages=c,c++,objc,obj-c++
152        configure.args-append --enable-languages=c,c++,objc,obj-c++,java
153        post-destroot {
154                file rename ${destroot}${prefix}/share/python/aotcompile.py \
155                        ${destroot}${prefix}/share/python/aotcompile-46.py
156                file rename ${destroot}${prefix}/share/python/classfile.py \
157                        ${destroot}${prefix}/share/python/classfile-46.py
158        }
159}
160
161platform powerpc {
162    configure.universal_archs ppc ppc64
163}
164platform i386 {
165    configure.universal_archs i386 x86_64
166}
167configure.universal_cflags
168configure.universal_cxxflags
169configure.universal_ldflags
170configure.universal_args
171variant universal {
172    configure.args-delete --disable-multilib
173}
174
175livecheck.type  regex
176livecheck.url   ftp://gcc.gnu.org/pub/gcc/snapshots/
177livecheck.regex LATEST-4.6 -> (4.6-\[0-9\]+)
Note: See TracBrowser for help on using the repository browser.