new package: sfml
This commit is contained in:
parent
adfc204f0b
commit
1630a81b4a
38
x11-packages/sfml/build.sh
Normal file
38
x11-packages/sfml/build.sh
Normal file
@ -0,0 +1,38 @@
|
||||
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
|
||||
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() {
|
||||
cp src/SFML/Window/Android/JoystickImpl.cpp src/SFML/Window/Unix/
|
||||
}
|
||||
|
||||
termux_step_pre_configure() {
|
||||
CPPFLAGS+=" -DSFML_SYSTEM_LINUX"
|
||||
|
||||
_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
|
||||
}
|
23
x11-packages/sfml/cmake-Config.cmake.patch
Normal file
23
x11-packages/sfml/cmake-Config.cmake.patch
Normal file
@ -0,0 +1,23 @@
|
||||
--- a/cmake/Config.cmake
|
||||
+++ b/cmake/Config.cmake
|
||||
@@ -16,9 +16,9 @@
|
||||
message(FATAL_ERROR "Unsupported architecture")
|
||||
return()
|
||||
endif()
|
||||
-elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
+elseif(TRUE)
|
||||
set(SFML_OS_UNIX 1)
|
||||
- if(ANDROID)
|
||||
+ if(FALSE)
|
||||
set(SFML_OS_ANDROID 1)
|
||||
# use the OpenGL ES implementation on Android
|
||||
set(OPENGL_ES 1)
|
||||
@@ -55,7 +55,7 @@
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
-elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Android")
|
||||
+elseif(FALSE)
|
||||
set(SFML_OS_ANDROID 1)
|
||||
|
||||
# use the OpenGL ES implementation on Android
|
11
x11-packages/sfml/src-SFML-Window-CMakeLists.txt.patch
Normal file
11
x11-packages/sfml/src-SFML-Window-CMakeLists.txt.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/src/SFML/Window/CMakeLists.txt
|
||||
+++ b/src/SFML/Window/CMakeLists.txt
|
||||
@@ -272,7 +272,7 @@
|
||||
target_link_libraries(sfml-window PRIVATE EGL GLES)
|
||||
endif()
|
||||
|
||||
-if(SFML_OS_LINUX)
|
||||
+if(FALSE)
|
||||
sfml_find_package(UDev INCLUDE "UDEV_INCLUDE_DIR" LINK "UDEV_LIBRARIES")
|
||||
target_link_libraries(sfml-window PRIVATE UDev)
|
||||
elseif(SFML_OS_WINDOWS)
|
Loading…
Reference in New Issue
Block a user