diff --git a/.gitignore b/.gitignore index f18dfe4..9f09bb6 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ addon0.6.1-1.zip /stk-0.9.1-src.zip /supertuxkart-0.9.1-src.tar.xz /supertuxkart-0.9.2-rc1-src.tar.xz +/supertuxkart-0.9.2-src.tar.xz diff --git a/0001-Fix-double-slash-in-include.patch b/0001-Fix-double-slash-in-include.patch deleted file mode 100644 index 6b3d4c8..0000000 --- a/0001-Fix-double-slash-in-include.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 27bcdb341e88e4800342d9ee25d033da5dd99d7e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= -Date: Thu, 16 Jun 2016 21:27:34 +0200 -Subject: [PATCH 1/5] Fix double slash in include - -Triggers a weird 9 year old RPM bug when extracting -debugging information for the compiled binary: -https://bugzilla.redhat.com/show_bug.cgi?id=304121 ---- - src/network/protocols/server_lobby_room_protocol.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/network/protocols/server_lobby_room_protocol.cpp b/src/network/protocols/server_lobby_room_protocol.cpp -index ad610ed..d3dbeee 100644 ---- a/src/network/protocols/server_lobby_room_protocol.cpp -+++ b/src/network/protocols/server_lobby_room_protocol.cpp -@@ -33,7 +33,7 @@ - #include "network/stk_peer.hpp" - #include "online/online_profile.hpp" - #include "online/request_manager.hpp" --#include "states_screens//networking_lobby.hpp" -+#include "states_screens/networking_lobby.hpp" - #include "states_screens/race_result_gui.hpp" - #include "states_screens/waiting_for_others.hpp" - #include "utils/log.hpp" --- -2.7.4 - diff --git a/0001-Unbundle-ENet.patch b/0001-Unbundle-ENet.patch new file mode 100644 index 0000000..eaafbdb --- /dev/null +++ b/0001-Unbundle-ENet.patch @@ -0,0 +1,94 @@ +From 861d49fcd8236c46183ade5c654df05fd65678bc Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Tue, 21 Jun 2016 10:08:57 +0200 +Subject: [PATCH 1/4] Unbundle ENet + +Signed-off-by: Igor Gnatenko +--- + CMakeLists.txt | 6 +++--- + cmake/FindENet.cmake | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 52 insertions(+), 3 deletions(-) + create mode 100644 cmake/FindENet.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d29d915..aceb7eb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -64,8 +64,8 @@ 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") ++find_package(ENet REQUIRED) ++include_directories(${ENet_INCLUDE_DIRS}) + + # Build glew library + add_definitions(-DGLEW_NO_GLU) +@@ -342,7 +342,7 @@ target_link_libraries(supertuxkart + bulletdynamics + bulletcollision + bulletmath +- enet ++ ${ENet_LIBRARIES} + glew + stkirrlicht + ${Angelscript_LIBRARIES} +diff --git a/cmake/FindENet.cmake b/cmake/FindENet.cmake +new file mode 100644 +index 0000000..b6c146c +--- /dev/null ++++ b/cmake/FindENet.cmake +@@ -0,0 +1,49 @@ ++# - Try to find enet ++# Once done this will define ++# ++# ENET_FOUND - system has enet ++# ENet_INCLUDE_DIRS - the enet include directory ++# ENet_LIBRARIES - the libraries needed to use enet ++# ++# $ENETDIR is an environment variable used for finding enet. ++# ++# Borrowed from The Mana World ++# http://themanaworld.org/ ++# ++# Several changes and additions by Fabian 'x3n' Landau ++# Lots of simplifications by Adrian Friedli ++# > www.orxonox.net < ++ ++FIND_PATH(ENet_INCLUDE_DIRS enet/enet.h ++ PATHS ++ $ENV{ENETDIR} ++ /usr/local ++ /usr ++ PATH_SUFFIXES include ++ ) ++ ++FIND_LIBRARY(ENet_LIBRARY ++ NAMES enet ++ PATHS ++ $ENV{ENETDIR} ++ /usr/local ++ /usr ++ PATH_SUFFIXES lib ++ ) ++ ++# handle the QUIETLY and REQUIRED arguments and set ENET_FOUND to TRUE if ++# all listed variables are TRUE ++INCLUDE(FindPackageHandleStandardArgs) ++FIND_PACKAGE_HANDLE_STANDARD_ARGS(ENet DEFAULT_MSG ENet_LIBRARY ENet_INCLUDE_DIRS) ++ ++IF (ENET_FOUND) ++ IF(WIN32) ++ SET(WINDOWS_ENET_DEPENDENCIES "ws2_32;winmm") ++ SET(ENet_LIBRARIES ${ENet_LIBRARY} ${WINDOWS_ENET_DEPENDENCIES}) ++ ELSE(WIN32) ++ SET(ENet_LIBRARIES ${ENet_LIBRARY}) ++ ENDIF(WIN32) ++ENDIF (ENET_FOUND) ++ ++MARK_AS_ADVANCED(ENet_LIBRARY ENet_LIBRARIES ENet_INCLUDE_DIRS) ++ +-- +2.7.4 + diff --git a/0002-Unbundle-ENet.patch b/0002-Unbundle-ENet.patch deleted file mode 100644 index 4ff4be1..0000000 --- a/0002-Unbundle-ENet.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 3a85509696bcfd26e1f1a386579e4e278e192564 Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Tue, 21 Jun 2016 10:08:57 +0200 -Subject: [PATCH 2/5] Unbundle ENet - -Signed-off-by: Igor Gnatenko ---- - CMakeLists.txt | 6 +++--- - cmake/FindENet.cmake | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 52 insertions(+), 3 deletions(-) - create mode 100644 cmake/FindENet.cmake - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 41e1662..4e5089e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -64,8 +64,8 @@ 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") -+find_package(ENet REQUIRED) -+include_directories(${ENet_INCLUDE_DIRS}) - - # Build glew library - add_definitions(-DGLEW_NO_GLU) -@@ -342,7 +342,7 @@ target_link_libraries(supertuxkart - bulletdynamics - bulletcollision - bulletmath -- enet -+ ${ENet_LIBRARIES} - glew - stkirrlicht - ${Angelscript_LIBRARIES} -diff --git a/cmake/FindENet.cmake b/cmake/FindENet.cmake -new file mode 100644 -index 0000000..b6c146c ---- /dev/null -+++ b/cmake/FindENet.cmake -@@ -0,0 +1,49 @@ -+# - Try to find enet -+# Once done this will define -+# -+# ENET_FOUND - system has enet -+# ENet_INCLUDE_DIRS - the enet include directory -+# ENet_LIBRARIES - the libraries needed to use enet -+# -+# $ENETDIR is an environment variable used for finding enet. -+# -+# Borrowed from The Mana World -+# http://themanaworld.org/ -+# -+# Several changes and additions by Fabian 'x3n' Landau -+# Lots of simplifications by Adrian Friedli -+# > www.orxonox.net < -+ -+FIND_PATH(ENet_INCLUDE_DIRS enet/enet.h -+ PATHS -+ $ENV{ENETDIR} -+ /usr/local -+ /usr -+ PATH_SUFFIXES include -+ ) -+ -+FIND_LIBRARY(ENet_LIBRARY -+ NAMES enet -+ PATHS -+ $ENV{ENETDIR} -+ /usr/local -+ /usr -+ PATH_SUFFIXES lib -+ ) -+ -+# handle the QUIETLY and REQUIRED arguments and set ENET_FOUND to TRUE if -+# all listed variables are TRUE -+INCLUDE(FindPackageHandleStandardArgs) -+FIND_PACKAGE_HANDLE_STANDARD_ARGS(ENet DEFAULT_MSG ENet_LIBRARY ENet_INCLUDE_DIRS) -+ -+IF (ENET_FOUND) -+ IF(WIN32) -+ SET(WINDOWS_ENET_DEPENDENCIES "ws2_32;winmm") -+ SET(ENet_LIBRARIES ${ENet_LIBRARY} ${WINDOWS_ENET_DEPENDENCIES}) -+ ELSE(WIN32) -+ SET(ENet_LIBRARIES ${ENet_LIBRARY}) -+ ENDIF(WIN32) -+ENDIF (ENET_FOUND) -+ -+MARK_AS_ADVANCED(ENet_LIBRARY ENet_LIBRARIES ENet_INCLUDE_DIRS) -+ --- -2.7.4 - diff --git a/0002-Unbundle-WiiUse.patch b/0002-Unbundle-WiiUse.patch new file mode 100644 index 0000000..ef7cb2b --- /dev/null +++ b/0002-Unbundle-WiiUse.patch @@ -0,0 +1,146 @@ +From ab51656979c17fdc71b1eec7a6b3289d9b61d1ca Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Tue, 21 Jun 2016 10:13:16 +0200 +Subject: [PATCH 2/4] Unbundle WiiUse + +Signed-off-by: Igor Gnatenko +--- + CMakeLists.txt | 8 ++-- + cmake/FindWiiUse.cmake | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 102 insertions(+), 5 deletions(-) + create mode 100644 cmake/FindWiiUse.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index aceb7eb..919f85a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -108,10 +108,8 @@ include_directories("${PROJECT_SOURCE_DIR}/lib/irrlicht/include") + # (at least on VS) irrlicht will find wiiuse io.h file because + # of the added include directory. + if(USE_WIIUSE) +- if(WIIUSE_BUILD) +- add_subdirectory("${PROJECT_SOURCE_DIR}/lib/wiiuse") +- endif() +- include_directories("${PROJECT_SOURCE_DIR}/lib/wiiuse") ++ find_package(WiiUse REQUIRED) ++ include_directories(${WIIUSE_INCLUDE_DIR}) + endif() + + # Set include paths +@@ -399,7 +397,7 @@ if(USE_WIIUSE) + target_link_libraries(supertuxkart ${PROJECT_SOURCE_DIR}/dependencies/lib/wiiuse.lib) + endif() + else() +- target_link_libraries(supertuxkart wiiuse bluetooth) ++ target_link_libraries(supertuxkart ${WIIUSE_LIBRARIES}) + endif() + add_definitions(-DENABLE_WIIUSE) + +diff --git a/cmake/FindWiiUse.cmake b/cmake/FindWiiUse.cmake +new file mode 100644 +index 0000000..2657cbb +--- /dev/null ++++ b/cmake/FindWiiUse.cmake +@@ -0,0 +1,99 @@ ++# - try to find WiiUse library ++# ++# Cache Variables: (probably not for direct use in your scripts) ++# WIIUSE_INCLUDE_DIR ++# WIIUSE_LIBRARY ++# ++# Non-cache variables you might use in your CMakeLists.txt: ++# WIIUSE_FOUND ++# WIIUSE_INCLUDE_DIRS ++# WIIUSE_LIBRARIES ++# WIIUSE_RUNTIME_LIBRARIES - aka the dll for installing ++# WIIUSE_RUNTIME_LIBRARY_DIRS ++# ++# Requires these CMake modules: ++# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) ++# ++# Original Author: ++# 2009-2010 Ryan Pavlik ++# http://academic.cleardefinition.com ++# Iowa State University HCI Graduate Program/VRAC ++# ++# Copyright Iowa State University 2009-2010. ++# Distributed under the Boost Software License, Version 1.0. ++# (See accompanying file LICENSE_1_0.txt or copy at ++# http://www.boost.org/LICENSE_1_0.txt) ++ ++set(WIIUSE_ROOT_DIR ++ "${WIIUSE_ROOT_DIR}" ++ CACHE ++ PATH ++ "Directory to search for WiiUse") ++ ++if(CMAKE_SIZEOF_VOID_P MATCHES "8") ++ set(_LIBSUFFIXES /lib64 /lib) ++else() ++ set(_LIBSUFFIXES /lib) ++endif() ++ ++find_library(WIIUSE_LIBRARY ++ NAMES ++ wiiuse ++ PATHS ++ "${WIIUSE_ROOT_DIR}" ++ PATH_SUFFIXES ++ "${_LIBSUFFIXES}") ++ ++get_filename_component(_libdir "${WIIUSE_LIBRARY}" PATH) ++ ++find_path(WIIUSE_INCLUDE_DIR ++ NAMES ++ wiiuse.h ++ HINTS ++ "${_libdir}" ++ "${_libdir}/.." ++ PATHS ++ "${WIIUSE_ROOT_DIR}" ++ PATH_SUFFIXES ++ include/) ++ ++set(_deps_check) ++if(WIN32) ++ find_file(WIIUSE_RUNTIME_LIBRARY ++ NAMES ++ wiiuse.dll ++ HINTS ++ "${_libdir}" ++ "${_libdir}/.." ++ PATH_SUFFIXES ++ bin) ++ ++ set(WIIUSE_RUNTIME_LIBRARIES "${WIIUSE_RUNTIME_LIBRARY}") ++ get_filename_component(WIIUSE_RUNTIME_LIBRARY_DIRS ++ "${WIIUSE_RUNTIME_LIBRARY}" ++ PATH) ++ list(APPEND _deps_check WIIUSE_RUNTIME_LIBRARY) ++else() ++ set(WIIUSE_RUNTIME_LIBRARY "${WIIUSE_LIBRARY}") ++ set(WIIUSE_RUNTIME_LIBRARIES "${WIIUSE_RUNTIME_LIBRARY}") ++ get_filename_component(WIIUSE_RUNTIME_LIBRARY_DIRS ++ "${WIIUSE_LIBRARY}" ++ PATH) ++endif() ++ ++include(FindPackageHandleStandardArgs) ++find_package_handle_standard_args(WiiUse ++ DEFAULT_MSG ++ WIIUSE_LIBRARY ++ WIIUSE_INCLUDE_DIR ++ ${_deps_check}) ++ ++if(WIIUSE_FOUND) ++ set(WIIUSE_LIBRARIES "${WIIUSE_LIBRARY}") ++ set(WIIUSE_INCLUDE_DIRS "${WIIUSE_INCLUDE_DIR}") ++ mark_as_advanced(WIIUSE_ROOT_DIR) ++endif() ++ ++mark_as_advanced(WIIUSE_INCLUDE_DIR ++ WIIUSE_LIBRARY ++ WIIUSE_RUNTIME_LIBRARY) +-- +2.7.4 + diff --git a/0003-Unbundle-GLEW.patch b/0003-Unbundle-GLEW.patch new file mode 100644 index 0000000..4848af3 --- /dev/null +++ b/0003-Unbundle-GLEW.patch @@ -0,0 +1,37 @@ +From 586ba4f09d2028219e19e1ed475b7c91617d0574 Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Tue, 21 Jun 2016 10:18:12 +0200 +Subject: [PATCH 3/4] Unbundle GLEW + +Signed-off-by: Igor Gnatenko +--- + CMakeLists.txt | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 919f85a..b157779 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -69,8 +69,8 @@ include_directories(${ENet_INCLUDE_DIRS}) + + # Build glew library + add_definitions(-DGLEW_NO_GLU) +-add_subdirectory("${PROJECT_SOURCE_DIR}/lib/glew") +-include_directories("${PROJECT_SOURCE_DIR}/lib/glew/include") ++find_package(GLEW REQUIRED) ++include_directories(${GLEW_INCLUDE_DIRS}) + + if((WIN32 AND NOT MINGW) OR APPLE) + if (NOT APPLE) +@@ -341,7 +341,7 @@ target_link_libraries(supertuxkart + bulletcollision + bulletmath + ${ENet_LIBRARIES} +- glew ++ ${GLEW_LIBRARIES} + stkirrlicht + ${Angelscript_LIBRARIES} + ${CURL_LIBRARIES} +-- +2.7.4 + diff --git a/0003-Unbundle-WiiUse.patch b/0003-Unbundle-WiiUse.patch deleted file mode 100644 index dd90a9b..0000000 --- a/0003-Unbundle-WiiUse.patch +++ /dev/null @@ -1,146 +0,0 @@ -From c91d99a4d604659dbc7b2e06601731e7eebc2c2e Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Tue, 21 Jun 2016 10:13:16 +0200 -Subject: [PATCH 3/5] Unbundle WiiUse - -Signed-off-by: Igor Gnatenko ---- - CMakeLists.txt | 8 ++-- - cmake/FindWiiUse.cmake | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 102 insertions(+), 5 deletions(-) - create mode 100644 cmake/FindWiiUse.cmake - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 4e5089e..380de47 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -108,10 +108,8 @@ include_directories("${PROJECT_SOURCE_DIR}/lib/irrlicht/include") - # (at least on VS) irrlicht will find wiiuse io.h file because - # of the added include directory. - if(USE_WIIUSE) -- if(WIIUSE_BUILD) -- add_subdirectory("${PROJECT_SOURCE_DIR}/lib/wiiuse") -- endif() -- include_directories("${PROJECT_SOURCE_DIR}/lib/wiiuse") -+ find_package(WiiUse REQUIRED) -+ include_directories(${WIIUSE_INCLUDE_DIR}) - endif() - - # Set include paths -@@ -399,7 +397,7 @@ if(USE_WIIUSE) - target_link_libraries(supertuxkart ${PROJECT_SOURCE_DIR}/dependencies/lib/wiiuse.lib) - endif() - else() -- target_link_libraries(supertuxkart wiiuse bluetooth) -+ target_link_libraries(supertuxkart ${WIIUSE_LIBRARIES}) - endif() - add_definitions(-DENABLE_WIIUSE) - -diff --git a/cmake/FindWiiUse.cmake b/cmake/FindWiiUse.cmake -new file mode 100644 -index 0000000..2657cbb ---- /dev/null -+++ b/cmake/FindWiiUse.cmake -@@ -0,0 +1,99 @@ -+# - try to find WiiUse library -+# -+# Cache Variables: (probably not for direct use in your scripts) -+# WIIUSE_INCLUDE_DIR -+# WIIUSE_LIBRARY -+# -+# Non-cache variables you might use in your CMakeLists.txt: -+# WIIUSE_FOUND -+# WIIUSE_INCLUDE_DIRS -+# WIIUSE_LIBRARIES -+# WIIUSE_RUNTIME_LIBRARIES - aka the dll for installing -+# WIIUSE_RUNTIME_LIBRARY_DIRS -+# -+# Requires these CMake modules: -+# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) -+# -+# Original Author: -+# 2009-2010 Ryan Pavlik -+# http://academic.cleardefinition.com -+# Iowa State University HCI Graduate Program/VRAC -+# -+# Copyright Iowa State University 2009-2010. -+# Distributed under the Boost Software License, Version 1.0. -+# (See accompanying file LICENSE_1_0.txt or copy at -+# http://www.boost.org/LICENSE_1_0.txt) -+ -+set(WIIUSE_ROOT_DIR -+ "${WIIUSE_ROOT_DIR}" -+ CACHE -+ PATH -+ "Directory to search for WiiUse") -+ -+if(CMAKE_SIZEOF_VOID_P MATCHES "8") -+ set(_LIBSUFFIXES /lib64 /lib) -+else() -+ set(_LIBSUFFIXES /lib) -+endif() -+ -+find_library(WIIUSE_LIBRARY -+ NAMES -+ wiiuse -+ PATHS -+ "${WIIUSE_ROOT_DIR}" -+ PATH_SUFFIXES -+ "${_LIBSUFFIXES}") -+ -+get_filename_component(_libdir "${WIIUSE_LIBRARY}" PATH) -+ -+find_path(WIIUSE_INCLUDE_DIR -+ NAMES -+ wiiuse.h -+ HINTS -+ "${_libdir}" -+ "${_libdir}/.." -+ PATHS -+ "${WIIUSE_ROOT_DIR}" -+ PATH_SUFFIXES -+ include/) -+ -+set(_deps_check) -+if(WIN32) -+ find_file(WIIUSE_RUNTIME_LIBRARY -+ NAMES -+ wiiuse.dll -+ HINTS -+ "${_libdir}" -+ "${_libdir}/.." -+ PATH_SUFFIXES -+ bin) -+ -+ set(WIIUSE_RUNTIME_LIBRARIES "${WIIUSE_RUNTIME_LIBRARY}") -+ get_filename_component(WIIUSE_RUNTIME_LIBRARY_DIRS -+ "${WIIUSE_RUNTIME_LIBRARY}" -+ PATH) -+ list(APPEND _deps_check WIIUSE_RUNTIME_LIBRARY) -+else() -+ set(WIIUSE_RUNTIME_LIBRARY "${WIIUSE_LIBRARY}") -+ set(WIIUSE_RUNTIME_LIBRARIES "${WIIUSE_RUNTIME_LIBRARY}") -+ get_filename_component(WIIUSE_RUNTIME_LIBRARY_DIRS -+ "${WIIUSE_LIBRARY}" -+ PATH) -+endif() -+ -+include(FindPackageHandleStandardArgs) -+find_package_handle_standard_args(WiiUse -+ DEFAULT_MSG -+ WIIUSE_LIBRARY -+ WIIUSE_INCLUDE_DIR -+ ${_deps_check}) -+ -+if(WIIUSE_FOUND) -+ set(WIIUSE_LIBRARIES "${WIIUSE_LIBRARY}") -+ set(WIIUSE_INCLUDE_DIRS "${WIIUSE_INCLUDE_DIR}") -+ mark_as_advanced(WIIUSE_ROOT_DIR) -+endif() -+ -+mark_as_advanced(WIIUSE_INCLUDE_DIR -+ WIIUSE_LIBRARY -+ WIIUSE_RUNTIME_LIBRARY) --- -2.7.4 - diff --git a/0004-Unbundle-GLEW.patch b/0004-Unbundle-GLEW.patch deleted file mode 100644 index 6e05c21..0000000 --- a/0004-Unbundle-GLEW.patch +++ /dev/null @@ -1,37 +0,0 @@ -From c4bbeed88605feecfd6cb4d24dba06d1ede0bcc6 Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Tue, 21 Jun 2016 10:18:12 +0200 -Subject: [PATCH 4/5] Unbundle GLEW - -Signed-off-by: Igor Gnatenko ---- - CMakeLists.txt | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 380de47..df3ea38 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -69,8 +69,8 @@ include_directories(${ENet_INCLUDE_DIRS}) - - # Build glew library - add_definitions(-DGLEW_NO_GLU) --add_subdirectory("${PROJECT_SOURCE_DIR}/lib/glew") --include_directories("${PROJECT_SOURCE_DIR}/lib/glew/include") -+find_package(GLEW REQUIRED) -+include_directories(${GLEW_INCLUDE_DIRS}) - - if((WIN32 AND NOT MINGW) OR APPLE) - if (NOT APPLE) -@@ -341,7 +341,7 @@ target_link_libraries(supertuxkart - bulletcollision - bulletmath - ${ENet_LIBRARIES} -- glew -+ ${GLEW_LIBRARIES} - stkirrlicht - ${Angelscript_LIBRARIES} - ${CURL_LIBRARIES} --- -2.7.4 - diff --git a/0004-make-code-compatible-with-angelscript-2.31.0.patch b/0004-make-code-compatible-with-angelscript-2.31.0.patch new file mode 100644 index 0000000..78cac47 --- /dev/null +++ b/0004-make-code-compatible-with-angelscript-2.31.0.patch @@ -0,0 +1,325 @@ +From 58d1015a31e75e3ec255cbfcbacb1ec3ef88d8a7 Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Tue, 21 Jun 2016 11:48:13 +0200 +Subject: [PATCH 4/4] make code compatible with angelscript 2.31.0 + +Signed-off-by: Igor Gnatenko +--- + src/scriptengine/script_engine.cpp | 2 +- + src/scriptengine/scriptarray.cpp | 56 +++++++++++++++--------------- + src/scriptengine/scriptarray.hpp | 18 +++++----- + src/scriptengine/scriptstdstring_utils.cpp | 2 +- + 4 files changed, 39 insertions(+), 39 deletions(-) + +diff --git a/src/scriptengine/script_engine.cpp b/src/scriptengine/script_engine.cpp +index 7bd4e7b..3346469 100644 +--- a/src/scriptengine/script_engine.cpp ++++ b/src/scriptengine/script_engine.cpp +@@ -219,7 +219,7 @@ namespace Scripting + /* + void ScriptEngine::runMethod(asIScriptObject* obj, std::string methodName) + { +- asIObjectType* type = obj->GetObjectType(); ++ asITypeInfo* type = obj->GetObjectType(); + asIScriptFunction* method = type->GetMethodByName(methodName.c_str()); + if (method == NULL) + Log::error("Scripting", ("runMethod: object does not implement method " + methodName).c_str()); +diff --git a/src/scriptengine/scriptarray.cpp b/src/scriptengine/scriptarray.cpp +index 7689f2b..c394c36 100644 +--- a/src/scriptengine/scriptarray.cpp ++++ b/src/scriptengine/scriptarray.cpp +@@ -79,7 +79,7 @@ struct SArrayCache + // through 1999 for this purpose, so we should be fine. + const asPWORD ARRAY_CACHE = 1000; + +-static void CleanupObjectTypeArrayCache(asIObjectType *type) ++static void CleanupObjectTypeArrayCache(asITypeInfo *type) + { + SArrayCache *cache = reinterpret_cast(type->GetUserData(ARRAY_CACHE)); + if( cache ) +@@ -89,7 +89,7 @@ static void CleanupObjectTypeArrayCache(asIObjectType *type) + } + } + +-CScriptArray* CScriptArray::Create(asIObjectType *ot, asUINT length) ++CScriptArray* CScriptArray::Create(asITypeInfo *ot, asUINT length) + { + asIScriptContext *ctx = asGetActiveContext(); + +@@ -117,7 +117,7 @@ CScriptArray* CScriptArray::Create(asIObjectType *ot, asUINT length) + return a; + } + +-CScriptArray* CScriptArray::Create(asIObjectType *ot, void *initList) ++CScriptArray* CScriptArray::Create(asITypeInfo *ot, void *initList) + { + asIScriptContext *ctx = asGetActiveContext(); + +@@ -145,7 +145,7 @@ CScriptArray* CScriptArray::Create(asIObjectType *ot, void *initList) + return a; + } + +-CScriptArray* CScriptArray::Create(asIObjectType *ot, asUINT length, void *defVal) ++CScriptArray* CScriptArray::Create(asITypeInfo *ot, asUINT length, void *defVal) + { + asIScriptContext *ctx = asGetActiveContext(); + +@@ -173,7 +173,7 @@ CScriptArray* CScriptArray::Create(asIObjectType *ot, asUINT length, void *defVa + return a; + } + +-CScriptArray* CScriptArray::Create(asIObjectType *ot) ++CScriptArray* CScriptArray::Create(asITypeInfo *ot) + { + return CScriptArray::Create(ot, asUINT(0)); + } +@@ -183,7 +183,7 @@ CScriptArray* CScriptArray::Create(asIObjectType *ot) + // subtype at compile time, instead of at runtime. The output argument dontGarbageCollect + // allow the callback to tell the engine if the template instance type shouldn't be garbage collected, + // i.e. no asOBJ_GC flag. +-static bool ScriptArrayTemplateCallback(asIObjectType *ot, bool &dontGarbageCollect) ++static bool ScriptArrayTemplateCallback(asITypeInfo *ot, bool &dontGarbageCollect) + { + // Make sure the subtype can be instantiated with a default factory/constructor, + // otherwise we won't be able to instantiate the elements. +@@ -192,7 +192,7 @@ static bool ScriptArrayTemplateCallback(asIObjectType *ot, bool &dontGarbageColl + return false; + if( (typeId & asTYPEID_MASK_OBJECT) && !(typeId & asTYPEID_OBJHANDLE) ) + { +- asIObjectType *subtype = ot->GetEngine()->GetObjectTypeById(typeId); ++ asITypeInfo *subtype = ot->GetEngine()->GetTypeInfoById(typeId); + asDWORD flags = subtype->GetFlags(); + if( (flags & asOBJ_VALUE) && !(flags & asOBJ_POD) ) + { +@@ -266,7 +266,7 @@ static bool ScriptArrayTemplateCallback(asIObjectType *ot, bool &dontGarbageColl + // If it is possible to determine that the handle cannot refer to an object type + // that can potentially form a circular reference with the array then it is not + // necessary to make the array garbage collected. +- asIObjectType *subtype = ot->GetEngine()->GetObjectTypeById(typeId); ++ asITypeInfo *subtype = ot->GetEngine()->GetTypeInfoById(typeId); + asDWORD flags = subtype->GetFlags(); + if( !(flags & asOBJ_GC) ) + { +@@ -317,7 +317,7 @@ static void RegisterScriptArray_Native(asIScriptEngine *engine) + UNUSED_VAR(r); + + // Register the object type user data clean up +- engine->SetObjectTypeUserDataCleanupCallback(CleanupObjectTypeArrayCache, ARRAY_CACHE); ++ engine->SetTypeInfoUserDataCleanupCallback(CleanupObjectTypeArrayCache, ARRAY_CACHE); + + // Register the array type as a template + r = engine->RegisterObjectType("array", 0, asOBJ_REF | asOBJ_GC | asOBJ_TEMPLATE); assert( r >= 0 ); +@@ -326,12 +326,12 @@ static void RegisterScriptArray_Native(asIScriptEngine *engine) + r = engine->RegisterObjectBehaviour("array", asBEHAVE_TEMPLATE_CALLBACK, "bool f(int&in, bool&out)", asFUNCTION(ScriptArrayTemplateCallback), asCALL_CDECL); assert( r >= 0 ); + + // Templates receive the object type as the first parameter. To the script writer this is hidden +- r = engine->RegisterObjectBehaviour("array", asBEHAVE_FACTORY, "array@ f(int&in)", asFUNCTIONPR(CScriptArray::Create, (asIObjectType*), CScriptArray*), asCALL_CDECL); assert( r >= 0 ); +- r = engine->RegisterObjectBehaviour("array", asBEHAVE_FACTORY, "array@ f(int&in, uint)", asFUNCTIONPR(CScriptArray::Create, (asIObjectType*, asUINT), CScriptArray*), asCALL_CDECL); assert( r >= 0 ); +- r = engine->RegisterObjectBehaviour("array", asBEHAVE_FACTORY, "array@ f(int&in, uint, const T &in)", asFUNCTIONPR(CScriptArray::Create, (asIObjectType*, asUINT, void *), CScriptArray*), asCALL_CDECL); assert( r >= 0 ); ++ r = engine->RegisterObjectBehaviour("array", asBEHAVE_FACTORY, "array@ f(int&in)", asFUNCTIONPR(CScriptArray::Create, (asITypeInfo*), CScriptArray*), asCALL_CDECL); assert( r >= 0 ); ++ r = engine->RegisterObjectBehaviour("array", asBEHAVE_FACTORY, "array@ f(int&in, uint)", asFUNCTIONPR(CScriptArray::Create, (asITypeInfo*, asUINT), CScriptArray*), asCALL_CDECL); assert( r >= 0 ); ++ r = engine->RegisterObjectBehaviour("array", asBEHAVE_FACTORY, "array@ f(int&in, uint, const T &in)", asFUNCTIONPR(CScriptArray::Create, (asITypeInfo*, asUINT, void *), CScriptArray*), asCALL_CDECL); assert( r >= 0 ); + + // Register the factory that will be used for initialization lists +- r = engine->RegisterObjectBehaviour("array", asBEHAVE_LIST_FACTORY, "array@ f(int&in type, int&in list) {repeat T}", asFUNCTIONPR(CScriptArray::Create, (asIObjectType*, void*), CScriptArray*), asCALL_CDECL); assert( r >= 0 ); ++ r = engine->RegisterObjectBehaviour("array", asBEHAVE_LIST_FACTORY, "array@ f(int&in type, int&in list) {repeat T}", asFUNCTIONPR(CScriptArray::Create, (asITypeInfo*, void*), CScriptArray*), asCALL_CDECL); assert( r >= 0 ); + + // The memory management methods + r = engine->RegisterObjectBehaviour("array", asBEHAVE_ADDREF, "void f()", asMETHOD(CScriptArray,AddRef), asCALL_THISCALL); assert( r >= 0 ); +@@ -408,7 +408,7 @@ CScriptArray &CScriptArray::operator=(const CScriptArray &other) + return *this; + } + +-CScriptArray::CScriptArray(asIObjectType *ot, void *buf) ++CScriptArray::CScriptArray(asITypeInfo *ot, void *buf) + { + refCount = 1; + gcFlag = false; +@@ -498,7 +498,7 @@ CScriptArray::CScriptArray(asIObjectType *ot, void *buf) + objType->GetEngine()->NotifyGarbageCollectorOfNewObject(this, objType); + } + +-CScriptArray::CScriptArray(asUINT length, asIObjectType *ot) ++CScriptArray::CScriptArray(asUINT length, asITypeInfo *ot) + { + refCount = 1; + gcFlag = false; +@@ -549,7 +549,7 @@ CScriptArray::CScriptArray(const CScriptArray &other) + *this = other; + } + +-CScriptArray::CScriptArray(asUINT length, void *defVal, asIObjectType *ot) ++CScriptArray::CScriptArray(asUINT length, void *defVal, asITypeInfo *ot) + { + refCount = 1; + gcFlag = false; +@@ -779,7 +779,7 @@ bool CScriptArray::CheckMaxSize(asUINT numElements) + return true; + } + +-asIObjectType *CScriptArray::GetArrayObjectType() const ++asITypeInfo *CScriptArray::GetArrayObjectType() const + { + return objType; + } +@@ -899,7 +899,7 @@ void CScriptArray::Construct(SArrayBuffer *buf, asUINT start, asUINT end) + void **d = (void**)(buf->data + start * sizeof(void*)); + + asIScriptEngine *engine = objType->GetEngine(); +- asIObjectType *subType = objType->GetSubType(); ++ asITypeInfo *subType = objType->GetSubType(); + + for( ; d < max; d++ ) + { +@@ -1221,7 +1221,7 @@ int CScriptArray::Find(asUINT startAt, void *value) const + if( !cache || (cache->cmpFunc == 0 && cache->eqFunc == 0) ) + { + asIScriptContext *ctx = asGetActiveContext(); +- asIObjectType* subType = objType->GetEngine()->GetObjectTypeById(subTypeId); ++ asITypeInfo* subType = objType->GetEngine()->GetTypeInfoById(subTypeId); + + // Throw an exception + if( ctx ) +@@ -1369,7 +1369,7 @@ void CScriptArray::Sort(asUINT startAt, asUINT count, bool asc) + if( !cache || cache->cmpFunc == 0 ) + { + asIScriptContext *ctx = asGetActiveContext(); +- asIObjectType* subType = objType->GetEngine()->GetObjectTypeById(subTypeId); ++ asITypeInfo* subType = objType->GetEngine()->GetTypeInfoById(subTypeId); + + // Throw an exception + if( ctx ) +@@ -1512,7 +1512,7 @@ void CScriptArray::CopyBuffer(SArrayBuffer *dst, SArrayBuffer *src) + void **d = (void**)dst->data; + void **s = (void**)src->data; + +- asIObjectType *subType = objType->GetSubType(); ++ asITypeInfo *subType = objType->GetSubType(); + for( ; d < max; d++, s++ ) + engine->AssignScriptObject(*d, *s, subType); + } +@@ -1563,7 +1563,7 @@ void CScriptArray::Precache() + // If the sub type is a handle to const, then the methods must be const too + bool mustBeConst = (subTypeId & asTYPEID_HANDLETOCONST) ? true : false; + +- asIObjectType *subType = objType->GetEngine()->GetObjectTypeById(subTypeId); ++ asITypeInfo *subType = objType->GetEngine()->GetTypeInfoById(subTypeId); + if( subType ) + { + for( asUINT i = 0; i < subType->GetMethodCount(); i++ ) +@@ -1712,14 +1712,14 @@ bool CScriptArray::GetFlag() + + static void ScriptArrayFactory_Generic(asIScriptGeneric *gen) + { +- asIObjectType *ot = *(asIObjectType**)gen->GetAddressOfArg(0); ++ asITypeInfo *ot = *(asITypeInfo**)gen->GetAddressOfArg(0); + + *reinterpret_cast(gen->GetAddressOfReturnLocation()) = CScriptArray::Create(ot); + } + + static void ScriptArrayFactory2_Generic(asIScriptGeneric *gen) + { +- asIObjectType *ot = *(asIObjectType**)gen->GetAddressOfArg(0); ++ asITypeInfo *ot = *(asITypeInfo**)gen->GetAddressOfArg(0); + asUINT length = gen->GetArgDWord(1); + + *reinterpret_cast(gen->GetAddressOfReturnLocation()) = CScriptArray::Create(ot, length); +@@ -1727,7 +1727,7 @@ static void ScriptArrayFactory2_Generic(asIScriptGeneric *gen) + + static void ScriptArrayListFactory_Generic(asIScriptGeneric *gen) + { +- asIObjectType *ot = *(asIObjectType**)gen->GetAddressOfArg(0); ++ asITypeInfo *ot = *(asITypeInfo**)gen->GetAddressOfArg(0); + void *buf = gen->GetArgAddress(1); + + *reinterpret_cast(gen->GetAddressOfReturnLocation()) = CScriptArray::Create(ot, buf); +@@ -1735,7 +1735,7 @@ static void ScriptArrayListFactory_Generic(asIScriptGeneric *gen) + + static void ScriptArrayFactoryDefVal_Generic(asIScriptGeneric *gen) + { +- asIObjectType *ot = *(asIObjectType**)gen->GetAddressOfArg(0); ++ asITypeInfo *ot = *(asITypeInfo**)gen->GetAddressOfArg(0); + asUINT length = gen->GetArgDWord(1); + void *defVal = gen->GetArgAddress(2); + +@@ -1744,7 +1744,7 @@ static void ScriptArrayFactoryDefVal_Generic(asIScriptGeneric *gen) + + static void ScriptArrayTemplateCallback_Generic(asIScriptGeneric *gen) + { +- asIObjectType *ot = *(asIObjectType**)gen->GetAddressOfArg(0); ++ asITypeInfo *ot = *(asITypeInfo**)gen->GetAddressOfArg(0); + bool *dontGarbageCollect = *(bool**)gen->GetAddressOfArg(1); + *reinterpret_cast(gen->GetAddressOfReturnLocation()) = ScriptArrayTemplateCallback(ot, *dontGarbageCollect); + } +@@ -1941,7 +1941,7 @@ static void RegisterScriptArray_Generic(asIScriptEngine *engine) + int r = 0; + UNUSED_VAR(r); + +- engine->SetObjectTypeUserDataCleanupCallback(CleanupObjectTypeArrayCache, ARRAY_CACHE); ++ engine->SetTypeInfoUserDataCleanupCallback(CleanupObjectTypeArrayCache, ARRAY_CACHE); + + r = engine->RegisterObjectType("array", 0, asOBJ_REF | asOBJ_GC | asOBJ_TEMPLATE); assert( r >= 0 ); + r = engine->RegisterObjectBehaviour("array", asBEHAVE_TEMPLATE_CALLBACK, "bool f(int&in, bool&out)", asFUNCTION(ScriptArrayTemplateCallback_Generic), asCALL_GENERIC); assert( r >= 0 ); +diff --git a/src/scriptengine/scriptarray.hpp b/src/scriptengine/scriptarray.hpp +index a1c0a0a..f65724c 100644 +--- a/src/scriptengine/scriptarray.hpp ++++ b/src/scriptengine/scriptarray.hpp +@@ -29,17 +29,17 @@ public: + static void SetMemoryFunctions(asALLOCFUNC_t allocFunc, asFREEFUNC_t freeFunc); + + // Factory functions +- static CScriptArray *Create(asIObjectType *ot); +- static CScriptArray *Create(asIObjectType *ot, asUINT length); +- static CScriptArray *Create(asIObjectType *ot, asUINT length, void *defaultValue); +- static CScriptArray *Create(asIObjectType *ot, void *listBuffer); ++ static CScriptArray *Create(asITypeInfo *ot); ++ static CScriptArray *Create(asITypeInfo *ot, asUINT length); ++ static CScriptArray *Create(asITypeInfo *ot, asUINT length, void *defaultValue); ++ static CScriptArray *Create(asITypeInfo *ot, void *listBuffer); + + // Memory management + void AddRef() const; + void Release() const; + + // Type information +- asIObjectType *GetArrayObjectType() const; ++ asITypeInfo *GetArrayObjectType() const; + int GetArrayTypeId() const; + int GetElementTypeId() const; + +@@ -97,15 +97,15 @@ public: + protected: + mutable int refCount; + mutable bool gcFlag; +- asIObjectType *objType; ++ asITypeInfo *objType; + SArrayBuffer *buffer; + int elementSize; + int subTypeId; + + // Constructors +- CScriptArray(asIObjectType *ot, void *initBuf); // Called from script when initialized with list +- CScriptArray(asUINT length, asIObjectType *ot); +- CScriptArray(asUINT length, void *defVal, asIObjectType *ot); ++ CScriptArray(asITypeInfo *ot, void *initBuf); // Called from script when initialized with list ++ CScriptArray(asUINT length, asITypeInfo *ot); ++ CScriptArray(asUINT length, void *defVal, asITypeInfo *ot); + CScriptArray(const CScriptArray &other); + virtual ~CScriptArray(); + +diff --git a/src/scriptengine/scriptstdstring_utils.cpp b/src/scriptengine/scriptstdstring_utils.cpp +index d46fea7..3abd028 100644 +--- a/src/scriptengine/scriptstdstring_utils.cpp ++++ b/src/scriptengine/scriptstdstring_utils.cpp +@@ -28,7 +28,7 @@ static CScriptArray *StringSplit(const string &delim, const string &str) + + // TODO: This should only be done once + // TODO: This assumes that CScriptArray was already registered +- asIObjectType *arrayType = engine->GetObjectTypeByDecl("array"); ++ asITypeInfo *arrayType = engine->GetTypeInfoByDecl("array"); + + // Create the array object + CScriptArray *array = CScriptArray::Create(arrayType); +-- +2.7.4 + diff --git a/0005-make-code-compatible-with-angelscript-2.31.0.patch b/0005-make-code-compatible-with-angelscript-2.31.0.patch deleted file mode 100644 index d111317..0000000 --- a/0005-make-code-compatible-with-angelscript-2.31.0.patch +++ /dev/null @@ -1,325 +0,0 @@ -From 29063e82701d7834140a4e3bfbdd39fddb2ed970 Mon Sep 17 00:00:00 2001 -From: Igor Gnatenko -Date: Tue, 21 Jun 2016 11:48:13 +0200 -Subject: [PATCH 5/5] make code compatible with angelscript 2.31.0 - -Signed-off-by: Igor Gnatenko ---- - src/scriptengine/script_engine.cpp | 2 +- - src/scriptengine/scriptarray.cpp | 56 +++++++++++++++--------------- - src/scriptengine/scriptarray.hpp | 18 +++++----- - src/scriptengine/scriptstdstring_utils.cpp | 2 +- - 4 files changed, 39 insertions(+), 39 deletions(-) - -diff --git a/src/scriptengine/script_engine.cpp b/src/scriptengine/script_engine.cpp -index 7bd4e7b..3346469 100644 ---- a/src/scriptengine/script_engine.cpp -+++ b/src/scriptengine/script_engine.cpp -@@ -219,7 +219,7 @@ namespace Scripting - /* - void ScriptEngine::runMethod(asIScriptObject* obj, std::string methodName) - { -- asIObjectType* type = obj->GetObjectType(); -+ asITypeInfo* type = obj->GetObjectType(); - asIScriptFunction* method = type->GetMethodByName(methodName.c_str()); - if (method == NULL) - Log::error("Scripting", ("runMethod: object does not implement method " + methodName).c_str()); -diff --git a/src/scriptengine/scriptarray.cpp b/src/scriptengine/scriptarray.cpp -index 7689f2b..c394c36 100644 ---- a/src/scriptengine/scriptarray.cpp -+++ b/src/scriptengine/scriptarray.cpp -@@ -79,7 +79,7 @@ struct SArrayCache - // through 1999 for this purpose, so we should be fine. - const asPWORD ARRAY_CACHE = 1000; - --static void CleanupObjectTypeArrayCache(asIObjectType *type) -+static void CleanupObjectTypeArrayCache(asITypeInfo *type) - { - SArrayCache *cache = reinterpret_cast(type->GetUserData(ARRAY_CACHE)); - if( cache ) -@@ -89,7 +89,7 @@ static void CleanupObjectTypeArrayCache(asIObjectType *type) - } - } - --CScriptArray* CScriptArray::Create(asIObjectType *ot, asUINT length) -+CScriptArray* CScriptArray::Create(asITypeInfo *ot, asUINT length) - { - asIScriptContext *ctx = asGetActiveContext(); - -@@ -117,7 +117,7 @@ CScriptArray* CScriptArray::Create(asIObjectType *ot, asUINT length) - return a; - } - --CScriptArray* CScriptArray::Create(asIObjectType *ot, void *initList) -+CScriptArray* CScriptArray::Create(asITypeInfo *ot, void *initList) - { - asIScriptContext *ctx = asGetActiveContext(); - -@@ -145,7 +145,7 @@ CScriptArray* CScriptArray::Create(asIObjectType *ot, void *initList) - return a; - } - --CScriptArray* CScriptArray::Create(asIObjectType *ot, asUINT length, void *defVal) -+CScriptArray* CScriptArray::Create(asITypeInfo *ot, asUINT length, void *defVal) - { - asIScriptContext *ctx = asGetActiveContext(); - -@@ -173,7 +173,7 @@ CScriptArray* CScriptArray::Create(asIObjectType *ot, asUINT length, void *defVa - return a; - } - --CScriptArray* CScriptArray::Create(asIObjectType *ot) -+CScriptArray* CScriptArray::Create(asITypeInfo *ot) - { - return CScriptArray::Create(ot, asUINT(0)); - } -@@ -183,7 +183,7 @@ CScriptArray* CScriptArray::Create(asIObjectType *ot) - // subtype at compile time, instead of at runtime. The output argument dontGarbageCollect - // allow the callback to tell the engine if the template instance type shouldn't be garbage collected, - // i.e. no asOBJ_GC flag. --static bool ScriptArrayTemplateCallback(asIObjectType *ot, bool &dontGarbageCollect) -+static bool ScriptArrayTemplateCallback(asITypeInfo *ot, bool &dontGarbageCollect) - { - // Make sure the subtype can be instantiated with a default factory/constructor, - // otherwise we won't be able to instantiate the elements. -@@ -192,7 +192,7 @@ static bool ScriptArrayTemplateCallback(asIObjectType *ot, bool &dontGarbageColl - return false; - if( (typeId & asTYPEID_MASK_OBJECT) && !(typeId & asTYPEID_OBJHANDLE) ) - { -- asIObjectType *subtype = ot->GetEngine()->GetObjectTypeById(typeId); -+ asITypeInfo *subtype = ot->GetEngine()->GetTypeInfoById(typeId); - asDWORD flags = subtype->GetFlags(); - if( (flags & asOBJ_VALUE) && !(flags & asOBJ_POD) ) - { -@@ -266,7 +266,7 @@ static bool ScriptArrayTemplateCallback(asIObjectType *ot, bool &dontGarbageColl - // If it is possible to determine that the handle cannot refer to an object type - // that can potentially form a circular reference with the array then it is not - // necessary to make the array garbage collected. -- asIObjectType *subtype = ot->GetEngine()->GetObjectTypeById(typeId); -+ asITypeInfo *subtype = ot->GetEngine()->GetTypeInfoById(typeId); - asDWORD flags = subtype->GetFlags(); - if( !(flags & asOBJ_GC) ) - { -@@ -317,7 +317,7 @@ static void RegisterScriptArray_Native(asIScriptEngine *engine) - UNUSED_VAR(r); - - // Register the object type user data clean up -- engine->SetObjectTypeUserDataCleanupCallback(CleanupObjectTypeArrayCache, ARRAY_CACHE); -+ engine->SetTypeInfoUserDataCleanupCallback(CleanupObjectTypeArrayCache, ARRAY_CACHE); - - // Register the array type as a template - r = engine->RegisterObjectType("array", 0, asOBJ_REF | asOBJ_GC | asOBJ_TEMPLATE); assert( r >= 0 ); -@@ -326,12 +326,12 @@ static void RegisterScriptArray_Native(asIScriptEngine *engine) - r = engine->RegisterObjectBehaviour("array", asBEHAVE_TEMPLATE_CALLBACK, "bool f(int&in, bool&out)", asFUNCTION(ScriptArrayTemplateCallback), asCALL_CDECL); assert( r >= 0 ); - - // Templates receive the object type as the first parameter. To the script writer this is hidden -- r = engine->RegisterObjectBehaviour("array", asBEHAVE_FACTORY, "array@ f(int&in)", asFUNCTIONPR(CScriptArray::Create, (asIObjectType*), CScriptArray*), asCALL_CDECL); assert( r >= 0 ); -- r = engine->RegisterObjectBehaviour("array", asBEHAVE_FACTORY, "array@ f(int&in, uint)", asFUNCTIONPR(CScriptArray::Create, (asIObjectType*, asUINT), CScriptArray*), asCALL_CDECL); assert( r >= 0 ); -- r = engine->RegisterObjectBehaviour("array", asBEHAVE_FACTORY, "array@ f(int&in, uint, const T &in)", asFUNCTIONPR(CScriptArray::Create, (asIObjectType*, asUINT, void *), CScriptArray*), asCALL_CDECL); assert( r >= 0 ); -+ r = engine->RegisterObjectBehaviour("array", asBEHAVE_FACTORY, "array@ f(int&in)", asFUNCTIONPR(CScriptArray::Create, (asITypeInfo*), CScriptArray*), asCALL_CDECL); assert( r >= 0 ); -+ r = engine->RegisterObjectBehaviour("array", asBEHAVE_FACTORY, "array@ f(int&in, uint)", asFUNCTIONPR(CScriptArray::Create, (asITypeInfo*, asUINT), CScriptArray*), asCALL_CDECL); assert( r >= 0 ); -+ r = engine->RegisterObjectBehaviour("array", asBEHAVE_FACTORY, "array@ f(int&in, uint, const T &in)", asFUNCTIONPR(CScriptArray::Create, (asITypeInfo*, asUINT, void *), CScriptArray*), asCALL_CDECL); assert( r >= 0 ); - - // Register the factory that will be used for initialization lists -- r = engine->RegisterObjectBehaviour("array", asBEHAVE_LIST_FACTORY, "array@ f(int&in type, int&in list) {repeat T}", asFUNCTIONPR(CScriptArray::Create, (asIObjectType*, void*), CScriptArray*), asCALL_CDECL); assert( r >= 0 ); -+ r = engine->RegisterObjectBehaviour("array", asBEHAVE_LIST_FACTORY, "array@ f(int&in type, int&in list) {repeat T}", asFUNCTIONPR(CScriptArray::Create, (asITypeInfo*, void*), CScriptArray*), asCALL_CDECL); assert( r >= 0 ); - - // The memory management methods - r = engine->RegisterObjectBehaviour("array", asBEHAVE_ADDREF, "void f()", asMETHOD(CScriptArray,AddRef), asCALL_THISCALL); assert( r >= 0 ); -@@ -408,7 +408,7 @@ CScriptArray &CScriptArray::operator=(const CScriptArray &other) - return *this; - } - --CScriptArray::CScriptArray(asIObjectType *ot, void *buf) -+CScriptArray::CScriptArray(asITypeInfo *ot, void *buf) - { - refCount = 1; - gcFlag = false; -@@ -498,7 +498,7 @@ CScriptArray::CScriptArray(asIObjectType *ot, void *buf) - objType->GetEngine()->NotifyGarbageCollectorOfNewObject(this, objType); - } - --CScriptArray::CScriptArray(asUINT length, asIObjectType *ot) -+CScriptArray::CScriptArray(asUINT length, asITypeInfo *ot) - { - refCount = 1; - gcFlag = false; -@@ -549,7 +549,7 @@ CScriptArray::CScriptArray(const CScriptArray &other) - *this = other; - } - --CScriptArray::CScriptArray(asUINT length, void *defVal, asIObjectType *ot) -+CScriptArray::CScriptArray(asUINT length, void *defVal, asITypeInfo *ot) - { - refCount = 1; - gcFlag = false; -@@ -779,7 +779,7 @@ bool CScriptArray::CheckMaxSize(asUINT numElements) - return true; - } - --asIObjectType *CScriptArray::GetArrayObjectType() const -+asITypeInfo *CScriptArray::GetArrayObjectType() const - { - return objType; - } -@@ -899,7 +899,7 @@ void CScriptArray::Construct(SArrayBuffer *buf, asUINT start, asUINT end) - void **d = (void**)(buf->data + start * sizeof(void*)); - - asIScriptEngine *engine = objType->GetEngine(); -- asIObjectType *subType = objType->GetSubType(); -+ asITypeInfo *subType = objType->GetSubType(); - - for( ; d < max; d++ ) - { -@@ -1221,7 +1221,7 @@ int CScriptArray::Find(asUINT startAt, void *value) const - if( !cache || (cache->cmpFunc == 0 && cache->eqFunc == 0) ) - { - asIScriptContext *ctx = asGetActiveContext(); -- asIObjectType* subType = objType->GetEngine()->GetObjectTypeById(subTypeId); -+ asITypeInfo* subType = objType->GetEngine()->GetTypeInfoById(subTypeId); - - // Throw an exception - if( ctx ) -@@ -1369,7 +1369,7 @@ void CScriptArray::Sort(asUINT startAt, asUINT count, bool asc) - if( !cache || cache->cmpFunc == 0 ) - { - asIScriptContext *ctx = asGetActiveContext(); -- asIObjectType* subType = objType->GetEngine()->GetObjectTypeById(subTypeId); -+ asITypeInfo* subType = objType->GetEngine()->GetTypeInfoById(subTypeId); - - // Throw an exception - if( ctx ) -@@ -1512,7 +1512,7 @@ void CScriptArray::CopyBuffer(SArrayBuffer *dst, SArrayBuffer *src) - void **d = (void**)dst->data; - void **s = (void**)src->data; - -- asIObjectType *subType = objType->GetSubType(); -+ asITypeInfo *subType = objType->GetSubType(); - for( ; d < max; d++, s++ ) - engine->AssignScriptObject(*d, *s, subType); - } -@@ -1563,7 +1563,7 @@ void CScriptArray::Precache() - // If the sub type is a handle to const, then the methods must be const too - bool mustBeConst = (subTypeId & asTYPEID_HANDLETOCONST) ? true : false; - -- asIObjectType *subType = objType->GetEngine()->GetObjectTypeById(subTypeId); -+ asITypeInfo *subType = objType->GetEngine()->GetTypeInfoById(subTypeId); - if( subType ) - { - for( asUINT i = 0; i < subType->GetMethodCount(); i++ ) -@@ -1712,14 +1712,14 @@ bool CScriptArray::GetFlag() - - static void ScriptArrayFactory_Generic(asIScriptGeneric *gen) - { -- asIObjectType *ot = *(asIObjectType**)gen->GetAddressOfArg(0); -+ asITypeInfo *ot = *(asITypeInfo**)gen->GetAddressOfArg(0); - - *reinterpret_cast(gen->GetAddressOfReturnLocation()) = CScriptArray::Create(ot); - } - - static void ScriptArrayFactory2_Generic(asIScriptGeneric *gen) - { -- asIObjectType *ot = *(asIObjectType**)gen->GetAddressOfArg(0); -+ asITypeInfo *ot = *(asITypeInfo**)gen->GetAddressOfArg(0); - asUINT length = gen->GetArgDWord(1); - - *reinterpret_cast(gen->GetAddressOfReturnLocation()) = CScriptArray::Create(ot, length); -@@ -1727,7 +1727,7 @@ static void ScriptArrayFactory2_Generic(asIScriptGeneric *gen) - - static void ScriptArrayListFactory_Generic(asIScriptGeneric *gen) - { -- asIObjectType *ot = *(asIObjectType**)gen->GetAddressOfArg(0); -+ asITypeInfo *ot = *(asITypeInfo**)gen->GetAddressOfArg(0); - void *buf = gen->GetArgAddress(1); - - *reinterpret_cast(gen->GetAddressOfReturnLocation()) = CScriptArray::Create(ot, buf); -@@ -1735,7 +1735,7 @@ static void ScriptArrayListFactory_Generic(asIScriptGeneric *gen) - - static void ScriptArrayFactoryDefVal_Generic(asIScriptGeneric *gen) - { -- asIObjectType *ot = *(asIObjectType**)gen->GetAddressOfArg(0); -+ asITypeInfo *ot = *(asITypeInfo**)gen->GetAddressOfArg(0); - asUINT length = gen->GetArgDWord(1); - void *defVal = gen->GetArgAddress(2); - -@@ -1744,7 +1744,7 @@ static void ScriptArrayFactoryDefVal_Generic(asIScriptGeneric *gen) - - static void ScriptArrayTemplateCallback_Generic(asIScriptGeneric *gen) - { -- asIObjectType *ot = *(asIObjectType**)gen->GetAddressOfArg(0); -+ asITypeInfo *ot = *(asITypeInfo**)gen->GetAddressOfArg(0); - bool *dontGarbageCollect = *(bool**)gen->GetAddressOfArg(1); - *reinterpret_cast(gen->GetAddressOfReturnLocation()) = ScriptArrayTemplateCallback(ot, *dontGarbageCollect); - } -@@ -1941,7 +1941,7 @@ static void RegisterScriptArray_Generic(asIScriptEngine *engine) - int r = 0; - UNUSED_VAR(r); - -- engine->SetObjectTypeUserDataCleanupCallback(CleanupObjectTypeArrayCache, ARRAY_CACHE); -+ engine->SetTypeInfoUserDataCleanupCallback(CleanupObjectTypeArrayCache, ARRAY_CACHE); - - r = engine->RegisterObjectType("array", 0, asOBJ_REF | asOBJ_GC | asOBJ_TEMPLATE); assert( r >= 0 ); - r = engine->RegisterObjectBehaviour("array", asBEHAVE_TEMPLATE_CALLBACK, "bool f(int&in, bool&out)", asFUNCTION(ScriptArrayTemplateCallback_Generic), asCALL_GENERIC); assert( r >= 0 ); -diff --git a/src/scriptengine/scriptarray.hpp b/src/scriptengine/scriptarray.hpp -index a1c0a0a..f65724c 100644 ---- a/src/scriptengine/scriptarray.hpp -+++ b/src/scriptengine/scriptarray.hpp -@@ -29,17 +29,17 @@ public: - static void SetMemoryFunctions(asALLOCFUNC_t allocFunc, asFREEFUNC_t freeFunc); - - // Factory functions -- static CScriptArray *Create(asIObjectType *ot); -- static CScriptArray *Create(asIObjectType *ot, asUINT length); -- static CScriptArray *Create(asIObjectType *ot, asUINT length, void *defaultValue); -- static CScriptArray *Create(asIObjectType *ot, void *listBuffer); -+ static CScriptArray *Create(asITypeInfo *ot); -+ static CScriptArray *Create(asITypeInfo *ot, asUINT length); -+ static CScriptArray *Create(asITypeInfo *ot, asUINT length, void *defaultValue); -+ static CScriptArray *Create(asITypeInfo *ot, void *listBuffer); - - // Memory management - void AddRef() const; - void Release() const; - - // Type information -- asIObjectType *GetArrayObjectType() const; -+ asITypeInfo *GetArrayObjectType() const; - int GetArrayTypeId() const; - int GetElementTypeId() const; - -@@ -97,15 +97,15 @@ public: - protected: - mutable int refCount; - mutable bool gcFlag; -- asIObjectType *objType; -+ asITypeInfo *objType; - SArrayBuffer *buffer; - int elementSize; - int subTypeId; - - // Constructors -- CScriptArray(asIObjectType *ot, void *initBuf); // Called from script when initialized with list -- CScriptArray(asUINT length, asIObjectType *ot); -- CScriptArray(asUINT length, void *defVal, asIObjectType *ot); -+ CScriptArray(asITypeInfo *ot, void *initBuf); // Called from script when initialized with list -+ CScriptArray(asUINT length, asITypeInfo *ot); -+ CScriptArray(asUINT length, void *defVal, asITypeInfo *ot); - CScriptArray(const CScriptArray &other); - virtual ~CScriptArray(); - -diff --git a/src/scriptengine/scriptstdstring_utils.cpp b/src/scriptengine/scriptstdstring_utils.cpp -index d46fea7..3abd028 100644 ---- a/src/scriptengine/scriptstdstring_utils.cpp -+++ b/src/scriptengine/scriptstdstring_utils.cpp -@@ -28,7 +28,7 @@ static CScriptArray *StringSplit(const string &delim, const string &str) - - // TODO: This should only be done once - // TODO: This assumes that CScriptArray was already registered -- asIObjectType *arrayType = engine->GetObjectTypeByDecl("array"); -+ asITypeInfo *arrayType = engine->GetTypeInfoByDecl("array"); - - // Create the array object - CScriptArray *array = CScriptArray::Create(arrayType); --- -2.7.4 - diff --git a/sources b/sources index f3d41ff..c733f25 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2c537214e33b9a69a5a16b9be3c3f4a7 supertuxkart-0.9.2-rc1-src.tar.xz +f1f5081fd41b8eeb310b4edc07b9ee12 supertuxkart-0.9.2-src.tar.xz diff --git a/supertuxkart-0.7.3-desktop.patch b/supertuxkart-0.7.3-desktop.patch deleted file mode 100644 index a567a3a..0000000 --- a/supertuxkart-0.7.3-desktop.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up SuperTuxKart-0.8/data/supertuxkart_desktop.template~ SuperTuxKart-0.8/data/supertuxkart_desktop.template ---- SuperTuxKart-0.8/data/supertuxkart_desktop.template~ 2012-03-06 01:18:51.000000000 +0100 -+++ SuperTuxKart-0.8/data/supertuxkart_desktop.template 2013-08-04 16:32:08.266203622 +0200 -@@ -1,15 +1,13 @@ - [Desktop Entry] --Encoding=UTF-8 - Name=SuperTuxKart --Icon=@PREFIX@/share/pixmaps/supertuxkart_64.xpm -+Icon=supertuxkart - GenericName=A kart racing game - GenericName[de_DE]=Ein Kart-Rennspiel - GenericName[fr_FR]=Un jeu de karting - GenericName[gl]=Xogo de carreiras con karts - GenericName[ro_RO]=Un joc de curse cu carturi --Exec=@PREFIX@/games/supertuxkart --log=file -+Exec=supertuxkart-wrapper --log=file - Terminal=false - StartupNotify=false - Type=Application --TryExec=@PREFIX@/games/supertuxkart --Categories=Game;ArcadeGame; -+Categories=Game;ActionGame;ArcadeGame; diff --git a/supertuxkart.spec b/supertuxkart.spec index 7017b6e..7de2456 100644 --- a/supertuxkart.spec +++ b/supertuxkart.spec @@ -1,26 +1,23 @@ -%global rctag rc1 +#global rctag rc1 %global __global_ldflags %(echo "%{__global_ldflags} -lX11") Name: supertuxkart Version: 0.9.2 -Release: 0.3%{?rctag:.%{rctag}}%{?dist} +Release: 1%{?rctag:.%{rctag}}%{?dist} Summary: Kids 3D go-kart racing game featuring Tux -Group: Amusements/Games License: GPLv2+ and GPLv3 and CC-BY-SA URL: http://supertuxkart.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}%{?rctag:-%{rctag}}-src.tar.xz Source1: %{name}.6 Source2: supertuxkart-0.7.3-license-clarification.txt -# https://github.com/supertuxkart/stk-code/commit/0a042c25a08a2fbf6b8f7eec79a702fa8dc5aae2 -Patch0001: 0001-Fix-double-slash-in-include.patch # Fedora-specific patches. No bundled libraries. Never. -Patch0002: 0002-Unbundle-ENet.patch -Patch0003: 0003-Unbundle-WiiUse.patch -Patch0004: 0004-Unbundle-GLEW.patch +Patch0001: 0001-Unbundle-ENet.patch +Patch0002: 0002-Unbundle-WiiUse.patch +Patch0003: 0003-Unbundle-GLEW.patch # https://github.com/supertuxkart/stk-code/pull/2525 -Patch0005: 0005-make-code-compatible-with-angelscript-2.31.0.patch +Patch0004: 0004-make-code-compatible-with-angelscript-2.31.0.patch BuildRequires: cmake BuildRequires: freetype-devel @@ -109,6 +106,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*%{name}.desktop %{_datadir}/%{name} %changelog +* Fri Jul 01 2016 Igor Gnatenko - 0.9.2-1 +- Update to 0.9.2 + * Mon Jun 27 2016 Igor Gnatenko - 0.9.2-0.3.rc1 - Rebuild for new angelscript