summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorQin Yuhao2016-09-12 14:16:08 +0800
committerQin Yuhao2016-09-12 14:16:08 +0800
commiteb3404eb1b51ad66eb6e93029806464ce7973d80 (patch)
tree2d6850e00f9c8fd3bb5700ceb8f0d8a294de3220
downloadaur-eb3404eb1b51ad66eb6e93029806464ce7973d80.tar.gz
Initial commit
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD45
2 files changed, 61 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..f4c9c53b0cd
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = x86_64-apple-darwin-binutils
+ pkgdesc = Cross binutils for the Apple Darwin cross-compiler
+ pkgver = 2.27
+ pkgrel = 1
+ url = http://www.gnu.org/software/binutils
+ arch = i386
+ arch = x86_64
+ license = GPL
+ depends = zlib
+ options = !libtool
+ options = !emptydirs
+ source = http://ftp.gnu.org/gnu/binutils/binutils-2.27.tar.gz
+ md5sums = 41b053ed4fb2c6a8173ef421460fbb28
+
+pkgname = x86_64-apple-darwin-binutils
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..78edfb1d0e4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+_targets="x86_64-apple-darwin"
+
+pkgname="${_targets}"-binutils
+pkgver=2.27
+pkgrel=1
+pkgdesc="Cross binutils for the Apple Darwin cross-compiler"
+arch=('i386' 'x86_64')
+url="http://www.gnu.org/software/binutils"
+license=('GPL')
+#groups=
+depends=('zlib')
+options=('!libtool' '!emptydirs')
+source=("http://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.gz")
+md5sums=('41b053ed4fb2c6a8173ef421460fbb28')
+
+prepare() {
+ cd ${srcdir}/binutils-${pkgver}
+ #do not install libiberty
+ sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
+ # hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
+}
+
+build() {
+ for _target in $_targets; do
+ msg "Building ${_target} cross binutils"
+ mkdir -p ${srcdir}/binutils-${_target} && cd "${srcdir}/binutils-${_target}"
+ $srcdir/binutils-${pkgver}/configure --prefix=/usr \
+ --target=${_target} \
+ --infodir=/usr/share/info/${_target} \
+ --enable-lto --enable-plugins \
+ --enable-64-bit-bfd \
+ --disable-multilib --disable-nls \
+ --disable-werror
+ make
+ done
+}
+
+package() {
+ for _target in ${_targets}; do
+ msg "Installing ${_target} cross binutils"
+ cd ${srcdir}/binutils-${_target}
+ make DESTDIR=${pkgdir} install
+ done
+}