summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSchala2015-06-08 18:08:20 -0700
committerSchala2015-06-08 18:08:20 -0700
commit3b7794913e06446bfb29cadaa7e5f1687e302175 (patch)
tree159bb010b733a501dd77d737aee0e6464d4e262a
downloadaur-3b7794913e06446bfb29cadaa7e5f1687e302175.tar.gz
init
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD40
2 files changed, 57 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..237f7f69ad8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = mingw-w64-libffi
+ pkgdesc = Portable foreign function interface library (mingw-w64)
+ pkgver = 3.2.1
+ pkgrel = 1
+ url = http://sourceware.org/libffi
+ arch = any
+ license = MIT
+ makedepends = mingw-w64-configure
+ depends = mingw-w64-crt
+ options = staticlibs
+ options = !buildflags
+ options = !strip
+ source = ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz
+ sha1sums = 280c265b789e041c02e5c97815793dfc283fb1e6
+
+pkgname = mingw-w64-libffi
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..bd7ca93eebd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+pkgname=mingw-w64-libffi
+pkgver=3.2.1
+pkgrel=1
+pkgdesc="Portable foreign function interface library (mingw-w64)"
+arch=(any)
+depends=(mingw-w64-crt)
+makedepends=(mingw-w64-configure)
+options=(staticlibs !buildflags !strip)
+license=(MIT)
+url="http://sourceware.org/libffi"
+source=("ftp://sourceware.org/pub/libffi/libffi-${pkgver}.tar.gz")
+sha1sums=('280c265b789e041c02e5c97815793dfc283fb1e6')
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+build() {
+ cd "${srcdir}/libffi-${pkgver}"
+ unset LDFLAGS
+ for _arch in ${_architectures}; do
+ mkdir -p build-${_arch} && pushd build-${_arch}
+ ${_arch}-configure \
+ --target=${_arch} \
+ --enable-pax_emutramp
+ make
+ popd
+ done
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ cd "${srcdir}/libffi-${pkgver}/build-${_arch}"
+ make DESTDIR="${pkgdir}" install
+ rm -rf "$pkgdir/usr/${_arch}/share"
+ find "$pkgdir/usr/${_arch}" -name '*.exe' -o -name '*.bat' -o -name '*.def' -o -name '*.exp' | xargs -rtl1 rm
+ find "$pkgdir/usr/${_arch}" -name '*.dll' | xargs -rtl1 ${_arch}-strip --strip-unneeded
+ find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs -rtl1 ${_arch}-strip -g
+ done
+}
+
+# vim:set ts=2 sw=2 et: