[81601] trunk/dports/cross

raimue at macports.org raimue at macports.org
Tue Aug 2 14:23:07 PDT 2011


Revision: 81601
          http://trac.macports.org/changeset/81601
Author:   raimue at macports.org
Date:     2011-08-02 14:23:07 -0700 (Tue, 02 Aug 2011)
Log Message:
-----------
cross/arm-none-eabi-gcc:
New port

Added Paths:
-----------
    trunk/dports/cross/arm-none-eabi-gcc/
    trunk/dports/cross/arm-none-eabi-gcc/Portfile

Added: trunk/dports/cross/arm-none-eabi-gcc/Portfile
===================================================================
--- trunk/dports/cross/arm-none-eabi-gcc/Portfile	                        (rev 0)
+++ trunk/dports/cross/arm-none-eabi-gcc/Portfile	2011-08-02 21:23:07 UTC (rev 81601)
@@ -0,0 +1,207 @@
+# $Id$
+
+PortSystem       1.0
+
+name            arm-none-eabi-gcc
+version         4.6.1
+set branch      [join [lrange [split ${version} .] 0 1] .]
+
+categories      cross devel
+platforms       darwin
+license         GPL-3
+maintainers     nomaintainer
+description     The GNU compiler collection for arm-none-eabi
+long_description \
+    The GNU compiler collection, including front ends for C, C++, Objective-C \
+    and Objective-C++ for arm-none-eabi.
+homepage        http://gcc.gnu.org/
+
+set newlibversion       1.19.0
+set crossgcc-target     arm-none-eabi
+
+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
+set dnewlib     newlib-${newlibversion}.tar.gz
+
+master_sites    gnu:gcc/gcc-${version}/:gcc \
+                ftp://sources.redhat.com/pub/newlib/:newlib
+distfiles       ${dcore}:gcc \
+                ${dcxx}:gcc \
+                ${dobjc}:gcc \
+                ${dnewlib}:newlib
+dist_subdir     gcc
+checksums       ${dcore} \
+                sha1    9b766705f051ffb7321de58f247688b0ae661b98 \
+                rmd160  bbe0b5127e584ad92516aff79bfa74ec30db2be4 \
+                ${dcxx} \
+                sha1    043aa427ede603196588c2a2737c22e0d241ceca \
+                rmd160  857253c13eb4177512fc1bc6d797af28dde60eeb \
+                ${dobjc} \
+                sha1    ed6f640b62465999eb1439a4db6dda3c35b6d19d \
+                rmd160  728e7ea55a04f28c6c3556c56213b2d9f023a0be \
+                ${dnewlib} \
+                sha1    b2269d30ce7b93b7c714b90ef2f40221c2df0fcd \
+                rmd160  a28bd656ec895da0738dac3fb367851a2992d724
+use_bzip2 yes
+worksrcdir      build
+
+depends_lib     port:${crossgcc-target}-binutils \
+                port:gmp \
+                port:mpfr \
+                port:libiconv \
+                port:libmpc
+
+extract.only    ${dcore} ${dcxx} ${dobjc}
+post-extract {
+	system -W ${workpath} "tar -xzf ${distpath}/newlib-${newlibversion}.tar.gz"
+	ln -s ${workpath}/newlib-${newlibversion}/newlib ${workpath}/gcc-${version}/
+}
+
+post-patch {
+        namespace eval crossgcc {}
+
+        # Fix the info pages and related stuff.
+        #
+        # path: path to the doc directory (e.g. gas/doc/)
+        # makefile: path to Makefile.in (e.g. gas/doc/Makefile.in)
+        # name: name of the info page (e.g. as)
+        # suffix: suffix of the source page (texinfo or texi)
+        proc crossgcc::fixinfo { path makefile name suffix } {
+                global crossgcc-target workpath version
+
+                # Fix the source
+                reinplace "s|setfilename ${name}.info|setfilename ${crossgcc-target}-${name}.info|g" \
+                        ${workpath}/gcc-${version}/${path}/${name}.${suffix}
+                reinplace "s|(${name})|(${crossgcc-target}-${name})|g" \
+                        ${workpath}/gcc-${version}/${path}/${name}.${suffix}
+                reinplace "s|@file{${name}}|@file{${crossgcc-target}-${name}}|g" \
+                        ${workpath}/gcc-${version}/${path}/${name}.${suffix}
+
+                # Fix the Makefile
+                reinplace "s| ${name}.info| ${crossgcc-target}-${name}.info|g" \
+                        ${workpath}/gcc-${version}/${makefile}
+                reinplace "s|/${name}.info|/${crossgcc-target}-${name}.info|g" \
+                        ${workpath}/gcc-${version}/${makefile}
+                reinplace "s|^${name}.info|${crossgcc-target}-${name}.info|g" \
+                        ${workpath}/gcc-${version}/${makefile}
+                reinplace "s| ${name}.pod| ${crossgcc-target}-${name}.pod|g" \
+                        ${workpath}/gcc-${version}/${makefile}
+                reinplace "s|/${name}.pod|/${crossgcc-target}-${name}.pod|g" \
+                        ${workpath}/gcc-${version}/${makefile}
+                reinplace "s|^${name}.pod|${crossgcc-target}-${name}.pod|g" \
+                        ${workpath}/gcc-${version}/${makefile}
+                reinplace "s| ${name}.${suffix}| ${crossgcc-target}-${name}.${suffix}|g" \
+                        ${workpath}/gcc-${version}/${makefile}
+                reinplace "s|/${name}.${suffix}|/${crossgcc-target}-${name}.${suffix}|g" \
+                        ${workpath}/gcc-${version}/${makefile}
+                reinplace "s|^${name}.${suffix}|${crossgcc-target}-${name}.${suffix}|g" \
+                        ${workpath}/gcc-${version}/${makefile}
+
+                # Rename the source
+                file rename ${workpath}/gcc-${version}/${path}/${name}.${suffix} \
+                        ${workpath}/gcc-${version}/${path}/${crossgcc-target}-${name}.${suffix}
+
+                # Fix install-info's dir.
+                # (note: this may be effectless if there was no info dir to be fixed)
+                reinplace "s|--info-dir=\$(DESTDIR)\$(infodir)|--dir-file=\$(DESTDIR)\$(infodir)/${crossgcc-target}-gcc-dir|g" \
+                        ${workpath}/gcc-${version}/${makefile}
+        }
+
+        # gcc/doc/cpp.texi
+        crossgcc::fixinfo gcc/doc/ gcc/Makefile.in cpp texi
+
+        # gcc/doc/cppinternals.texi
+        crossgcc::fixinfo gcc/doc/ gcc/Makefile.in cppinternals texi
+
+        # gcc/doc/gcc.texi
+        crossgcc::fixinfo gcc/doc/ gcc/Makefile.in gcc texi
+
+        # gcc/doc/gccint.texi
+        crossgcc::fixinfo gcc/doc/ gcc/Makefile.in gccint texi
+
+        # # gcc/fortran/gfortran.texi
+        # crossgcc::fixinfo gcc/fortran/ gcc/fortran/Make-lang.in gfortran texi
+
+        # # gcc/java/gcj.texi
+        # crossgcc::fixinfo gcc/java/ gcc/java/Make-lang.in gcj texi
+
+        # gcc/doc/gccinstall.info
+        crossgcc::fixinfo gcc/doc/ gcc/Makefile.in gccinstall info
+
+        # libquadmath/libquadmath.info
+        crossgcc::fixinfo libquadmath libquadmath/Makefile.in libquadmath info
+}
+
+# the generated compiler doesn't accept -arch
+configure.cc_archflags
+configure.cxx_archflags
+configure.objc_archflags
+configure.ld_archflags
+platform darwin {
+    configure.args-append --build=${build_arch}-apple-darwin${os.major}
+}
+
+pre-configure   {
+    file mkdir ${worksrcpath}
+}
+
+configure.cmd   ../gcc-${version}/configure
+configure.args  --target=${crossgcc-target} \
+                --enable-languages="c,objc,c++,obj-c++" \
+                --infodir=${prefix}/share/info \
+                --mandir=${prefix}/share/man \
+                --datarootdir=${prefix}/share/${name} \
+                --with-system-zlib \
+                --disable-nls \
+                --with-gmp=${prefix} \
+                --with-mpfr=${prefix} \
+                --with-mpc=${prefix} \
+                --enable-stage1-checking \
+                --enable-multilib
+
+# specific to ARM
+configure.args-append \
+                --enable-interwork
+
+configure.env-append \
+    AR_FOR_TARGET=${crossgcc-target}-ar \
+    AS_FOR_TARGET=${crossgcc-target}-as \
+    LD_FOR_TARGET=${crossgcc-target}-ld \
+    NM_FOR_TARGET=${crossgcc-target}-nm \
+    OBJDUMP_FOR_TARGET=${crossgcc-target}-objdump \
+    RANLIB_FOR_TARGET=${crossgcc-target}-ranlib \
+    STRIP_FOR_TARGET=${crossgcc-target}-strip
+
+# http://trac.macports.org/ticket/29104
+if {${configure.compiler} == "llvm-gcc-4.2"} {
+   configure.compiler clang
+}
+
+destroot.violate_mtree yes
+
+pre-destroot {
+        # gcc needs the cross directory structure to be present
+        # in order to fill it during installation.
+        file mkdir "${destroot}/${prefix}/${crossgcc-target}/bin"
+        file mkdir "${destroot}/${prefix}/${crossgcc-target}/lib"
+}
+
+post-destroot {
+        # Stuff we don't want (either because they're in the system
+        # or because they would conflict with other FSF ports)
+        # (it's easier for maintainability purposes to fix things here)
+
+        # FSF propaganda (should already be there or would conflict)
+        file delete -force "${destroot}/${prefix}/share/man/man7"
+
+        # (host) libiberty
+        file delete "${destroot}/${prefix}/lib/${build_arch}/libiberty.a"
+}
+
+livecheck.type  regex
+livecheck.url   http://gcc.gnu.org/releases.html
+livecheck.regex {<tr><td><a href="gcc-.*/">GCC (.*)</a></td>   <td>.*</td></tr>}


Property changes on: trunk/dports/cross/arm-none-eabi-gcc/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110802/6d601890/attachment.html>


More information about the macports-changes mailing list