summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-action/supertuxkart/files/supertuxkart-0.9.3-unbundle-enet.patch')
-rw-r--r--games-action/supertuxkart/files/supertuxkart-0.9.3-unbundle-enet.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/games-action/supertuxkart/files/supertuxkart-0.9.3-unbundle-enet.patch b/games-action/supertuxkart/files/supertuxkart-0.9.3-unbundle-enet.patch
new file mode 100644
index 000000000000..8c00fce7e186
--- /dev/null
+++ b/games-action/supertuxkart/files/supertuxkart-0.9.3-unbundle-enet.patch
@@ -0,0 +1,57 @@
+Description: Build supertuxkart against system enet instead of embedded copy
+Forwarded: not-yet
+Author: Vincent Cheng <vcheng@debian.org>
+Last-Update: 2016-07-17
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -105,9 +105,9 @@
+ 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")
++# ENet
++find_package(ENet REQUIRED)
++include_directories(${ENET_INCLUDE_DIR})
+
+ # Build glew library
+ if(NOT USE_GLES2 AND NOT SERVER_ONLY)
+@@ -406,10 +406,10 @@
+ bulletdynamics
+ bulletcollision
+ bulletmath
+- enet
+ stkirrlicht
+ ${Angelscript_LIBRARIES}
+ ${CURL_LIBRARIES}
++ ${ENET_LIBRARIES}
+ ${OGGVORBIS_LIBRARIES}
+ ${OPENAL_LIBRARY}
+ ${FREETYPE_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)