[26855] trunk/dports/cross

source_changes at macosforge.org source_changes at macosforge.org
Mon Jul 9 18:48:00 PDT 2007


Revision: 26855
          http://trac.macosforge.org/projects/macports/changeset/26855
Author:   pguyot at kallisys.net
Date:     2007-07-09 18:48:00 -0700 (Mon, 09 Jul 2007)

Log Message:
-----------
New port: cross/arm-none-linux-gnueabi-binutils (binutils for Nokia Internet Tablet 770/800)

Added Paths:
-----------
    trunk/dports/cross/arm-none-linux-gnueabi-binutils/
    trunk/dports/cross/arm-none-linux-gnueabi-binutils/Portfile

Added: trunk/dports/cross/arm-none-linux-gnueabi-binutils/Portfile
===================================================================
--- trunk/dports/cross/arm-none-linux-gnueabi-binutils/Portfile	                        (rev 0)
+++ trunk/dports/cross/arm-none-linux-gnueabi-binutils/Portfile	2007-07-10 01:48:00 UTC (rev 26855)
@@ -0,0 +1,128 @@
+# $Id: Portfile 24064 2007-04-16 02:46:32Z pguyot at kallisys.net $
+
+PortSystem			1.0
+name				arm-none-linux-gnueabi-binutils
+version				2005q3-2
+
+# Parameters for this port.
+set crossgcc-target arm-none-linux-gnueabi
+
+description			FSF Binutils for arm-none-linux-gnueabi cross development, with Code Sourcery patches (for Nokia Internet Tablet)
+long_description	Free Software Foundation development toolchain ("binutils") for \
+					arm-none-linux-gnueabi cross development (for Nokia Internet Tablet).
+platforms			darwin
+categories			cross devel
+maintainers			pguyot at kallisys.net
+homepage			http://www.codesourcery.com/gnu_toolchains/arm
+master_sites			macports:pguyot	
+distname			binutils-${version}
+worksrcdir			binutils-2.17pre
+use_bzip2			yes
+checksums			md5 4c68f4c9b5623ddd5289cb223fac0be2 \
+					sha1 051e49e4b3e1b752beddb628ea9d4c2b5ed8edda \
+					rmd160 39bd5f92476daed7f0292e98449e7cfdc7d0910f
+
+# Download everything to binutils/
+dist_subdir			binutils
+
+# Build in a different directory, as advised in the README file.
+pre-configure   	{ system "cd ${workpath} && mkdir -p build"}
+configure.dir   	${workpath}/build
+configure.cmd   	${worksrcpath}/configure
+configure.env   	CC="cc -no-cpp-precomp"
+configure.args  	--infodir='${prefix}/share/info' --target=${crossgcc-target} \
+			--program-prefix=${crossgcc-target}- --mandir='${prefix}/share/man' --with-sysroots
+build.dir       	${workpath}/build
+					
+# We don't want the etc module.
+post-extract {
+	system "rm -rf ${worksrcpath}/etc"
+}
+
+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
+}
+
+post-destroot {
+	# Installing (host) libiberty was a mistake.
+	file delete "${destroot}/${prefix}/lib/libiberty.a"
+}
+
+livecheck.check	freshmeat
+livecheck.name	binutils

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070709/a334ec4d/attachment.html


More information about the macports-changes mailing list