[SCM] gerbera/master: Add patches for compatability with libupnp 1.8.2

jcowgill at users.alioth.debian.org jcowgill at users.alioth.debian.org
Sat Sep 23 17:48:15 UTC 2017


The following commit has been merged in the master branch:
commit 6f21e7f1591334fbe0598d0804382e99879618de
Author: James Cowgill <jcowgill at debian.org>
Date:   Sat Sep 9 13:54:20 2017 +0100

    Add patches for compatability with libupnp 1.8.2

diff --git a/debian/control b/debian/control
index 6ca3121..261ac9a 100644
--- a/debian/control
+++ b/debian/control
@@ -16,7 +16,7 @@ Build-Depends:
  libmagic-dev,
  libsqlite3-dev,
  libtag1-dev,
- libupnp-1.8-dev,
+ libupnp1.8-dev,
  libz-dev,
  pkg-config,
  uuid-dev
diff --git a/debian/patches/0009_CMake-Improve-compat-with-libupnp-1.8.2.patch b/debian/patches/0009_CMake-Improve-compat-with-libupnp-1.8.2.patch
new file mode 100644
index 0000000..5e3a7c5
--- /dev/null
+++ b/debian/patches/0009_CMake-Improve-compat-with-libupnp-1.8.2.patch
@@ -0,0 +1,65 @@
+From e5e5e4f4e5a87390d5a4b4f7dd97da4703621184 Mon Sep 17 00:00:00 2001
+From: Ian Whyman <thev00d00 at gentoo.org>
+Date: Sun, 20 Aug 2017 12:34:36 +0100
+Subject: [PATCH 1/2] CMake: Improve compat with libupnp 1.8.2
+
+---
+ CMakeLists.txt          |  2 +-
+ cmake/FindLibUpnp.cmake | 21 +++++++++++----------
+ 2 files changed, 12 insertions(+), 11 deletions(-)
+
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -364,7 +364,7 @@ endif()
+ 
+ # Debian ships a snapshot from 2010: libupnp4 (1.8.0~svn20100507-1.2)
+ # This is missing templated types so we need to ifdef
+-if(UPNP_INCLUDE_DIR AND NOT EXISTS "${UPNP_INCLUDE_DIR}/upnp-1.8/TemplateInclude.h")
++if(UPNP_INCLUDE_DIR AND NOT EXISTS "${UPNP_INCLUDE_DIR}/TemplateInclude.h")
+     message (WARNING "\n!! You are using a very old 1.8 snapshot. Please upgrade to a newer snapshot from upstream (https://github.com/mrjimenez/pupnp) !!\n")
+     message (STATUS "gerbera: Enabling old libupnp snapshot compat. Web interface will probably not work.")
+     add_definitions(-DUPNP_OLD_SNAPSHOT)
+--- a/cmake/FindLibUpnp.cmake
++++ b/cmake/FindLibUpnp.cmake
+@@ -8,30 +8,31 @@
+ #  UPNP_HAS_REUSEADDR - If LinUPnP was built with SO_REUSEADDR support
+ 
+ find_package(PkgConfig QUIET)
+-pkg_check_modules (PC_UPNP QUIET libupnp-1.8)
++pkg_check_modules (PC_UPNP QUIET libupnp-1.8 libupnp)
+ 
+-find_path(UPNP_INCLUDE_DIR upnp-1.8/upnp.h
++find_path(UPNP_INCLUDE_DIR upnp.h
+     HINTS ${PC_UPNP_INCLUDEDIR} ${PC_UPNP_INCLUDE_DIRS}
+-    PATH_SUFFIXES upnp)
++    PATH_SUFFIXES upnp-1.8 upnp)
++
+ find_library(UPNP_UPNP_LIBRARY
+-    NAMES libupnp-1.8 upnp-1.8 upnp4
++    NAMES libupnp-1.8 upnp-1.8 libupnp upnp upnp4
+     HINTS ${PC_UPNP_LIBDIR} ${PC_UPNP_LIBRARY_DIRS})
++
+ find_library(UPNP_IXML_LIBRARY
+-    NAMES libixml-1.8 ixml-1.8 ixml4
++    NAMES libixml-1.8 ixml-1.8 libixml ixml ixml4
+     HINTS ${PC_UPNP_LIBDIR} ${PC_UPNP_LIBRARY_DIRS})
+ 
+-if(EXISTS "${UPNP_INCLUDE_DIR}/upnp-1.8/upnpconfig.h")
+-    file (STRINGS ${UPNP_INCLUDE_DIR}/upnp-1.8/upnpconfig.h _UPNP_DEFS REGEX "^[ \t]*#define[ \t]+UPNP_VERSION_(MAJOR|MINOR|PATCH)")
++if(EXISTS ${UPNP_INCLUDE_DIR}/upnpconfig.h)
++    file (STRINGS ${UPNP_INCLUDE_DIR}/upnpconfig.h _UPNP_DEFS REGEX "^[ \t]*#define[ \t]+UPNP_VERSION_(MAJOR|MINOR|PATCH)")
+     string (REGEX REPLACE ".*UPNP_VERSION_MAJOR ([0-9]+).*" "\\1" UPNP_MAJOR_VERSION "${_UPNP_DEFS}")
+     string (REGEX REPLACE ".*UPNP_VERSION_MINOR ([0-9]+).*" "\\1" UPNP_MINOR_VERSION "${_UPNP_DEFS}")
+     string (REGEX REPLACE ".*UPNP_VERSION_PATCH ([0-9]+).*" "\\1" UPNP_PATCH_VERSION "${_UPNP_DEFS}")
+     set (UPNP_VERSION_STRING "${UPNP_MAJOR_VERSION}.${UPNP_MINOR_VERSION}.${UPNP_PATCH_VERSION}")
+ 
+     # Check for IPv6
+-    file (STRINGS ${UPNP_INCLUDE_DIR}/upnp-1.8/upnpconfig.h UPNP_HAS_IPV6 REGEX "^[ \t]*#define[ \t]+UPNP_ENABLE_IPV6[ \t]+(1)$")
++    file (STRINGS ${UPNP_INCLUDE_DIR}/upnpconfig.h UPNP_HAS_IPV6 REGEX "^[ \t]*#define[ \t]+UPNP_ENABLE_IPV6[ \t]+(1)$")
+     # Check for SO_REUSEADDR
+-    file (STRINGS ${UPNP_INCLUDE_DIR}/upnp-1.8/upnpconfig.h UPNP_HAS_REUSEADDR REGEX "^[ \t]*#define[ \t]+UPNP_MINISERVER_REUSEADDR[ \t]+(1)$")
+-
++    file (STRINGS ${UPNP_INCLUDE_DIR}/upnpconfig.h UPNP_HAS_REUSEADDR REGEX "^[ \t]*#define[ \t]+UPNP_MINISERVER_REUSEADDR[ \t]+(1)$")
+ endif()
+ 
+ include(FindPackageHandleStandardArgs)
diff --git a/debian/patches/0010_Unqualify-libupnp-includes.patch b/debian/patches/0010_Unqualify-libupnp-includes.patch
new file mode 100644
index 0000000..c3ea5b0
--- /dev/null
+++ b/debian/patches/0010_Unqualify-libupnp-includes.patch
@@ -0,0 +1,201 @@
+From 555d33fb7bc357d952c662f4de9986e33d483926 Mon Sep 17 00:00:00 2001
+From: Ian Whyman <thev00d00 at gentoo.org>
+Date: Mon, 21 Aug 2017 22:13:03 +0100
+Subject: [PATCH 2/2] Unqualify libupnp includes
+
+We now correctly set in the libupnp include path in CMake, so this is no
+longer needed.
+
+Should fix the build with libupnp 1.8.2.
+
+Thanks to @whorfin for reporting
+
+Fixes #137
+---
+ src/action_request.h                     | 2 +-
+ src/buffered_io_handler.h                | 2 +-
+ src/curl_io_handler.h                    | 2 +-
+ src/file_io_handler.cc                   | 2 +-
+ src/io_handler.cc                        | 2 +-
+ src/io_handler.h                         | 2 +-
+ src/io_handler_buffer_helper.h           | 2 +-
+ src/mem_io_handler.cc                    | 2 +-
+ src/subscription_request.h               | 2 +-
+ src/transcoding/transcode_ext_handler.cc | 2 +-
+ src/transcoding/transcode_ext_handler.h  | 2 +-
+ src/transcoding/transcode_handler.h      | 2 +-
+ src/url_request_handler.cc               | 2 +-
+ 13 files changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/src/action_request.h b/src/action_request.h
+index 7c1d97ab..4550b12f 100644
+--- a/src/action_request.h
++++ b/src/action_request.h
+@@ -33,7 +33,7 @@
+ #ifndef __ACTION_REQUEST_H__
+ #define __ACTION_REQUEST_H__
+ 
+-#include <upnp-1.8/upnp.h>
++#include <upnp.h>
+ 
+ #include "common.h"
+ #include "mxml/mxml.h"
+diff --git a/src/buffered_io_handler.h b/src/buffered_io_handler.h
+index 541a8e10..c530729b 100644
+--- a/src/buffered_io_handler.h
++++ b/src/buffered_io_handler.h
+@@ -32,7 +32,7 @@
+ #ifndef __BUFFERED_IO_HANDLER_H__
+ #define __BUFFERED_IO_HANDLER_H__
+ 
+-#include <upnp-1.8/upnp.h>
++#include <upnp.h>
+ 
+ #include "common.h"
+ #include "io_handler_buffer_helper.h"
+diff --git a/src/curl_io_handler.h b/src/curl_io_handler.h
+index 8cbc260e..c34ff3a1 100644
+--- a/src/curl_io_handler.h
++++ b/src/curl_io_handler.h
+@@ -35,7 +35,7 @@
+ #define __CURL_IO_HANDLER_H__
+ 
+ #include <curl/curl.h>
+-#include <upnp-1.8/upnp.h>
++#include <upnp.h>
+ 
+ #include "common.h"
+ #include "io_handler_buffer_helper.h"
+diff --git a/src/file_io_handler.cc b/src/file_io_handler.cc
+index d2d3e218..8a4a56b7 100644
+--- a/src/file_io_handler.cc
++++ b/src/file_io_handler.cc
+@@ -34,7 +34,7 @@
+ #include <unistd.h>
+ #include <cstring>
+ #include <cstdio>
+-#include <upnp-1.8/ixml.h>
++#include <ixml.h>
+ 
+ #include "server.h"
+ #include "common.h"
+diff --git a/src/io_handler.cc b/src/io_handler.cc
+index 3a1579f3..44b28cb8 100644
+--- a/src/io_handler.cc
++++ b/src/io_handler.cc
+@@ -31,7 +31,7 @@
+ /// This handles the VirtualDirCallbacks that come from the web server.
+ 
+ #include <unistd.h>
+-#include <upnp-1.8/ixml.h>
++#include <ixml.h>
+ 
+ #include "server.h"
+ 
+diff --git a/src/io_handler.h b/src/io_handler.h
+index b62a4393..08353751 100644
+--- a/src/io_handler.h
++++ b/src/io_handler.h
+@@ -32,7 +32,7 @@
+ #ifndef __IO_HANDLER_H__
+ #define __IO_HANDLER_H__
+ 
+-#include <upnp-1.8/upnp.h>
++#include <upnp.h>
+ 
+ #include "common.h"
+ 
+diff --git a/src/io_handler_buffer_helper.h b/src/io_handler_buffer_helper.h
+index 5f0cdc2a..bad70ac0 100644
+--- a/src/io_handler_buffer_helper.h
++++ b/src/io_handler_buffer_helper.h
+@@ -33,7 +33,7 @@
+ #define __IO_HANDLER_BUFFER_HELPER_H__
+ 
+ #include <pthread.h>
+-#include <upnp-1.8/upnp.h>
++#include <upnp.h>
+ #include <mutex>
+ #include <condition_variable>
+ 
+diff --git a/src/mem_io_handler.cc b/src/mem_io_handler.cc
+index c398b100..ae77a56c 100644
+--- a/src/mem_io_handler.cc
++++ b/src/mem_io_handler.cc
+@@ -36,7 +36,7 @@
+ #include <unistd.h>
+ #include <cstring>
+ #include <cstdio>
+-#include <upnp-1.8/ixml.h>
++#include <ixml.h>
+ #include <ctime>
+ #include "common.h"
+ #include "storage.h"
+diff --git a/src/subscription_request.h b/src/subscription_request.h
+index e956d545..2bf91706 100644
+--- a/src/subscription_request.h
++++ b/src/subscription_request.h
+@@ -33,7 +33,7 @@
+ #ifndef __SUBSCRIPTION_REQUEST_H__
+ #define __SUBSCRIPTION_REQUEST_H__
+ 
+-#include <upnp-1.8/upnp.h>
++#include <upnp.h>
+ 
+ #include "common.h"
+ 
+diff --git a/src/transcoding/transcode_ext_handler.cc b/src/transcoding/transcode_ext_handler.cc
+index b12dc97a..9e622647 100644
+--- a/src/transcoding/transcode_ext_handler.cc
++++ b/src/transcoding/transcode_ext_handler.cc
+@@ -36,7 +36,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+-#include <upnp-1.8/ixml.h>
++#include <ixml.h>
+ #include <unistd.h>
+ #include <cstring>
+ #include <cstdio>
+diff --git a/src/transcoding/transcode_ext_handler.h b/src/transcoding/transcode_ext_handler.h
+index ac7d14f0..5b2b155a 100644
+--- a/src/transcoding/transcode_ext_handler.h
++++ b/src/transcoding/transcode_ext_handler.h
+@@ -32,7 +32,7 @@
+ #ifndef __TRANSCODE_EXTERNAL_HANDLER_H__
+ #define __TRANSCODE_EXTERNAL_HANDLER_H__
+ 
+-#include <upnp-1.8/upnp.h>
++#include <upnp.h>
+ 
+ #include "common.h"
+ #include "transcode_handler.h"
+diff --git a/src/transcoding/transcode_handler.h b/src/transcoding/transcode_handler.h
+index 40001b06..064ed4e8 100644
+--- a/src/transcoding/transcode_handler.h
++++ b/src/transcoding/transcode_handler.h
+@@ -32,7 +32,7 @@
+ #ifndef __TRANSCODE_HANDLER_H__
+ #define __TRANSCODE_HANDLER_H__
+ 
+-#include <upnp-1.8/upnp.h>
++#include <upnp.h>
+ 
+ #include "common.h"
+ #include "io_handler.h"
+diff --git a/src/url_request_handler.cc b/src/url_request_handler.cc
+index 93e818df..1cd73fb2 100644
+--- a/src/url_request_handler.cc
++++ b/src/url_request_handler.cc
+@@ -31,7 +31,7 @@
+ 
+ #ifdef HAVE_CURL
+ 
+-#include <upnp-1.8/ixml.h>
++#include <ixml.h>
+ 
+ #include "server.h"
+ #include "common.h"
+-- 
+2.14.1
+
diff --git a/debian/patches/series b/debian/patches/series
index cff7489..8bba6f1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,4 @@
 0001_fix_spelling_errors.patch
 0008_symlinks.patch
+0009_CMake-Improve-compat-with-libupnp-1.8.2.patch
+0010_Unqualify-libupnp-includes.patch

-- 
gerbera packaging



More information about the pkg-multimedia-commits mailing list