# $Id: Portfile 68778 2010-06-13 13:51:28Z ryandesign@macports.org $ PortSystem 1.0 name gcc46 version 4.6-20100605 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}/:gcc \ ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/snapshots/${version}/:gcc \ ftp://gcc.gnu.org/pub/gcc/snapshots/${version}/:gcc \ ftp://sourceware.org/pub/java/:ecj 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 set ecj ecj-4.5.jar distfiles ${dcore}:gcc ${dfort}:gcc ${dcxx}:gcc ${djava}:gcc ${dobjc}:gcc ${ecj}:ecj extract.only ${dcore} ${dfort} ${dcxx} ${djava} ${dobjc} checksums gcc-core-${version}.tar.bz2 \ md5 d7d0f9c790971cdc0adb0ba49ecedaf6 \ sha1 0fe47cc0bc568d46421bee44f3a0df3b2e245cc1 \ rmd160 b142243ec63556c5070ffb0f7da60e8d35a22038 \ gcc-fortran-${version}.tar.bz2 \ md5 7ec02efa15cbefc8d68ef2a261c9e7fc \ sha1 7d178372332e991432a93d82513da2bab9ea53c4 \ rmd160 0492921259b940d4a39a010e3f7c893df35c5ddd \ gcc-g++-${version}.tar.bz2 \ md5 e92e0bcbc915b3ca1a7c7b6e3d82ed07 \ sha1 9bd89fe21472c71ca7a7955cabf8813872b5663f \ rmd160 fe2c6eff683507be825ae45198ff1d84e21839ad \ gcc-java-${version}.tar.bz2 \ md5 b48455d9eab4b2fb8c6696e571d3ecc3 \ sha1 d0715e9b78418945ff0ba3a4a1da8116d2d8fd13 \ rmd160 61c23146727213fd05a647463e0ec1c8e8e73452 \ gcc-objc-${version}.tar.bz2 \ md5 a1102de51a7fd9c98f4c6aa797dfa883 \ sha1 6dd1bc286a535936c84a0e1532b2034881d09ae1 \ rmd160 d58496f1bcd1fbf34cb753ceb9a24f5fdf75cd2b \ ${ecj} \ md5 d7cd6a27c8801e66cbaa964a039ecfdb \ sha1 58c1d79c64c8cd718550f32a932ccfde8d1e6449 \ rmd160 d3f4da657f086b6423f74e93f001132f4855368a use_bzip2 yes # gmp and mpfr are not universal universal_variant no depends_lib port:gmp port:mpfr port:libiconv port:libmpc patchfiles tls_configure_fix.diff patch.dir ${workpath}/gcc-${version} set major 4.6 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} } post-extract { copy ${distpath}/${ecj} ${workpath}/gcc-${version}/ecj.jar } 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 \ --datarootdir=${prefix}/share/gcc-${major} \ --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} \ --with-mpc=${prefix} \ --enable-stage1-checking # 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-gcc46 ${destroot}${prefix}/etc/select/gcc/ } platform powerpc { configure.args-append --disable-multilib } platform darwin 10 { configure.args-append --enable-fully-dynamic-string } # 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.6 -> (4.6-\[0-9\]+)