Selaa lähdekoodia

package/libopenmpt: new package

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>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Julien Olivain 1 vuosi sitten
vanhempi
commit
c5896d00d9

+ 1 - 0
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/

+ 1 - 0
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"

+ 28 - 0
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

+ 3 - 0
package/libopenmpt/libopenmpt.hash

@@ -0,0 +1,3 @@
+# computed locally
+sha256  87778c8046a226c6cbfb114f4c8e3e27c121b7b3dccce5cb7de45899250274cc  libopenmpt-0.7.8+release.autotools.tar.gz
+sha256  e3d7e76c6b441ddd9fff0a397e7b5e055a11678bd7c3b246a0ce13e352eb15e8  LICENSE

+ 92 - 0
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))