wayland: switch to Meson toolchain

- add patch to build wayland-scanner on host
This commit is contained in:
SupervisedThinking 2021-11-17 22:41:12 +01:00
parent 82aa90887c
commit 7df5356e40
2 changed files with 23 additions and 19 deletions

View File

@ -7,33 +7,25 @@ PKG_SHA256="baccd902300d354581cd5ad3cc49daa4921d55fb416a5883e218750fef166d15"
PKG_LICENSE="OSS" PKG_LICENSE="OSS"
PKG_SITE="https://wayland.freedesktop.org/" PKG_SITE="https://wayland.freedesktop.org/"
PKG_URL="https://wayland.freedesktop.org/releases/${PKG_NAME}-${PKG_VERSION}.tar.xz" PKG_URL="https://wayland.freedesktop.org/releases/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_TARGET="toolchain wayland:host libffi expat libxml2"
PKG_DEPENDS_HOST="libffi:host expat:host libxml2:host" PKG_DEPENDS_HOST="libffi:host expat:host libxml2:host"
PKG_DEPENDS_TARGET="toolchain wayland:host libffi expat libxml2"
PKG_LONGDESC="a display server protocol" PKG_LONGDESC="a display server protocol"
PKG_TOOLCHAIN="configure"
PKG_CONFIGURE_OPTS_HOST="--enable-shared \ PKG_MESON_OPTS_HOST="-Dlibraries=false \
--disable-static \ -Dscanner=true \
--disable-libraries \ -Ddocumentation=false \
--disable-documentation \ -Ddtd_validation=false"
--with-gnu-ld"
PKG_CONFIGURE_OPTS_TARGET="--with-sysroot=${SYSROOT_PREFIX} \ PKG_MESON_OPTS_TARGET="-Dlibraries=true \
--with-host-scanner \ -Dscanner=false \
--enable-shared \ -Ddocumentation=false \
--disable-static \ -Ddtd_validation=false"
--enable-libraries \
--disable-documentation \
--with-gnu-ld"
pre_configure_target() { pre_configure_target() {
# wayland does not build with NDEBUG (requires assert for tests) # wayland does not build with NDEBUG (requires assert for tests)
export CFLAGS=$(echo ${CFLAGS} | sed -e "s|-DNDEBUG||g") export TARGET_CFLAGS=$(echo ${TARGET_CFLAGS} | sed -e "s|-DNDEBUG||g")
} }
post_makeinstall_target() { post_makeinstall_host() {
rm -rf ${INSTALL}/usr/bin
rm -rf ${INSTALL}/usr/share
cp ${TOOLCHAIN}/lib/pkgconfig/wayland-scanner.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig/ cp ${TOOLCHAIN}/lib/pkgconfig/wayland-scanner.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig/
} }

View File

@ -0,0 +1,12 @@
--- /src/meson.build
+++ /src/meson.build
@@ -58,7 +58,7 @@
)
endif
-if meson.is_cross_build() or not get_option('scanner')
+if meson.is_cross_build() and get_option('libraries')
scanner_dep = dependency('wayland-scanner', native: true, version: meson.project_version())
wayland_scanner_for_build = find_program(scanner_dep.get_pkgconfig_variable('wayland_scanner'))
else