Use gcc-ar in mingw-w64-meson
This commit is contained in:
parent
19b5116ea6
commit
82ba630d0b
|
@ -0,0 +1,41 @@
|
|||
# Maintainer: drakkan <nicola.murino at gmail dot com>
|
||||
pkgname=mingw-w64-meson
|
||||
pkgver=1
|
||||
pkgrel=8
|
||||
arch=('any')
|
||||
pkgdesc="Meson wrapper for MinGW (mingw-w64)"
|
||||
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=('4ba3d46e1eb976b69f47b58edc51de1d01aba7362a18ec0715e1d209601f5a96'
|
||||
'd02f4469567104c03d908b1eb7cd2093342bf84b58bd2dc458e33ffd708b5ccb')
|
||||
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
|
||||
|
||||
build() {
|
||||
for _arch in ${_architectures}; do
|
||||
if [ ${_arch} = "i686-w64-mingw32" ]; then
|
||||
_cpu_family="x86"
|
||||
else
|
||||
_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
|
||||
}
|
||||
|
||||
package() {
|
||||
install -d "${pkgdir}"/usr/bin
|
||||
install -d "${pkgdir}"/usr/share/mingw
|
||||
for _arch in ${_architectures}; do
|
||||
install -m 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
|
||||
}
|
||||
|
||||
# vim: ts=2 sw=2 et:
|
|
@ -0,0 +1,34 @@
|
|||
#!/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 \
|
||||
--libexecdir /usr/@TRIPLE@/lib \
|
||||
--bindir /usr/@TRIPLE@/bin \
|
||||
--sbindir /usr/@TRIPLE@/bin \
|
||||
--includedir /usr/@TRIPLE@/include \
|
||||
--datadir /usr/@TRIPLE@/share \
|
||||
--mandir /usr/@TRIPLE@/share/man \
|
||||
--infodir /usr/@TRIPLE@/share/info \
|
||||
--localedir /usr/@TRIPLE@/share/locale \
|
||||
--sysconfdir /usr/@TRIPLE@/etc \
|
||||
--localstatedir /var \
|
||||
--sharedstatedir /var/lib \
|
||||
--buildtype release \
|
||||
--wrap-mode nofallback \
|
||||
--strip \
|
||||
--cross-file ${CROSS_FILE} \
|
||||
--default-library shared \
|
||||
"$@" \
|
||||
-D b_lto=true
|
|
@ -0,0 +1,22 @@
|
|||
[binaries]
|
||||
c = '@TRIPLE@-gcc'
|
||||
cpp = '@TRIPLE@-g++'
|
||||
fortran = '@TRIPLE@-gfortran'
|
||||
ar = '@TRIPLE@-gcc-ar'
|
||||
pkgconfig = '@TRIPLE@-pkg-config'
|
||||
ranlib = '@TRIPLE@-ranlib'
|
||||
strip = '@TRIPLE@-strip'
|
||||
windres = '@TRIPLE@-windres'
|
||||
exe_wrapper = '@TRIPLE@-wine'
|
||||
|
||||
[properties]
|
||||
root = '@TRIPLE@'
|
||||
c_args = ['-Wp,-D_FORTIFY_SOURCE=2', '-fexceptions', '--param=ssp-buffer-size=4']
|
||||
cpp_args = ['-Wp,-D_FORTIFY_SOURCE=2', '-fexceptions', '--param=ssp-buffer-size=4']
|
||||
needs_exe_wrapper = true
|
||||
|
||||
[host_machine]
|
||||
system = 'windows'
|
||||
cpu_family = '@CPU_FAMILY@'
|
||||
cpu = '@PROCESSOR@'
|
||||
endian = 'little'
|
Loading…
Reference in New Issue