summaryrefslogtreecommitdiffstats
path: root/meta-multimedia
diff options
context:
space:
mode:
authorCarlos Rafael Giani <dv@pseudoterminal.org>2018-07-28 13:55:04 +0200
committerKhem Raj <raj.khem@gmail.com>2018-07-29 00:40:17 -0700
commit5a9a62ee69d487b5aecc441b22b3773d4f51f2f1 (patch)
treef26a10e504143011f68fe6e6e9c49bbcfe6194f5 /meta-multimedia
parent51a5ff244676540cf62e4dfd70143029306c6e2a (diff)
downloadmeta-openembedded-5a9a62ee69d487b5aecc441b22b3773d4f51f2f1.tar.gz
libopenmpt: add recipe
libopenmpt is a cross-platform C++ and C library to decode tracked music files ("modules", like the .mod .xm .s3m .it formats) into raw PCM audio. It is based on the player code of OpenMPT module tracker. Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-multimedia')
-rw-r--r--meta-multimedia/recipes-multimedia/libopenmpt/files/run-ptest9
-rw-r--r--meta-multimedia/recipes-multimedia/libopenmpt/libopenmpt_0.3.10.bb104
2 files changed, 113 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/libopenmpt/files/run-ptest b/meta-multimedia/recipes-multimedia/libopenmpt/files/run-ptest
new file mode 100644
index 000000000..84981b22c
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/libopenmpt/files/run-ptest
@@ -0,0 +1,9 @@
1#!/bin/sh
2
3./libopenmpttest >/dev/null 2>&1
4
5if [ $? -eq 0 ]; then
6 echo "PASS: libopenmpttest"
7else
8 echo "FAIL: libopenmpttest"
9fi
diff --git a/meta-multimedia/recipes-multimedia/libopenmpt/libopenmpt_0.3.10.bb b/meta-multimedia/recipes-multimedia/libopenmpt/libopenmpt_0.3.10.bb
new file mode 100644
index 000000000..d14246f32
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/libopenmpt/libopenmpt_0.3.10.bb
@@ -0,0 +1,104 @@
1SUMMARY = "C and C++ cross-platform library for decoding tracked music files (modules)"
2DESCRIPTION = "libopenmpt is a cross-platform C++ and C library to decode tracked \
3music files (modules) into a raw PCM audio stream. It also comes with openmpt123, a \
4cross-platform command-line or terminal based module file player, and libopenmpt_modplug, \
5a wrapper around libopenmpt that provides an interface that is ABI compatile with \
6libmodplug. libopenmpt is based on the player code of the OpenMPT project."
7HOMEPAGE = "https://lib.openmpt.org/libopenmpt/"
8SECTION = "libs"
9
10LICENSE = "BSD-3-Clause"
11LIC_FILES_CHKSUM = "file://LICENSE;md5=e804150573f149befef6c07e173f20c3"
12
13DEPENDS = "virtual/libiconv"
14
15SRC_URI = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${PV}+release.autotools.tar.gz \
16 file://run-ptest \
17 "
18SRC_URI[md5sum] = "66bbc6fbb5f27a554cb145d805e9ef9d"
19SRC_URI[sha256sum] = "14a137b8d1a20e1b6a5e67cbc9467ab7e5e4e67d5aa38a247afc825685c53939"
20
21S = "${WORKDIR}/libopenmpt-${PV}+release.autotools"
22
23inherit autotools pkgconfig ptest
24
25PACKAGECONFIG ??= " \
26 libopenmpt-modplug openmpt123 \
27 ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
28 flac mpg123 ogg sndfile vorbis vorbisfile zlib \
29 ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \
30"
31
32# libopenmpt_modplug is a library that wraps libopenmpt calls into
33# functions that are ABI compatible with libmodplug. This allows for
34# using modplug headers and linking against libopenmpt_modplug
35# instead of against the original libmodplug library.
36# NOTE: The wrapper is compatible to the ABI from libmodplug version
37# 0.8.8 and newer.
38PACKAGECONFIG[libopenmpt-modplug] = "--enable-libopenmpt_modplug,--disable-libopenmpt_modplug"
39PACKAGECONFIG[openmpt123] = "--enable-openmpt123,--disable-openmpt123"
40PACKAGECONFIG[tests] = "--enable-tests,--disable-tests"
41
42# These packageconfigs affect openmpt123
43PACKAGECONFIG[flac] = "--with-flac,--without-flac,flac"
44PACKAGECONFIG[mpg123] = "--with-mpg123,--without-mpg123,mpg123"
45PACKAGECONFIG[ogg] = "--with-ogg,--without-ogg,libogg"
46PACKAGECONFIG[portaudio] = "--with-portaudio,--without-portaudio,portaudio-v19"
47PACKAGECONFIG[pulseaudio] = "--with-pulseaudio,--without-pulseaudio,pulseaudio"
48PACKAGECONFIG[sdl] = "--with-sdl,--without-sdl,virtual/libsdl"
49PACKAGECONFIG[sdl2] = "--with-sdl2,--without-sdl2,virtual/libsdl2"
50PACKAGECONFIG[sndfile] = "--with-sndfile,--without-sndfile,libsndfile1"
51PACKAGECONFIG[vorbis] = "--with-vorbis,--without-vorbis,libvorbis"
52PACKAGECONFIG[vorbisfile] = "--with-vorbisfile,--without-vorbisfile,libvorbis"
53PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
54
55# --disable-libmodplug is necessary, since otherwise we'd
56# have a collision with the libmodplug package, because of the
57# libmodplug.so file. (libmodplug.so from libopenmpt isintended
58# to be used as a drop-in replacement, and according to the
59# documentation, is not complete.)
60EXTRA_OECONF += " \
61 --disable-doxygen-doc \
62 --disable-examples \
63 --disable-libmodplug \
64 --without-portaudiocpp \
65"
66
67do_compile_ptest() {
68 oe_runmake ${PARALLEL_MAKE} libopenmpttest
69}
70
71do_install_ptest() {
72 install -d ${D}${PTEST_PATH}/test
73 install -m 0755 ${B}/libopenmpttest ${D}${PTEST_PATH}
74 install -m 0644 ${S}/test/test.mptm ${D}${PTEST_PATH}/test
75 install -m 0644 ${S}/test/test.s3m ${D}${PTEST_PATH}/test
76 install -m 0644 ${S}/test/test.xm ${D}${PTEST_PATH}/test
77
78 install -d ${D}${PTEST_PATH}/libopenmpt
79 install -m 0644 ${S}/libopenmpt/libopenmpt_version.mk ${D}${PTEST_PATH}/libopenmpt
80}
81
82python __anonymous() {
83 packageconfig = (d.getVar("PACKAGECONFIG") or "").split()
84 if ("sdl" in packageconfig) and ("sdl2" in packageconfig):
85 bb.error("sdl and sdl2 packageconfigs cannot be both enabled")
86}
87
88PACKAGES =+ "${PN}-modplug ${PN}-openmpt123 ${PN}-openmpt123-doc"
89FILES_${PN}-modplug = "${libdir}/libopenmpt_modplug.so.*"
90FILES_${PN}-openmpt123 = "${bindir}/openmpt123"
91FILES_${PN}-openmpt123-doc = "${mandir}/man1/openmpt123*"
92
93# Since version 0.3, libopenmpt uses SemVer 2.0.0 versioning.
94# The SemVer versioning scheme is incompatible with Debian/Ubuntu
95# package version names.
96DEBIAN_NOAUTONAME_${PN} = "1"
97DEBIAN_NOAUTONAME_${PN}-modplug = "1"
98
99RDEPENDS_${PN}_libc-glibc = " \
100 glibc-gconv-cp1252 \
101 glibc-gconv-ibm437 \
102 glibc-gconv-iso8859-1 \
103 glibc-gconv-iso8859-15 \
104"