From 3c5380d7599be74aaa60efd04ca7e8a6e48c656d Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 22 Aug 2021 21:10:33 +0100 Subject: [PATCH] libxkbcommon: add package Add X keyboard library used for keyboard input. Signed-off-by: Daniel Golle --- libs/libxkbcommon/Makefile | 56 +++++++++++++++++++ .../001-fix-wayland-scanner-detect.patch | 30 ++++++++++ 2 files changed, 86 insertions(+) create mode 100644 libs/libxkbcommon/Makefile create mode 100644 libs/libxkbcommon/patches/001-fix-wayland-scanner-detect.patch diff --git a/libs/libxkbcommon/Makefile b/libs/libxkbcommon/Makefile new file mode 100644 index 0000000..58277e9 --- /dev/null +++ b/libs/libxkbcommon/Makefile @@ -0,0 +1,56 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=libxkbcommon +PKG_VERSION:=1.3.0 +PKG_RELEASE:=$(AUTORELEASE) + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://xkbcommon.org/download/ +PKG_HASH:=7b09e098ea69bc3054f0c57a9a25fda571c4df22398811606e32b5fffeb75e7b + +PKG_MAINTAINER:=Daniel Golle +PKG_LICENSE:=BSD-3-Clause + +PKG_INSTALL:=1 + +PKG_BUILD_DEPENDS:=wayland + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/meson.mk + +MESON_ARGS += \ + -Denable-x11=false \ + -Denable-docs=false \ + -Denable-wayland=true \ + -Dscanner_bin="$(STAGING_DIR_HOSTPKG)/bin/wayland-scanner" + +define Package/libxkbcommon + SECTION:=libs + CATEGORY:=Libraries + TITLE:=libxkbcommon + URL:=https://xkbcommon.org/ + DEPENDS:=+libwayland +libxml2 +wayland-protocols +endef + +define Package/libxkbcommon/description +endef + +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/*.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/libxkbcommon/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/ + $(INSTALL_DIR) $(1)/usr/libexec/xkbcommon + $(CP) $(PKG_INSTALL_DIR)/usr/libexec/xkbcommon/* $(1)/usr/libexec/xkbcommon/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xkbcli $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,libxkbcommon)) diff --git a/libs/libxkbcommon/patches/001-fix-wayland-scanner-detect.patch b/libs/libxkbcommon/patches/001-fix-wayland-scanner-detect.patch new file mode 100644 index 0000000..0a41f83 --- /dev/null +++ b/libs/libxkbcommon/patches/001-fix-wayland-scanner-detect.patch @@ -0,0 +1,30 @@ +--- a/meson.build ++++ b/meson.build +@@ -480,7 +480,11 @@ if build_tools + You can disable the Wayland xkbcli programs with -Denable-wayland=false.''') + endif + +- wayland_scanner = find_program(wayland_scanner_dep.get_pkgconfig_variable('wayland_scanner')) ++ if (get_option('scanner_bin') == '') ++ wayland_scanner = find_program(wayland_scanner_dep.get_pkgconfig_variable('wayland_scanner')) ++ else ++ wayland_scanner = find_program(get_option('scanner_bin')) ++ endif + wayland_scanner_code_gen = generator( + wayland_scanner, + output: '@BASENAME@-protocol.c', +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -62,6 +62,12 @@ option( + description: 'Enable support for Wayland utility programs', + ) + option( ++ 'scanner_bin', ++ description: 'Path to wayland-scanner binary', ++ type: 'string', ++ value: '' ++) ++option( + 'enable-xkbregistry', + type: 'boolean', + value: true, -- 2.30.2