浏览代码

package/mpd: add io_uring optional dependency

Since version 0.22 mpd provides an option to use the io_uring kernel interface
for asynchronous access to local files. Buildroot has the necessary library
(package/liburing) since commit 03ca6f4e39874583060317e7e15e9e360220877e.

Add an optional dependency on liburing to enable asynchronous file access using
the kernel io_uring interface.

Signed-off-by: Andreas Ziegler <br015@umbiko.net>
Reviewed-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Andreas Ziegler 3 年之前
父节点
当前提交
f0469f30d6
共有 2 个文件被更改,包括 17 次插入0 次删除
  1. 10 0
      package/mpd/Config.in
  2. 7 0
      package/mpd/mpd.mk

+ 10 - 0
package/mpd/Config.in

@@ -347,6 +347,16 @@ config BR2_PACKAGE_MPD_AVAHI_SUPPORT
 comment "avahi support needs a toolchain w/ dynamic library"
 	depends on BR2_STATIC_LIBS
 
+config BR2_PACKAGE_MPD_IO_URING
+	bool "io_uring"
+	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
+	select BR2_PACKAGE_LIBURING
+	help
+	  Asynchronous I/O using kernel io_uring subsystem
+
+comment "io_uring support needs a toolchain w/ headers >= 5.1"
+	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_1
+
 config BR2_PACKAGE_MPD_LIBMPDCLIENT
 	bool "libmpdclient"
 	select BR2_PACKAGE_LIBMPDCLIENT

+ 7 - 0
package/mpd/mpd.mk

@@ -119,6 +119,13 @@ else
 MPD_CONF_OPTS += -Did3tag=disabled
 endif
 
+ifeq ($(BR2_PACKAGE_MPD_IO_URING),y)
+MPD_DEPENDENCIES += liburing
+MPD_CONF_OPTS += -Dio_uring=enabled
+else
+MPD_CONF_OPTS += -Dio_uring=disabled
+endif
+
 ifeq ($(BR2_PACKAGE_MPD_JACK2),y)
 MPD_DEPENDENCIES += jack2
 MPD_CONF_OPTS += -Djack=enabled