| 1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 |
|---|
| 2 | # $Id$ |
|---|
| 3 | |
|---|
| 4 | PortSystem 1.0 |
|---|
| 5 | |
|---|
| 6 | name gcc43 |
|---|
| 7 | version 4.3.2 |
|---|
| 8 | platforms darwin |
|---|
| 9 | categories lang |
|---|
| 10 | maintainers mww |
|---|
| 11 | description The GNU compiler collection |
|---|
| 12 | long_description The GNU compiler collection, including front ends for \ |
|---|
| 13 | C, C++, Objective-C, Objective-C++, Java and Fortran95. |
|---|
| 14 | |
|---|
| 15 | homepage http://gcc.gnu.org/ |
|---|
| 16 | master_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 | |
|---|
| 22 | set dcore gcc-core-${version}.tar.bz2 |
|---|
| 23 | set dfort gcc-fortran-${version}.tar.bz2 |
|---|
| 24 | set dcxx gcc-g++-${version}.tar.bz2 |
|---|
| 25 | set djava gcc-java-${version}.tar.bz2 |
|---|
| 26 | set dobjc gcc-objc-${version}.tar.bz2 |
|---|
| 27 | distfiles ${dcore} ${dfort} ${dcxx} ${djava} ${dobjc} |
|---|
| 28 | |
|---|
| 29 | checksums ${dcore} sha1 8137e6f12fea6730873ab6230e6f6a768443de83 \ |
|---|
| 30 | ${dfort} sha1 1d200514f87dc913fb632e379d2c452937b9b04e \ |
|---|
| 31 | ${dcxx} sha1 373245dcf103550980510874bb8c0cd1a6271ae5 \ |
|---|
| 32 | ${djava} sha1 d98caa7c1a7f031df824793327c364733a3cab42 \ |
|---|
| 33 | ${dobjc} sha1 3377f5e91d1fa68993447894369ba5cbe2741157 |
|---|
| 34 | |
|---|
| 35 | use_bzip2 yes |
|---|
| 36 | |
|---|
| 37 | depends_lib port:gmp port:mpfr port:libiconv |
|---|
| 38 | |
|---|
| 39 | set major 4.3 |
|---|
| 40 | |
|---|
| 41 | worksrcdir build |
|---|
| 42 | |
|---|
| 43 | pre-configure { |
|---|
| 44 | file mkdir ${worksrcpath} |
|---|
| 45 | } |
|---|
| 46 | |
|---|
| 47 | configure.cmd ../gcc-${version}/configure |
|---|
| 48 | configure.args --enable-languages=c,c++,objc,obj-c++,java,fortran \ |
|---|
| 49 | --libdir=${prefix}/lib/${name} \ |
|---|
| 50 | --includedir=${prefix}/include/${name} \ |
|---|
| 51 | --infodir=${prefix}/share/info \ |
|---|
| 52 | --mandir=${prefix}/share/man \ |
|---|
| 53 | --with-local-prefix=${prefix} \ |
|---|
| 54 | --with-system-zlib \ |
|---|
| 55 | --disable-nls \ |
|---|
| 56 | --program-suffix=-mp-${major} \ |
|---|
| 57 | --with-gxx-include-dir=${prefix}/include/${name}/c++/ \ |
|---|
| 58 | --with-gmp=${prefix} \ |
|---|
| 59 | --with-mpfr=${prefix} |
|---|
| 60 | # do NOT use MacPorts binutils -- they do not work |
|---|
| 61 | configure.env-append AR_FOR_TARGET=/usr/bin/ar \ |
|---|
| 62 | AS_FOR_TARGET=/usr/bin/as \ |
|---|
| 63 | LD_FOR_TARGET=/usr/bin/ld \ |
|---|
| 64 | NM_FOR_TARGET=/usr/bin/nm \ |
|---|
| 65 | OBJDUMP_FOR_TARGET=/usr/bin/objdump \ |
|---|
| 66 | RANLIB_FOR_TARGET=/usr/bin/ranlib \ |
|---|
| 67 | STRIP_FOR_TARGET=/usr/bin/strip |
|---|
| 68 | |
|---|
| 69 | use_parallel_build yes |
|---|
| 70 | |
|---|
| 71 | destroot.target install install-info-host |
|---|
| 72 | # install-info # errors on objc-info files |
|---|
| 73 | |
|---|
| 74 | post-destroot { |
|---|
| 75 | # move manuals to gcc43-specific directory |
|---|
| 76 | xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/man/man7 |
|---|
| 77 | xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/info |
|---|
| 78 | eval xinstall -m 0644 [glob ${destroot}${prefix}/share/man/man7/*] ${destroot}${prefix}/share/gcc43/man/man7 |
|---|
| 79 | eval xinstall -m 0644 [glob ${destroot}${prefix}/share/info/*] ${destroot}${prefix}/share/gcc43/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-gcc43 ${destroot}${prefix}/etc/select/gcc/ |
|---|
| 87 | } |
|---|
| 88 | |
|---|
| 89 | #platform darwin 7 { |
|---|
| 90 | # configure.cflags-append -force_cpusubtype_ALL |
|---|
| 91 | # configure.env BOOT_CFLAGS="-g -O2 -force_cpusubtype_ALL" |
|---|
| 92 | # build.args-append XCFLAGS=-force_cpusubtype_ALL |
|---|
| 93 | #} |
|---|
| 94 | |
|---|
| 95 | platform powerpc { |
|---|
| 96 | configure.args-append --disable-multilib |
|---|
| 97 | } |
|---|
| 98 | |
|---|
| 99 | # Java support does not compile on 10.4/x86 |
|---|
| 100 | platform darwin 8 i386 { |
|---|
| 101 | configure.args-delete --enable-languages=c,c++,objc,obj-c++,java,fortran |
|---|
| 102 | configure.args-append --enable-languages=c,c++,objc,obj-c++,fortran |
|---|
| 103 | } |
|---|
| 104 | |
|---|
| 105 | # odcctools currently do not compile for x64 - move to variant for the time being |
|---|
| 106 | #variant odcctools \ |
|---|
| 107 | # description "Use the odcctools instead of the system provided ones - does not work for x64 currently!" { |
|---|
| 108 | # depends_lib-append port:odcctools |
|---|
| 109 | # patch { |
|---|
| 110 | # reinplace "s|/usr/bin/libtool|${prefix}/bin/odlibtool|g" \ |
|---|
| 111 | # ${workpath}/gcc-${version}/gcc/config/darwin.h |
|---|
| 112 | # } |
|---|
| 113 | # configure.args-append --with-as=${prefix}/bin/odas \ |
|---|
| 114 | # --with-ld=${prefix}/bin/odld \ |
|---|
| 115 | # --with-ar=${prefix}/bin/odar |
|---|
| 116 | #} |
|---|
| 117 | |
|---|
| 118 | livecheck.check regex |
|---|
| 119 | livecheck.url http://gcc.gnu.org/gcc-4.3/ |
|---|
| 120 | livecheck.regex GCC (4\\.3\\.\[0-9\]) |
|---|