2025-06-27 07:05:51 +02:00

62 lines
2.1 KiB
Bash

# Maintainer: Martell Malone <martellmalone@gmail.com>
_realname=winstorecompat
_mingw_suff=mingw-w64-cross
pkgbase="${_mingw_suff}-mingwarm64-${_realname}"
_targetpkgs=("${_mingw_suff}-mingwarm64-${_realname}")
pkgname=("${_targetpkgs[@]}")
pkgver=13.0.0dev
pkgrel=1
pkgdesc="MinGW-w64 winRT compat library"
arch=('i686' 'x86_64')
url='https://www.mingw-w64.org'
msys2_repository_url='https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-libraries/winstorecompat'
license=('custom')
groups=("${_mingw_suff}-toolchain" "${_mingw_suff}")
makedepends=("git" "${_mingw_suff}-mingwarm64-gcc" "${_mingw_suff}-mingwarm64-binutils" "${_mingw_suff}-mingwarm64-crt" "${_mingw_suff}-mingwarm64-headers" 'autotools')
backup=()
options=('!strip' '!buildflags' 'staticlibs' '!emptydirs' '!buildflags')
_commit='9d8da7d28c75dd70bcd7b6b5f9b360ebfe13194a'
source=("mingw-w64"::"git+https://github.com/Windows-on-ARM-Experiments/mingw-woarm64.git#commit=$_commit")
sha256sums=('1900fb686ee98ef7b55297d7e5298b01b1c1be2d4ca61f2c0fb39bb1dc1a7858')
msys2_references=(
# doesn't exist in arch, this is the next best thing
'archlinux: mingw-w64-headers'
'cpe: cpe:/a:mingw-w64:mingw-w64'
)
_build() {
_target=$1
mkdir -p ${srcdir}/build-${_target} && cd ${srcdir}/build-${_target}
unset CC
${srcdir}/mingw-w64/mingw-w64-libraries/winstorecompat/configure \
--prefix=/opt/${_target} \
--build=${CHOST} \
--host=${_target}
make
}
_package() {
_target=$1
cd ${srcdir}/build-${_target}
make DESTDIR=${pkgdir} install
}
build() {
for _pkg in "${_targetpkgs[@]}"; do
case "$_pkg" in
"${_mingw_suff}-ucrt64-${_realname}") _build "x86_64-w64-mingw32ucrt" ;;
"${_mingw_suff}-mingw32-${_realname}") _build "i686-w64-mingw32" ;;
"${_mingw_suff}-mingw64-${_realname}") _build "x86_64-w64-mingw32" ;;
"${_mingw_suff}-mingwarm64-${_realname}") _build "aarch64-w64-mingw32" ;;
esac
done
}
package_mingw-w64-cross-mingwarm64-winstorecompat() {
depends=("${_mingw_suff}-mingwarm64-crt")
conflicts=("${_mingw_suff}-${_realname}<=12.0.0.r0.g819a6ec2e-1")
_package "aarch64-w64-mingw32"
}