Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 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. libopenmpt is based \ |
| 5 | on the player code of the OpenMPT project." |
| 6 | HOMEPAGE = "https://lib.openmpt.org/libopenmpt/" |
| 7 | SECTION = "libs" |
| 8 | |
| 9 | LICENSE = "BSD-3-Clause" |
| 10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=ae09d6164bdecb499183479fd32b66fb" |
| 11 | |
| 12 | DEPENDS = "virtual/libiconv" |
| 13 | |
| 14 | SRC_URI = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${PV}+release.autotools.tar.gz \ |
| 15 | file://run-ptest \ |
| 16 | " |
| 17 | SRC_URI[md5sum] = "d21fb799695cbe10a1e9aeaea23ed708" |
| 18 | SRC_URI[sha256sum] = "50c0d62ff2d9afefa36cce9f29042cb1fb8d4f0b386b81a0fc7734f35e21e6b6" |
| 19 | |
| 20 | S = "${WORKDIR}/libopenmpt-${PV}+release.autotools" |
| 21 | |
| 22 | inherit autotools pkgconfig ptest |
| 23 | |
| 24 | PACKAGECONFIG ??= " \ |
| 25 | openmpt123 \ |
| 26 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ |
| 27 | flac mpg123 ogg sndfile vorbis vorbisfile zlib \ |
| 28 | ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \ |
| 29 | " |
| 30 | |
| 31 | PACKAGECONFIG[openmpt123] = "--enable-openmpt123,--disable-openmpt123" |
| 32 | PACKAGECONFIG[tests] = "--enable-tests,--disable-tests" |
| 33 | |
| 34 | # These packageconfigs affect openmpt123 |
| 35 | PACKAGECONFIG[flac] = "--with-flac,--without-flac,flac" |
| 36 | PACKAGECONFIG[mpg123] = "--with-mpg123,--without-mpg123,mpg123" |
| 37 | PACKAGECONFIG[ogg] = "--with-ogg,--without-ogg,libogg" |
| 38 | PACKAGECONFIG[portaudio] = "--with-portaudio,--without-portaudio,portaudio-v19" |
| 39 | PACKAGECONFIG[pulseaudio] = "--with-pulseaudio,--without-pulseaudio,pulseaudio" |
Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame] | 40 | PACKAGECONFIG[sdl2] = "--with-sdl2,--without-sdl2,libsdl2" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 41 | PACKAGECONFIG[sndfile] = "--with-sndfile,--without-sndfile,libsndfile1" |
| 42 | PACKAGECONFIG[vorbis] = "--with-vorbis,--without-vorbis,libvorbis" |
| 43 | PACKAGECONFIG[vorbisfile] = "--with-vorbisfile,--without-vorbisfile,libvorbis" |
| 44 | PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib" |
| 45 | |
| 46 | EXTRA_OECONF += " \ |
| 47 | --disable-doxygen-doc \ |
| 48 | --disable-examples \ |
| 49 | --without-portaudiocpp \ |
| 50 | " |
| 51 | |
| 52 | do_compile_ptest() { |
| 53 | oe_runmake ${PARALLEL_MAKE} libopenmpttest |
| 54 | } |
| 55 | |
| 56 | do_install_ptest() { |
| 57 | install -d ${D}${PTEST_PATH}/test |
| 58 | install -m 0755 ${B}/libopenmpttest ${D}${PTEST_PATH} |
| 59 | install -m 0644 ${S}/test/test.mptm ${D}${PTEST_PATH}/test |
| 60 | install -m 0644 ${S}/test/test.s3m ${D}${PTEST_PATH}/test |
| 61 | install -m 0644 ${S}/test/test.xm ${D}${PTEST_PATH}/test |
| 62 | |
| 63 | install -d ${D}${PTEST_PATH}/libopenmpt |
| 64 | install -m 0644 ${S}/libopenmpt/libopenmpt_version.mk ${D}${PTEST_PATH}/libopenmpt |
| 65 | } |
| 66 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 67 | PACKAGES =+ "${PN}-openmpt123 ${PN}-openmpt123-doc" |
| 68 | FILES:${PN}-openmpt123 = "${bindir}/openmpt123" |
| 69 | FILES:${PN}-openmpt123-doc = "${mandir}/man1/openmpt123*" |
| 70 | |
| 71 | # Since version 0.3, libopenmpt uses SemVer 2.0.0 versioning. |
| 72 | # The SemVer versioning scheme is incompatible with Debian/Ubuntu |
| 73 | # package version names. |
| 74 | DEBIAN_NOAUTONAME:${PN} = "1" |
| 75 | |
| 76 | RDEPENDS:${PN}:libc-glibc = " \ |
| 77 | glibc-gconv-cp1252 \ |
| 78 | glibc-gconv-ibm437 \ |
| 79 | glibc-gconv-iso8859-1 \ |
| 80 | glibc-gconv-iso8859-15 \ |
| 81 | " |