This is an automated email from the git hooks/post-receive script. tobi pushed a commit to branch master in repository rbdoom3bfg.
commit 3d8c23a92dda56a3e1d700c42bc838f83648425a Author: Tobias Frost <[email protected]> Date: Tue Oct 11 07:56:37 2016 +0200 New patch 90-system-rapidjson.patch to utilize Debian's rapidjson --- debian/changelog | 1 + debian/control | 1 + debian/patches/90-system-rapidjson.patch | 152 +++++++++++++++++++++++++++++++ debian/patches/series | 1 + debian/rules | 1 + 5 files changed, 156 insertions(+) diff --git a/debian/changelog b/debian/changelog index fc99ee4..5244299 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ rbdoom3bfg (1.1.0~preview3+repack1+git20160807-1) UNRELEASED; urgency=medium - 20-reproducible.patch updated to remove one additional __DATE__. - Add new files to d/copyright, licensed expat. * Fix typo in d/README.source -- the var is UPSVER not USVER. + * New patch 90-system-rapidjson.patch to utilize Debian's rapidjson -- Tobias Frost <[email protected]> Sun, 09 Oct 2016 16:14:19 +0200 diff --git a/debian/control b/debian/control index b62bed0..cb35a85 100644 --- a/debian/control +++ b/debian/control @@ -14,6 +14,7 @@ Build-Depends: cmake, libpng-dev, libsdl2-dev, libswscale-dev | libswscale-ffmpeg-dev, + rapidjson-dev, zlib1g-dev Standards-Version: 3.9.6 Homepage: https://github.com/RobertBeckebans/RBDOOM-3-BFG diff --git a/debian/patches/90-system-rapidjson.patch b/debian/patches/90-system-rapidjson.patch new file mode 100644 index 0000000..8706236 --- /dev/null +++ b/debian/patches/90-system-rapidjson.patch @@ -0,0 +1,152 @@ +Description: Patch to be able to use Debian's rapidjson + This patch adds the CMake-snippet and the necessary changes to be able to + compile with the pacakged rapidjson. +Author: Tobias Frost <[email protected]> +Forwarded: https://github.com/RobertBeckebans/RBDOOM-3-BFG/pull/351 +Last-Update: 2016-10-11 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/neo/CMakeLists.txt ++++ b/neo/CMakeLists.txt +@@ -41,6 +41,9 @@ + + option(USE_SYSTEM_LIBGLEW + "Use the system libglew instead of the bundled one" OFF) ++ ++option(USE_SYSTEM_RAPIDJSON ++ "Use the system rapidjson instead of the bundled one" OFF) + + set(CPU_TYPE "" CACHE STRING "When set, passes this string as CPU-ID which will be embedded into the binary.") + +@@ -273,6 +276,17 @@ + add_definitions(-DGLEW_STATIC) + endif (GLEW_FOUND) + ++if(USE_SYSTEM_RAPIDJSON) ++find_package(rapidjson REQUIRED) ++endif(USE_SYSTEM_RAPIDJSON) ++ ++if (RAPIDJSON_FOUND) ++ include_directories("${RAPIDJSON_INCLUDE_DIRS}") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${RAPIDJSON_CXX_FLAGS}") ++else (RAPIDJSON_FOUND) ++ include_directories("libs/rapidjson/include") ++endif (RAPIDJSON_FOUND) ++ + add_subdirectory(idlib) + + file(GLOB AAS_INCLUDES aas/*.h) +--- /dev/null ++++ b/neo/cmake/Findrapidjson.cmake +@@ -0,0 +1,97 @@ ++# Copyright (c) 2011 Milo Yip ([email protected]) ++# Copyright (c) 2013 Rafal Jeczalik ([email protected]) ++# Distributed under the MIT License (see license.txt file) ++ ++# ----------------------------------------------------------------------------------- ++# ++# Finds the rapidjson library ++# ++# ----------------------------------------------------------------------------------- ++# ++# Variables used by this module, they can change the default behaviour. ++# Those variables need to be either set before calling find_package ++# or exported as environment variables before running CMake: ++# ++# RAPIDJSON_INCLUDEDIR - Set custom include path, useful when rapidjson headers are ++# outside system paths ++# RAPIDJSON_USE_SSE2 - Configure rapidjson to take advantage of SSE2 capabilities ++# RAPIDJSON_USE_SSE42 - Configure rapidjson to take advantage of SSE4.2 capabilities ++# ++# ----------------------------------------------------------------------------------- ++# ++# Variables defined by this module: ++# ++# RAPIDJSON_FOUND - True if rapidjson was found ++# RAPIDJSON_INCLUDE_DIRS - Path to rapidjson include directory ++# RAPIDJSON_CXX_FLAGS - Extra C++ flags required for compilation with rapidjson ++# ++# ----------------------------------------------------------------------------------- ++# ++# Example usage: ++# ++# set(RAPIDJSON_USE_SSE2 ON) ++# set(RAPIDJSON_INCLUDEDIR "/opt/github.com/rjeczalik/rapidjson/include") ++# ++# find_package(rapidjson REQUIRED) ++# ++# include_directories("${RAPIDJSON_INCLUDE_DIRS}") ++# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${RAPIDJSON_CXX_FLAGS}") ++# add_executable(foo foo.cc) ++# ++# ----------------------------------------------------------------------------------- ++ ++foreach(opt RAPIDJSON_INCLUDEDIR RAPIDJSON_USE_SSE2 RAPIDJSON_USE_SSE42) ++ if(${opt} AND DEFINED ENV{${opt}} AND NOT ${opt} STREQUAL "$ENV{${opt}}") ++ message(WARNING "Conflicting ${opt} values: ignoring environment variable and using CMake cache entry.") ++ elseif(DEFINED ENV{${opt}} AND NOT ${opt}) ++ set(${opt} "$ENV{${opt}}") ++ endif() ++endforeach() ++ ++find_path( ++ RAPIDJSON_INCLUDE_DIRS ++ NAMES rapidjson/rapidjson.h ++ PATHS ${RAPIDJSON_INCLUDEDIR} ++ DOC "Include directory for the rapidjson library." ++) ++ ++mark_as_advanced(RAPIDJSON_INCLUDE_DIRS) ++ ++if(RAPIDJSON_INCLUDE_DIRS) ++ set(RAPIDJSON_FOUND TRUE) ++endif() ++ ++mark_as_advanced(RAPIDJSON_FOUND) ++ ++if(RAPIDJSON_USE_SSE42) ++ set(RAPIDJSON_CXX_FLAGS "-DRAPIDJSON_SSE42") ++ if(MSVC) ++ set(RAPIDJSON_CXX_FLAGS "${RAPIDJSON_CXX_FLAGS} /arch:SSE4.2") ++ else() ++ set(RAPIDJSON_CXX_FLAGS "${RAPIDJSON_CXX_FLAGS} -msse4.2") ++ endif() ++else() ++ if(RAPIDJSON_USE_SSE2) ++ set(RAPIDJSON_CXX_FLAGS "-DRAPIDJSON_SSE2") ++ if(MSVC) ++ set(RAPIDJSON_CXX_FLAGS "${RAPIDJSON_CXX_FLAGS} /arch:SSE2") ++ else() ++ set(RAPIDJSON_CXX_FLAGS "${RAPIDJSON_CXX_FLAGS} -msse2") ++ endif() ++ endif() ++endif() ++ ++mark_as_advanced(RAPIDJSON_CXX_FLAGS) ++ ++if(RAPIDJSON_FOUND) ++ if(NOT rapidjson_FIND_QUIETLY) ++ message(STATUS "Found rapidjson header files in ${RAPIDJSON_INCLUDE_DIRS}") ++ if(DEFINED RAPIDJSON_CXX_FLAGS) ++ message(STATUS "Found rapidjson C++ extra compilation flags: ${RAPIDJSON_CXX_FLAGS}") ++ endif() ++ endif() ++elseif(rapidjson_FIND_REQUIRED) ++ message(FATAL_ERROR "Could not find rapidjson") ++else() ++ message(STATUS "Optional package rapidjson was not found") ++endif() +--- a/neo/idlib/precompiled.h ++++ b/neo/idlib/precompiled.h +@@ -105,7 +105,10 @@ + #include "../ui/UserInterface.h" + + // RB: required for SWF extensions +-#include "../libs/rapidjson/include/rapidjson/document.h" ++//#include "../libs/rapidjson/include/rapidjson/document.h" ++#include "rapidjson/document.h" ++ ++ + + #include "../swf/SWF.h" + diff --git a/debian/patches/series b/debian/patches/series index acd8f43..a31fbf1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ #65-init-sdl2.patch #70-ffmpeg_2.9.patch 80-libpng16.patch +90-system-rapidjson.patch diff --git a/debian/rules b/debian/rules index f501d91..186ce6f 100755 --- a/debian/rules +++ b/debian/rules @@ -22,6 +22,7 @@ override_dh_auto_configure: -DSDL2=ON -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) \ -DUSE_SYSTEM_ZLIB=ON -DUSE_SYSTEM_LIBPNG=ON \ -DUSE_SYSTEM_LIBJPEG=ON -DUSE_SYSTEM_LIBGLEW=ON \ + -DUSE_SYSTEM_RAPIDJSON=ON \ -DCPU_TYPE=$(DEB_BUILD_ARCH_CPU) \ -DUSE_PRECOMPILED_HEADERS=OFF \ -DCPU_OPTIMIZATION="" \ -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/rbdoom3bfg.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

