mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-08-01 15:37:44 +00:00
package/wayland: build a host variant
Starting with 1.4.0, weston requires wayland-scanner to build its DT. So far, we got away with just hand-building wayland-scanner, and made that available in HOST_DIR/usr/bin But now, weston also requires wayland's DTD, which we did not take care of in our dirty little hack. So, the best solution is to just build a host-variant of wayland, so we get both wayland-scanner, and the DTD. But then, we do not build the target wayland-scanner (he, wayland tries to run it at build time...). So it is a matter of just tweaking a little bit the host .pc file (which weston uses to find wayland-scanner, sigh...) and fake it as a target .pc file. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
aa8eea6c37
commit
2c07341c75
@ -11,22 +11,27 @@ WAYLAND_LICENSE = MIT
|
|||||||
WAYLAND_LICENSE_FILES = COPYING
|
WAYLAND_LICENSE_FILES = COPYING
|
||||||
|
|
||||||
WAYLAND_INSTALL_STAGING = YES
|
WAYLAND_INSTALL_STAGING = YES
|
||||||
WAYLAND_DEPENDENCIES = libffi host-pkgconf expat host-expat
|
WAYLAND_DEPENDENCIES = libffi host-pkgconf host-wayland expat
|
||||||
|
|
||||||
# wayland needs a wayland-scanner program to generate some of its
|
# wayland-scanner is only needed for building, not on the target
|
||||||
# source code. By default, it builds it with CC, so it doesn't work with
|
|
||||||
# cross-compilation. Therefore, we build it manually, and tell wayland
|
|
||||||
# that the tool is already available.
|
|
||||||
WAYLAND_CONF_OPT = --disable-scanner
|
WAYLAND_CONF_OPT = --disable-scanner
|
||||||
|
|
||||||
define WAYLAND_BUILD_SCANNER
|
# We must provide a specialy-crafted wayland-scanner .pc file
|
||||||
(cd $(@D)/src/; \
|
# which we vampirise and adapt from the host-wayland copy
|
||||||
$(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) \
|
define WAYLAND_SCANNER_PC
|
||||||
-o wayland-scanner scanner.c wayland-util.c -lexpat; \
|
$(INSTALL) -m 0644 -D $(HOST_DIR)/usr/share/pkgconfig/wayland-scanner.pc \
|
||||||
$(INSTALL) -m 0755 -D wayland-scanner \
|
$(STAGING_DIR)/usr/lib/pkgconfig/wayland-scanner.pc
|
||||||
$(HOST_DIR)/usr/bin/wayland-scanner)
|
$(SED) 's:^prefix=.*:prefix=/usr:' \
|
||||||
|
-e 's:^wayland_scanner=.*:wayland_scanner=$(HOST_DIR)/usr/bin/wayland-scanner:' \
|
||||||
|
$(STAGING_DIR)/usr/lib/pkgconfig/wayland-scanner.pc
|
||||||
endef
|
endef
|
||||||
|
WAYLAND_POST_INSTALL_STAGING_HOOKS += WAYLAND_SCANNER_PC
|
||||||
|
|
||||||
WAYLAND_POST_CONFIGURE_HOOKS += WAYLAND_BUILD_SCANNER
|
# Remove the DTD from the target, it's not needed at runtime
|
||||||
|
define WAYLAND_TARGET_CLEANUP
|
||||||
|
rm -rf $(TARGET_DIR)/usr/share/wayland
|
||||||
|
endef
|
||||||
|
WAYLAND_POST_INSTALL_TARGET_HOOKS += WAYLAND_TARGET_CLEANUP
|
||||||
|
|
||||||
$(eval $(autotools-package))
|
$(eval $(autotools-package))
|
||||||
|
$(eval $(host-autotools-package))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user