[75895] trunk/dports/cross
ryandesign at macports.org
ryandesign at macports.org
Fri Feb 11 18:24:52 PST 2011
Revision: 75895
http://trac.macports.org/changeset/75895
Author: ryandesign at macports.org
Date: 2011-02-11 18:24:50 -0800 (Fri, 11 Feb 2011)
Log Message:
-----------
lm32-rtems-binutils: new port, version 2.20.90; see #27420
Added Paths:
-----------
trunk/dports/cross/lm32-rtems-binutils/
trunk/dports/cross/lm32-rtems-binutils/Portfile
Added: trunk/dports/cross/lm32-rtems-binutils/Portfile
===================================================================
--- trunk/dports/cross/lm32-rtems-binutils/Portfile (rev 0)
+++ trunk/dports/cross/lm32-rtems-binutils/Portfile 2011-02-12 02:24:50 UTC (rev 75895)
@@ -0,0 +1,152 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem 1.0
+
+name lm32-rtems-binutils
+version 2.20.90
+
+# Parameters for this port.
+set crossgcc-target lm32-rtems
+set rtemsversion 4.11
+
+categories cross devel
+platforms darwin
+maintainers gmail.com:yann.sionneau
+
+description FSF Binutils for lm32-rtems cross development
+long_description Free Software Foundation development toolchain ("binutils") for \
+ lm32-rtems cross development tools (for Milkymist & lm32_evr platforms).
+
+homepage http://www.gnu.org/software/binutils/binutils.html
+master_sites http://www.rtems.com/ftp/pub/rtems/SOURCES/${rtemsversion}/ \
+ ftp://ftp.rtems.com/pub/rtems/SOURCES/${rtemsversion}/
+
+distname binutils-${version}
+use_bzip2 yes
+
+checksums binutils-${version}.tar.bz2 \
+ sha1 ee0124f6e597fc4d5ccc1c423aa470e51a28f20d \
+ rmd160 462ed7213461cc47f3a5bf5365c422818e7bd577 \
+ binutils-${version}-rtems${rtemsversion}-20101109.diff \
+ sha1 6c24112556957d4a9b5720ebb98c3a98524c3fc5 \
+ rmd160 26a0c4f0a0c15de816f0e162dfcc8bddb2044a2e
+
+patchfiles binutils-${version}-rtems${rtemsversion}-20101109.diff
+patch.pre_args -p1
+
+depends_lib port:gettext port:zlib
+
+# All cross ports violate the mtree layout.
+destroot.violate_mtree yes
+
+# Download everything to binutils/
+dist_subdir binutils
+
+# We don't want the etc module.
+post-extract {
+ delete ${worksrcpath}/etc
+}
+
+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 souce page (texinfo or texi)
+ proc crossgcc::fixinfo { path makefile name suffix } {
+ global crossgcc-target worksrcpath
+
+ # Fix the source
+ reinplace "s|setfilename ${name}.info|setfilename ${crossgcc-target}-${name}.info|g" \
+ ${worksrcpath}/${path}/${name}.${suffix}
+ reinplace "s|(${name})|(${crossgcc-target}-${name})|g" \
+ ${worksrcpath}/${path}/${name}.${suffix}
+ reinplace "s|@file{${name}}|@file{${crossgcc-target}-${name}}|g" \
+ ${worksrcpath}/${path}/${name}.${suffix}
+
+ # Fix the Makefile
+ reinplace "s|${name}.info|${crossgcc-target}-${name}.info|g" \
+ ${worksrcpath}/${makefile}
+ reinplace "s|${name}.${suffix}|${crossgcc-target}-${name}.${suffix}|g" \
+ ${worksrcpath}/${makefile}
+
+ # Rename the source
+ file rename ${worksrcpath}/${path}/${name}.${suffix} \
+ ${worksrcpath}/${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}-dir|g" \
+ "${worksrcpath}/${makefile}"
+ }
+
+ # Fix the gettext files and related stuff.
+ #
+ # module: name of the module (e.g. gas)
+ proc crossgcc::fixgettext { module } {
+ global crossgcc-target worksrcpath
+
+ if { [ file exists "${worksrcpath}/${module}/Makefile.in" ] } {
+ reinplace "s|@PACKAGE@|${crossgcc-target}- at PACKAGE@|g" \
+ "${worksrcpath}/${module}/Makefile.in"
+ }
+ if { [ file exists "${worksrcpath}/${module}/doc/Makefile.in" ] } {
+ reinplace "s|@PACKAGE@|${crossgcc-target}- at PACKAGE@|g" \
+ "${worksrcpath}/${module}/doc/Makefile.in"
+ }
+ if { [ file exists "${worksrcpath}/${module}/po/Make-in" ] } {
+ reinplace "s|@PACKAGE@|${crossgcc-target}- at PACKAGE@|g" \
+ "${worksrcpath}/${module}/po/Make-in"
+ }
+ }
+
+ # gas/doc/as.texinfo
+ crossgcc::fixinfo gas/doc/ gas/doc/Makefile.in as texinfo
+
+ # bfd/doc/bfd.texinfo
+ crossgcc::fixinfo bfd/doc/ bfd/doc/Makefile.in bfd texinfo
+
+ # binutils/doc/binutils.texi
+ crossgcc::fixinfo binutils/doc/ binutils/doc/Makefile.in binutils texi
+
+ # gprof/gprof.texi
+ crossgcc::fixinfo gprof/ gprof/Makefile.in gprof texi
+
+ # ld/ld.texinfo
+ crossgcc::fixinfo ld/ ld/Makefile.in ld texinfo
+
+ # gettext stuff.
+ crossgcc::fixgettext bfd
+ crossgcc::fixgettext binutils
+ crossgcc::fixgettext gas
+ crossgcc::fixgettext gprof
+ crossgcc::fixgettext ld
+ crossgcc::fixgettext opcodes
+}
+
+# Build in a different directory, as advised in the README file.
+configure.dir ${workpath}/build
+pre-configure {
+ file mkdir ${configure.dir}
+}
+configure.cmd ${worksrcpath}/configure
+configure.args --infodir=${prefix}/share/info \
+ --target=${crossgcc-target}${rtemsversion} \
+ --mandir=${prefix}/share/man \
+ --disable-werror
+
+build.dir ${configure.dir}
+
+post-destroot {
+ # Installing (host) libiberty was a mistake.
+ foreach f [glob -directory ${destroot}${prefix}/lib libiberty.a */libiberty.a] {
+ file delete $f
+ }
+}
+
+livecheck.type freshmeat
+livecheck.name binutils
Property changes on: trunk/dports/cross/lm32-rtems-binutils/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/20110211/4d8ca136/attachment-0001.html>
More information about the macports-changes
mailing list