summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorey Powell2015-07-29 14:27:49 -0500
committerCorey Powell2015-07-29 14:27:49 -0500
commit2e3646eb773121fe8aa7a2a88b0f5c43e2e4c9b6 (patch)
treeb9c9ecd6200a785065569c616a50ebd08ea7ad4f
parent51f5ceccc97b05b441f2596aa3af9db3868d79e6 (diff)
downloadaur-2e3646eb773121fe8aa7a2a88b0f5c43e2e4c9b6.tar.gz
Tweaked PKGBUILD a bit
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD25
2 files changed, 21 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7c43df17e0cc..3737eea4a04e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -7,6 +7,9 @@ pkgbase = mingw-w64-libyaml
license = MIT
makedepends = mingw-w64-gcc
depends = mingw-w64-crt
+ options = staticlibs
+ options = !strip
+ options = !buildflags
source = http://pyyaml.org/download/libyaml/yaml-0.1.6.tar.gz
md5sums = 5fe00cda18ca5daeb43762b80c38e06e
diff --git a/PKGBUILD b/PKGBUILD
index 414606a2ba5b..4b4872ccb6b5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,29 +1,35 @@
# Maintainer: Corey Powell (mistdragon100@gmail.com)
# Swiped from the official libyaml package and modified for mingw-w64
+# Also swiped some code from 0X1A and Schala's mingw-w64-libyaml
pkgname=mingw-w64-libyaml
pkgver=0.1.6
pkgrel=1
pkgdesc="YAML 1.1 library (mingw-w64)"
arch=('any')
-depends=('mingw-w64-crt')
-makedepends=('mingw-w64-gcc')
url="http://pyyaml.org/wiki/LibYAML"
license=('MIT')
+makedepends=('mingw-w64-gcc')
+depends=('mingw-w64-crt')
+options=(staticlibs !strip !buildflags)
source=(http://pyyaml.org/download/libyaml/yaml-${pkgver}.tar.gz)
md5sums=('5fe00cda18ca5daeb43762b80c38e06e')
+
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
-_config="mingw"
+
build() {
cd "${srcdir}/yaml-${pkgver}"
unset LDFLAGS
for _arch in ${_architectures}; do
- cp -R ${srcdir}/yaml-${pkgver} ${srcdir}/yaml-${pkgver}-${_arch}
+ cp -R "${srcdir}/yaml-${pkgver}" "${srcdir}/yaml-${pkgver}-${_arch}"
cd ${srcdir}/yaml-${pkgver}-${_arch}
#Finally compile
./configure \
- --prefix=/usr/${_arch} --host=${_arch} \
+ --prefix=/usr/${_arch} \
+ --build=$CHOST \
+ --host=${_arch} \
CFLAGS="-DYAML_DECLARE_STATIC" --enable-static --disable-shared
- make all
+ make
+ ${_arch}-gcc -shared src/*.o -o libyaml.dll -Xlinker --out-implib -Xlinker libyaml.dll.a
done
}
@@ -31,7 +37,12 @@ package() {
for _arch in ${_architectures}; do
cd "${srcdir}/yaml-${pkgver}-${_arch}"
make DESTDIR="${pkgdir}" install
- #make DESTDIR="${pkgdir}" install
+ make DESTDIR="$pkgdir" install
+ install -Dm644 "libyaml.dll" "${pkgdir}/usr/${_arch}/bin/libyaml.dll"
+ install -m644 "libyaml.dll.a" "${pkgdir}/usr/${_arch}/lib/libyaml.dll.a"
install -m644 -D LICENSE "${pkgdir}/usr/${_arch}/share/licenses/${pkgname}/LICENSE"
+ find "$pkgdir/usr/${_arch}" -name '*.exe' | 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
}