# $Id$ PortSystem 1.0 name gcc45 version 4.5-20100114 platforms darwin categories lang maintainers mww license GPLv3 description The GNU compiler collection, prerelease BETA long_description The GNU compiler collection, including front ends for \ C, C++, Objective-C and Objective-C++. This is a \ prerelease BETA version and does not have all \ available language front ends enabled. homepage http://gcc.gnu.org/ master_sites ftp://ftp.gwdg.de/pub/linux/gcc/snapshots/${version}/ \ ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/snapshots/${version}/ \ ftp://gcc.gnu.org/pub/gcc/snapshots/${version}/ set dcore gcc-core-${version}.tar.bz2 set dfort gcc-fortran-${version}.tar.bz2 set dcxx gcc-g++-${version}.tar.bz2 set djava gcc-java-${version}.tar.bz2 set dobjc gcc-objc-${version}.tar.bz2 distfiles ${dcore} ${dfort} ${dcxx} ${djava} ${dobjc} checksums gcc-core-4.5-20100114.tar.bz2 \ md5 f1b0ad54cecb0d9c0d69589135cddcfb \ sha1 7be9c2931c566719031f1b21afb43f210b739893 \ rmd160 ba490c79e12f0a728ade64362571ae0511e62093 \ gcc-fortran-4.5-20100114.tar.bz2 \ md5 fe05e9d0b24ea68d488742e1a71c441d \ sha1 ec62ef63aa1766b56cf1bf3ac93a49bee2e6bed9 \ rmd160 020523b6b082b428d6cc1c5818cf8fd0a7af8c73 \ gcc-g++-4.5-20100114.tar.bz2 \ md5 09b8c97e81fc7efad9b7bbee9691400c \ sha1 ec307f8ad2b5773c94f15cf0bf68d26e30ac500e \ rmd160 a1fbbb6a5d8ff05434b4309853e012fe902e5ff2 \ gcc-java-4.5-20100114.tar.bz2 \ md5 4dd27b22a2148c6c85ffa82fe4d3b207 \ sha1 ffe1bea6cd7ca9ad5446b7cd1cc3701d7240e782 \ rmd160 a3ddde7e20a7ba85957f38df7bd73f2fc26895ab \ gcc-objc-4.5-20100114.tar.bz2 \ md5 7484af0e48a5e2b44b68c696d3e3b0d5 \ sha1 bb3ce1d4b1c2d85dd3fb0eec0422d94dcabd5ff9 \ rmd160 402f8be3fab4a57890f05ecd2df3da1443b6581d use_bzip2 yes # gmp and mpfr are not universal universal_variant no depends_lib port:gmp port:mpfr port:libiconv port:libmpc set major 4.5 worksrcdir build # the generated compiler doesn't accept -arch if {[info exists build_arch] && ${os.platform} == "darwin"} { configure.cc_archflags configure.cxx_archflags configure.objc_archflags configure.pre_args-append --build=${build_arch}-apple-darwin${os.major} } pre-configure { file mkdir ${worksrcpath} } configure.cmd ../gcc-${version}/configure configure.args --enable-languages=c,c++,objc,obj-c++ \ --libdir=${prefix}/lib/${name} \ --includedir=${prefix}/include/${name} \ --infodir=${prefix}/share/info \ --mandir=${prefix}/share/man \ --with-local-prefix=${prefix} \ --with-system-zlib \ --disable-nls \ --program-suffix=-mp-${major} \ --with-gxx-include-dir=${prefix}/include/${name}/c++/ \ --with-gmp=${prefix} \ --with-mpfr=${prefix} # do NOT use MacPorts binutils -- they do not work configure.env-append AR_FOR_TARGET=/usr/bin/ar \ AS_FOR_TARGET=/usr/bin/as \ LD_FOR_TARGET=/usr/bin/ld \ NM_FOR_TARGET=/usr/bin/nm \ OBJDUMP_FOR_TARGET=/usr/bin/objdump \ RANLIB_FOR_TARGET=/usr/bin/ranlib \ STRIP_FOR_TARGET=/usr/bin/strip build.target bootstrap use_parallel_build yes destroot.target install install-info-host post-destroot { file delete -force ${destroot}${prefix}/share/man/man7 \ ${destroot}${prefix}/share/info # install/copy ffitarget.h only if we have it if {![catch {set ffitarget.h [glob ${destroot}${prefix}/lib/${name}/gcc/*/${version}/include/ffitarget.h]} result]} { file copy ${ffitarget.h} ${destroot}${prefix}/include/${name}/ } # install select file for gcc_select xinstall -m 755 -d ${destroot}${prefix}/etc/select/gcc xinstall -m 444 ${filespath}/mp-gcc45 ${destroot}${prefix}/etc/select/gcc/ } #platform darwin 7 { # configure.cflags-append -force_cpusubtype_ALL # confgiure.env BOOT_CFLAGS="-g -O2 -force_cpusubtype_ALL" # build.args-append XCFLAGS=-force_cpusubtype_ALL #} platform powerpc { configure.args-append --disable-multilib } # due to popular request - untested for the BETA; will be removed as soon as other languages than C compile successfuly variant gfortran conflicts java \ description "Enables Fortran/gfortran; this language will be enabled in the final version - this variant is completely untested!" { configure.args-delete --enable-languages=c,c++,objc,obj-c++ configure.args-append --enable-languages=c,c++,objc,obj-c++,fortran } # due to popular request - untested for the BETA; will be removed as soon as other languages than C compile successfuly variant java conflicts gfortran \ description "Enables Java/gcj; this language will be enabled in the final version - this variant is completely untested!" { configure.args-delete --enable-languages=c,c++,objc,obj-c++ configure.args-append --enable-languages=c,c++,objc,obj-c++,java } livecheck.type regex livecheck.url ftp://gcc.gnu.org/pub/gcc/snapshots/ livecheck.regex LATEST-4.5 -> (4.5-\[0-9\]+)