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

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

version 4.5-20100304

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.2 KB
Line 
1# $Id: Portfile 64503 2010-03-07 21:37:21Z mww@macports.org $
2
3PortSystem 1.0
4
5name                    gcc45
6version                 4.5-20100304
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-4.5-20100304.tar.bz2 \
30                    md5     fa8a2b1ac3522813194f428e3a98d83d \
31                    sha1    ed439ee587050186f4596227463797bed02b85e5 \
32                    rmd160  dbb9c7e642cb0bdfb6b0a1eb9a70500afc4deb58 \
33                    gcc-fortran-4.5-20100304.tar.bz2 \
34                    md5     324e8736424a822328c9e152b9bdbdb8 \
35                    sha1    93e019897f4f2147bad7cc8e1914397ffa5e8185 \
36                    rmd160  a4bda669cbe39e469f5994b999f9aeabb87773bb \
37                    gcc-g++-4.5-20100304.tar.bz2 \
38                    md5     5ef986f46b6addaae4a6ef9e9ae3b7e2 \
39                    sha1    dc72055e5abb2e69c836129abe3e268c2a5d5616 \
40                    rmd160  821cdeaae9d6df2988cb98362656502bc6f0d8ab \
41                    gcc-java-4.5-20100304.tar.bz2 \
42                    md5     81e8ecb5ac7761871afc5f95e2a98d87 \
43                    sha1    0a930e9048f7e864928910659056055440187c54 \
44                    rmd160  017261fd108e5f46a02846ea78358f71383ccce9 \
45                    gcc-objc-4.5-20100304.tar.bz2 \
46                    md5     3938c3455e2e45b3775db67e29fd17e9 \
47                    sha1    02dec2252e6a38d677d4c953f5ec022256937292 \
48                    rmd160  50d0d1c4dc03045f3f2590cdcb8754d25df0bd0c
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.