# $Id: Portfile 61209 2009-12-05 08:32:16Z mww@macports.org $ PortSystem 1.0 name gcc45 version 4.5-20091203 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-20091203.tar.bz2 \ md5 f7995be144b87581ae114f4dab3f0ae1 \ sha1 6fe84dd7d77adfba980776b9e74004093c0925bd \ rmd160 23feec866bc81d3b74a5d80529ca02a93370b486 \ gcc-fortran-4.5-20091203.tar.bz2 \ md5 b4529c79a36f3bd56fd3b388e6f4c604 \ sha1 90de5b64967470f46634c00661d6b0f4ecfe5389 \ rmd160 7d4f64d523b5b35337abd202ba73943475510f81 \ gcc-g++-4.5-20091203.tar.bz2 \ md5 13ce66c02e71355dc0e34eb0ddf0076c \ sha1 25e994b727927fa7a62641784a3e89fc5dca3f99 \ rmd160 e58c50a5ae4dcce81b54c276aeea70fc0330b240 \ gcc-java-4.5-20091203.tar.bz2 \ md5 42533a17c82a8c98c7a23d36c4266253 \ sha1 e7a2ea123299b693c21d13af44371cd04ea0d758 \ rmd160 9446efbd630ce71df44a9c5e26641e52f589e4f7 \ gcc-objc-4.5-20091203.tar.bz2 \ md5 8c55e526ce21af0fed1d397d8f4c9a27 \ sha1 21b7b2489c136ce984420f969297b574293d190b \ rmd160 0fc8d70a646323939beaf976aba84aa3f33fb91c use_bzip2 yes # gmp and mpfr are not universal universal_variant no depends_lib port:gmp port:mpfr port:libiconv 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\]+)