From 09078df796dd94d4c9e515718ca81b8939f3942f Mon Sep 17 00:00:00 2001
From: Danny Rawlins <romster@shortcircuit.net.au>
Date: Thu, 30 Nov 2006 20:42:40 +1100
Subject: [PATCH] mingw32-binutils: initial commit

---
 mingw32-binutils/.footprint | 56 +++++++++++++++++++++++++++++++++++++
 mingw32-binutils/.md5sum    |  1 +
 mingw32-binutils/.nostrip   |  1 +
 mingw32-binutils/Pkgfile    | 31 ++++++++++++++++++++
 4 files changed, 89 insertions(+)
 create mode 100644 mingw32-binutils/.footprint
 create mode 100644 mingw32-binutils/.md5sum
 create mode 100644 mingw32-binutils/.nostrip
 create mode 100644 mingw32-binutils/Pkgfile

diff --git a/mingw32-binutils/.footprint b/mingw32-binutils/.footprint
new file mode 100644
index 000000000..819f05663
--- /dev/null
+++ b/mingw32-binutils/.footprint
@@ -0,0 +1,56 @@
+drwxr-xr-x	root/root	usr/
+drwxr-xr-x	root/root	usr/bin/
+-rwxr-xr-x	root/root	usr/bin/mingw32-addr2line
+-rwxr-xr-x	root/root	usr/bin/mingw32-ar
+-rwxr-xr-x	root/root	usr/bin/mingw32-as
+-rwxr-xr-x	root/root	usr/bin/mingw32-c++filt
+-rwxr-xr-x	root/root	usr/bin/mingw32-dlltool
+-rwxr-xr-x	root/root	usr/bin/mingw32-dllwrap
+-rwxr-xr-x	root/root	usr/bin/mingw32-gprof
+-rwxr-xr-x	root/root	usr/bin/mingw32-ld
+-rwxr-xr-x	root/root	usr/bin/mingw32-nm
+-rwxr-xr-x	root/root	usr/bin/mingw32-objcopy
+-rwxr-xr-x	root/root	usr/bin/mingw32-objdump
+-rwxr-xr-x	root/root	usr/bin/mingw32-ranlib
+-rwxr-xr-x	root/root	usr/bin/mingw32-readelf
+-rwxr-xr-x	root/root	usr/bin/mingw32-size
+-rwxr-xr-x	root/root	usr/bin/mingw32-strings
+-rwxr-xr-x	root/root	usr/bin/mingw32-strip
+-rwxr-xr-x	root/root	usr/bin/mingw32-windres
+drwxr-xr-x	root/root	usr/lib/
+drwxr-xr-x	root/root	usr/man/
+drwxr-xr-x	root/root	usr/man/man1/
+-rw-r--r--	root/root	usr/man/man1/mingw32-addr2line.1.gz
+-rw-r--r--	root/root	usr/man/man1/mingw32-ar.1.gz
+-rw-r--r--	root/root	usr/man/man1/mingw32-as.1.gz
+-rw-r--r--	root/root	usr/man/man1/mingw32-c++filt.1.gz
+-rw-r--r--	root/root	usr/man/man1/mingw32-dlltool.1.gz
+-rw-r--r--	root/root	usr/man/man1/mingw32-gprof.1.gz
+-rw-r--r--	root/root	usr/man/man1/mingw32-ld.1.gz
+-rw-r--r--	root/root	usr/man/man1/mingw32-nlmconv.1.gz
+-rw-r--r--	root/root	usr/man/man1/mingw32-nm.1.gz
+-rw-r--r--	root/root	usr/man/man1/mingw32-objcopy.1.gz
+-rw-r--r--	root/root	usr/man/man1/mingw32-objdump.1.gz
+-rw-r--r--	root/root	usr/man/man1/mingw32-ranlib.1.gz
+-rw-r--r--	root/root	usr/man/man1/mingw32-readelf.1.gz
+-rw-r--r--	root/root	usr/man/man1/mingw32-size.1.gz
+-rw-r--r--	root/root	usr/man/man1/mingw32-strings.1.gz
+-rw-r--r--	root/root	usr/man/man1/mingw32-strip.1.gz
+-rw-r--r--	root/root	usr/man/man1/mingw32-windres.1.gz
+drwxr-xr-x	root/root	usr/mingw32/
+drwxr-xr-x	root/root	usr/mingw32/bin/
+-rwxr-xr-x	root/root	usr/mingw32/bin/ar
+-rwxr-xr-x	root/root	usr/mingw32/bin/as
+-rwxr-xr-x	root/root	usr/mingw32/bin/dlltool
+-rwxr-xr-x	root/root	usr/mingw32/bin/ld
+-rwxr-xr-x	root/root	usr/mingw32/bin/nm
+-rwxr-xr-x	root/root	usr/mingw32/bin/objdump
+-rwxr-xr-x	root/root	usr/mingw32/bin/ranlib
+-rwxr-xr-x	root/root	usr/mingw32/bin/strip
+drwxr-xr-x	root/root	usr/mingw32/lib/
+drwxr-xr-x	root/root	usr/mingw32/lib/ldscripts/
+-rw-r--r--	root/root	usr/mingw32/lib/ldscripts/i386pe.x
+-rw-r--r--	root/root	usr/mingw32/lib/ldscripts/i386pe.xbn
+-rw-r--r--	root/root	usr/mingw32/lib/ldscripts/i386pe.xn
+-rw-r--r--	root/root	usr/mingw32/lib/ldscripts/i386pe.xr
+-rw-r--r--	root/root	usr/mingw32/lib/ldscripts/i386pe.xu
diff --git a/mingw32-binutils/.md5sum b/mingw32-binutils/.md5sum
new file mode 100644
index 000000000..d2155e05f
--- /dev/null
+++ b/mingw32-binutils/.md5sum
@@ -0,0 +1 @@
+1f460788226614419bc41ab4adde6576  binutils-2.17.50-20060824-1-src.tar.gz
diff --git a/mingw32-binutils/.nostrip b/mingw32-binutils/.nostrip
new file mode 100644
index 000000000..8d98f9deb
--- /dev/null
+++ b/mingw32-binutils/.nostrip
@@ -0,0 +1 @@
+.*
diff --git a/mingw32-binutils/Pkgfile b/mingw32-binutils/Pkgfile
new file mode 100644
index 000000000..cfdf9dfbd
--- /dev/null
+++ b/mingw32-binutils/Pkgfile
@@ -0,0 +1,31 @@
+# Description: MinGW32 binutils.
+# URL: http://www.mingw.org/
+# Maintainer: Danny Rawlins, romster at shortcircuit dot net dot au
+# Packager: Danny Rawlins, romster at shortcircuit dot net dot au
+# Depends on: texinfo, mingw32-runtime
+
+name=mingw32-binutils
+version=2.17.50-20060824
+release=2
+source=(http://dl.sourceforge.net/sourceforge/mingw/binutils-$version-1-src.tar.gz)
+
+build() {
+	mkdir $SRC/build
+	cd $SRC/build
+
+	../binutils-$version-1-src/configure \
+		--prefix=/usr \
+		--target=mingw32 \
+		--disable-nls \
+		--disable-shared \
+		--with-gcc \
+		--with-gnu-as \
+		--with-gnu-ld
+		
+	make CFLAGS="-O2 -fno-exceptions" LDFLAGS="-s"
+	make DESTDIR=$PKG install
+	rm -r $PKG/usr/info
+	rm $PKG/usr/lib/libiberty.a
+	find $PKG/ -type f -regex '.dll$' -regex 'debug$' -exec strip {} \;
+}
+