diff options
Diffstat (limited to 'games-action/supertuxkart/files/supertuxkart-0.9.3-fix-buildsystem.patch')
-rw-r--r-- | games-action/supertuxkart/files/supertuxkart-0.9.3-fix-buildsystem.patch | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/games-action/supertuxkart/files/supertuxkart-0.9.3-fix-buildsystem.patch b/games-action/supertuxkart/files/supertuxkart-0.9.3-fix-buildsystem.patch new file mode 100644 index 000000000000..def5c80340ba --- /dev/null +++ b/games-action/supertuxkart/files/supertuxkart-0.9.3-fix-buildsystem.patch @@ -0,0 +1,103 @@ +* Unbundle remaining libraries: GLEW, zlib, png, jpeg +* Add -DAS_DEPRECATED for Angelscript +* Remove definition of debug macros +* Build bundled Irrlicht with user flags + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -110,43 +110,11 @@ + include_directories(${ENET_INCLUDE_DIR}) + + # Build glew library + if(NOT USE_GLES2 AND NOT SERVER_ONLY) ++ find_package(GLEW REQUIRED) ++ include_directories(${GLEW_INCLUDE_DIRS}) + add_definitions(-DGLEW_NO_GLU) +- add_subdirectory("${PROJECT_SOURCE_DIR}/lib/glew") +- include_directories("${PROJECT_SOURCE_DIR}/lib/glew/include") + endif() + +-if(MSVC OR APPLE) +- if (NOT APPLE) +- # Build zlib library +- add_subdirectory("${PROJECT_SOURCE_DIR}/lib/zlib") +- include_directories("${PROJECT_SOURCE_DIR}/lib/zlib") +- +- set(ZLIB_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lib/zlib" "${PROJECT_BINARY_DIR}/lib/zlib/") +- set(ZLIB_LIBRARY zlibstatic) +- endif() +- +- # Build png library +- set(SKIP_INSTALL_ALL TRUE) +- set(PNG_STATIC TRUE CACHE BOOL "Build static lib") +- set(PNG_TESTS FALSE CACHE BOOL "Build libpng tests") +- set(PNG_SHARED FALSE CACHE BOOL "Build shared lib") +- add_subdirectory("${PROJECT_SOURCE_DIR}/lib/libpng") +- include_directories("${PROJECT_SOURCE_DIR}/lib/libpng") +- +- set(PNG_PNG_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lib/libpng/") +- set(PNG_LIBRARY png_static) +-endif() +- +-# Add jpeg library +-if (APPLE) +- add_subdirectory("${PROJECT_SOURCE_DIR}/lib/jpeglib") +- include_directories("${PROJECT_SOURCE_DIR}/lib/jpeglib") +- set(JPEG_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/lib/jpeglib/") +- set(JPEG_LIBRARY jpeglib) +-else() +- find_package(JPEG REQUIRED) +- include_directories(${JPEG_INCLUDE_DIR}) +-endif() + + if (BUILD_RECORDER) +@@ -206,6 +174,7 @@ + find_package(Angelscript) + if(ANGELSCRIPT_FOUND) + include_directories(${Angelscript_INCLUDE_DIRS}) ++ add_definitions(-DAS_DEPRECATED) + else() + message(FATAL_ERROR "Angelscript not found. " + "Either install angelscript or use built-in version using " +@@ -307,14 +276,6 @@ + # VS will automatically add NDEBUG for release mode, but only _DEBUG in debug mode. + # Since STK uses DEBUG, this is added for debug compilation only: + set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG) +-else() +- # All non VS generators used create only a single compile mode, so +- # compile flags can be simplye be added +- if(CMAKE_BUILD_TYPE MATCHES Debug) +- add_definitions(-DDEBUG) +- else() +- add_definitions(-DNDEBUG) +- endif() + endif() + + # TODO: remove this switch +@@ -426,7 +395,7 @@ + if(NOT SERVER_ONLY) + if(NOT USE_GLES2) +- target_link_libraries(supertuxkart ${OPENGL_gl_LIBRARY} glew graphics_utils) ++ target_link_libraries(supertuxkart ${OPENGL_gl_LIBRARY} ${GLEW_LIBRARIES} graphics_utils) + else() + target_link_libraries(supertuxkart GLESv2) + endif() + endif() +--- a/lib/irrlicht/CMakeLists.txt ++++ b/lib/irrlicht/CMakeLists.txt +@@ -68,15 +68,6 @@ + if(WIN32) + add_definitions(-D_IRR_STATIC_LIB_) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) # Shut up about unsafe stuff +-else() +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing") +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pipe -O3 -fno-exceptions -fstrict-aliasing") +- if(CMAKE_COMPILER_IS_GNUCC) +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fexpensive-optimizations") +- endif() +- if(CMAKE_COMPILER_IS_GNUCXX) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexpensive-optimizations") +- endif() + endif() + + if(USE_GLES2) |