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

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

gcc44: increase epoch so MacPorts realizes "4.4.0" is newer than "4.4-20090331".
Maintainer-approved.
See http://lists.macosforge.org/pipermail/macports-users/2009-May/015215.html

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