Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libopenmpt: new package
@ 2024-07-13 13:31 Julien Olivain
  2024-07-13 14:39 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Julien Olivain @ 2024-07-13 13:31 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain, Thomas Petazzoni

libopenmpt is a cross-platform C++ and C library to decode
tracked music files (modules) into a raw PCM audio stream.

openmpt123 is a cross-platform command-line or terminal
based module file player.

https://lib.openmpt.org/libopenmpt

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
Patch tested on branch master at commit 42eae73 with commands:

    utils/docker-run make check-package
    ...
    0 warnings generated

    utils/test-pkg -p libopenmpt
    ...
    6 builds, 0 skipped, 0 build failed, 0 legal-info failed, 0 show-info failed

Note: I will post a runtime test later for that package...
---
 DEVELOPERS                         |  1 +
 package/Config.in                  |  1 +
 package/libopenmpt/Config.in       | 28 +++++++++
 package/libopenmpt/libopenmpt.hash |  3 +
 package/libopenmpt/libopenmpt.mk   | 92 ++++++++++++++++++++++++++++++
 5 files changed, 125 insertions(+)
 create mode 100644 package/libopenmpt/Config.in
 create mode 100644 package/libopenmpt/libopenmpt.hash
 create mode 100644 package/libopenmpt/libopenmpt.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index b66fda5fcb..46ef79c79b 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1770,6 +1770,7 @@ F:	package/gnupg2/
 F:	package/highway/
 F:	package/kexec/
 F:	package/libjxl/
+F:	package/libopenmpt/
 F:	package/mokutil/
 F:	package/octave/
 F:	package/ola/
diff --git a/package/Config.in b/package/Config.in
index 65d7981773..980ffaaa72 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1496,6 +1496,7 @@ menu "Audio/Sound"
 	source "package/libmad/Config.in"
 	source "package/libmodplug/Config.in"
 	source "package/libmpdclient/Config.in"
+	source "package/libopenmpt/Config.in"
 	source "package/libreplaygain/Config.in"
 	source "package/libsamplerate/Config.in"
 	source "package/libsidplay2/Config.in"
diff --git a/package/libopenmpt/Config.in b/package/libopenmpt/Config.in
new file mode 100644
index 0000000000..43a5802954
--- /dev/null
+++ b/package/libopenmpt/Config.in
@@ -0,0 +1,28 @@
+config BR2_PACKAGE_LIBOPENMPT
+	bool "libopenmpt"
+	# See: https://lib.openmpt.org/doc/dependencies.html
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	help
+	  libopenmpt is a cross-platform C++ and C library to decode
+	  tracked music files (modules) into a raw PCM audio stream.
+
+	  openmpt123 is a cross-platform command-line or terminal
+	  based module file player.
+
+	  https://lib.openmpt.org/libopenmpt
+
+if BR2_PACKAGE_LIBOPENMPT
+
+config BR2_PACKAGE_LIBOPENMPT_OPENMPT123
+	bool "openmpt123"
+	help
+	  Install the openmpt123 command line tool.
+
+endif
+
+comment "libopenmpt needs a toolchain w/ threads, C++, gcc >= 7"
+	depends on !BR2_INSTALL_LIBSTDCPP || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
+		!BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/libopenmpt/libopenmpt.hash b/package/libopenmpt/libopenmpt.hash
new file mode 100644
index 0000000000..df0b43096a
--- /dev/null
+++ b/package/libopenmpt/libopenmpt.hash
@@ -0,0 +1,3 @@
+# computed locally
+sha256  87778c8046a226c6cbfb114f4c8e3e27c121b7b3dccce5cb7de45899250274cc  libopenmpt-0.7.8+release.autotools.tar.gz
+sha256  e3d7e76c6b441ddd9fff0a397e7b5e055a11678bd7c3b246a0ce13e352eb15e8  LICENSE
diff --git a/package/libopenmpt/libopenmpt.mk b/package/libopenmpt/libopenmpt.mk
new file mode 100644
index 0000000000..d07dc1c2fc
--- /dev/null
+++ b/package/libopenmpt/libopenmpt.mk
@@ -0,0 +1,92 @@
+################################################################################
+#
+# libopenmpt
+#
+################################################################################
+
+LIBOPENMPT_VERSION = 0.7.8
+LIBOPENMPT_SITE = https://lib.openmpt.org/files/libopenmpt/src
+LIBOPENMPT_SOURCE = libopenmpt-$(LIBOPENMPT_VERSION)+release.autotools.tar.gz
+LIBOPENMPT_LICENSE = BSD-3-Clause
+LIBOPENMPT_LICENSE_FILES = LICENSE
+LIBOPENMPT_DEPENDENCIES = host-pkgconf
+
+ifeq ($(BR2_PACKAGE_LIBOPENMPT_OPENMPT123),y)
+LIBOPENMPT_CONF_OPTS += --enable-openmpt123
+else
+LIBOPENMPT_CONF_OPTS += --disable-openmpt123
+endif
+
+ifeq ($(BR2_PACKAGE_FLAC),y)
+LIBOPENMPT_CONF_OPTS += --with-flac
+LIBOPENMPT_DEPENDENCIES += flac
+else
+LIBOPENMPT_CONF_OPTS += --without-flac
+endif
+
+ifeq ($(BR2_PACKAGE_LIBOGG),y)
+LIBOPENMPT_CONF_OPTS += --with-ogg
+LIBOPENMPT_DEPENDENCIES += libogg
+else
+LIBOPENMPT_CONF_OPTS += --without-ogg
+endif
+
+ifeq ($(BR2_PACKAGE_LIBSNDFILE),y)
+LIBOPENMPT_CONF_OPTS += --with-sndfile
+LIBOPENMPT_DEPENDENCIES += libsndfile
+else
+LIBOPENMPT_CONF_OPTS += --without-sndfile
+endif
+
+ifeq ($(BR2_PACKAGE_LIBVORBIS),y)
+LIBOPENMPT_CONF_OPTS += --with-vorbis --with-vorbisfile
+LIBOPENMPT_DEPENDENCIES += libvorbis
+else
+LIBOPENMPT_CONF_OPTS += --without-vorbis --without-vorbisfile
+endif
+
+ifeq ($(BR2_PACKAGE_MPG123),y)
+LIBOPENMPT_CONF_OPTS += --with-mpg123
+LIBOPENMPT_DEPENDENCIES += mpg123
+else
+LIBOPENMPT_CONF_OPTS += --without-mpg123
+endif
+
+ifeq ($(BR2_PACKAGE_PORTAUDIO),y)
+LIBOPENMPT_CONF_OPTS += --with-portaudio
+LIBOPENMPT_DEPENDENCIES += portaudio
+else
+LIBOPENMPT_CONF_OPTS += --without-portaudio
+endif
+
+ifeq ($(BR2_PACKAGE_PORTAUDIO_CXX),y)
+LIBOPENMPT_CONF_OPTS += --with-portaudiocpp
+# No need to add portaudio dependency, because this config already
+# depends on BR2_PACKAGE_PORTAUDIO. So the dependency has already been
+# added in the previous block.
+else
+LIBOPENMPT_CONF_OPTS += --without-portaudiocpp
+endif
+
+ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
+LIBOPENMPT_CONF_OPTS += --with-pulseaudio
+LIBOPENMPT_DEPENDENCIES += pulseaudio
+else
+LIBOPENMPT_CONF_OPTS += --without-pulseaudio
+endif
+
+ifeq ($(BR2_PACKAGE_SDL2),y)
+LIBOPENMPT_CONF_OPTS += --with-sdl2
+LIBOPENMPT_DEPENDENCIES += sdl2
+else
+LIBOPENMPT_CONF_OPTS += --without-sdl2
+endif
+
+ifeq ($(BR2_PACKAGE_ZLIB),y)
+LIBOPENMPT_CONF_OPTS += --with-zlib
+LIBOPENMPT_DEPENDENCIES += zlib
+else
+LIBOPENMPT_CONF_OPTS += --without-zlib
+endif
+
+$(eval $(autotools-package))
-- 
2.45.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/libopenmpt: new package
  2024-07-13 13:31 [Buildroot] [PATCH 1/1] package/libopenmpt: new package Julien Olivain
@ 2024-07-13 14:39 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-13 14:39 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot

On Sat, 13 Jul 2024 15:31:04 +0200
Julien Olivain <ju.o@free.fr> wrote:

> libopenmpt is a cross-platform C++ and C library to decode
> tracked music files (modules) into a raw PCM audio stream.
> 
> openmpt123 is a cross-platform command-line or terminal
> based module file player.
> 
> https://lib.openmpt.org/libopenmpt
> 
> Signed-off-by: Julien Olivain <ju.o@free.fr>
> ---
> Patch tested on branch master at commit 42eae73 with commands:

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-13 14:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-13 13:31 [Buildroot] [PATCH 1/1] package/libopenmpt: new package Julien Olivain
2024-07-13 14:39 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox