supertuxkart/supertuxkart-system-enet-glew.patch
Matthias Mailänder 256e096683 Accepting request 307346 from home:scarabeus_iv:branches:games
Won't build on openSUSE 13.1 unless new glew is linked to the games prj.

- Require qlew >= 1.10 as per upstream readme

- Unbundle wiiuse too:
  * supertuxkart-no-undefined.patch
  * supertuxkart-unbundle-wiiuse.patch

- Update to use %cmake macro and obey no-undefined/etc rules we have
  in SUSE
- Apply patches to unbundle various broken things:
  * supertuxkart-irrlicht.patch
  * supertuxkart-no-undefined.patch
  * supertuxkart-system-enet-glew.patch

OBS-URL: https://build.opensuse.org/request/show/307346
OBS-URL: https://build.opensuse.org/package/show/games/supertuxkart?expand=0&rev=62
2015-05-15 20:51:08 +00:00

69 lines
1.8 KiB
Diff

Description: Build supertuxkart against system enet and system glew, instead
of embedded copies
Forwarded: not-yet
Author: Vincent Cheng <vcheng@debian.org>
Last-Update: 2015-05-14
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,13 +60,13 @@
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/bullet")
include_directories("${PROJECT_SOURCE_DIR}/lib/bullet/src")
-# Build the ENet UDP network library
-add_subdirectory("${PROJECT_SOURCE_DIR}/lib/enet")
-include_directories("${PROJECT_SOURCE_DIR}/lib/enet/include")
-
-# Build glew library
-add_subdirectory("${PROJECT_SOURCE_DIR}/lib/glew")
-include_directories("${PROJECT_SOURCE_DIR}/lib/glew/include")
+# ENet
+find_package(ENet REQUIRED)
+include_directories(${ENET_INCLUDE_DIR})
+
+# GLEW
+find_package(GLEW REQUIRED)
+include_directories(${GLEW_INCLUDE_DIRS})
if((WIN32 AND NOT MINGW) OR APPLE)
if (NOT APPLE)
@@ -307,11 +307,11 @@
bulletdynamics
bulletcollision
bulletmath
- enet
- glew
stkirrlicht
angelscript
${CURL_LIBRARIES}
+ ${ENET_LIBRARIES}
+ ${GLEW_LIBRARIES}
${OGGVORBIS_LIBRARIES}
${OPENAL_LIBRARY}
${OPENGL_LIBRARIES}
--- /dev/null
+++ b/cmake/FindENet.cmake
@@ -0,0 +1,22 @@
+# - Find ENet
+# Find the ENet includes and libraries
+#
+# Following variables are provided:
+# ENET_FOUND
+# True if ENet has been found
+# ENET_INCLUDE_DIR
+# The include directories of ENet
+# ENET_LIBRARIES
+# ENet library list
+
+
+find_path(ENET_INCLUDE_DIR enet/enet.h /usr/include)
+find_library(ENET_LIBRARY NAMES enet PATHS /usr/lib)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(ENet DEFAULT_MSG ENET_INCLUDE_DIR ENET_LIBRARY)
+
+# Publish variables
+set(ENET_INCLUDE_DIRS ${ENET_INCLUDE_DIR})
+set(ENET_LIBRARIES ${ENET_LIBRARY})
+mark_as_advanced(ENET_INCLUDE_DIR ENET_LIBRARY)