Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=0346337d6b6b796adb6b099bc6185d7f66c52c5c
commit 0346337d6b6b796adb6b099bc6185d7f66c52c5c Author: DeX77 <de...@frugalware.org> Date: Thu Nov 16 11:44:42 2017 +0100 vlc-2.2.6-8-x86_64 * rebuild with libupnp>=1.8.3 diff --git a/source/xmultimedia/vlc/0014-upnp-Add-support-for-libupnp-1.8.patch b/source/xmultimedia/vlc/0014-upnp-Add-support-for-libupnp-1.8.patch new file mode 100644 index 0000000..1bdd10a --- /dev/null +++ b/source/xmultimedia/vlc/0014-upnp-Add-support-for-libupnp-1.8.patch @@ -0,0 +1,144 @@ +From: Sebastian Ramacher <sebast...@ramacher.at> +Date: Wed, 30 Aug 2017 18:31:34 +0200 +Subject: upnp: Add support for libupnp 1.8 + +Callbacks now take const void* as second argument and some members can +only be accessed via getter functions. + +Signed-off-by: Sebastian Ramacher <sramac...@debian.org> +Signed-off-by: Jean-Baptiste Kempf <j...@videolan.org> +(cherry picked from commit 3eb4e03512f45c1fa27c7f9a6759e8e7d3905720) +--- + modules/services_discovery/upnp.cpp | 63 ++++++++++++++++++++++++++++++------- + 1 file changed, 51 insertions(+), 12 deletions(-) + +diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp +index 4642ff9..ab61c5c 100644 +--- a/modules/services_discovery/upnp.cpp ++++ b/modules/services_discovery/upnp.cpp +@@ -40,6 +40,44 @@ + #include <assert.h> + #include <limits.h> + ++#if UPNP_VERSION < 10800 ++/* ++ * Compat functions and typedefs for libupnp prior to 1.8 ++ */ ++typedef void* UpnpEventPtr; ++typedef Upnp_Discovery UpnpDiscovery; ++typedef Upnp_Action_Complete UpnpActionComplete; ++typedef Upnp_Event UpnpEvent; ++typedef Upnp_Event_Subscribe UpnpEventSubscribe; ++ ++static const char* UpnpDiscovery_get_Location_cstr( const UpnpDiscovery* p_discovery ) ++{ ++ return p_discovery->Location; ++} ++ ++static const char* UpnpDiscovery_get_DeviceID_cstr( const UpnpDiscovery* p_discovery ) ++{ ++ return p_discovery->DeviceId; ++} ++ ++static IXML_Document* UpnpActionComplete_get_ActionResult( const UpnpActionComplete* p_result ) ++{ ++ return p_result->ActionResult; ++} ++ ++static const char* UpnpEvent_get_SID_cstr( const UpnpEvent* p_e ) ++{ ++ return p_e->Sid; ++} ++ ++static const char* UpnpEventSubscribe_get_SID_cstr( const UpnpEventSubscribe* p_s ) ++{ ++ return p_s->Sid; ++} ++#else ++typedef const void* UpnpEventPtr; ++#endif ++ + /* + * Constants + */ +@@ -80,7 +118,7 @@ vlc_module_end(); + /* + * Local prototypes + */ +-static int Callback( Upnp_EventType event_type, void* p_event, void* p_user_data ); ++static int Callback( Upnp_EventType event_type, UpnpEventPtr p_event, void* p_user_data ); + + const char* xml_getChildElementValue( IXML_Element* p_parent, + const char* psz_tag_name ); +@@ -325,7 +363,7 @@ int xml_getNumber( IXML_Document* p_doc, + /* + * 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, UpnpEventPtr 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 +374,23 @@ static int Callback( Upnp_EventType event_type, void* p_event, void* p_user_data + 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 +398,18 @@ static int Callback( Upnp_EventType event_type, void* p_event, void* p_user_data + + 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 +419,9 @@ static int Callback( Upnp_EventType event_type, void* p_event, void* p_user_data + { + /* 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/source/xmultimedia/vlc/FrugalBuild b/source/xmultimedia/vlc/FrugalBuild index a2240d8..7bb4800 100644 --- a/source/xmultimedia/vlc/FrugalBuild +++ b/source/xmultimedia/vlc/FrugalBuild @@ -9,7 +9,7 @@ pkgname=vlc pkgver=2.2.6 pkgextraver= -pkgrel=7 +pkgrel=8 pkgdesc="The cross-platform media player and streaming server." url="http://www.videolan.org/vlc/" ## TODO: split a lot more -- crazy -- @@ -101,14 +101,16 @@ if ! Fuse $USE_DEVEL; then vlc-2.1.0-TomWij-bisected-PA-broken-underflow.patch \ vlc-9999-libva-1.2.1-compat.patch \ vlc-2.2.4-relax_ffmpeg.patch \ - vlc-2.2.4-ffmpeg3.patch) + vlc-2.2.4-ffmpeg3.patch \ + 0014-upnp-Add-support-for-libupnp-1.8.patch ) sha1sums=('d299dce6a5c94af4292657b6cb99c44654024f70' \ '5d7dba23756ff577a90b8631b187fbeac1f94e17' \ 'b1d20239bd0f7ee0666cec8d1f8118ab087f9893' \ '61ce442f390b3f744bbcd5771368c13e9236ea81' \ 'b435ddbb4df0cbe7f983fba74e5b5747d6a62e9c' \ 'e09103af98841ca149e26c0ef8051ecef588832b' \ - 'c572727ab1604aed3414ce5622bcc123d2accd7d') + 'c572727ab1604aed3414ce5622bcc123d2accd7d' \ + 'c7315d6d4585af517110e79776311e80584c71af') else @@ -168,7 +170,7 @@ subinstall+=("$pkgname.install") subpkgs+=('vlc-upnp') subdescs+=('vlc plugin for upnp') subrodepends+=("$pkgname>=$pkgver") -subdepends+=("libupnp>=1.6.13") +subdepends+=("libupnp>=1.8.3") subgroups+=('xmultimedia-extra vlc-codecs') subarchs+=('x86_64') subinstall+=("$pkgname.install") _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git