summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorey Powell2018-06-08 15:51:51 -0500
committerCorey Powell2018-06-08 15:51:51 -0500
commita70c1680722be45f97ded05fea7be4de03de2dee (patch)
tree63b7fad84b8b9e0d1ef8229b6e51997a46952e4b
parent4bd8aaf60b404c2bcabc8b4d603ba1f540be9c67 (diff)
downloadaur-a70c1680722be45f97ded05fea7be4de03de2dee.tar.gz
Use mingw-w64-configure for the configuration
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD46
2 files changed, 27 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8a85fb8c5f19..ab6b463028f5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,11 +1,11 @@
pkgbase = mingw-w64-libyaml
pkgdesc = YAML 1.1 library (mingw-w64)
pkgver = 0.1.7
- pkgrel = 1
+ pkgrel = 2
url = http://pyyaml.org/wiki/LibYAML
arch = any
license = MIT
- makedepends = mingw-w64-gcc
+ makedepends = mingw-w64-configure
depends = mingw-w64-crt
options = staticlibs
options = !strip
diff --git a/PKGBUILD b/PKGBUILD
index 185039114cd7..6b85517295b7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,12 +3,12 @@
# Also swiped some code from 0X1A and Schala's mingw-w64-libyaml
pkgname=mingw-w64-libyaml
pkgver=0.1.7
-pkgrel=1
+pkgrel=2
pkgdesc="YAML 1.1 library (mingw-w64)"
arch=('any')
url="http://pyyaml.org/wiki/LibYAML"
license=('MIT')
-makedepends=('mingw-w64-gcc')
+makedepends=('mingw-w64-configure')
depends=('mingw-w64-crt')
options=(staticlibs !strip !buildflags)
source=(http://pyyaml.org/download/libyaml/yaml-${pkgver}.tar.gz)
@@ -17,32 +17,36 @@ md5sums=('1abf45bd3a96374fa55ca63b32f9f2f9')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
build() {
- cd "${srcdir}/yaml-${pkgver}"
- unset LDFLAGS
+ cd "${srcdir}/yaml-$pkgver/"
for _arch in ${_architectures}; do
- cp -R "${srcdir}/yaml-${pkgver}" "${srcdir}/yaml-${pkgver}-${_arch}"
- cd ${srcdir}/yaml-${pkgver}-${_arch}
- #Finally compile
- ./configure \
- --prefix=/usr/${_arch} \
- --build=$CHOST \
- --host=${_arch} \
- CFLAGS="-DYAML_DECLARE_STATIC" --enable-static --disable-shared
+ mkdir -p build-${_arch} && pushd build-${_arch}
+ ${_arch}-configure CFLAGS="-DYAML_DECLARE_STATIC" --enable-static --disable-shared
make
- ${_arch}-gcc -shared src/*.o -o libyaml.dll -Xlinker --out-implib -Xlinker libyaml.dll.a
+ popd
done
}
package() {
for _arch in ${_architectures}; do
- cd "${srcdir}/yaml-${pkgver}-${_arch}"
+ cd "${srcdir}/yaml-$pkgver/build-${_arch}"
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
+ rm -rf "$pkgdir"/usr/${_arch}/share/man
+ #${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
+ ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
+ find "$pkgdir" -name '*.exe' -delete
+ find "$pkgdir" -name '*.dll' -delete
+ find "$pkgdir" -name '*.h' -delete
done
+
+ #for _arch in ${_architectures}; do
+ # cd "${srcdir}/yaml-${pkgver}-${_arch}"
+ # 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
}