source: trunk/dports/lang/gcc48/Portfile @ 97645

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

gcc48: version 4.8-20120909

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.7 KB
Line 
1# $Id: Portfile 97645 2012-09-10 17:34:12Z mww@macports.org $
2
3PortSystem 1.0
4PortGroup select 1.0
5
6name                gcc48
7version             4.8-20120909
8platforms           darwin
9categories          lang
10maintainers         mww openmaintainer
11license             GPL-3
12description         The GNU compiler collection, prerelease BETA
13long_description    The GNU compiler collection, including front ends for \
14                    C, C++, Objective-C, Objective-C++, Fortran and Java. \
15                    This is a prerelease BETA version!
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                    http://mirrors-us.seosue.com/gcc/snapshots/${version}/ \
22                    http://gcc.skazkaforyou.com/snapshots/${version}/
23
24distname            gcc-${version}
25
26checksums           rmd160  35cd54340b158c8fcccbf5f4be599f141d60f694 \
27                    sha256  7afd0b9143a541702f767d69610b5648e7e97fdd66b02ca910175e0bad2b31c0
28
29supported_archs     i386 x86_64
30
31use_bzip2           yes
32
33depends_lib         port:gmp port:mpfr port:libiconv port:libmpc port:ppl port:cloog
34depends_run         port:gcc_select port:ld64 port:cctools
35
36depends_skip_archcheck-append gcc_select ld64 cctools
37
38set major           4.8
39
40worksrcdir          build
41
42post-extract {
43    file mkdir ${worksrcpath}
44}
45
46platform darwin {
47    configure.pre_args-append --build=${build_arch}-apple-darwin${os.major}
48}
49
50configure.cmd       ../gcc-${version}/configure
51configure.args      --enable-languages=c,c++,objc,obj-c++,fortran,java \
52                    --libdir=${prefix}/lib/${name} \
53                    --includedir=${prefix}/include/${name} \
54                    --infodir=${prefix}/share/info \
55                    --mandir=${prefix}/share/man \
56                    --datarootdir=${prefix}/share/gcc-${major} \
57                    --with-local-prefix=${prefix} \
58                    --with-system-zlib \
59                    --disable-nls \
60                    --program-suffix=-mp-${major} \
61                    --with-gxx-include-dir=${prefix}/include/${name}/c++/ \
62                    --with-gmp=${prefix} \
63                    --with-mpfr=${prefix} \
64                    --with-mpc=${prefix} \
65                    --with-ppl=${prefix} \
66                    --with-cloog=${prefix} --enable-cloog-backend=isl \
67                    --enable-stage1-checking \
68                    --disable-multilib \
69                    --enable-lto \
70                    --with-as=${prefix}/bin/as \
71                    --with-ld=${prefix}/bin/ld \
72                    --with-ar=${prefix}/bin/ar \
73                    --with-bugurl=https://trac.macports.org/newticket
74
75configure.env-append \
76                    AR_FOR_TARGET=${prefix}/bin/ar \
77                    AS_FOR_TARGET=${prefix}/bin/as \
78                    LD_FOR_TARGET=${prefix}/bin/ld \
79                    NM_FOR_TARGET=${prefix}/bin/nm \
80                    OBJDUMP_FOR_TARGET=${prefix}/bin/objdump \
81                    RANLIB_FOR_TARGET=${prefix}/bin/ranlib \
82                    STRIP_FOR_TARGET=${prefix}/bin/strip \
83                    OTOOL=${prefix}/bin/otool \
84                    OTOOL64=${prefix}/bin/otool
85
86pre-configure {
87    configure.args-append --with-pkgversion="MacPorts ${name} ${version}_${revision}${portvariants}"
88}
89
90# http://trac.macports.org/ticket/29104
91if {${configure.compiler} == "llvm-gcc-4.2"} {
92    configure.compiler clang
93}
94
95build.target        bootstrap
96use_parallel_build  yes
97
98destroot.target     install install-info-host
99
100post-destroot {
101    file delete -force ${destroot}${prefix}/share/man/man7 \
102        ${destroot}${prefix}/share/info
103    # install/copy ffitarget.h only if we have it
104    if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
105        file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
106    }
107}
108
109select.group        gcc
110select.file         ${filespath}/mp-${name}
111
112platform powerpc {
113    configure.universal_archs ppc ppc64
114}
115platform i386 {
116    configure.universal_archs i386 x86_64
117}
118variant universal {
119    configure.args-delete --disable-multilib
120}
121# the generated compiler doesn't accept -arch
122configure.env-append CPP="${configure.cc} -E"
123build.env-append CPP="${configure.cc} -E"
124configure.cc-append [get_canonical_archflags]
125configure.cc_archflags
126configure.cxx_archflags
127configure.objc_archflags
128configure.ld_archflags
129configure.universal_cflags
130configure.universal_cxxflags
131configure.universal_ldflags
132configure.universal_args
133
134livecheck.type      regex
135livecheck.url       ftp://gcc.gnu.org/pub/gcc/snapshots/
136livecheck.regex     LATEST-4.8 -> (4.8-\[0-9\]+)
Note: See TracBrowser for help on using the repository browser.