[widelands] 01/01: new patch to use the system-wide minizip when available
Martin Quinson
mquinson at moszumanska.debian.org
Sat Nov 19 15:25:40 UTC 2016
This is an automated email from the git hooks/post-receive script.
mquinson pushed a commit to branch master
in repository widelands.
commit c359821faa25d177f265775875d13b0d99fc785d
Author: Martin Quinson <martin.quinson at loria.fr>
Date: Sat Nov 19 15:10:17 2016 +0100
new patch to use the system-wide minizip when available
- update the other patches that are applied afterward
---
debian/changelog | 11 ++-
debian/control | 4 +-
debian/patches/dbg_symbols | 2 +-
debian/patches/series | 1 +
debian/patches/system-wide_minizip | 155 +++++++++++++++++++++++++++++++++++++
5 files changed, 166 insertions(+), 7 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 244cf29..97734b7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
widelands (1:19+repack-1) UNRELEASED; urgency=medium
- This package is not ready for unstable because it embeeds 2
- softwares in src/third_party. We should use the system version
- instead. But unfortunately, lua-eris is not packaged yet...
+ This package is not ready for unstable because it embeeds lua-eris
+ in src/third_party. We should package this software for Debian and
+ use the system version instead.
* New upstream release. New features highlight:
- Seafaring AI and other AI improvements
@@ -30,13 +30,16 @@ widelands (1:19+repack-1) UNRELEASED; urgency=medium
c++ 11, continuous integration, move to Transifex and merge bot.
Also tons of cleanups to the code base.
- * Package is manually repacked to mv debian/ debian.orig/
+ * Package is manually repacked to mv debian/ debian.orig/ in
+ upstream tar file.
* Change the build-dependencies of SDL to the one of SDL2
* Update our patches:
- Drop patch kfreebsd-integrated-libraries (integrated upstream)
- Comment mips and s390 patches: they may be useless nowadays
* Take the new man page from the upstream debian package.
* New d/watch file by Steven De Herdt (Closes: #844005)
+ * New d/p/system-wide_minizip to not use the embeeded minizip
+ (provided by upstream developpers)
-- Martin Quinson <mquinson at debian.org> Sun, 13 Nov 2016 17:57:15 +0100
diff --git a/debian/control b/debian/control
index 0b014cf..602dc2a 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,7 @@ Build-Depends: debhelper (>= 9),
cmake,
doxygen,
imagemagick,
- liblua5.1-dev,
+ libminizip-dev,
libboost-dev,
libboost-regex-dev,
libboost-test-dev,
@@ -25,7 +25,7 @@ Build-Depends: debhelper (>= 9),
zlib1g-dev
Vcs-Git: git://git.debian.org/git/pkg-games/widelands.git
Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-games/widelands.git
-#Vcs-Svn: svn://svn.debian.org/svn/collab-maint/deb-maint/widelands/ <-- Old location of packaging
+#Vcs-Svn: svn://svn.debian.org/svn/collab-maint/deb-maint/widelands/ <-- Location of old packaging
Homepage: http://www.widelands.org/
Package: widelands
diff --git a/debian/patches/dbg_symbols b/debian/patches/dbg_symbols
index 25751eb..79bebb7 100644
--- a/debian/patches/dbg_symbols
+++ b/debian/patches/dbg_symbols
@@ -9,7 +9,7 @@ Index: b/CMakeLists.txt
===================================================================
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -93,7 +93,7 @@ endif (NOT CMAKE_BUILD_TYPE OR CMAKE_BUI
+@@ -95,7 +95,7 @@ endif (NOT CMAKE_BUILD_TYPE OR CMAKE_BUI
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(WL_DEBUG_FLAGS "-g -DDEBUG")
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
diff --git a/debian/patches/series b/debian/patches/series
index ea6c931..2c5ffe9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,5 @@
# mips_gcc_ICE_with-03
# s390_new_architecture
+system-wide_minizip
hurd_PATH_MAX_missing
dbg_symbols
diff --git a/debian/patches/system-wide_minizip b/debian/patches/system-wide_minizip
new file mode 100644
index 0000000..cbc06bd
--- /dev/null
+++ b/debian/patches/system-wide_minizip
@@ -0,0 +1,155 @@
+Description: use the system-wide minizip instead of the embeeded one if found.
+Forwarded-Upstream: It was provided by upstream: http://bazaar.launchpad.net/~widelands-dev/widelands/b19-debian/revision/8147
+ .
+ Thanks to Fòram na Gàidhlig for the patch.
+
+I just added this line to make its use easier:
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_HOME_DIRECTORY}/Modules)
+
+=== modified file 'CMakeLists.txt'
+---
+ CMakeLists.txt | 3 +++
+ Modules/FindMinizip.cmake | 37 +++++++++++++++++++++++++++++++++++++
+ cmake/WlFunctions.cmake | 7 +++++++
+ src/io/CMakeLists.txt | 2 +-
+ src/third_party/CMakeLists.txt | 20 +++++++++++---------
+ src/third_party/minizip/README.txt | 4 ++++
+ 6 files changed, 63 insertions(+), 10 deletions(-)
+
+Index: b/CMakeLists.txt
+===================================================================
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -3,6 +3,7 @@ project (widelands)
+ cmake_minimum_required (VERSION 2.8.7)
+
+ include("${CMAKE_SOURCE_DIR}/cmake/WlFunctions.cmake")
++set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_HOME_DIRECTORY}/Modules)
+
+ option(OPTION_USE_GLBINDING "Use glbinding instead of GLEW" OFF)
+ option(OPTION_GLEW_STATIC "Use static GLEW Library" OFF)
+@@ -64,6 +65,8 @@ find_package(SDL2_net REQUIRED)
+ find_package(SDL2_ttf REQUIRED)
+ find_package(ZLIB REQUIRED)
+ find_package(ICU REQUIRED)
++find_package(Minizip)
++
+ if(OPTION_USE_GLBINDING)
+ find_package(glbinding REQUIRED)
+ else()
+Index: b/Modules/FindMinizip.cmake
+===================================================================
+--- /dev/null
++++ b/Modules/FindMinizip.cmake
+@@ -0,0 +1,37 @@
++# - Try to find Minizip
++# Once done this will define
++#
++# MINIZIP_FOUND - system has MINIZIP
++# MINIZIP_INCLUDE_DIR - the MINIZIP include directory
++# MINIZIP_LIBRARY_DIR - where the libraries are
++# MINIZIP_LIBRARY - Link these to use MINIZIP
++#
++
++IF (MINIZIP_INCLUDE_DIR)
++ # Already in cache, be silent
++ SET(MINIZIP_FIND_QUIETLY TRUE)
++ENDIF (MINIZIP_INCLUDE_DIR)
++
++FIND_PATH( MINIZIP_INCLUDE_DIR
++ NAMES zip.h unzip.h ioapi.h
++ PATHS /usr/local/include /usr/include
++ PATH_SUFFIXES minizip/ )
++SET( MINIZIP_NAMES minizip MINIZIP )
++FIND_LIBRARY( MINIZIP_LIBRARY
++ NAMES ${MINIZIP_NAMES}
++ PATHS /usr/lib /usr/local/lib )
++
++GET_FILENAME_COMPONENT( MINIZIP_LIBRARY_DIR ${MINIZIP_LIBRARY} PATH )
++
++IF (MINIZIP_INCLUDE_DIR AND MINIZIP_LIBRARY)
++ SET(MINIZIP_FOUND TRUE)
++ SET(MINIZIP_LIBRARY_DIR ${MINIZIP_LIBRARY} )
++ IF (NOT MINIZIP_FIND_QUIETLY)
++ MESSAGE (STATUS "Found Minizip: ${MINIZIP_LIBRARY} ${MINIZIP_INCLUDE_DIR}")
++ ENDIF (NOT MINIZIP_FIND_QUIETLY)
++ELSE (MINIZIP_INCLUDE_DIR AND MINIZIP_LIBRARY)
++ SET( MINIZIP_FOUND FALSE )
++ SET( MINIZIP_LIBRARY_DIR )
++ SET( MINIZIP_EXTRA_DEFINITIONS )
++ENDIF (MINIZIP_INCLUDE_DIR AND MINIZIP_LIBRARY)
++
+Index: b/cmake/WlFunctions.cmake
+===================================================================
+--- a/cmake/WlFunctions.cmake
++++ b/cmake/WlFunctions.cmake
+@@ -82,6 +82,13 @@ macro(_common_compile_tasks)
+ if(ARG_USES_ZLIB)
+ wl_include_system_directories(${NAME} ${ZLIB_INCLUDE_DIRS})
+ target_link_libraries(${NAME} ${ZLIB_LIBRARY})
++ if (MINIZIP_FOUND)
++ wl_include_system_directories(${NAME} ${MINIZIP_INCLUDE_DIR})
++ target_link_libraries(${NAME} ${MINIZIP_LIBRARY})
++ else(MINIZIP_FOUND)
++ target_link_libraries(${NAME} third_party_minizip)
++ message(WARNING "You are using widelands-bundled minizip sources. Please install your distribution's minizip dev library or urge your distribution maintainer to include the minizip library in your package repository. Thank you.")
++ endif(MINIZIP_FOUND)
+ endif()
+
+ # OpenGL and GLEW are one thing for us. If you use the one, you also use the
+Index: b/src/io/CMakeLists.txt
+===================================================================
+--- a/src/io/CMakeLists.txt
++++ b/src/io/CMakeLists.txt
+@@ -36,11 +36,11 @@ wl_library(io_filesystem
+ filesystem/zip_exceptions.h
+ filesystem/zip_filesystem.cc
+ filesystem/zip_filesystem.h
++ USES_ZLIB
+ DEPENDS
+ base_exceptions
+ base_log
+ base_macros
+ io_fileread
+ io_stream
+- third_party_minizip
+ )
+Index: b/src/third_party/CMakeLists.txt
+===================================================================
+--- a/src/third_party/CMakeLists.txt
++++ b/src/third_party/CMakeLists.txt
+@@ -1,12 +1,14 @@
+-wl_library(third_party_minizip
+- THIRD_PARTY
+- SRCS
+- minizip/ioapi.h
+- minizip/unzip.cc
+- minizip/unzip.h
+- minizip/zip.h
+- USES_ZLIB
+-)
++if(NOT MINIZIP_FOUND)
++ wl_library(third_party_minizip
++ THIRD_PARTY
++ SRCS
++ ioapi.h
++ unzip.cc
++ unzip.h
++ zip.h
++ USES_ZLIB
++ )
++endif(NOT MINIZIP_FOUND)
+
+ wl_library(third_party_eris
+ THIRD_PARTY
+Index: b/src/third_party/minizip/README.txt
+===================================================================
+--- a/src/third_party/minizip/README.txt
++++ b/src/third_party/minizip/README.txt
+@@ -1,2 +1,6 @@
+ The files in this directory are either original or derived sources from zlib's
+ minizip examples.
++
++The sources are only included in Widelands if you don't have Minizip installed.
++Please install your distribution's minizip library or urge your distribution maintainer
++to include the minizip library in your package repository. Thank you.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/widelands.git
More information about the Pkg-games-commits
mailing list