53 lines
1.7 KiB
Bash
53 lines
1.7 KiB
Bash
# Maintainer: Felix Yan <felixonmars@archlinux.org>
|
|
|
|
pkgname=mingw-w64-headers
|
|
pkgver=12.0.0
|
|
pkgrel=1
|
|
pkgdesc="MinGW-w64 headers for Windows"
|
|
arch=('any')
|
|
url="http://mingw-w64.sourceforge.net"
|
|
license=('custom')
|
|
groups=('mingw-w64-toolchain' 'mingw-w64')
|
|
options=('!strip' '!libtool' '!emptydirs')
|
|
source=(git+https://gitea.classfun.cn:4443/mirrors/mingw-w64.git)
|
|
sha512sums=('SKIP')
|
|
|
|
_targets="i686-w64-mingw32 x86_64-w64-mingw32 aarch64-w64-mingw32"
|
|
get_latest() {
|
|
cd "$srcdir/mingw-w64"
|
|
git tag | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort --version-sort | tail -n1
|
|
}
|
|
|
|
pkgver() {
|
|
get_latest | sed 's,^v,,'
|
|
}
|
|
|
|
prepare() {
|
|
cd "$srcdir/mingw-w64"
|
|
git checkout "$(get_latest)"
|
|
}
|
|
|
|
build() {
|
|
for _target in ${_targets}; do
|
|
echo "Configuring ${_target} headers"
|
|
mkdir -p "$srcdir"/headers-${_target} && cd "$srcdir"/headers-${_target}
|
|
"$srcdir"/mingw-w64/mingw-w64-headers/configure --prefix=/usr/${_target} --enable-sdk=all --host=${_target}
|
|
done
|
|
}
|
|
|
|
package() {
|
|
for _target in ${_targets}; do
|
|
echo "Installing ${_target} headers"
|
|
cd "$srcdir"/headers-${_target}
|
|
make 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
|
|
|
|
echo "Installing MinGW-w64 licenses"
|
|
install -Dm644 "$srcdir"/mingw-w64/COPYING.MinGW-w64/COPYING.MinGW-w64.txt "$pkgdir"/usr/share/licenses/${pkgname}/COPYING.MinGW-w64.txt
|
|
install -Dm644 "$srcdir"/mingw-w64/COPYING.MinGW-w64-runtime/COPYING.MinGW-w64-runtime.txt "$pkgdir"/usr/share/licenses/${pkgname}/COPYING.MinGW-w64-runtime.txt
|
|
install -Dm644 "$srcdir"/mingw-w64/mingw-w64-headers/ddk/readme.txt "$pkgdir"/usr/share/licenses/${pkgname}/ddk-readme.txt
|
|
}
|