Revision: 87650 http://trac.macports.org/changeset/87650 Author: mww@macports.org Date: 2011-11-30 01:20:09 -0800 (Wed, 30 Nov 2011) Log Message: ----------- new port lang/gcc47 (prerelease BETA) Added Paths: ----------- trunk/dports/lang/gcc47/ trunk/dports/lang/gcc47/Portfile trunk/dports/lang/gcc47/files/ trunk/dports/lang/gcc47/files/mp-gcc47 Added: trunk/dports/lang/gcc47/Portfile =================================================================== --- trunk/dports/lang/gcc47/Portfile (rev 0) +++ trunk/dports/lang/gcc47/Portfile 2011-11-30 09:20:09 UTC (rev 87650) @@ -0,0 +1,136 @@ +# $Id: Portfile 83385 2011-08-31 01:52:26Z dports@macports.org $ + +PortSystem 1.0 +PortGroup select 1.0 + +name gcc47 +version 4.7-20111126 +platforms darwin +categories lang +maintainers mww openmaintainer +license GPL-3 +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}/ + +distname gcc-${version} + +checksums md5 48fc89937334522d4e250b5167f92289 \ + rmd160 b224b033de5af53d3de0b43644d6b4ecf12f14ef \ + sha256 2d0c7f2e92a5d166da1c24f2f320f5bd8ff11226efaf24f4dd17d6fffd5ebbe3 + +use_bzip2 yes + +depends_lib port:gmp port:mpfr port:libiconv port:libmpc +depends_run port:gcc_select + +set major 4.7 + +worksrcdir build + +post-extract { + file mkdir ${worksrcpath} +} + +# 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} +} + +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 + +# http://trac.macports.org/ticket/29104 +if {${configure.compiler} == "llvm-gcc-4.2"} { + configure.compiler clang +} + +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}/ + } +} + +select.group gcc +select.file ${filespath}/mp-${name} + +# 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.7 -> (4.7-\[0-9\]+) Added: trunk/dports/lang/gcc47/files/mp-gcc47 =================================================================== --- trunk/dports/lang/gcc47/files/mp-gcc47 (rev 0) +++ trunk/dports/lang/gcc47/files/mp-gcc47 2011-11-30 09:20:09 UTC (rev 87650) @@ -0,0 +1,7 @@ +bin/gcc-mp-4.7 +bin/cpp-mp-4.7 +bin/c++-mp-4.7 +bin/g++-mp-4.7 +bin/gcj-mp-4.7 +bin/gcov-mp-4.7 +bin/gfortran-mp-4.7