diff options
author | Emil Velikov | 2022-11-20 20:38:58 +0000 |
---|---|---|
committer | Emil Velikov | 2022-11-21 02:39:21 +0000 |
commit | 791bca2a8408fc50952fef66131c5c2e032f2d31 (patch) | |
tree | 4fb9277b6c3f92bc149bc296834d05c57a100610 | |
parent | 9910b6e91a9e3a8ae54f510946c95d95f5755d8d (diff) | |
download | aur-791bca2a8408fc50952fef66131c5c2e032f2d31.tar.gz |
mingw-w64-waffle 1.7.0-2: build with meson
The meson build depends on cmake to generate the cmake files.
But it must not use the mingw-w64-cmake wrapper, since that fails to
print the basics needed. Aka --system-information with the wrapper
outputs nothing.
In addition, we need to disable LTO since it completely stuffs the final
binaries. Similarly - stripping is left to the packaging stage.
There are some caveats, comparing the cmake build:
- the meson cross-file set ssp, so one needs libssp-0.dll
- upstream uses __thread, so one needs libwinpthread-1.dll
- upstream sets the prefix, so locally we rename {lib,}waffle-1.dll
The latter two be fixed with a later upstream release.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 29 |
2 files changed, 20 insertions, 14 deletions
@@ -1,11 +1,12 @@ pkgbase = mingw-w64-waffle pkgdesc = a library for choosing window system and OpenGL API at runtime (mingw-w64) pkgver = 1.7.0 - pkgrel = 1 + pkgrel = 2 url = https://waffle.freedesktop.org arch = any license = BSD - makedepends = mingw-w64-cmake + makedepends = mingw-w64-meson + makedepends = cmake depends = mingw-w64-crt options = !strip options = !buildflags @@ -1,12 +1,12 @@ pkgname=mingw-w64-waffle pkgver=1.7.0 -pkgrel=1 +pkgrel=2 pkgdesc='a library for choosing window system and OpenGL API at runtime (mingw-w64)' arch=('any') url='https://waffle.freedesktop.org' license=('BSD') depends=('mingw-w64-crt') -makedepends=('mingw-w64-cmake') +makedepends=('mingw-w64-meson' 'cmake') options=('!strip' '!buildflags' 'staticlibs') source=("https://gitlab.freedesktop.org/mesa/waffle/-/archive/v$pkgver/waffle-v$pkgver.tar.gz") sha256sums=('8562abf8d4778b788787513803b16b55a7ffff0971337cdac245ff29d8b12642') @@ -15,24 +15,29 @@ _architectures="i686-w64-mingw32 x86_64-w64-mingw32" build() { cd "${srcdir}/waffle-v$pkgver" + for _arch in ${_architectures}; do - mkdir -p build-${_arch} && pushd build-${_arch} - ${_arch}-cmake .. \ - -Dwaffle_build_tests=0 \ - -Dwaffle_build_manpages=0 \ - -Dwaffle_build_htmldocs=0 \ - -Dwaffle_build_examples=0 - make - popd + ${_arch}-meson build-${_arch} \ + -D b_lto=false \ + -D strip=false \ + -D build-manpages=false \ + -D build-htmldocs=false \ + -D build-examples=false + meson compile -C build-${_arch} done } package() { + cd "${srcdir}/waffle-v$pkgver" + for _arch in ${_architectures}; do - cd "${srcdir}/waffle-v$pkgver/build-${_arch}" - make DESTDIR="${pkgdir}" install + meson install -C build-${_arch} --destdir "$pkgdir" + rm -r "$pkgdir"/usr/${_arch}/share ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a + + # To be fixed upstream with a later release + mv "$pkgdir"/usr/${_arch}/bin/{lib,}waffle-1.dll done } |