source: trunk/dports/lang/gcc44/Portfile @ 37227

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

version 4.4-20080530, add gcc_select file

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.9 KB
Line 
1# $Id: Portfile 37227 2008-05-31 14:10:09Z mww@macports.org $
2
3PortSystem 1.0
4
5name                    gcc44
6version                 4.4-20080530
7platforms               darwin
8categories              lang
9maintainers             mww
10description             The GNU compiler collection, prerelease BETA
11long_description        The GNU compiler collection, including front ends for \
12                        C, C++, Objective-C and Objective-C++. This is a \
13                        prerelease BETA version and does not have all \
14                        available language front ends enabled.
15
16homepage                http://gcc.gnu.org/
17master_sites    ftp://ftp.gwdg.de/pub/linux/gcc/snapshots/${version}/ \
18                                ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/snapshots/${version}/ \
19                                ftp://gcc.gnu.org/pub/gcc/snapshots/${version}/
20
21set dcore               gcc-core-${version}.tar.bz2
22set dfort               gcc-fortran-${version}.tar.bz2
23set dcxx                gcc-g++-${version}.tar.bz2
24set djava               gcc-java-${version}.tar.bz2
25set dobjc               gcc-objc-${version}.tar.bz2
26distfiles               ${dcore} ${dfort} ${dcxx} ${djava} ${dobjc}
27
28checksums               ${dcore} sha1 fc3a615e115b9e0da0bdcc648fba11da80dc084c \
29                        ${dfort} sha1 026fd28fb06c97e6d15f61f0e0cb7d0efd26bf41 \
30                        ${dcxx} sha1 64b2ea05fcfba7cfabf987825c2ab968862adeca \
31                        ${djava} sha1 413be6fa4b736dde3391630481bc546622e13e39 \
32                        ${dobjc} sha1 149e0e6588ac3832c7151b48f62b2877a2264b6c
33
34use_bzip2               yes
35
36depends_lib             port:gmp port:mpfr port:libiconv
37
38set major               4.4
39
40worksrcdir              build
41
42pre-configure {
43        file mkdir ${worksrcpath}
44}
45
46configure.cmd   ../gcc-${version}/configure
47configure.args  --enable-languages=c,c++,objc,obj-c++ \
48                --libdir=${prefix}/lib/${name} \
49                --includedir=${prefix}/include/${name} \
50                --infodir=${prefix}/share/info \
51                --mandir=${prefix}/share/man \
52                --with-local-prefix=${prefix} \
53                --with-system-zlib \
54                --disable-nls \
55                --program-suffix=-mp-${major} \
56                --with-gxx-include-dir=${prefix}/include/${name}/c++/ \
57                --with-gmp=${prefix} \
58                --with-mpfr=${prefix}
59# do NOT use MacPorts binutils -- they do not work
60configure.env-append    AR_FOR_TARGET=/usr/bin/ar \
61                        AS_FOR_TARGET=/usr/bin/as \
62                        LD_FOR_TARGET=/usr/bin/ld \
63                        NM_FOR_TARGET=/usr/bin/nm \
64                        OBJDUMP_FOR_TARGET=/usr/bin/objdump \
65                        RANLIB_FOR_TARGET=/usr/bin/ranlib \
66                        STRIP_FOR_TARGET=/usr/bin/strip
67
68build.target    bootstrap
69use_parallel_build      yes
70
71destroot.target install install-info-host
72
73post-destroot {
74        file delete -force ${destroot}${prefix}/share/man/man7 \
75                ${destroot}${prefix}/share/info
76        # install/copy ffitarget.h only if we have it
77        if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} {
78                file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/
79        }
80        # install select file for gcc_select
81        xinstall -m 755 -d ${destroot}${prefix}/etc/select/gcc
82        xinstall -m 444 ${filespath}/mp-gcc44 ${destroot}${prefix}/etc/select/gcc/
83}
84
85#platform darwin 7 {
86#       configure.cflags-append -force_cpusubtype_ALL
87#       confgiure.env   BOOT_CFLAGS="-g -O2 -force_cpusubtype_ALL"
88#       build.args-append       XCFLAGS=-force_cpusubtype_ALL
89#}
90
91platform powerpc {
92        configure.args-append --disable-multilib
93}
94
95# odcctools currently do not compile for x64 - move to variant for the time being
96variant odcctools \
97        description "Use the odcctools instead of the system provided ones - does not work for x64 currently!" {
98        depends_lib-append      port:odcctools
99        patch {
100                reinplace "s|/usr/bin/libtool|${prefix}/bin/odlibtool|g" \
101                        ${workpath}/gcc-${version}/gcc/config/darwin.h
102        }
103        configure.args-append   --with-as=${prefix}/bin/odas \
104                                --with-ld=${prefix}/bin/odld \
105                                --with-ar=${prefix}/bin/odar
106}
107
108# due to popular request - untested for the BETA; will be removed as soon as other languages than C compile successfuly
109variant gfortran \
110        description "Enables fortran; this language will be enabled in the final version - this variant is completely untested!" {
111        configure.args-delete --enable-languages=c,c++,objc,obj-c++
112        configure.args-append --enable-languages=c,c++,objc,obj-c++,fortran
113}
114
115livecheck.check regex
116livecheck.url   ftp://gcc.gnu.org/pub/gcc/snapshots/
117livecheck.regex LATEST-4.4 -> (4.4-\[0-9\]+)
118
Note: See TracBrowser for help on using the repository browser.