# $Id: Portfile 69859 2010-07-19 03:31:10Z jmr@macports.org $ PortSystem 1.0 name gcc46 version 4.6-20100612 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 \ http://mirrors.kernel.org/sources.redhat.com/java/:ecj \ http://www.mirrorservice.org/sites/sources.redhat.com/pub/java/:ecj \ http://ftp-stud.fht-esslingen.de/pub/Mirrors/sourceware.org/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 3f666a86055db21afb6c7795716cd2aa \ sha1 0aa824acf6fd105c6002bc19477664eec134e7e1 \ rmd160 134ef49f47c06b0f56fc79a86b71a4ce38ef12ef \ gcc-fortran-${version}.tar.bz2 \ md5 89f58cfaf6c6986c274a2f08aa1fbb86 \ sha1 fffc489ca1db449bcdad36bf9b4a79652044d5e0 \ rmd160 0eece241bc6dca75a3edcdf73e2c8753239501c2 \ gcc-g++-${version}.tar.bz2 \ md5 4b2957634967f1d452b52c39d2b32cf7 \ sha1 6a959b1701d5f0a71ef334b940ff900e2355fa97 \ rmd160 fbfe2bb919d234324243ffe606c798aef9fe332b \ gcc-java-${version}.tar.bz2 \ md5 fdd1c0118cfb7221c626a686cf50bf39 \ sha1 d08eaff598de4e5a44a8775585d9580347aab247 \ rmd160 2ada408b7722cb3505d4e26f98ba6b7907d198d6 \ gcc-objc-${version}.tar.bz2 \ md5 6d029df100d44318d0a47e074a810010 \ sha1 43404e2cf526f39e5afc954f8d61dc47d0c16468 \ rmd160 c7b1b2ad8c44e583347bebd7a4e0d7c1ea87afc5 \ ${ecj} \ md5 d7cd6a27c8801e66cbaa964a039ecfdb \ sha1 58c1d79c64c8cd718550f32a932ccfde8d1e6449 \ rmd160 d3f4da657f086b6423f74e93f001132f4855368a use_bzip2 yes depends_lib port:gmp port:mpfr port:libiconv port:libmpc patchfiles patch-160729.diff patch.pre_args -p1 patch.dir ${workpath}/gcc-${version} set major 4.6 worksrcdir build # the generated compiler doesn't accept -arch configure.cc_archflags configure.cxx_archflags configure.objc_archflags configure.ld_archflags platform darwin { 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 \ --disable-multilib # 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 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 post-destroot { file rename ${destroot}${prefix}/share/python/aotcompile.py \ ${destroot}${prefix}/share/python/aotcompile-46.py file rename ${destroot}${prefix}/share/python/classfile.py \ ${destroot}${prefix}/share/python/classfile-46.py } } platform powerpc { configure.universal_archs ppc ppc64 } platform i386 { configure.universal_archs i386 x86_64 } configure.universal_cflags configure.universal_cxxflags configure.universal_ldflags configure.universal_args variant universal { configure.args-delete --disable-multilib } livecheck.type regex livecheck.url ftp://gcc.gnu.org/pub/gcc/snapshots/ livecheck.regex LATEST-4.6 -> (4.6-\[0-9\]+)