Bug#868936: vlc: port to libupnp-1.8
Sebastian Ramacher
sramacher at debian.org
Thu Jul 20 12:34:42 UTC 2017
Control: reassign -1 pupnp-1.8 1:1.8.1-1
Hi
On 2017-07-19 18:26:25, Uwe Kleine-König wrote:
> Package: src:vlc
> Version: 2.2.6-3ukl1
> Severity: wishlist
> Tags: patch
>
> Hello,
>
> currently there are two versions of libupnp in the archive (libupnp6 and
> libupnp-1.8-10). To be able to remove libupnp6 (i.e. the older of the
> two) it is necessary to port vlc (and all other rdepends) to
> libupnp-1.8.
>
> The patch below implements this for vlc. With this applied I can still
> playback videos with vlc.
As long as the adoption to upnp 1.8 requires to add -1.8 everywhere (are we
supposed to change it to -1.9 next month with the next upstream release?), this
was explicitly NAKed upstream. So please fix the include paths and the name of
the pkg-config module to point back to upnp.
All other parts of the patch can be done with a simple SONAME bump and a normal
library transition and adding calls to UpnpDiscovery_get_*_cstr depending on the
upnp version.
Cheers
> Best regards and thanks
> Uwe
>
> ------>8------
> From: Uwe Kleine-König <ukleinek at debian.org>
> Date: Wed, 19 Jul 2017 17:26:52 +0200
> Subject: [PATCH] Port vlc to libupnp-1.8
>
> ---
> debian/changelog | 6 ++
> debian/control | 2 +-
> debian/patches/0014-port-to-libupnp-1.8.patch | 107 ++++++++++++++++++++++++++
> debian/patches/series | 1 +
> 4 files changed, 115 insertions(+), 1 deletion(-)
> create mode 100644 debian/patches/0014-port-to-libupnp-1.8.patch
>
> diff --git a/debian/changelog b/debian/changelog
> index fffe2478af58..c9cc38b82630 100644
> --- a/debian/changelog
> +++ b/debian/changelog
> @@ -1,3 +1,9 @@
> +vlc (2.2.6-4) UNRELEASED; urgency=medium
> +
> + * Port to libupnp-1.8
> +
> + -- Uwe Kleine-König <ukleinek at debian.org> Wed, 19 Jul 2017 17:25:10 +0200
> +
> vlc (2.2.6-3) unstable; urgency=medium
>
> [ Mateusz Łukasik ]
> diff --git a/debian/control b/debian/control
> index b9c6addd8c3f..601971f80e55 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -87,7 +87,7 @@ Build-Depends: autopoint,
> libtheora-dev (>= 1.0),
> libtwolame-dev (>= 0.3.8),
> libudev-dev [linux-any],
> - libupnp-dev,
> + libupnp-1.8-dev,
> libv4l-dev [linux-any],
> libva-dev [kfreebsd-any linux-any],
> libvcdinfo-dev (>= 0.7.22),
> diff --git a/debian/patches/0014-port-to-libupnp-1.8.patch b/debian/patches/0014-port-to-libupnp-1.8.patch
> new file mode 100644
> index 000000000000..a24f42c7417b
> --- /dev/null
> +++ b/debian/patches/0014-port-to-libupnp-1.8.patch
> @@ -0,0 +1,107 @@
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -4040,7 +4040,7 @@
> + dnl
> + dnl UPnP Plugin (Intel SDK)
> + dnl
> +-PKG_ENABLE_MODULES_VLC([UPNP], [upnp], [libupnp], [Intel UPNP SDK],[auto])
> ++PKG_ENABLE_MODULES_VLC([UPNP], [upnp], [libupnp-1.8], [Intel UPNP SDK],[auto])
> +
> + EXTEND_HELP_STRING([Misc options:])
> +
> +--- a/modules/services_discovery/upnp.hpp
> ++++ b/modules/services_discovery/upnp.hpp
> +@@ -28,8 +28,8 @@
> + #include <vector>
> + #include <string>
> +
> +-#include <upnp/upnp.h>
> +-#include <upnp/upnptools.h>
> ++#include <upnp-1.8/upnp.h>
> ++#include <upnp-1.8/upnptools.h>
> +
> + #include <vlc_common.h>
> +
> +--- a/modules/services_discovery/upnp.cpp
> ++++ b/modules/services_discovery/upnp.cpp
> +@@ -80,7 +80,7 @@
> + /*
> + * Local prototypes
> + */
> +-static int Callback( Upnp_EventType event_type, void* p_event, void* p_user_data );
> ++static int Callback( Upnp_EventType event_type, const void* p_event, void* p_user_data );
> +
> + const char* xml_getChildElementValue( IXML_Element* p_parent,
> + const char* psz_tag_name );
> +@@ -325,7 +325,7 @@
> + /*
> + * Handles all UPnP events
> + */
> +-static int Callback( Upnp_EventType event_type, void* p_event, void* p_user_data )
> ++static int Callback( Upnp_EventType event_type, const void* p_event, void* p_user_data )
> + {
> + services_discovery_t* p_sd = ( services_discovery_t* ) p_user_data;
> + services_discovery_sys_t* p_sys = p_sd->p_sys;
> +@@ -336,22 +336,23 @@
> + case UPNP_DISCOVERY_ADVERTISEMENT_ALIVE:
> + case UPNP_DISCOVERY_SEARCH_RESULT:
> + {
> +- struct Upnp_Discovery* p_discovery = ( struct Upnp_Discovery* )p_event;
> ++ const UpnpDiscovery* p_discovery = ( const UpnpDiscovery* )p_event;
> +
> + IXML_Document *p_description_doc = 0;
> +
> + int i_res;
> +- i_res = UpnpDownloadXmlDoc( p_discovery->Location, &p_description_doc );
> ++ i_res = UpnpDownloadXmlDoc( UpnpDiscovery_get_Location_cstr( p_discovery ),
> ++ &p_description_doc );
> + if ( i_res != UPNP_E_SUCCESS )
> + {
> + msg_Warn( p_sd, "Could not download device description! "
> + "Fetching data from %s failed: %s",
> +- p_discovery->Location, UpnpGetErrorMessage( i_res ) );
> ++ UpnpDiscovery_get_Location_cstr( p_discovery ), UpnpGetErrorMessage( i_res ) );
> + return i_res;
> + }
> +
> + MediaServer::parseDeviceDescription( p_description_doc,
> +- p_discovery->Location, p_sd );
> ++ UpnpDiscovery_get_Location_cstr(p_discovery), p_sd );
> +
> + ixmlDocument_free( p_description_doc );
> + }
> +@@ -359,18 +360,18 @@
> +
> + case UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE:
> + {
> +- struct Upnp_Discovery* p_discovery = ( struct Upnp_Discovery* )p_event;
> ++ const UpnpDiscovery* p_discovery = ( const UpnpDiscovery* )p_event;
> +
> +- p_sys->p_server_list->removeServer( p_discovery->DeviceId );
> ++ p_sys->p_server_list->removeServer( UpnpDiscovery_get_DeviceID_cstr( p_discovery ) );
> +
> + }
> + break;
> +
> + case UPNP_EVENT_RECEIVED:
> + {
> +- Upnp_Event* p_e = ( Upnp_Event* )p_event;
> ++ const UpnpEvent* p_e = ( const UpnpEvent* )p_event;
> +
> +- MediaServer* p_server = p_sys->p_server_list->getServerBySID( p_e->Sid );
> ++ MediaServer* p_server = p_sys->p_server_list->getServerBySID( UpnpEvent_get_SID_cstr( p_e ) );
> + if ( p_server ) p_server->fetchContents();
> + }
> + break;
> +@@ -380,9 +381,9 @@
> + {
> + /* Re-subscribe. */
> +
> +- Upnp_Event_Subscribe* p_s = ( Upnp_Event_Subscribe* )p_event;
> ++ const UpnpEventSubscribe* p_s = ( const UpnpEventSubscribe* )p_event;
> +
> +- MediaServer* p_server = p_sys->p_server_list->getServerBySID( p_s->Sid );
> ++ MediaServer* p_server = p_sys->p_server_list->getServerBySID( UpnpEventSubscribe_get_SID_cstr( p_s ) );
> + if ( p_server ) p_server->subscribeToContentDirectory();
> + }
> + break;
> diff --git a/debian/patches/series b/debian/patches/series
> index 8733a5586d5e..34b9f10cb668 100644
> --- a/debian/patches/series
> +++ b/debian/patches/series
> @@ -11,3 +11,4 @@
> 0011-codec-avcodec-check-avcodec-visible-sizes.patch
> 0012-decoder-check-visible-size-when-creating-buffer.patch
> 0013-codec-flac-fix-heap-write-overflow-on-frame-format-c.patch
> +0014-port-to-libupnp-1.8.patch
> --
> 2.11.0
> _______________________________________________
> pkg-multimedia-maintainers mailing list
> pkg-multimedia-maintainers at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers
--
Sebastian Ramacher
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-multimedia-maintainers/attachments/20170720/00912375/attachment.sig>
More information about the pkg-multimedia-maintainers
mailing list