termux-packages/x11-packages/sfml/build.sh

38 lines
1.1 KiB
Bash
Raw Normal View History

2022-04-22 18:38:32 +02:00
TERMUX_PKG_HOMEPAGE=https://www.sfml-dev.org/
TERMUX_PKG_DESCRIPTION="A simple, fast, cross-platform and object-oriented multimedia API"
TERMUX_PKG_LICENSE="ZLIB"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.5.1
2022-04-28 20:56:41 +02:00
TERMUX_PKG_REVISION=1
2022-04-22 18:38:32 +02:00
TERMUX_PKG_SRCURL=https://github.com/SFML/SFML/archive/refs/tags/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=438c91a917cc8aa19e82c6f59f8714da353c488584a007d401efac8368e1c785
TERMUX_PKG_DEPENDS="freetype, libc++, libflac, libogg, libvorbis, libx11, libxrandr, mesa, openal-soft"
termux_step_post_get_source() {
2022-04-28 20:56:41 +02:00
cp src/SFML/Window/Android/JoystickImpl.{cpp,hpp} src/SFML/Window/Unix/
2022-04-22 18:38:32 +02:00
}
termux_step_pre_configure() {
_NEED_DUMMY_LIBPTHREAD_A=
_LIBPTHREAD_A=$TERMUX_PREFIX/lib/libpthread.a
if [ ! -e $_LIBPTHREAD_A ]; then
_NEED_DUMMY_LIBPTHREAD_A=true
echo '!<arch>' > $_LIBPTHREAD_A
fi
_NEED_DUMMY_LIBRT_A=
_LIBRT_A=$TERMUX_PREFIX/lib/librt.a
if [ ! -e $_LIBRT_A ]; then
_NEED_DUMMY_LIBRT_A=true
echo '!<arch>' > $_LIBRT_A
fi
}
termux_step_post_make_install() {
if [ $_NEED_DUMMY_LIBPTHREAD_A ]; then
rm -f $_LIBPTHREAD_A
fi
if [ $_NEED_DUMMY_LIBRT_A ]; then
rm -f $_LIBRT_A
fi
}