[hedgewars] 02/02: Add debian patches, upload to experimental

Gianfranco Costamagna locutusofborg-guest at moszumanska.debian.org
Sun Dec 28 20:55:31 UTC 2014


This is an automated email from the git hooks/post-receive script.

locutusofborg-guest pushed a commit to branch experimental
in repository hedgewars.

commit 86b5fd5587e68201ef11b24ccafe227a3f3eee88
Author: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
Date:   Sun Dec 28 21:54:59 2014 +0100

    Add debian patches, upload to experimental
---
 ...t-when-BUILD_ENGINE_C-ON-and-FONTS_DIR-is.patch | 91 ++++++++++++++++++++++
 debian/patches/disable-fstack-protector.patch      | 13 ++++
 debian/patches/series                              |  2 +
 3 files changed, 106 insertions(+)

diff --git a/debian/patches/0001-Fix-segfault-when-BUILD_ENGINE_C-ON-and-FONTS_DIR-is.patch b/debian/patches/0001-Fix-segfault-when-BUILD_ENGINE_C-ON-and-FONTS_DIR-is.patch
new file mode 100644
index 0000000..0047800
--- /dev/null
+++ b/debian/patches/0001-Fix-segfault-when-BUILD_ENGINE_C-ON-and-FONTS_DIR-is.patch
@@ -0,0 +1,91 @@
+From 4dd79f547ad8a690b085a49ebcff41bada8c800d Mon Sep 17 00:00:00 2001
+From: Gianfranco Costamagna <costamagnagianfranco at yahoo.it>
+Date: Sat, 29 Nov 2014 14:53:41 +0100
+Subject: [PATCH 1/2] Fix segfault when BUILD_ENGINE_C=ON and FONTS_DIR is
+ provided
+
+---
+ hedgewars/CMakeLists.txt         | 16 ++++++++++------
+ hedgewars/config.inc.in          |  4 ----
+ hedgewars/uPhysFSLayer.pas       |  2 +-
+ project_files/hwc/CMakeLists.txt | 11 +++++++++++
+ 4 files changed, 22 insertions(+), 11 deletions(-)
+
+diff --git a/hedgewars/CMakeLists.txt b/hedgewars/CMakeLists.txt
+index 3fc769f..e4ac4bc 100644
+--- a/hedgewars/CMakeLists.txt
++++ b/hedgewars/CMakeLists.txt
+@@ -21,12 +21,16 @@ if(UNIX)
+ endif(UNIX)
+ 
+ # convert list into pascal array
+-list(LENGTH FONTS_DIRS ndirs)
+-set(FONTS_DIRS_ARRAY "array [0..${ndirs}] of PChar = (")
+-foreach(fontdir ${FONTS_DIRS})
+-    set(FONTS_DIRS_ARRAY "${FONTS_DIRS_ARRAY}\n'${fontdir}',")
+-endforeach(fontdir)
+-set(FONTS_DIRS_ARRAY "${FONTS_DIRS_ARRAY}\nnil);\n")
++if(FONTS_DIRS)
++  list(LENGTH FONTS_DIRS ndirs)
++  set(FONTS_DIRS_ARRAY "array [0..${ndirs}] of PChar = (")
++  foreach(fontdir ${FONTS_DIRS})
++      set(FONTS_DIRS_ARRAY "${FONTS_DIRS_ARRAY}\n'${fontdir}',")
++  endforeach(fontdir)
++  set(FONTS_DIRS_ARRAY "${FONTS_DIRS_ARRAY}\nnil);\n")
++else(FONTS_DIRS)
++  set(FONTS_DIRS_ARRAY "array [0..1] of PChar = (nil, nil);")
++endif(FONTS_DIRS)
+ 
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc)
+ include_directories(${CMAKE_CURRENT_BINARY_DIR})
+diff --git a/hedgewars/config.inc.in b/hedgewars/config.inc.in
+index 4345c8f..15c2a80 100644
+--- a/hedgewars/config.inc.in
++++ b/hedgewars/config.inc.in
+@@ -26,8 +26,4 @@ const cNetProtoVersion = ${HEDGEWARS_PROTO_VER};
+       cRevisionString = '${HEDGEWARS_REVISION}';
+       cHashString = '${HEDGEWARS_HASH}';
+       cDefaultPathPrefix = '${HEDGEWARS_FULL_DATADIR}/Data';
+-{$IFDEF PAS2C}
+-      cFontsPaths: array[0..1] of PChar = (nil, nil);
+-{$ELSE}
+       cFontsPaths: ${FONTS_DIRS_ARRAY}
+-{$ENDIF}
+diff --git a/hedgewars/uPhysFSLayer.pas b/hedgewars/uPhysFSLayer.pas
+index 37726c7..7f8b2bf 100644
+--- a/hedgewars/uPhysFSLayer.pas
++++ b/hedgewars/uPhysFSLayer.pas
+@@ -166,7 +166,7 @@ begin
+     // mount system fonts paths first
+     for i:= low(cFontsPaths) to high(cFontsPaths) do
+         begin
+-            fp := cFontsPaths[i];
++            fp := PChar(cFontsPaths[i]);
+             if fp <> nil then
+                 pfsMount(ansistring(fp), PChar('/Fonts'));
+         end;
+diff --git a/project_files/hwc/CMakeLists.txt b/project_files/hwc/CMakeLists.txt
+index 66cbefa..159071f 100644
+--- a/project_files/hwc/CMakeLists.txt
++++ b/project_files/hwc/CMakeLists.txt
+@@ -16,6 +16,17 @@ include_directories(${LUA_INCLUDE_DIR})
+ include_directories(${SDL_INCLUDE_DIR})
+ add_subdirectory(rtl)
+ 
++# convert list into pascal array
++if(FONTS_DIRS)
++  list(LENGTH FONTS_DIRS ndirs)
++  set(FONTS_DIRS_ARRAY "array [0..${ndirs}] of shortstring = (")
++  foreach(fontdir ${FONTS_DIRS})
++      set(FONTS_DIRS_ARRAY "${FONTS_DIRS_ARRAY}\n'${fontdir}',")
++  endforeach(fontdir)
++  set(FONTS_DIRS_ARRAY "${FONTS_DIRS_ARRAY}\nnil);\n")
++else(FONTS_DIRS)
++  set(FONTS_DIRS_ARRAY "array [0..1] of PChar = (nil, nil);")
++endif(FONTS_DIRS)
+ configure_file(${CMAKE_SOURCE_DIR}/hedgewars/config.inc.in ${CMAKE_CURRENT_BINARY_DIR}/config.inc)
+ 
+ #get the list of pas files that are going to be converted and compiled
+-- 
+1.9.1
+
diff --git a/debian/patches/disable-fstack-protector.patch b/debian/patches/disable-fstack-protector.patch
new file mode 100644
index 0000000..c225ecf
--- /dev/null
+++ b/debian/patches/disable-fstack-protector.patch
@@ -0,0 +1,13 @@
+diff --git a/cmake_modules/compilerchecks.cmake b/cmake_modules/compilerchecks.cmake
+index 2029712..aba4abc 100644
+--- a/cmake_modules/compilerchecks.cmake
++++ b/cmake_modules/compilerchecks.cmake
+@@ -17,7 +17,7 @@ if(NOT (WIN32 OR (CMAKE_SYSTEM_NAME MATCHES BSD.OS) OR (CMAKE_SYSTEM_NAME MATCHE
+     #some bsd installations reported problems too
+     #(see 822312 654424 on bugzilla.redhat.com)
+     check_c_compiler_flag("-fstack-protector-all -fstack-protector" HAVE_STACKPROTECTOR)
+-    if(HAVE_STACKPROTECTOR)
++    if(HAVE_STACKPROTECTOR AND NOT BUILD_ENGINE_C)
+         add_flag_append(CMAKE_C_FLAGS "-fstack-protector-all -fstack-protector")
+         add_flag_append(CMAKE_CXX_FLAGS "-fstack-protector-all -fstack-protector")
+     endif()
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..10c6876
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+0001-Fix-segfault-when-BUILD_ENGINE_C-ON-and-FONTS_DIR-is.patch
+disable-fstack-protector.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/hedgewars.git



More information about the Pkg-games-commits mailing list