Add alsa-lib
This commit is contained in:
parent
6d3ce02bf7
commit
5b6c9e28b3
3 changed files with 65 additions and 2 deletions
|
@ -18,6 +18,7 @@ ffbuild_dockerbuild() {
|
||||||
--prefix="$FFBUILD_PREFIX"
|
--prefix="$FFBUILD_PREFIX"
|
||||||
--disable-shared
|
--disable-shared
|
||||||
--enable-static
|
--enable-static
|
||||||
|
--with-pic
|
||||||
)
|
)
|
||||||
|
|
||||||
if [[ $TARGET == win* || $TARGET == linux* ]]; then
|
if [[ $TARGET == win* || $TARGET == linux* ]]; then
|
||||||
|
|
53
scripts.d/45-alsalib.sh
Executable file
53
scripts.d/45-alsalib.sh
Executable file
|
@ -0,0 +1,53 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
ALSALIB_REPO="https://github.com/alsa-project/alsa-lib.git"
|
||||||
|
ALSALIB_COMMIT="1454b5f118a3b92663923fe105daecfeb7e20f1b"
|
||||||
|
|
||||||
|
ffbuild_enabled() {
|
||||||
|
[[ $TARGET == linux* ]] || return 1
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
ffbuild_dockerbuild() {
|
||||||
|
git-mini-clone "$ALSALIB_REPO" "$ALSALIB_COMMIT" alsalib
|
||||||
|
cd alsalib
|
||||||
|
|
||||||
|
autoreconf -i
|
||||||
|
|
||||||
|
local myconf=(
|
||||||
|
--prefix="$FFBUILD_PREFIX"
|
||||||
|
--with-configdir="/usr/share/alsa"
|
||||||
|
--disable-shared
|
||||||
|
--enable-static
|
||||||
|
--with-pic
|
||||||
|
--without-debug
|
||||||
|
--without-versioned
|
||||||
|
--disable-old-symbols
|
||||||
|
--disable-python
|
||||||
|
--disable-topology
|
||||||
|
--disable-alisp
|
||||||
|
)
|
||||||
|
|
||||||
|
if [[ $TARGET == linux* ]]; then
|
||||||
|
myconf+=(
|
||||||
|
--host="$FFBUILD_TOOLCHAIN"
|
||||||
|
)
|
||||||
|
else
|
||||||
|
echo "Unknown target"
|
||||||
|
return -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
./configure "${myconf[@]}"
|
||||||
|
make -j$(nproc)
|
||||||
|
make install
|
||||||
|
|
||||||
|
rm -rf "$FFBUILD_PREFIX"/{bin/aserver,share/alsa}
|
||||||
|
}
|
||||||
|
|
||||||
|
ffbuild_configure() {
|
||||||
|
echo --enable-alsa
|
||||||
|
}
|
||||||
|
|
||||||
|
ffbuild_unconfigure() {
|
||||||
|
echo --disable-alsa
|
||||||
|
}
|
|
@ -17,13 +17,20 @@ ffbuild_dockerbuild() {
|
||||||
-DSDL_SHARED=OFF
|
-DSDL_SHARED=OFF
|
||||||
-DSDL_STATIC=ON
|
-DSDL_STATIC=ON
|
||||||
-DSDL_STATIC_PIC=ON
|
-DSDL_STATIC_PIC=ON
|
||||||
|
-DSDL_TEST=OFF
|
||||||
)
|
)
|
||||||
|
|
||||||
if [[ $TARGET == linux* ]]; then
|
if [[ $TARGET == linux* ]]; then
|
||||||
mycmake+=(
|
mycmake+=(
|
||||||
|
-DSDL_X11=ON
|
||||||
-DSDL_X11_SHARED=OFF
|
-DSDL_X11_SHARED=OFF
|
||||||
-DHAVE_XGENERICEVENT=TRUE
|
-DHAVE_XGENERICEVENT=TRUE
|
||||||
-DSDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM=1
|
-DSDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM=1
|
||||||
|
|
||||||
|
-DSDL_ALSA=ON
|
||||||
|
-DSDL_ALSA_SHARED=OFF
|
||||||
|
-DHAVE_ASOUNDLIB_H=TRUE
|
||||||
|
-DHAVE_LIBASOUND=TRUE
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -33,9 +40,11 @@ ffbuild_dockerbuild() {
|
||||||
ninja install
|
ninja install
|
||||||
|
|
||||||
if [[ $TARGET == linux* ]]; then
|
if [[ $TARGET == linux* ]]; then
|
||||||
sed -ri -e 's/ \-l\/.+?\.a//g' \
|
sed -ri -e 's/\-Wl,\-\-no\-undefined.*//' \
|
||||||
|
-e 's/ \-l\/.+?\.a//g' \
|
||||||
|
-e 's/ \-lasound//g' \
|
||||||
"$FFBUILD_PREFIX"/lib/pkgconfig/sdl2.pc
|
"$FFBUILD_PREFIX"/lib/pkgconfig/sdl2.pc
|
||||||
echo 'Requires: xxf86vm xscrnsaver xrandr xfixes xi xinerama xcursor' >> "$FFBUILD_PREFIX"/lib/pkgconfig/sdl2.pc
|
echo 'Requires: alsa xxf86vm xscrnsaver xrandr xfixes xi xinerama xcursor' >> "$FFBUILD_PREFIX"/lib/pkgconfig/sdl2.pc
|
||||||
elif [[ $TARGET == win* ]]; then
|
elif [[ $TARGET == win* ]]; then
|
||||||
sed -ri -e 's/\-Wl,\-\-no\-undefined.*//' \
|
sed -ri -e 's/\-Wl,\-\-no\-undefined.*//' \
|
||||||
-e 's/ \-mwindows//g' \
|
-e 's/ \-mwindows//g' \
|
||||||
|
|
Loading…
Reference in a new issue