mirror of
https://github.com/openwrt/video.git
synced 2025-12-21 17:04:37 +04:00
wayland: add package
Add wayland framework package and host build. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
80
frameworks/wayland/Makefile
Normal file
80
frameworks/wayland/Makefile
Normal file
@@ -0,0 +1,80 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wayland
|
||||
PKG_VERSION:=1.19.0
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://wayland.freedesktop.org/releases/
|
||||
PKG_HASH:=baccd902300d354581cd5ad3cc49daa4921d55fb416a5883e218750fef166d15
|
||||
|
||||
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_BUILD_DEPENDS:=libffi/host libxml2/host expat/host wayland/host
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/meson.mk
|
||||
|
||||
define Package/libwayland
|
||||
SECTION:=libs
|
||||
CATEGORY:=Video
|
||||
SUBMENU:=Frameworks and Toolkits
|
||||
TITLE:=wayland
|
||||
URL:=https://wayland.freedesktop.org/
|
||||
DEPENDS:=+libexpat +libffi
|
||||
endef
|
||||
|
||||
define Package/libwayland/description
|
||||
endef
|
||||
|
||||
define Package/wayland-scanner
|
||||
SECTION:=libs
|
||||
CATEGORY:=Video
|
||||
SUBMENU:=Frameworks and Toolkits
|
||||
TITLE:=wayland
|
||||
URL:=https://wayland.freedesktop.org/
|
||||
DEPENDS:=+libxml2 +libexpat
|
||||
endef
|
||||
|
||||
define Package/wayland-scanner/description
|
||||
endef
|
||||
|
||||
MESON_HOST_ARGS += \
|
||||
-Dscanner=true \
|
||||
-Dlibraries=false \
|
||||
-Ddocumentation=false \
|
||||
-Ddtd_validation=true
|
||||
|
||||
MESON_ARGS += \
|
||||
-Dscanner=true \
|
||||
-Dlibraries=true \
|
||||
-Ddocumentation=false \
|
||||
-Ddtd_validation=true \
|
||||
-Dscanner_bin="$(STAGING_DIR_HOSTPKG)/bin/wayland-scanner"
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
|
||||
endef
|
||||
|
||||
define Package/libwayland/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/wayland-scanner/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wayland-scanner $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libwayland))
|
||||
$(eval $(call BuildPackage,wayland-scanner))
|
||||
$(eval $(call HostBuild))
|
||||
@@ -0,0 +1,30 @@
|
||||
--- a/src/meson.build
|
||||
+++ b/src/meson.build
|
||||
@@ -59,8 +59,12 @@ if get_option('scanner')
|
||||
endif
|
||||
|
||||
if meson.is_cross_build() or not get_option('scanner')
|
||||
- scanner_dep = dependency('wayland-scanner', native: true, version: meson.project_version())
|
||||
- wayland_scanner_for_build = find_program(scanner_dep.get_pkgconfig_variable('wayland_scanner'))
|
||||
+ if (get_option('scanner_bin') != '')
|
||||
+ wayland_scanner_for_build = get_option('scanner_bin')
|
||||
+ else
|
||||
+ scanner_dep = dependency('wayland-scanner', native: true, version: meson.project_version())
|
||||
+ wayland_scanner_for_build = find_program(scanner_dep.get_pkgconfig_variable('wayland_scanner'))
|
||||
+ endif
|
||||
else
|
||||
wayland_scanner_for_build = wayland_scanner
|
||||
endif
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -6,6 +6,10 @@ option('scanner',
|
||||
description: 'Compile wayland-scanner binary',
|
||||
type: 'boolean',
|
||||
value: 'true')
|
||||
+option('scanner_bin',
|
||||
+ description: 'Path to wayland-scanner binary',
|
||||
+ type: 'string',
|
||||
+ value: '')
|
||||
option('documentation',
|
||||
description: 'Build the documentation (requires Doxygen, dot, xmlto, xsltproc)',
|
||||
type: 'boolean',
|
||||
Reference in New Issue
Block a user