Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | SUMMARY = "Audio decoder for MPEG-1 Layer 1/2/3" |
| 2 | DESCRIPTION = "The core of mpg123 is an MPEG-1 Layer 1/2/3 decoding library, which can be used by other programs. \ |
| 3 | mpg123 also comes with a command-line tool which can playback using ALSA, PulseAudio, OSS, and several other APIs, \ |
| 4 | and also can write the decoded audio to WAV." |
| 5 | HOMEPAGE = "http://mpg123.de/" |
| 6 | BUGTRACKER = "http://sourceforge.net/p/mpg123/bugs/" |
| 7 | SECTION = "multimedia" |
| 8 | |
| 9 | LICENSE = "LGPLv2.1" |
| 10 | LICENSE_FLAGS = "commercial" |
| 11 | LIC_FILES_CHKSUM = "file://COPYING;md5=1e86753638d3cf2512528b99079bc4f3" |
| 12 | |
| 13 | DEPENDS = "audiofile" |
| 14 | |
| 15 | SRC_URI = "${SOURCEFORGE_MIRROR}/mpg123/mpg123/${PV}/${BP}.tar.bz2" |
| 16 | |
| 17 | SRC_URI[md5sum] = "2dfafae3bbc532b4c8b04a77c6a6de89" |
| 18 | SRC_URI[sha256sum] = "5069e02e50138600f10cc5f7674e44e9bf6f1930af81d0e1d2f869b3c0ee40d2" |
| 19 | |
| 20 | inherit autotools pkgconfig |
| 21 | |
| 22 | # The options should be mutually exclusive for configuration script. |
| 23 | # If both alsa and pulseaudio are specified (as in the default distro features) |
| 24 | # pulseaudio takes precedence. |
| 25 | PACKAGECONFIG_ALSA = "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)}" |
| 26 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '${PACKAGECONFIG_ALSA}', d)}" |
| 27 | |
| 28 | PACKAGECONFIG[alsa] = "--with-default-audio=alsa,,alsa-lib" |
| 29 | PACKAGECONFIG[esd] = ",,esound" |
| 30 | PACKAGECONFIG[jack] = ",,jack" |
| 31 | PACKAGECONFIG[openal] = ",,openal-soft" |
| 32 | PACKAGECONFIG[portaudio] = ",,portaudio-v19" |
| 33 | PACKAGECONFIG[pulseaudio] = "--with-default-audio=pulse,,pulseaudio" |
| 34 | PACKAGECONFIG[sdl] = ",,libsdl" |
| 35 | |
| 36 | # Following are possible sound output modules: |
| 37 | # alsa arts coreaudio dummy esd jack nas openal os2 oss portaudio pulse sdl sndio sun tinyalsa win32 win32_wasapi |
| 38 | AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'alsa', 'alsa', '', d)}" |
| 39 | AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'esd', 'esd', '', d)}" |
| 40 | AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'jack', 'jack', '', d)}" |
| 41 | AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'openal', 'openal', '', d)}" |
| 42 | AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'portaudio', 'portaudio', '', d)}" |
| 43 | AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'pulse', '', d)}" |
| 44 | AUDIOMODS += "${@bb.utils.contains('PACKAGECONFIG', 'sdl', 'sdl', '', d)}" |
| 45 | |
| 46 | EXTRA_OECONF = " \ |
| 47 | --enable-shared \ |
| 48 | --with-audio='${AUDIOMODS}' \ |
| 49 | --with-module-suffix=.so \ |
| 50 | ${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \ |
| 51 | ${@bb.utils.contains('TUNE_FEATURES', 'altivec', '--with-cpu=altivec', '', d)} \ |
| 52 | " |
| 53 | |
| 54 | # The x86 assembler optimisations contains text relocations and there are no |
| 55 | # upstream plans to fix them: http://sourceforge.net/p/mpg123/bugs/168/ |
| 56 | INSANE_SKIP_${PN}_append_x86 = " textrel" |
| 57 | |
| 58 | # Fails to build with thumb-1 (qemuarm) |
| 59 | #| {standard input}: Assembler messages: |
| 60 | #| {standard input}:47: Error: selected processor does not support Thumb mode `smull r5,r6,r7,r4' |
| 61 | #| {standard input}:48: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r5,r5,lsr#24' |
| 62 | #... |
| 63 | #| make[3]: *** [equalizer.lo] Error 1 |
| 64 | ARM_INSTRUCTION_SET_armv4 = "arm" |
| 65 | ARM_INSTRUCTION_SET_armv5 = "arm" |