mirror of
https://github.com/chocolate-doom/chocpkg.git
synced 2024-11-10 07:11:39 +00:00
Add libmad package for MP3 support.
At request of Fabian.
This commit is contained in:
parent
1cca6143f5
commit
fd46edf258
2 changed files with 33 additions and 2 deletions
|
@ -9,8 +9,8 @@ variant latest fetch_hg https://hg.libsdl.org/SDL_mixer
|
|||
|
||||
# Disable dependencies on external libraries for sound file formats:
|
||||
config_options="
|
||||
--disable-music-mod --disable-music-mp3
|
||||
--disable-music-flac-shared --disable-music-ogg-shared
|
||||
--disable-music-mod --disable-music-flac-shared
|
||||
--disable-music-ogg-shared
|
||||
"
|
||||
|
||||
# ...except ones we have installed:
|
||||
|
@ -28,4 +28,10 @@ else
|
|||
config_options+=" --disable-music-midi-fluidsynth"
|
||||
fi
|
||||
|
||||
if chocpkg installed ${PACKAGE_TYPE}:libmad; then
|
||||
config_options+=" --enable-music-mp3 --enable-music-mp3-mad-gpl"
|
||||
else
|
||||
config_options+=" --disable-music-mp3 --disable-music-mp3-mad-gpl"
|
||||
fi
|
||||
|
||||
build_autotools $config_options
|
||||
|
|
25
pkgdef/libmad.sh
Normal file
25
pkgdef/libmad.sh
Normal file
|
@ -0,0 +1,25 @@
|
|||
description "MPEG Audio Decoder library"
|
||||
check_library mad
|
||||
variant stable fetch_download \
|
||||
ftp://ftp.mars.org/pub/mpeg/libmad-0.15.1b.tar.gz \
|
||||
bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690
|
||||
build_autotools
|
||||
|
||||
prebuild_setup() {
|
||||
cp configure configure.orig
|
||||
# libmad hasn't had a new release in 14 years, so we must manually
|
||||
# patch the configure script to remove all these compiler flags which
|
||||
# don't work any more (especially in clang):
|
||||
sed <configure.orig >configure '
|
||||
s/-fforce-mem//
|
||||
s/-fthread-jumps//
|
||||
s/-fcse-follow-jumps//
|
||||
s/-fcse-skip-blocks//
|
||||
s/-fregmove//
|
||||
s/-fexpensive-optimizations//
|
||||
s/-fschedule-insns2//
|
||||
s/-fstrength-reduce//
|
||||
s/-march=i486//
|
||||
'
|
||||
}
|
||||
|
Loading…
Reference in a new issue