[planetblupi] 02/08: Refresh the 'optional CURL dependency patch with the upstream patch series

Didier Raboud odyx at moszumanska.debian.org
Sun Oct 22 10:12:34 UTC 2017


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

odyx pushed a commit to branch debian/master
in repository planetblupi.

commit 95aa603d488fefbf5c25a57afbca6abb6a2c5b75
Merge: a1f7258 a08c4dc
Author: Didier Raboud <odyx at debian.org>
Date:   Fri Oct 20 19:16:49 2017 +0200

    Refresh the 'optional CURL dependency patch with the upstream patch series

 CMakeLists.txt                                     | 20 +++---
 debian/.git-dpm                                    |  4 +-
 ...L-dependency-optional-through-the-PB_HTT.patch} | 74 +++++++++++-----------
 debian/patches/series                              |  2 +-
 src/blupi.cxx                                      | 10 +--
 5 files changed, 54 insertions(+), 56 deletions(-)

diff --cc debian/.git-dpm
index 6842cb0,0000000..ff66920
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,8 -1,0 +1,8 @@@
 +# see git-dpm(1) from git-dpm package
- f3d75e5f26dfaceefd64674860d5e278d3065297
- f3d75e5f26dfaceefd64674860d5e278d3065297
++a08c4dc1a1666f6ed7558f29cfc0d57c4d8d723e
++a08c4dc1a1666f6ed7558f29cfc0d57c4d8d723e
 +e0ace8819512553d3680e912e419a5df1b8295ab
 +e0ace8819512553d3680e912e419a5df1b8295ab
 +planetblupi_1.11.0.orig.tar.xz
 +d62eb5661224b1859f3b23afdbfbe03349e2f789
 +23135816
diff --cc debian/patches/0002-Make-the-CURL-dependency-optional-through-the-PB_HTT.patch
index 59bc5f3,0000000..27bf521
mode 100644,000000..100644
--- a/debian/patches/0002-Make-the-CURL-dependency-optional-through-the-PB_HTT.patch
+++ b/debian/patches/0002-Make-the-CURL-dependency-optional-through-the-PB_HTT.patch
@@@ -1,144 -1,0 +1,144 @@@
- From f3d75e5f26dfaceefd64674860d5e278d3065297 Mon Sep 17 00:00:00 2001
++From a08c4dc1a1666f6ed7558f29cfc0d57c4d8d723e Mon Sep 17 00:00:00 2001
 +From: Didier Raboud <odyx at debian.org>
 +Date: Fri, 20 Oct 2017 16:04:46 +0200
- Subject: Make the CURL dependency optional, through the
-  PLANETBLUPI_HTTP_VERSION_CHECK CMake option
++Subject: Make the CURL dependency optional, through the PB_HTTP_VERSION_CHECK
++ CMake option
 +
++This is the following serie of commits:
++ - 6134edc96ef3952936570ec5c3fae79e1ad8a0f8 Make the CURL dependency optional, through the PLANETBLUPI_HTTP_VERSION_CHECK CMake option
++ - 433768147bbe86d24dfe9e3b3fbe34ffd2be2b0d Follow coding rules (space before bracket)
++ - cce3961fc8413e5d58ae068425e2ef2dad5b0319 CMake: use list(APPEND) instead of set
++ - a7018dbc5019be06fe10916deaeec9d700fce17d Fix warning of unused function
++ - b523641b869e3097ce7cd19ab457d273c3b8c8b7 Cosmetics
 +---
-  CMakeLists.txt | 26 +++++++++++++++++++++++---
-  src/blupi.cxx  | 10 +++++++++-
-  2 files changed, 32 insertions(+), 4 deletions(-)
++ CMakeLists.txt | 24 +++++++++++++++++++++---
++ src/blupi.cxx  |  8 ++++++++
++ 2 files changed, 29 insertions(+), 3 deletions(-)
 +
 +diff --git a/CMakeLists.txt b/CMakeLists.txt
- index 66e8f7d..6386eb0 100644
++index 66e8f7d..278c4f1 100644
 +--- a/CMakeLists.txt
 ++++ b/CMakeLists.txt
 +@@ -18,6 +18,8 @@ set (PB_PRODUCT_NAME "Planet Blupi")
 + set (PB_PACKAGE_NAME "planetblupi")
 + set (PB_DESCRIPTION "Planet Blupi - A delerious spell-binding game")
 + 
- +option(PLANETBLUPI_HTTP_VERSION_CHECK "Run a version check over HTTP (with CURL)" OFF)
+++option (PB_HTTP_VERSION_CHECK "Run a version check over HTTP (with CURL)" OFF)
 ++
 + configure_file (
 +   "${PROJECT_SOURCE_DIR}/src/config.h.in"
 +   "${PROJECT_BINARY_DIR}/include/config.h"
 +@@ -115,7 +117,10 @@ find_package (PkgConfig REQUIRED)
 + pkg_search_module (SDL2 REQUIRED sdl2)
 + pkg_search_module (SDL2_MIXER REQUIRED SDL2_mixer)
 + pkg_search_module (SDL2_IMAGE REQUIRED SDL2_image)
 +-pkg_search_module (CURL REQUIRED libcurl)
- +if(${PLANETBLUPI_HTTP_VERSION_CHECK})
+++if (${PB_HTTP_VERSION_CHECK})
 ++  pkg_search_module (CURL REQUIRED libcurl)
- +  add_definitions(-DUSE_CURL)
- +endif()
+++  add_definitions (-DUSE_CURL)
+++endif ()
 + 
 + if ("${STATIC_BUILD}")
 +   pkg_search_module (PNG REQUIRED libpng)
 +@@ -131,7 +136,9 @@ if ("${STATIC_BUILD}")
 +     pkg_search_module (PULSE REQUIRED libpulse)
 +   endif ()
 + 
 +-  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCURL_STATICLIB")
- +  if(${PLANETBLUPI_HTTP_VERSION_CHECK})
+++  if (${PB_HTTP_VERSION_CHECK})
 ++    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DCURL_STATICLIB")
 ++  endif ()
 + endif ()
 + 
 + ###########################
 +@@ -147,7 +154,6 @@ if ("${STATIC_BUILD}")
 +     ${SDL2_STATIC_LIBRARIES}
 +     ${SDL2_MIXER_STATIC_LIBRARIES}
 +     ${SDL2_IMAGE_STATIC_LIBRARIES}
 +-    ${CURL_STATIC_LIBRARIES}
 +     ${SDLKitchensink_STATIC_LIBRARIES}
 +     ${PNG_STATIC_LIBRARIES}
 +     ${AVCODEC_STATIC_LIBRARIES}
- @@ -157,6 +163,13 @@ if ("${STATIC_BUILD}")
++@@ -157,6 +163,12 @@ if ("${STATIC_BUILD}")
 +     ${SWRESAMPLE_STATIC_LIBRARIES}
 +   )
 + 
- +  if(${PLANETBLUPI_HTTP_VERSION_CHECK})
- +    set (planetblupi_DEPS
- +      ${planetblupi_DEPS}
+++  if (${PB_HTTP_VERSION_CHECK})
+++    list (APPEND planetblupi_DEPS
 ++      ${CURL_STATIC_LIBRARIES}
 ++    )
 ++  endif ()
 ++
 +   if (UNIX AND NOT APPLE)
 +     list (APPEND planetblupi_DEPS
 +       ${ALSA_STATIC_LIBRARIES}
- @@ -173,6 +186,13 @@ else ()
++@@ -173,6 +185,12 @@ else ()
 +     ${SDLKitchensink_LIBRARIES}
 +     pthread
 +   )
 ++
- +  if(${PLANETBLUPI_HTTP_VERSION_CHECK})
- +    set (planetblupi_DEPS
- +      ${planetblupi_DEPS}
+++  if (${PB_HTTP_VERSION_CHECK})
+++    list (APPEND planetblupi_DEPS
 ++      ${CURL_LIBRARIES}
 ++    )
 ++  endif ()
 + endif ()
 + 
 + target_link_libraries (planetblupi PUBLIC ${planetblupi_DEPS})
 +diff --git a/src/blupi.cxx b/src/blupi.cxx
- index 461fbd2..1ad2485 100644
++index 461fbd2..b8c6fd7 100644
 +--- a/src/blupi.cxx
 ++++ b/src/blupi.cxx
 +@@ -30,7 +30,9 @@
 + 
 + #include <SDL2/SDL_image.h>
 + #include <argagg/argagg.hpp>
- -#include <curl/curl.h>
 ++#ifdef USE_CURL
- +  #include <curl/curl.h>
- +#endif
++ #include <curl/curl.h>
+++#endif /* USE_CURL */
 + 
 + #include "json/json.hpp"
 + 
 +@@ -81,11 +83,13 @@ bool        g_bTermInit = false; // initialisation en cours
 + Uint32      g_lastPhase = 999;
 + static bool g_pause;
 + 
 ++#ifdef USE_CURL
 + struct url_data {
 +   CURLcode status;
 +   char *   buffer;
 +   size_t   size;
 + };
 ++#endif
 + 
 + template <typename Out>
 + static void
- @@ -462,6 +466,7 @@ static size_t
++@@ -458,6 +462,7 @@ InitFail (const char * msg)
++   FinishObjects ();
++ }
++ 
+++#ifdef USE_CURL
++ static size_t
 + updateCallback (void * ptr, size_t size, size_t nmemb, void * data)
 + {
-    size_t     realsize = size * nmemb;
- +#ifdef USE_CURL
-    url_data * mem      = static_cast<url_data *> (data);
-  
-    mem->buffer =
- @@ -472,6 +477,7 @@ updateCallback (void * ptr, size_t size, size_t nmemb, void * data)
-      mem->size += realsize;
-      mem->buffer[mem->size] = 0;
-    }
- +#endif
++@@ -475,10 +480,12 @@ updateCallback (void * ptr, size_t size, size_t nmemb, void * data)
 + 
 +   return realsize;
 + }
- @@ -479,6 +485,7 @@ updateCallback (void * ptr, size_t size, size_t nmemb, void * data)
+++#endif /* USE_CURL */
++ 
 + static void
 + CheckForUpdates ()
 + {
 ++#ifdef USE_CURL
 +   url_data chunk;
 + 
 +   chunk.buffer = nullptr; /* we expect realloc(NULL, size) to work */
 +@@ -515,6 +522,7 @@ CheckForUpdates ()
 +     free (chunk.buffer);
 + 
 +   curl_easy_cleanup (curl);
- +#endif
+++#endif /* USE_CURL */
 + }
 + 
 + static int
diff --cc debian/patches/series
index 65813ac,0000000..126434e
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,2 -1,0 +1,2 @@@
 +0001-The-planetblupi-executable-goes-to-usr-games-not-usr.patch
- 0002-Make-the-CURL-dependency-optional-through-the-PLANET.patch
++0002-Make-the-CURL-dependency-optional-through-the-PB_HTT.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/planetblupi.git



More information about the Pkg-games-commits mailing list