diff options
author | Carlos Rafael Giani <dv@pseudoterminal.org> | 2018-07-28 13:55:04 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2018-07-29 00:40:17 -0700 |
commit | 5a9a62ee69d487b5aecc441b22b3773d4f51f2f1 (patch) | |
tree | f26a10e504143011f68fe6e6e9c49bbcfe6194f5 /meta-multimedia | |
parent | 51a5ff244676540cf62e4dfd70143029306c6e2a (diff) | |
download | meta-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-ptest | 9 | ||||
-rw-r--r-- | meta-multimedia/recipes-multimedia/libopenmpt/libopenmpt_0.3.10.bb | 104 |
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 | |||
5 | if [ $? -eq 0 ]; then | ||
6 | echo "PASS: libopenmpttest" | ||
7 | else | ||
8 | echo "FAIL: libopenmpttest" | ||
9 | fi | ||
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 @@ | |||
1 | SUMMARY = "C and C++ cross-platform library for decoding tracked music files (modules)" | ||
2 | DESCRIPTION = "libopenmpt is a cross-platform C++ and C library to decode tracked \ | ||
3 | music files (modules) into a raw PCM audio stream. It also comes with openmpt123, a \ | ||
4 | cross-platform command-line or terminal based module file player, and libopenmpt_modplug, \ | ||
5 | a wrapper around libopenmpt that provides an interface that is ABI compatile with \ | ||
6 | libmodplug. libopenmpt is based on the player code of the OpenMPT project." | ||
7 | HOMEPAGE = "https://lib.openmpt.org/libopenmpt/" | ||
8 | SECTION = "libs" | ||
9 | |||
10 | LICENSE = "BSD-3-Clause" | ||
11 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e804150573f149befef6c07e173f20c3" | ||
12 | |||
13 | DEPENDS = "virtual/libiconv" | ||
14 | |||
15 | SRC_URI = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${PV}+release.autotools.tar.gz \ | ||
16 | file://run-ptest \ | ||
17 | " | ||
18 | SRC_URI[md5sum] = "66bbc6fbb5f27a554cb145d805e9ef9d" | ||
19 | SRC_URI[sha256sum] = "14a137b8d1a20e1b6a5e67cbc9467ab7e5e4e67d5aa38a247afc825685c53939" | ||
20 | |||
21 | S = "${WORKDIR}/libopenmpt-${PV}+release.autotools" | ||
22 | |||
23 | inherit autotools pkgconfig ptest | ||
24 | |||
25 | PACKAGECONFIG ??= " \ | ||
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. | ||
38 | PACKAGECONFIG[libopenmpt-modplug] = "--enable-libopenmpt_modplug,--disable-libopenmpt_modplug" | ||
39 | PACKAGECONFIG[openmpt123] = "--enable-openmpt123,--disable-openmpt123" | ||
40 | PACKAGECONFIG[tests] = "--enable-tests,--disable-tests" | ||
41 | |||
42 | # These packageconfigs affect openmpt123 | ||
43 | PACKAGECONFIG[flac] = "--with-flac,--without-flac,flac" | ||
44 | PACKAGECONFIG[mpg123] = "--with-mpg123,--without-mpg123,mpg123" | ||
45 | PACKAGECONFIG[ogg] = "--with-ogg,--without-ogg,libogg" | ||
46 | PACKAGECONFIG[portaudio] = "--with-portaudio,--without-portaudio,portaudio-v19" | ||
47 | PACKAGECONFIG[pulseaudio] = "--with-pulseaudio,--without-pulseaudio,pulseaudio" | ||
48 | PACKAGECONFIG[sdl] = "--with-sdl,--without-sdl,virtual/libsdl" | ||
49 | PACKAGECONFIG[sdl2] = "--with-sdl2,--without-sdl2,virtual/libsdl2" | ||
50 | PACKAGECONFIG[sndfile] = "--with-sndfile,--without-sndfile,libsndfile1" | ||
51 | PACKAGECONFIG[vorbis] = "--with-vorbis,--without-vorbis,libvorbis" | ||
52 | PACKAGECONFIG[vorbisfile] = "--with-vorbisfile,--without-vorbisfile,libvorbis" | ||
53 | PACKAGECONFIG[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.) | ||
60 | EXTRA_OECONF += " \ | ||
61 | --disable-doxygen-doc \ | ||
62 | --disable-examples \ | ||
63 | --disable-libmodplug \ | ||
64 | --without-portaudiocpp \ | ||
65 | " | ||
66 | |||
67 | do_compile_ptest() { | ||
68 | oe_runmake ${PARALLEL_MAKE} libopenmpttest | ||
69 | } | ||
70 | |||
71 | do_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 | |||
82 | python __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 | |||
88 | PACKAGES =+ "${PN}-modplug ${PN}-openmpt123 ${PN}-openmpt123-doc" | ||
89 | FILES_${PN}-modplug = "${libdir}/libopenmpt_modplug.so.*" | ||
90 | FILES_${PN}-openmpt123 = "${bindir}/openmpt123" | ||
91 | FILES_${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. | ||
96 | DEBIAN_NOAUTONAME_${PN} = "1" | ||
97 | DEBIAN_NOAUTONAME_${PN}-modplug = "1" | ||
98 | |||
99 | RDEPENDS_${PN}_libc-glibc = " \ | ||
100 | glibc-gconv-cp1252 \ | ||
101 | glibc-gconv-ibm437 \ | ||
102 | glibc-gconv-iso8859-1 \ | ||
103 | glibc-gconv-iso8859-15 \ | ||
104 | " | ||