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

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

new port lang/gcc46

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.0 KB
Line 
1# $Id: Portfile 67080 2010-04-28 16:26:50Z mww@macports.org $
2
3PortSystem 1.0
4
5name                    gcc46
6version                 4.6-20100424
7platforms               darwin
8categories              lang
9maintainers             mww
10license                 GPLv3
11description             The GNU compiler collection, prerelease BETA
12long_description        The GNU compiler collection, including front ends for \
13                        C, C++, Objective-C and Objective-C++. This is a \
14                        prerelease BETA version and does not have all \
15                        available language front ends enabled.
16
17homepage                http://gcc.gnu.org/
18master_sites    ftp://ftp.gwdg.de/pub/linux/gcc/snapshots/${version}/ \
19                                ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/snapshots/${version}/ \
20                                ftp://gcc.gnu.org/pub/gcc/snapshots/${version}/
21
22set dcore               gcc-core-${version}.tar.bz2
23set dfort               gcc-fortran-${version}.tar.bz2
24set dcxx                gcc-g++-${version}.tar.bz2
25set djava               gcc-java-${version}.tar.bz2
26set dobjc               gcc-objc-${version}.tar.bz2
27distfiles               ${dcore} ${dfort} ${dcxx} ${djava} ${dobjc}
28
29checksums           gcc-core-${version}.tar.bz2 \
30                    md5     493cb9dd52d958f8a2a44b2621a23e81 \
31                    sha1    dce21faaa3cb5dff1e7ed3e2b544372b59973ced \
32                    rmd160  e19ee9fb924ef54dfd12e32c9f0fbaf9c4baf282 \
33                    gcc-fortran-${version}.tar.bz2 \
34                    md5     bf4c271e995e05f4781b6b0e8d799c65 \
35                    sha1    701e5102367f46f7f4117b4cacd73f6a4bd18009 \
36                    rmd160  60c4a98d8887ee8756af7adea9839cfdcbdba258 \
37                    gcc-g++-${version}.tar.bz2 \
38                    md5     25f3551d1136732f6bc1d16f0ad96067 \
39                    sha1    4b916e15bb04fdc7eba7922dd357cff167555cd1 \
40                    rmd160  5fc82fee6038cacc5cced3fddb9656de18a12537 \
41                    gcc-java-${version}.tar.bz2 \
42                    md5     2665c57788284978ad726cde4f6db1d6 \
43                    sha1    c6dcc576ddaf065d47bcfbc246fa34a4a637b472 \
44                    rmd160  658a7e8c61dc8c553ef747ee51ad6b089a244e00 \
45                    gcc-objc-${version}.tar.bz2 \
46                    md5     a1b7a6bb8e560928ae9c567cefdce296 \
47                    sha1    34e4764717d4e28073093691c3e99a47644a3bdc \
48                    rmd160  96ecb44ca6c7588a130b69beb93f3f4c28f51b13
49
50use_bzip2               yes
51
52# gmp and mpfr are not universal
53universal_variant       no
54
55depends_lib             port:gmp port:mpfr port:libiconv port:libmpc
56
57set major               4.6
58
59worksrcdir              build
60
61# the generated compiler doesn't accept -arch
62if {[info exists build_arch] && ${os.platform} == "darwin"} {
63    configure.cc_archflags
64    configure.cxx_archflags
65    configure.objc_archflags
66    configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
67}
68
69pre-configure {
70        file mkdir ${worksrcpath}
71}
72
73configure.cmd   ../gcc-${version}/configure
74configure.args  --enable-languages=c,c++,objc,obj-c++ \
75                --libdir=${prefix}/lib/${name} \
76                --includedir=${prefix}/include/${name} \
77                --infodir=${prefix}/share/info \
78                --mandir=${prefix}/share/man \
79                --datarootdir=${prefix}/share/gcc-${major} \
80                --with-local-prefix=${prefix} \
81                --with-system-zlib \
82                --disable-nls \
83                --program-suffix=-mp-${major} \
84                --with-gxx-include-dir=${prefix}/include/${name}/c++/ \
85                --with-gmp=${prefix} \
86                --with-mpfr=${prefix} \
87                --with-mpc==${prefix} \
88                --enable-stage1-checking
89# do NOT use MacPorts binutils -- they do not work
90configure.env-append    AR_FOR_TARGET=/usr/bin/ar \
91                        AS_FOR_TARGET=/usr/bin/as \
92                        LD_FOR_TARGET=/usr/bin/ld \
93                        NM_FOR_TARGET=/usr/bin/nm \
94                        OBJDUMP_FOR_TARGET=/usr/bin/objdump \
95                        RANLIB_FOR_TARGET=/usr/bin/ranlib \
96                        STRIP_FOR_TARGET=/usr/bin/strip
97
98build.target    bootstrap
99use_parallel_build      yes
100
101destroot.target install install-info-host
102
103post-destroot {
104        file delete -force ${destroot}${prefix}/share/man/man7 \
105                ${destroot}${prefix}/share/info
106        # install/copy ffitarget.h only if we have it
107        if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
108                file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
109        }
110        # install select file for gcc_select
111        xinstall -m 755 -d ${destroot}${prefix}/etc/select/gcc
112        xinstall -m 444 ${filespath}/mp-gcc46 ${destroot}${prefix}/etc/select/gcc/
113}
114
115platform powerpc {
116        configure.args-append --disable-multilib
117}
118
119# due to popular request - untested for the BETA; will be removed as soon as other languages than C compile successfuly
120variant gfortran conflicts java \
121        description "Enables Fortran/gfortran; this language will be enabled in the final version - this variant is completely untested!" {
122        configure.args-delete --enable-languages=c,c++,objc,obj-c++
123        configure.args-append --enable-languages=c,c++,objc,obj-c++,fortran
124}
125
126# due to popular request - untested for the BETA; will be removed as soon as other languages than C compile successfuly
127variant java conflicts gfortran \
128        description "Enables Java/gcj; this language will be enabled in the final version - this variant is completely untested!" {
129        configure.args-delete --enable-languages=c,c++,objc,obj-c++
130        configure.args-append --enable-languages=c,c++,objc,obj-c++,java
131}
132
133livecheck.type  regex
134livecheck.url   ftp://gcc.gnu.org/pub/gcc/snapshots/
135livecheck.regex LATEST-4.6 -> (4.6-\[0-9\]+)
136
Note: See TracBrowser for help on using the repository browser.