浏览代码

package/liburing: new package

This is the io_uring library, liburing. liburing provides helpers to
setup and teardown io_uring instances, and also a simplified interface
for applications that don't need (or want) to deal with the full kernel
side implementation.

https://git.kernel.dk/cgit/liburing

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Fabrice Fontaine 3 年之前
父节点
当前提交
03ca6f4e39
共有 5 个文件被更改,包括 61 次插入0 次删除
  1. 1 0
      DEVELOPERS
  2. 1 0
      package/Config.in
  3. 15 0
      package/liburing/Config.in
  4. 8 0
      package/liburing/liburing.hash
  5. 36 0
      package/liburing/liburing.mk

+ 1 - 0
DEVELOPERS

@@ -906,6 +906,7 @@ F:	package/librsync/
 F:	package/libsoup/
 F:	package/libsoxr/
 F:	package/libupnp/
+F:	package/liburing/
 F:	package/libv4l/
 F:	package/libxslt/
 F:	package/mbedtls/

+ 1 - 0
package/Config.in

@@ -2000,6 +2000,7 @@ menu "Other"
 	source "package/libuci/Config.in"
 	source "package/libunwind/Config.in"
 	source "package/liburcu/Config.in"
+	source "package/liburing/Config.in"
 	source "package/libuv/Config.in"
 	source "package/lightning/Config.in"
 	source "package/linux-pam/Config.in"

+ 15 - 0
package/liburing/Config.in

@@ -0,0 +1,15 @@
+config BR2_PACKAGE_LIBURING
+	bool "liburing"
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
+	help
+	  This is the io_uring library, liburing. liburing provides
+	  helpers to setup and teardown io_uring instances, and also a
+	  simplified interface for applications that don't need (or
+	  want) to deal with the full kernel side implementation.
+
+	  https://git.kernel.dk/cgit/liburing
+
+comment "liburing needs a toolchain w/ gcc >= 4.9, headers >= 5.1"
+	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
+		!BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1

+ 8 - 0
package/liburing/liburing.hash

@@ -0,0 +1,8 @@
+# Locally calculated
+sha256  df7c8fd05fd39da622b2814e06f815f11f1beb429487a4330eed64bb7f353dbf  liburing-2.1.tar.bz2
+
+# Hash for license files
+sha256  592987e8510228d546540b84a22444bde98e48d03078d3b2eefcd889bec5ce8c  COPYING
+sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  COPYING.GPL
+sha256  d0b225f17ef2d05d5cda6b25b2dc334ef6f5f12537c20edf6e391852a095ec19  LICENSE
+sha256  97d62ff5d7cf0b1cef34c33a89877352911278ca4ac1c6c4f24a835baa5ea10b  README

+ 36 - 0
package/liburing/liburing.mk

@@ -0,0 +1,36 @@
+################################################################################
+#
+# liburing
+#
+################################################################################
+
+LIBURING_VERSION = 2.1
+LIBURING_SOURCE = liburing-$(LIBURING_VERSION).tar.bz2
+LIBURING_SITE = https://git.kernel.dk/cgit/liburing/snapshot
+LIBURING_LICENSE = (GPL-2.0 with exceptions and LGPL-2.1+) or MIT
+LIBURING_LICENSE_FILES = COPYING COPYING.GPL LICENSE README
+LIBURING_INSTALL_STAGING = YES
+
+ifeq ($(BR2_STATIC_LIBS),y)
+LIBURING_MAKE_OPTS += ENABLE_SHARED=0
+else
+LIBURING_MAKE_OPTS += ENABLE_SHARED=1
+endif
+
+define LIBURING_CONFIGURE_CMDS
+	(cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure)
+endef
+
+define LIBURING_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) $(LIBURING_MAKE_OPTS) -C $(@D)/src
+endef
+
+define LIBURING_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install
+endef
+
+define LIBURING_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
+
+$(eval $(generic-package))