source: trunk/dports/lang/gcc45/Portfile @ 65752

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

version 4.5-20100325

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.2 KB
Line 
1# $Id: Portfile 65752 2010-03-31 08:38:17Z mww@macports.org $
2
3PortSystem 1.0
4
5name                    gcc45
6version                 4.5-20100325
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     eae8a3f7bb382d5d4279895f26ecfda1 \
31                    sha1    549ad14b822184f5c3f49ed8db942ffea7e5e7ec \
32                    rmd160  4a8c3baa52cfe9f2761797b611009c740409adbc \
33                    gcc-fortran-${version}.tar.bz2 \
34                    md5     90d5740925c67fffe79512fd62dd615c \
35                    sha1    0133144f76026abc7b60fd38b1e0455ca7ac5d3c \
36                    rmd160  7930ae183e9f595dc661212aca223eb8069747ea \
37                    gcc-g++-${version}.tar.bz2 \
38                    md5     13d24db32b5503a11b89e1cf65d8fe3b \
39                    sha1    00074ee179ec3ce60fd8be7da0aaab06c0fd05b7 \
40                    rmd160  7e26846bca89530d6c117a97144c6a7efbb47d3c \
41                    gcc-java-${version}.tar.bz2 \
42                    md5     779f2ee9036f6f16277eb698fe4bdc0d \
43                    sha1    c58a2eb9e6b925e1353185eb6efc9c886cf80407 \
44                    rmd160  0dcd0e1e08bb0fde02a802f447f2b21b99a166e0 \
45                    gcc-objc-${version}.tar.bz2 \
46                    md5     c13e31e3a83986098cadaa0153c4480a \
47                    sha1    0365d10857133276f9a1e88fc485b0d55e232932 \
48                    rmd160  bde4233b9fb15179ac3969be804428fcaf231606
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.5
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                --with-local-prefix=${prefix} \
80                --with-system-zlib \
81                --disable-nls \
82                --program-suffix=-mp-${major} \
83                --with-gxx-include-dir=${prefix}/include/${name}/c++/ \
84                --with-gmp=${prefix} \
85                --with-mpfr=${prefix} \
86                --with-mpc==${prefix} \
87                --enable-stage1-checking
88# do NOT use MacPorts binutils -- they do not work
89configure.env-append    AR_FOR_TARGET=/usr/bin/ar \
90                        AS_FOR_TARGET=/usr/bin/as \
91                        LD_FOR_TARGET=/usr/bin/ld \
92                        NM_FOR_TARGET=/usr/bin/nm \
93                        OBJDUMP_FOR_TARGET=/usr/bin/objdump \
94                        RANLIB_FOR_TARGET=/usr/bin/ranlib \
95                        STRIP_FOR_TARGET=/usr/bin/strip
96
97build.target    bootstrap
98use_parallel_build      yes
99
100destroot.target install install-info-host
101
102post-destroot {
103        file delete -force ${destroot}${prefix}/share/man/man7 \
104                ${destroot}${prefix}/share/info
105        # install/copy ffitarget.h only if we have it
106        if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
107                file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
108        }
109        # install select file for gcc_select
110        xinstall -m 755 -d ${destroot}${prefix}/etc/select/gcc
111        xinstall -m 444 ${filespath}/mp-gcc45 ${destroot}${prefix}/etc/select/gcc/
112}
113
114#platform darwin 7 {
115#       configure.cflags-append -force_cpusubtype_ALL
116#       confgiure.env   BOOT_CFLAGS="-g -O2 -force_cpusubtype_ALL"
117#       build.args-append       XCFLAGS=-force_cpusubtype_ALL
118#}
119
120platform powerpc {
121        configure.args-append --disable-multilib
122}
123
124# due to popular request - untested for the BETA; will be removed as soon as other languages than C compile successfuly
125variant gfortran conflicts java \
126        description "Enables Fortran/gfortran; this language will be enabled in the final version - this variant is completely untested!" {
127        configure.args-delete --enable-languages=c,c++,objc,obj-c++
128        configure.args-append --enable-languages=c,c++,objc,obj-c++,fortran
129}
130
131# due to popular request - untested for the BETA; will be removed as soon as other languages than C compile successfuly
132variant java conflicts gfortran \
133        description "Enables Java/gcj; this language will be enabled in the final version - this variant is completely untested!" {
134        configure.args-delete --enable-languages=c,c++,objc,obj-c++
135        configure.args-append --enable-languages=c,c++,objc,obj-c++,java
136}
137
138livecheck.type  regex
139livecheck.url   ftp://gcc.gnu.org/pub/gcc/snapshots/
140livecheck.regex LATEST-4.5 -> (4.5-\[0-9\]+)
141
Note: See TracBrowser for help on using the repository browser.