From 8660d11b089ea628bbfb3ace61fd31a103bbd2c6 Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Wed, 24 Apr 2024 14:22:40 +0200 Subject: [PATCH] package/libxmlb: new package Signed-off-by: Yegor Yefremov Signed-off-by: Thomas Petazzoni --- DEVELOPERS | 1 + package/Config.in | 1 + package/libxmlb/Config.in | 17 +++++++++++++++++ package/libxmlb/libxmlb.hash | 3 +++ package/libxmlb/libxmlb.mk | 36 ++++++++++++++++++++++++++++++++++++ 5 files changed, 58 insertions(+) create mode 100644 package/libxmlb/Config.in create mode 100644 package/libxmlb/libxmlb.hash create mode 100644 package/libxmlb/libxmlb.mk diff --git a/DEVELOPERS b/DEVELOPERS index ef870f12d6..61bededd7d 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -3318,6 +3318,7 @@ F: package/libsoc/ F: package/libsocketcan/ F: package/libubox/ F: package/libuci/ +F: package/libxmlb/ F: package/linux-firmware/ F: package/linux-serial-test/ F: package/modem-manager/ diff --git a/package/Config.in b/package/Config.in index 310b763fbf..2b1e4a86b9 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1863,6 +1863,7 @@ menu "JSON/XML" source "package/libroxml/Config.in" source "package/libucl/Config.in" source "package/libxml2/Config.in" + source "package/libxmlb/Config.in" source "package/libxmlpp/Config.in" source "package/libxmlrpc/Config.in" source "package/libxslt/Config.in" diff --git a/package/libxmlb/Config.in b/package/libxmlb/Config.in new file mode 100644 index 0000000000..c582b14f58 --- /dev/null +++ b/package/libxmlb/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_LIBXMLB + bool "libxmlb" + depends on !BR2_STATIC_LIBS # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + depends on BR2_USE_WCHAR # glib2 + select BR2_PACKAGE_LIBGLIB2 + help + The libxmlb library takes XML source, and converts it + to a structured binary representation with a deduplicated + string table where the strings have the NULs included. + + https://github.com/hughsie/libxmlb + +comment "libxmlb needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/libxmlb/libxmlb.hash b/package/libxmlb/libxmlb.hash new file mode 100644 index 0000000000..0f91486a03 --- /dev/null +++ b/package/libxmlb/libxmlb.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 7050a3e43c4e1f53020cfbdfcb6fd5dc664c6c240faceb5ae3c8830423918262 libxmlb-0.3.19.tar.gz +sha256 20c17d8b8c48a600800dfd14f95d5cb9ff47066a9641ddeab48dc54aec96e331 LICENSE diff --git a/package/libxmlb/libxmlb.mk b/package/libxmlb/libxmlb.mk new file mode 100644 index 0000000000..1d5d339e4f --- /dev/null +++ b/package/libxmlb/libxmlb.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# libxmlb +# +################################################################################ + +LIBXMLB_VERSION = 0.3.19 +LIBXMLB_SITE = $(call github,hughsie,libxmlb,$(LIBXMLB_VERSION)) +LIBXMLB_LICENSE = LGPL-2.1+ +LIBXMLB_LICENSE_FILES = LICENSE +LIBXMLB_INSTALL_STAGING = YES +LIBXMLB_DEPENDENCIES = libglib2 +LIBXMLB_CONF_OPTS = -Dgtkdoc=false -Dtests=false + +ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y) +LIBXMLB_CONF_OPTS += -Dintrospection=true +LIBXMLB_DEPENDENCIES += gobject-introspection +else +LIBXMLB_CONF_OPTS += -Dintrospection=false +endif + +ifeq ($(BR2_PACKAGE_ZSTD),y) +LIBXMLB_DEPENDENCIES += zstd +LIBXMLB_CONF_OPTS += -Dzstd=enabled +else +LIBXMLB_CONF_OPTS += -Dzstd=disabled +endif + +ifeq ($(BR2_PACKAGE_XZ),y) +LIBXMLB_DEPENDENCIES += xz +LIBXMLB_CONF_OPTS += -Dlzma=enabled +else +LIBXMLB_CONF_OPTS += -Dlzma=disabled +endif + +$(eval $(meson-package))