libopenmpt_0.3.10.bb 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. LICENSE = "BSD-3-Clause"
  10. LIC_FILES_CHKSUM = "file://LICENSE;md5=e804150573f149befef6c07e173f20c3"
  11. DEPENDS = "virtual/libiconv"
  12. SRC_URI = "https://lib.openmpt.org/files/libopenmpt/src/libopenmpt-${PV}+release.autotools.tar.gz \
  13. file://run-ptest \
  14. "
  15. SRC_URI[md5sum] = "66bbc6fbb5f27a554cb145d805e9ef9d"
  16. SRC_URI[sha256sum] = "14a137b8d1a20e1b6a5e67cbc9467ab7e5e4e67d5aa38a247afc825685c53939"
  17. S = "${WORKDIR}/libopenmpt-${PV}+release.autotools"
  18. inherit autotools pkgconfig ptest
  19. PACKAGECONFIG ??= " \
  20. libopenmpt-modplug openmpt123 \
  21. ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
  22. flac mpg123 ogg sndfile vorbis vorbisfile zlib \
  23. ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \
  24. "
  25. # libopenmpt_modplug is a library that wraps libopenmpt calls into
  26. # functions that are ABI compatible with libmodplug. This allows for
  27. # using modplug headers and linking against libopenmpt_modplug
  28. # instead of against the original libmodplug library.
  29. # NOTE: The wrapper is compatible to the ABI from libmodplug version
  30. # 0.8.8 and newer.
  31. PACKAGECONFIG[libopenmpt-modplug] = "--enable-libopenmpt_modplug,--disable-libopenmpt_modplug"
  32. PACKAGECONFIG[openmpt123] = "--enable-openmpt123,--disable-openmpt123"
  33. PACKAGECONFIG[tests] = "--enable-tests,--disable-tests"
  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"
  40. PACKAGECONFIG[sdl] = "--with-sdl,--without-sdl,virtual/libsdl"
  41. PACKAGECONFIG[sdl2] = "--with-sdl2,--without-sdl2,virtual/libsdl2"
  42. PACKAGECONFIG[sndfile] = "--with-sndfile,--without-sndfile,libsndfile1"
  43. PACKAGECONFIG[vorbis] = "--with-vorbis,--without-vorbis,libvorbis"
  44. PACKAGECONFIG[vorbisfile] = "--with-vorbisfile,--without-vorbisfile,libvorbis"
  45. PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
  46. # --disable-libmodplug is necessary, since otherwise we'd
  47. # have a collision with the libmodplug package, because of the
  48. # libmodplug.so file. (libmodplug.so from libopenmpt isintended
  49. # to be used as a drop-in replacement, and according to the
  50. # documentation, is not complete.)
  51. EXTRA_OECONF += " \
  52. --disable-doxygen-doc \
  53. --disable-examples \
  54. --disable-libmodplug \
  55. --without-portaudiocpp \
  56. "
  57. do_compile_ptest() {
  58. oe_runmake ${PARALLEL_MAKE} libopenmpttest
  59. }
  60. do_install_ptest() {
  61. install -d ${D}${PTEST_PATH}/test
  62. install -m 0755 ${B}/libopenmpttest ${D}${PTEST_PATH}
  63. install -m 0644 ${S}/test/test.mptm ${D}${PTEST_PATH}/test
  64. install -m 0644 ${S}/test/test.s3m ${D}${PTEST_PATH}/test
  65. install -m 0644 ${S}/test/test.xm ${D}${PTEST_PATH}/test
  66. install -d ${D}${PTEST_PATH}/libopenmpt
  67. install -m 0644 ${S}/libopenmpt/libopenmpt_version.mk ${D}${PTEST_PATH}/libopenmpt
  68. }
  69. python __anonymous() {
  70. packageconfig = (d.getVar("PACKAGECONFIG") or "").split()
  71. if ("sdl" in packageconfig) and ("sdl2" in packageconfig):
  72. bb.error("sdl and sdl2 packageconfigs cannot be both enabled")
  73. }
  74. PACKAGES =+ "${PN}-modplug ${PN}-openmpt123 ${PN}-openmpt123-doc"
  75. FILES_${PN}-modplug = "${libdir}/libopenmpt_modplug.so.*"
  76. FILES_${PN}-openmpt123 = "${bindir}/openmpt123"
  77. FILES_${PN}-openmpt123-doc = "${mandir}/man1/openmpt123*"
  78. # Since version 0.3, libopenmpt uses SemVer 2.0.0 versioning.
  79. # The SemVer versioning scheme is incompatible with Debian/Ubuntu
  80. # package version names.
  81. DEBIAN_NOAUTONAME_${PN} = "1"
  82. DEBIAN_NOAUTONAME_${PN}-modplug = "1"
  83. RDEPENDS_${PN}_libc-glibc = " \
  84. glibc-gconv-cp1252 \
  85. glibc-gconv-ibm437 \
  86. glibc-gconv-iso8859-1 \
  87. glibc-gconv-iso8859-15 \
  88. "