| 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.3 |
|---|
| 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 b907061e5788d7060bfb94396152ba9fc0786f91 \ |
|---|
| 30 | ${dfort} sha1 14d8a5974fa16dcd5a9e2452db7fa9afc46b3be4 \ |
|---|
| 31 | ${dcxx} sha1 cb41dc7f52a23167b1dfdadadd437bbecb1dce05 \ |
|---|
| 32 | ${djava} sha1 4af4318b80b54a7e2c14c26834f467ce1362273a \ |
|---|
| 33 | ${dobjc} sha1 2459c314ebb9c8661870b42a146def33826cf147 |
|---|
| 34 | |
|---|
| 35 | use_bzip2 yes |
|---|
| 36 | |
|---|
| 37 | # gmp and mpfr are not universal |
|---|
| 38 | universal_variant no |
|---|
| 39 | |
|---|
| 40 | depends_lib port:gmp port:mpfr port:libiconv |
|---|
| 41 | |
|---|
| 42 | set major 4.3 |
|---|
| 43 | |
|---|
| 44 | worksrcdir build |
|---|
| 45 | |
|---|
| 46 | pre-configure { |
|---|
| 47 | file mkdir ${worksrcpath} |
|---|
| 48 | } |
|---|
| 49 | |
|---|
| 50 | configure.cmd ../gcc-${version}/configure |
|---|
| 51 | configure.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 |
|---|
| 64 | configure.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 | |
|---|
| 72 | use_parallel_build yes |
|---|
| 73 | |
|---|
| 74 | destroot.target install install-info-host |
|---|
| 75 | # install-info # errors on objc-info files |
|---|
| 76 | |
|---|
| 77 | post-destroot { |
|---|
| 78 | # move manuals to gcc43-specific directory |
|---|
| 79 | xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/man/man7 |
|---|
| 80 | xinstall -m 755 -d ${destroot}${prefix}/share/gcc43/info |
|---|
| 81 | eval xinstall -m 0644 [glob ${destroot}${prefix}/share/man/man7/*] ${destroot}${prefix}/share/gcc43/man/man7 |
|---|
| 82 | eval xinstall -m 0644 [glob ${destroot}${prefix}/share/info/*] ${destroot}${prefix}/share/gcc43/info |
|---|
| 83 | # install/copy ffitarget.h only if we have it |
|---|
| 84 | if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} { |
|---|
| 85 | file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/ |
|---|
| 86 | } |
|---|
| 87 | # install select file for gcc_select |
|---|
| 88 | xinstall -m 755 -d ${destroot}${prefix}/etc/select/gcc |
|---|
| 89 | xinstall -m 444 ${filespath}/mp-gcc43 ${destroot}${prefix}/etc/select/gcc/ |
|---|
| 90 | } |
|---|
| 91 | |
|---|
| 92 | platform darwin 7 { |
|---|
| 93 | depends_build-append port:gmake |
|---|
| 94 | build.cmd gmake |
|---|
| 95 | # configure.cflags-append -force_cpusubtype_ALL |
|---|
| 96 | # configure.env BOOT_CFLAGS="-g -O2 -force_cpusubtype_ALL" |
|---|
| 97 | # build.args-append XCFLAGS=-force_cpusubtype_ALL |
|---|
| 98 | } |
|---|
| 99 | |
|---|
| 100 | platform powerpc { |
|---|
| 101 | configure.args-append --disable-multilib |
|---|
| 102 | } |
|---|
| 103 | |
|---|
| 104 | # Java support does not compile on 10.4/x86 |
|---|
| 105 | platform darwin 8 i386 { |
|---|
| 106 | configure.args-delete --enable-languages=c,c++,objc,obj-c++,java,fortran |
|---|
| 107 | configure.args-append --enable-languages=c,c++,objc,obj-c++,fortran |
|---|
| 108 | } |
|---|
| 109 | |
|---|
| 110 | # odcctools currently do not compile for x64 - move to variant for the time being |
|---|
| 111 | #variant odcctools \ |
|---|
| 112 | # description "Use the odcctools instead of the system provided ones - does not work for x64 currently!" { |
|---|
| 113 | # depends_lib-append port:odcctools |
|---|
| 114 | # patch { |
|---|
| 115 | # reinplace "s|/usr/bin/libtool|${prefix}/bin/odlibtool|g" \ |
|---|
| 116 | # ${workpath}/gcc-${version}/gcc/config/darwin.h |
|---|
| 117 | # } |
|---|
| 118 | # configure.args-append --with-as=${prefix}/bin/odas \ |
|---|
| 119 | # --with-ld=${prefix}/bin/odld \ |
|---|
| 120 | # --with-ar=${prefix}/bin/odar |
|---|
| 121 | #} |
|---|
| 122 | |
|---|
| 123 | livecheck.check regex |
|---|
| 124 | livecheck.url http://gcc.gnu.org/gcc-4.3/ |
|---|
| 125 | livecheck.regex GCC (4\\.3\\.\[0-9\]) |
|---|
| 126 | |
|---|