Use cmake for SDL, add more X11 dependencies
This commit is contained in:
parent
3efcb24f50
commit
5aa01f37e3
8 changed files with 268 additions and 31 deletions
36
scripts.d/45-x11/50-libxi.sh
Executable file
36
scripts.d/45-x11/50-libxi.sh
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
LIBXI_REPO="https://gitlab.freedesktop.org/xorg/lib/libxi.git"
|
||||
LIBXI_COMMIT="f24d7f43ab4d97203e60677a3d42e11dbc80c8b4"
|
||||
|
||||
ffbuild_enabled() {
|
||||
[[ $TARGET != linux* ]] && return -1
|
||||
return 0
|
||||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git-mini-clone "$LIBXI_REPO" "$LIBXI_COMMIT" libxi
|
||||
cd libxi
|
||||
|
||||
autoreconf -i
|
||||
|
||||
local myconf=(
|
||||
--prefix="$FFBUILD_PREFIX"
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
)
|
||||
|
||||
if [[ $TARGET == linux* ]]; then
|
||||
myconf+=(
|
||||
--host="$FFBUILD_TOOLCHAIN"
|
||||
)
|
||||
else
|
||||
echo "Unknown target"
|
||||
return -1
|
||||
fi
|
||||
|
||||
./configure "${myconf[@]}"
|
||||
make -j$(nproc)
|
||||
make install
|
||||
}
|
36
scripts.d/45-x11/50-libxinerama.sh
Executable file
36
scripts.d/45-x11/50-libxinerama.sh
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
LIBXINERAMA_REPO="https://gitlab.freedesktop.org/xorg/lib/libxinerama.git"
|
||||
LIBXINERAMA_COMMIT="c5187f076d16601c15c59c5a2f05c0513d9f042b"
|
||||
|
||||
ffbuild_enabled() {
|
||||
[[ $TARGET != linux* ]] && return -1
|
||||
return 0
|
||||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git-mini-clone "$LIBXINERAMA_REPO" "$LIBXINERAMA_COMMIT" libxinerama
|
||||
cd libxinerama
|
||||
|
||||
autoreconf -i
|
||||
|
||||
local myconf=(
|
||||
--prefix="$FFBUILD_PREFIX"
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
)
|
||||
|
||||
if [[ $TARGET == linux* ]]; then
|
||||
myconf+=(
|
||||
--host="$FFBUILD_TOOLCHAIN"
|
||||
)
|
||||
else
|
||||
echo "Unknown target"
|
||||
return -1
|
||||
fi
|
||||
|
||||
./configure "${myconf[@]}"
|
||||
make -j$(nproc)
|
||||
make install
|
||||
}
|
36
scripts.d/45-x11/50-libxrender.sh
Executable file
36
scripts.d/45-x11/50-libxrender.sh
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
LIBXRENDER_REPO="https://gitlab.freedesktop.org/xorg/lib/libxrender.git"
|
||||
LIBXRENDER_COMMIT="bce0618839fc33f44edd8b5498b8e33d167806ff"
|
||||
|
||||
ffbuild_enabled() {
|
||||
[[ $TARGET != linux* ]] && return -1
|
||||
return 0
|
||||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git-mini-clone "$LIBXRENDER_REPO" "$LIBXRENDER_COMMIT" libxrender
|
||||
cd libxrender
|
||||
|
||||
autoreconf -i
|
||||
|
||||
local myconf=(
|
||||
--prefix="$FFBUILD_PREFIX"
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
)
|
||||
|
||||
if [[ $TARGET == linux* ]]; then
|
||||
myconf+=(
|
||||
--host="$FFBUILD_TOOLCHAIN"
|
||||
)
|
||||
else
|
||||
echo "Unknown target"
|
||||
return -1
|
||||
fi
|
||||
|
||||
./configure "${myconf[@]}"
|
||||
make -j$(nproc)
|
||||
make install
|
||||
}
|
36
scripts.d/45-x11/50-libxscrnsaver.sh
Executable file
36
scripts.d/45-x11/50-libxscrnsaver.sh
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
LIBXSCRNSAVER_REPO="https://gitlab.freedesktop.org/xorg/lib/libxscrnsaver.git"
|
||||
LIBXSCRNSAVER_COMMIT="aa9fd5061d0a8832480ad0c1acc9d2e864e807f4"
|
||||
|
||||
ffbuild_enabled() {
|
||||
[[ $TARGET != linux* ]] && return -1
|
||||
return 0
|
||||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git-mini-clone "$LIBXSCRNSAVER_REPO" "$LIBXSCRNSAVER_COMMIT" libxscrnsaver
|
||||
cd libxscrnsaver
|
||||
|
||||
autoreconf -i
|
||||
|
||||
local myconf=(
|
||||
--prefix="$FFBUILD_PREFIX"
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
)
|
||||
|
||||
if [[ $TARGET == linux* ]]; then
|
||||
myconf+=(
|
||||
--host="$FFBUILD_TOOLCHAIN"
|
||||
)
|
||||
else
|
||||
echo "Unknown target"
|
||||
return -1
|
||||
fi
|
||||
|
||||
./configure "${myconf[@]}"
|
||||
make -j$(nproc)
|
||||
make install
|
||||
}
|
36
scripts.d/45-x11/50-libxxf86vm.sh
Executable file
36
scripts.d/45-x11/50-libxxf86vm.sh
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
LIBXXF86VM_REPO="https://gitlab.freedesktop.org/xorg/lib/libxxf86vm.git"
|
||||
LIBXXF86VM_COMMIT="7f43cd2a905e7b93b83c9ce81dabb768f6fa2bc7"
|
||||
|
||||
ffbuild_enabled() {
|
||||
[[ $TARGET != linux* ]] && return -1
|
||||
return 0
|
||||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git-mini-clone "$LIBXXF86VM_REPO" "$LIBXXF86VM_COMMIT" libxxf86vm
|
||||
cd libxxf86vm
|
||||
|
||||
autoreconf -i
|
||||
|
||||
local myconf=(
|
||||
--prefix="$FFBUILD_PREFIX"
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
)
|
||||
|
||||
if [[ $TARGET == linux* ]]; then
|
||||
myconf+=(
|
||||
--host="$FFBUILD_TOOLCHAIN"
|
||||
)
|
||||
else
|
||||
echo "Unknown target"
|
||||
return -1
|
||||
fi
|
||||
|
||||
./configure "${myconf[@]}"
|
||||
make -j$(nproc)
|
||||
make install
|
||||
}
|
36
scripts.d/45-x11/60-libxcursor.sh
Executable file
36
scripts.d/45-x11/60-libxcursor.sh
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
LIBXCURSOR_REPO="https://gitlab.freedesktop.org/xorg/lib/libxcursor.git"
|
||||
LIBXCURSOR_COMMIT="801925839d26e7c8d942c5e02c4897652ead26c8"
|
||||
|
||||
ffbuild_enabled() {
|
||||
[[ $TARGET != linux* ]] && return -1
|
||||
return 0
|
||||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git-mini-clone "$LIBXCURSOR_REPO" "$LIBXCURSOR_COMMIT" libxcursor
|
||||
cd libxcursor
|
||||
|
||||
autoreconf -i
|
||||
|
||||
local myconf=(
|
||||
--prefix="$FFBUILD_PREFIX"
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
)
|
||||
|
||||
if [[ $TARGET == linux* ]]; then
|
||||
myconf+=(
|
||||
--host="$FFBUILD_TOOLCHAIN"
|
||||
)
|
||||
else
|
||||
echo "Unknown target"
|
||||
return -1
|
||||
fi
|
||||
|
||||
./configure "${myconf[@]}"
|
||||
make -j$(nproc)
|
||||
make install
|
||||
}
|
36
scripts.d/45-x11/60-libxrandr.sh
Executable file
36
scripts.d/45-x11/60-libxrandr.sh
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
LIBXRANDR_REPO="https://gitlab.freedesktop.org/xorg/lib/libxrandr.git"
|
||||
LIBXRANDR_COMMIT="55dcda4518eda8ae03ef25ea29d3c994ad71eb0a"
|
||||
|
||||
ffbuild_enabled() {
|
||||
[[ $TARGET != linux* ]] && return -1
|
||||
return 0
|
||||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
git-mini-clone "$LIBXRANDR_REPO" "$LIBXRANDR_COMMIT" libxrandr
|
||||
cd libxrandr
|
||||
|
||||
autoreconf -i
|
||||
|
||||
local myconf=(
|
||||
--prefix="$FFBUILD_PREFIX"
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
)
|
||||
|
||||
if [[ $TARGET == linux* ]]; then
|
||||
myconf+=(
|
||||
--host="$FFBUILD_TOOLCHAIN"
|
||||
)
|
||||
else
|
||||
echo "Unknown target"
|
||||
return -1
|
||||
fi
|
||||
|
||||
./configure "${myconf[@]}"
|
||||
make -j$(nproc)
|
||||
make install
|
||||
}
|
|
@ -1,40 +1,33 @@
|
|||
#!/bin/bash
|
||||
|
||||
SDL_SRC="https://libsdl.org/release/SDL2-2.0.18.tar.gz"
|
||||
SDL_REPO="https://github.com/libsdl-org/SDL.git"
|
||||
SDL_COMMIT="615f7b4453864d9475e8b20faa78ec67be357f1e"
|
||||
|
||||
ffbuild_enabled() {
|
||||
return 0
|
||||
}
|
||||
|
||||
ffbuild_dockerbuild() {
|
||||
mkdir sdl
|
||||
git-mini-clone "$SDL_REPO" "$SDL_COMMIT" sdl
|
||||
cd sdl
|
||||
|
||||
wget "$SDL_SRC" -O SDL.tar.gz
|
||||
tar xaf SDL.tar.gz
|
||||
rm SDL.tar.gz
|
||||
cd SDL*
|
||||
mkdir build && cd build
|
||||
|
||||
./autogen.sh
|
||||
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \
|
||||
-DSDL_SHARED=OFF -DSDL_STATIC=ON -DSDL_STATIC_PIC=ON -DSDL_X11_SHARED=OFF \
|
||||
-DHAVE_XGENERICEVENT=TRUE -DSDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM=1 \
|
||||
..
|
||||
|
||||
local myconf=(
|
||||
--prefix="$FFBUILD_PREFIX"
|
||||
--disable-shared
|
||||
--enable-static
|
||||
)
|
||||
exit 1
|
||||
|
||||
if [[ $TARGET == win* || $TARGET == linux* ]]; then
|
||||
myconf+=(
|
||||
--host="$FFBUILD_TOOLCHAIN"
|
||||
)
|
||||
else
|
||||
echo "Unknown target"
|
||||
return -1
|
||||
ninja -j$(nproc)
|
||||
ninja install
|
||||
|
||||
if [[ $TARGET == linux* ]]; then
|
||||
sed -ri -e 's/ \-l\/.+?\.a//g' \
|
||||
"$FFBUILD_PREFIX"/lib/pkgconfig/sdl2.pc
|
||||
echo 'Requires: xxf86vm xscrnsaver xrandr xfixes xi xinerama xcursor' >> "$FFBUILD_PREFIX"/lib/pkgconfig/sdl2.pc
|
||||
fi
|
||||
|
||||
./configure "${myconf[@]}"
|
||||
make -j$(nproc)
|
||||
make install
|
||||
}
|
||||
|
||||
ffbuild_configure() {
|
||||
|
@ -44,11 +37,3 @@ ffbuild_configure() {
|
|||
ffbuild_unconfigure() {
|
||||
echo --disable-sdl2
|
||||
}
|
||||
|
||||
ffbuild_cflags() {
|
||||
return 0
|
||||
}
|
||||
|
||||
ffbuild_ldflags() {
|
||||
return 0
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue