# Contributor: Leo # Maintainer: Simon Zeni pkgname=mingw-w64-headers pkgver=11.0.0 pkgrel=1 pkgdesc="MinGW-w64 headers for Windows" url="https://mingw-w64.sourceforge.net/" arch="x86_64 x86" license="custom" subpackages="$pkgname-doc" source="$pkgname-$pkgver.tar.bz2::https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/mingw-w64-v$pkgver.tar.bz2" builddir="$srcdir/mingw-w64-v$pkgver/mingw-w64-headers" case "$CARCH" in x86_64) _targets="x86_64-w64-mingw32 i686-w64-mingw32" subpackages="$subpackages i686-$pkgname:x32" ;; x86) _targets="i686-w64-mingw32" ;; esac build() { local target for target in $_targets; do msg "building target: $target" ( local bld="$srcdir"/bld-$target mkdir -p "$bld" cd "$bld" "$builddir"/configure \ --prefix=/usr/$target \ --enable-sdk=all \ --host=$target make ) done } package() { local target for target in $_targets; do make -C "$srcdir"/bld-$target DESTDIR="$pkgdir" install rm "$pkgdir"/usr/$target/include/pthread_signal.h rm "$pkgdir"/usr/$target/include/pthread_time.h rm "$pkgdir"/usr/$target/include/pthread_unistd.h done install -Dm644 "$srcdir"/mingw-w64-v$pkgver/COPYING.MinGW-w64/COPYING.MinGW-w64.txt \ "$pkgdir"/usr/share/licenses/$pkgname/COPYING.MinGW-w64.txt install -Dm644 "$srcdir"/mingw-w64-v$pkgver/COPYING.MinGW-w64-runtime/COPYING.MinGW-w64-runtime.txt \ "$pkgdir"/usr/share/licenses/$pkgname/COPYING.MinGW-w64-runtime.txt install -Dm644 "$srcdir"/mingw-w64-v$pkgver/mingw-w64-headers/ddk/readme.txt \ "$pkgdir"/usr/share/licenses/$pkgname/ddk-readme.txt } x32() { pkgdesc="$pkgdesc (i686 variant)" amove usr/i686-w64-mingw32 } sha512sums=" bc1c9fd9d8593ead9375fcbe40950f06cf7616b94dc676db2793ac9b496fe3a6cc94b5793effda3b752942be0d7d01a1c37a8f221aaf178df0d4eeb0aa6d1f8d mingw-w64-headers-11.0.0.tar.bz2 "