# $Id: Portfile 67080 2010-04-28 16:26:50Z mww@macports.org $ PortSystem 1.0 name gcc46 version 4.6-20100424 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-${version}.tar.bz2 \ md5 493cb9dd52d958f8a2a44b2621a23e81 \ sha1 dce21faaa3cb5dff1e7ed3e2b544372b59973ced \ rmd160 e19ee9fb924ef54dfd12e32c9f0fbaf9c4baf282 \ gcc-fortran-${version}.tar.bz2 \ md5 bf4c271e995e05f4781b6b0e8d799c65 \ sha1 701e5102367f46f7f4117b4cacd73f6a4bd18009 \ rmd160 60c4a98d8887ee8756af7adea9839cfdcbdba258 \ gcc-g++-${version}.tar.bz2 \ md5 25f3551d1136732f6bc1d16f0ad96067 \ sha1 4b916e15bb04fdc7eba7922dd357cff167555cd1 \ rmd160 5fc82fee6038cacc5cced3fddb9656de18a12537 \ gcc-java-${version}.tar.bz2 \ md5 2665c57788284978ad726cde4f6db1d6 \ sha1 c6dcc576ddaf065d47bcfbc246fa34a4a637b472 \ rmd160 658a7e8c61dc8c553ef747ee51ad6b089a244e00 \ gcc-objc-${version}.tar.bz2 \ md5 a1b7a6bb8e560928ae9c567cefdce296 \ sha1 34e4764717d4e28073093691c3e99a47644a3bdc \ rmd160 96ecb44ca6c7588a130b69beb93f3f4c28f51b13 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.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} } 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 } # 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\]+)