diff mbox series

[1/2] package/libdex: new package

Message ID 20240627220223.6687-2-aperez@igalia.com
State Accepted
Headers show
Series Update Sysprof to the latest release | expand

Commit Message

Adrian Perez de Castro June 27, 2024, 10:02 p.m. UTC
This package provides utilities for asynchronous programming in C
using a futures/promises model. Newer versions of sysprof require
this library.

https://gitlab.gnome.org/GNOME/libdex

Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
---
 DEVELOPERS                 |  1 +
 package/Config.in          |  1 +
 package/libdex/Config.in   | 17 +++++++++++++++++
 package/libdex/libdex.hash |  5 +++++
 package/libdex/libdex.mk   | 31 +++++++++++++++++++++++++++++++
 5 files changed, 55 insertions(+)
 create mode 100644 package/libdex/Config.in
 create mode 100644 package/libdex/libdex.hash
 create mode 100644 package/libdex/libdex.mk

Comments

Thomas Petazzoni July 12, 2024, 3:35 p.m. UTC | #1
Hello Adrian,

On Fri, 28 Jun 2024 01:02:18 +0300
Adrian Perez de Castro <aperez@igalia.com> wrote:

> This package provides utilities for asynchronous programming in C
> using a futures/promises model. Newer versions of sysprof require
> this library.
> 
> https://gitlab.gnome.org/GNOME/libdex
> 
> Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>

Thanks, applied with some really minor changes.

> diff --git a/package/Config.in b/package/Config.in
> index 550fdc1f411..ff55d892e0e 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -2155,6 +2155,7 @@ menu "Other"
>  	source "package/libcap/Config.in"
>  	source "package/libcap-ng/Config.in"
>  	source "package/libcgroup/Config.in"
> +	source "package/libdex/Config.in"
>  	source "package/llvm-project/libclc/Config.in"
>  	source "package/libcofi/Config.in"
>  	source "package/libcorrect/Config.in"

Fix up alphabetic ordering here. This was pointed out by "make
check-package".

> +LIBDEX_VERSION_MAJOR = 0.6
> +LIBDEX_VERSION = $(LIBDEX_VERSION_MAJOR).1
> +LIBDEX_SOURCE = libdex-$(LIBDEX_VERSION).tar.xz
> +LIBDEX_SITE = https://download.gnome.org/sources/libdex/$(LIBDEX_VERSION_MAJOR)
> +LIBDEX_LICENSE = LGPL-2.1+
> +LIBDEX_LICENSE_FILES = COPYING
> +LIBDEX_INSTALL_STAGING = YES
> +LIBDEX_DEPENDENCIES += libglib2

= instead of +=

> +LIBDEX_CONF_OPTS += \

Ditto here.

Thomas
diff mbox series

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index 8a5cceba78e..be622599387 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -55,6 +55,7 @@  F:	package/brotli/
 F:	package/bubblewrap/
 F:	package/cage/
 F:	package/cog/
+F:	package/libdex/
 F:	package/libepoxy/
 F:	package/libmanette/
 F:	package/libpsl/
diff --git a/package/Config.in b/package/Config.in
index 550fdc1f411..ff55d892e0e 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2155,6 +2155,7 @@  menu "Other"
 	source "package/libcap/Config.in"
 	source "package/libcap-ng/Config.in"
 	source "package/libcgroup/Config.in"
+	source "package/libdex/Config.in"
 	source "package/llvm-project/libclc/Config.in"
 	source "package/libcofi/Config.in"
 	source "package/libcorrect/Config.in"
diff --git a/package/libdex/Config.in b/package/libdex/Config.in
new file mode 100644
index 00000000000..f10bdac46f1
--- /dev/null
+++ b/package/libdex/Config.in
@@ -0,0 +1,17 @@ 
+config BR2_PACKAGE_LIBDEX
+	bool "libdex"
+	depends on BR2_USE_MMU # libglib2
+	depends on BR2_USE_WCHAR # libglib2, gettext
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
+	select BR2_PACKAGE_LIBGLIB2
+	help
+	  Dex provides Future-based programming for GLib-based
+	  applications. It both integrates with and brings new
+	  features for application and library authors who want
+	  to structure concurrent code in an easy to manage way.
+
+	  https://gitlab.gnome.org/GNOME/libdex
+
+comment "libdex needs a toolchain w/ wchar, threads"
+	depends on BR2_USE_MMU
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/libdex/libdex.hash b/package/libdex/libdex.hash
new file mode 100644
index 00000000000..ec22f330d9f
--- /dev/null
+++ b/package/libdex/libdex.hash
@@ -0,0 +1,5 @@ 
+# From https://download.gnome.org/sources/libdex/0.6/libdex-0.6.1.sha256sum
+sha256  d176de6578571e32a8c0b603b6a5a13fa5f87fb6b5442575b38ec5af16b17a92  libdex-0.6.1.tar.xz
+
+# License files
+sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551  COPYING
diff --git a/package/libdex/libdex.mk b/package/libdex/libdex.mk
new file mode 100644
index 00000000000..3a61a8504fb
--- /dev/null
+++ b/package/libdex/libdex.mk
@@ -0,0 +1,31 @@ 
+################################################################################
+#
+# libdex
+#
+################################################################################
+
+LIBDEX_VERSION_MAJOR = 0.6
+LIBDEX_VERSION = $(LIBDEX_VERSION_MAJOR).1
+LIBDEX_SOURCE = libdex-$(LIBDEX_VERSION).tar.xz
+LIBDEX_SITE = https://download.gnome.org/sources/libdex/$(LIBDEX_VERSION_MAJOR)
+LIBDEX_LICENSE = LGPL-2.1+
+LIBDEX_LICENSE_FILES = COPYING
+LIBDEX_INSTALL_STAGING = YES
+LIBDEX_DEPENDENCIES += libglib2
+LIBDEX_CONF_OPTS += \
+	-Ddocs=false \
+	-Dexamples=false \
+	-Dsysprof=false \
+	-Dtests=false \
+	-Dvapi=false \
+	-Deventfd=enabled \
+	-Dintrospection=disabled
+
+ifeq ($(BR2_PACKAGE_LIBURING),y)
+LIBDEX_CONF_OPTS += -Dliburing=enabled
+LIBDEX_DEPENDENCIES += liburing
+else
+LIBDEX_CONF_OPTS += -Dliburing=disabled
+endif
+
+$(eval $(meson-package))