[Buildroot] [git commit] package/libopenaptx: new package

From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: 2021-12-18 09:38:53
Subsystem: the rest · Maintainer: Linus Torvalds

commit: https://git.buildroot.net/buildroot/commit/?id=1e4050b2d0372e1b47b57cc4210e3da5cb8ec3de
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

This adds support for libopenaptx, an aptX encoder and decoder.

Signed-off-by: Yunhao Tian <redacted>
[Thomas:
- drop patches that added a CMakeLists.txt and instead use the
Makefile provided by upstream.
- add !BR2_STATIC_LIBS dependency
- add entry in DEVELOPERS file]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 DEVELOPERS                           |  3 +++
 package/Config.in                    |  1 +
 package/libopenaptx/Config.in        | 14 ++++++++++++++
 package/libopenaptx/libopenaptx.hash |  3 +++
 package/libopenaptx/libopenaptx.mk   | 29 +++++++++++++++++++++++++++++
 5 files changed, 50 insertions(+)
diff --git a/DEVELOPERS b/DEVELOPERS
index d7639ae812..61e3ea4381 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2966,6 +2966,9 @@ F:	support/testing/tests/package/test_libftdi1.py
 F:	support/testing/tests/package/test_python_can.py
 F:	utils/scanpypi
 
+N:	Yunhao Tian <t123yh.xyz@gmail.com>
+F:	package/libopenaptx/
+
 N:	Zoltan Gyarmati <zgyarmati@zgyarmati.de>
 F:	package/crudini/
 F:	package/grantlee/
diff --git a/package/Config.in b/package/Config.in
index c61ef472e3..bcb23132c9 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1744,6 +1744,7 @@ menu "Multimedia"
 	source "package/libmms/Config.in"
 	source "package/libmpeg2/Config.in"
 	source "package/libogg/Config.in"
+	source "package/libopenaptx/Config.in"
 	source "package/libopenh264/Config.in"
 	source "package/libopusenc/Config.in"
 	source "package/libtheora/Config.in"
diff --git a/package/libopenaptx/Config.in b/package/libopenaptx/Config.in
new file mode 100644
index 0000000000..46ff08a2d1
--- /dev/null
+++ b/package/libopenaptx/Config.in
@@ -0,0 +1,14 @@
+config BR2_PACKAGE_LIBOPENAPTX
+	bool "libopenaptx"
+	# unconditionallly builds a shared lib
+	depends on !BR2_STATIC_LIBS
+	help
+	  This is Open Source implementation of Audio Processing
+	  Technology codec (aptX) originally derived from ffmpeg 4.0
+	  project and licensed under GPLv3+. This codec is mainly used
+	  in Bluetooth A2DP profile.
+
+	  https://github.com/pali/libopenaptx
+
+comment "libopenaptx needs a toolchain w/ dynamic library"
+	depends on BR2_STATIC_LIBS
diff --git a/package/libopenaptx/libopenaptx.hash b/package/libopenaptx/libopenaptx.hash
new file mode 100644
index 0000000000..76b4e66c9b
--- /dev/null
+++ b/package/libopenaptx/libopenaptx.hash
@@ -0,0 +1,3 @@
+# Locally calculated:
+sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING
+sha256 a19b3b642def6f86441b73dd4efda6e6f13d49e7e2d6e5e91cc7eb464ebb505a libopenaptx-0.2.1.tar.gz
diff --git a/package/libopenaptx/libopenaptx.mk b/package/libopenaptx/libopenaptx.mk
new file mode 100644
index 0000000000..a4f58050b7
--- /dev/null
+++ b/package/libopenaptx/libopenaptx.mk
@@ -0,0 +1,29 @@
+################################################################################
+#
+# libogg
+#
+################################################################################
+
+LIBOPENAPTX_VERSION = 0.2.1
+LIBOPENAPTX_SITE = $(call github,pali,libopenaptx,$(LIBOPENAPTX_VERSION))
+LIBOPENAPTX_LICENSE = GPL-3.0
+LIBOPENAPTX_LICENSE_FILES = COPYING
+LIBOPENAPTX_INSTALL_STAGING = YES
+
+define LIBOPENAPTX_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS)
+endef
+
+define LIBOPENAPTX_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
+		DESTDIR=$(TARGET_DIR) \
+		PREFIX=/usr install
+endef
+
+define LIBOPENAPTX_INSTALL_STAGING_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \
+		DESTDIR=$(STAGING_DIR) \
+		PREFIX=/usr install
+endef
+
+$(eval $(generic-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help