diff options
author | Nicola Murino | 2018-05-14 11:46:12 +0200 |
---|---|---|
committer | Nicola Murino | 2018-05-14 11:46:12 +0200 |
commit | 230f33df4af3c093c42f09e955b276463e493321 (patch) | |
tree | 3c58a2a2391c00cc6136290e9034cea84244738a | |
parent | a98117ae11ab0ea506be43324cbbd7defc06c93d (diff) | |
download | aur-230f33df4af3c093c42f09e955b276463e493321.tar.gz |
cross file is now configurable
use the env var CROSS_FILE to set a custom cross file different from the system one
use the env var NEED_WINE to use a cross file with wine support
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 10 | ||||
-rw-r--r-- | meson-mingw-wrapper | 15 |
3 files changed, 24 insertions, 9 deletions
@@ -1,20 +1,20 @@ # Generated by mksrcinfo v8 -# Fri May 11 12:08:25 UTC 2018 +# Mon May 14 09:46:09 UTC 2018 pkgbase = mingw-w64-meson pkgdesc = Meson wrapper for MinGW (mingw-w64) pkgver = 1 - pkgrel = 4 + pkgrel = 5 url = http://fedoraproject.org/wiki/MinGW arch = any license = GPL depends = meson depends = mingw-w64-gcc depends = mingw-w64-pkg-config - depends = mingw-w64-wine + optdepends = mingw-w64-wine: Set NEED_WINE env variable in your PKGBUILD to use wine support in meson source = toolchain-mingw.meson source = meson-mingw-wrapper sha256sums = 32d9dc088394e17753231e4cc24c53c3d3c0e29130a9aa37c6ca080d865a22e2 - sha256sums = 955ab09bc5e0f191964e008a54caa695290264c84f16fac7e48c1a2fe0838232 + sha256sums = d02f4469567104c03d908b1eb7cd2093342bf84b58bd2dc458e33ffd708b5ccb pkgname = mingw-w64-meson @@ -1,16 +1,17 @@ # Maintainer: drakkan <nicola.murino at gmail dot com> pkgname=mingw-w64-meson pkgver=1 -pkgrel=4 +pkgrel=5 arch=('any') pkgdesc="Meson wrapper for MinGW (mingw-w64)" -depends=('meson' 'mingw-w64-gcc' 'mingw-w64-pkg-config' 'mingw-w64-wine') +depends=('meson' 'mingw-w64-gcc' 'mingw-w64-pkg-config') +optdepends=('mingw-w64-wine: Set NEED_WINE env variable in your PKGBUILD to use wine support in meson') license=("GPL") url="http://fedoraproject.org/wiki/MinGW" source=("toolchain-mingw.meson" "meson-mingw-wrapper") sha256sums=('32d9dc088394e17753231e4cc24c53c3d3c0e29130a9aa37c6ca080d865a22e2' - '955ab09bc5e0f191964e008a54caa695290264c84f16fac7e48c1a2fe0838232') + 'd02f4469567104c03d908b1eb7cd2093342bf84b58bd2dc458e33ffd708b5ccb') _architectures="i686-w64-mingw32 x86_64-w64-mingw32" build() { @@ -21,6 +22,8 @@ build() { _cpu_family="x86_64" fi sed "s|@TRIPLE@|${_arch}|g;s|@PROCESSOR@|${_arch::-12}|g;s|@CPU_FAMILY@|${_cpu_family}|g" toolchain-mingw.meson > toolchain-${_arch}.meson + sed "s|@TRIPLE@|${_arch}|g;s|@PROCESSOR@|${_arch::-12}|g;s|@CPU_FAMILY@|${_cpu_family}|g" toolchain-mingw.meson > toolchain-${_arch}-wine.meson + sed -i '/^exe_wrapper/ d' toolchain-${_arch}.meson sed "s|@TRIPLE@|${_arch}|g;" meson-mingw-wrapper > ${_arch}-meson done } @@ -30,6 +33,7 @@ package() { for _arch in ${_architectures}; do install -Dm 755 "${srcdir}/${_arch}-meson" "$pkgdir/usr/bin/${_arch}-meson" install -m 644 toolchain-${_arch}.meson "${pkgdir}"/usr/share/mingw/ + install -m 644 toolchain-${_arch}-wine.meson "${pkgdir}"/usr/share/mingw/ done } diff --git a/meson-mingw-wrapper b/meson-mingw-wrapper index 313702065c2a..4d7278411468 100644 --- a/meson-mingw-wrapper +++ b/meson-mingw-wrapper @@ -1,5 +1,16 @@ #!/bin/sh +if [ -z ${CROSS_FILE} ] +then + if [ -z ${NEED_WINE} ] + then + CROSS_FILE=/usr/share/mingw/toolchain-@TRIPLE@.meson + else + CROSS_FILE=/usr/share/mingw/toolchain-@TRIPLE@-wine.meson + fi +fi + + meson setup \ --prefix /usr/@TRIPLE@ \ --libdir /usr/@TRIPLE@/lib \ @@ -17,7 +28,7 @@ meson setup \ --buildtype release \ --wrap-mode nofallback \ --strip \ - --cross-file /usr/share/mingw/toolchain-@TRIPLE@.meson \ - --default-library both \ + --cross-file ${CROSS_FILE} \ + --default-library shared \ "$@" \ -D b_lto=true |