extra/vlc to 2.2.8-3

This commit is contained in:
Kevin Mihelich 2018-01-14 16:34:50 +00:00
parent edc32caf5a
commit e1d60c6012
3 changed files with 41 additions and 153 deletions

View file

@ -1,143 +0,0 @@
From 17faa5cd8e2dd041f87e1a2ee2789513d363dd63 Mon Sep 17 00:00:00 2001
From: Kevin Mihelich <kevin@archlinuxarm.org>
Date: Thu, 11 Jan 2018 18:56:13 -0700
Subject: [PATCH] Revert "upnp: Add support for libupnp 1.8"
This reverts commit 825dca78be3a81e2a1c5d04137aa01b1cb32dfd3.
---
modules/services_discovery/upnp.cpp | 63 +++++++------------------------------
1 file changed, 12 insertions(+), 51 deletions(-)
diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index 9b6ed8727a..b5f74097fb 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -40,44 +40,6 @@
#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
*/
@@ -118,7 +80,7 @@ vlc_module_end();
/*
* Local prototypes
*/
-static int Callback( Upnp_EventType event_type, UpnpEventPtr p_event, void* p_user_data );
+static int Callback( Upnp_EventType event_type, void* p_event, void* p_user_data );
const char* xml_getChildElementValue( IXML_Element* p_parent,
const char* psz_tag_name );
@@ -363,7 +325,7 @@ int xml_getNumber( IXML_Document* p_doc,
/*
* Handles all UPnP events
*/
-static int Callback( Upnp_EventType event_type, UpnpEventPtr p_event, void* p_user_data )
+static int Callback( Upnp_EventType event_type, 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;
@@ -374,23 +336,22 @@ static int Callback( Upnp_EventType event_type, UpnpEventPtr p_event, void* p_us
case UPNP_DISCOVERY_ADVERTISEMENT_ALIVE:
case UPNP_DISCOVERY_SEARCH_RESULT:
{
- const UpnpDiscovery* p_discovery = ( const UpnpDiscovery* )p_event;
+ struct Upnp_Discovery* p_discovery = ( struct Upnp_Discovery* )p_event;
IXML_Document *p_description_doc = 0;
int i_res;
- i_res = UpnpDownloadXmlDoc( UpnpDiscovery_get_Location_cstr( p_discovery ), &p_description_doc );
-
+ i_res = UpnpDownloadXmlDoc( p_discovery->Location, &p_description_doc );
if ( i_res != UPNP_E_SUCCESS )
{
msg_Warn( p_sd, "Could not download device description! "
"Fetching data from %s failed: %s",
- UpnpDiscovery_get_Location_cstr( p_discovery ), UpnpGetErrorMessage( i_res ) );
+ p_discovery->Location, UpnpGetErrorMessage( i_res ) );
return i_res;
}
MediaServer::parseDeviceDescription( p_description_doc,
- UpnpDiscovery_get_Location_cstr( p_discovery ), p_sd );
+ p_discovery->Location, p_sd );
ixmlDocument_free( p_description_doc );
}
@@ -398,18 +359,18 @@ static int Callback( Upnp_EventType event_type, UpnpEventPtr p_event, void* p_us
case UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE:
{
- const UpnpDiscovery* p_discovery = ( const UpnpDiscovery* )p_event;
+ struct Upnp_Discovery* p_discovery = ( struct Upnp_Discovery* )p_event;
- p_sys->p_server_list->removeServer( UpnpDiscovery_get_DeviceID_cstr( p_discovery ) );
+ p_sys->p_server_list->removeServer( p_discovery->DeviceId );
}
break;
case UPNP_EVENT_RECEIVED:
{
- const UpnpEvent* p_e = ( const UpnpEvent* )p_event;
+ Upnp_Event* p_e = ( Upnp_Event* )p_event;
- MediaServer* p_server = p_sys->p_server_list->getServerBySID( UpnpEvent_get_SID_cstr( p_e ) );
+ MediaServer* p_server = p_sys->p_server_list->getServerBySID( p_e->Sid );
if ( p_server ) p_server->fetchContents();
}
break;
@@ -419,9 +380,9 @@ static int Callback( Upnp_EventType event_type, UpnpEventPtr p_event, void* p_us
{
/* Re-subscribe. */
- const UpnpEventSubscribe* p_s = ( const UpnpEventSubscribe* )p_event;
+ Upnp_Event_Subscribe* p_s = ( Upnp_Event_Subscribe* )p_event;
- MediaServer* p_server = p_sys->p_server_list->getServerBySID( UpnpEventSubscribe_get_SID_cstr( p_s ) );
+ MediaServer* p_server = p_sys->p_server_list->getServerBySID( p_s->Sid );
if ( p_server ) p_server->subscribeToContentDirectory();
}
break;
--
2.15.1

View file

@ -6,11 +6,10 @@
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - enable gles2
# - patch to revert libupnp 1.8 changes that break building against libupnp 1.6
pkgname=vlc
pkgver=2.2.8
pkgrel=2
pkgrel=3
pkgdesc='Multi-platform MPEG, VCD/DVD, and DivX player'
url='https://www.videolan.org/vlc/'
arch=('x86_64')
@ -60,25 +59,25 @@ conflicts=('vlc-plugin')
replaces=('vlc-plugin')
options=('!emptydirs')
source=(https://download.videolan.org/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.xz{,.asc}
vlc-2.2.6-fix-memleak.patch
update-vlc-plugin-cache.hook
vlc-2.2.6-fix-memleak.patch
lua53_compat.patch
0001-Revert-upnp-Add-support-for-libupnp-1.8.patch)
vlc-2.2.8-libupnp-1.6.24.patch)
sha512sums=('adde16f4b4bd2d94f104bb3b99995df6bf4603bc67333c7615cb8d1d31ca63440b6b0aa93de9ccf0dba717cf905577c7d0bca7baba63caf401790b82eac3e04a'
'SKIP'
'0f16c0e1a21808a3e48a276ed41c3845650bb2d5df5386c8c50832aa769959a8d440086b0af3ae17add754b449a8501334b7f167c68210c255f55b53c40a799f'
'd9e69a01eb8868647beac0f419328e6ca3fe14a2e2a9e6ce4b61ed590b41b0136fb3ac9e284b174a910c2fe8822d1b37445a48d0b7caea647060ebfabe899e7b'
'0f16c0e1a21808a3e48a276ed41c3845650bb2d5df5386c8c50832aa769959a8d440086b0af3ae17add754b449a8501334b7f167c68210c255f55b53c40a799f'
'33cda373aa1fb3ee19a78748e2687f2b93c8662c9fda62ecd122a2e649df8edaceb54dda3991bc38c80737945a143a9e65baa2743a483bb737bb94cd590dc25f'
'4e12a7c4a6fc8287c8e9fda67825ec8bcd68d00e02846f825b5a3caf177d2b8cd4afcaddb517b2fc1ed6047f9b060e4ae8caafc1594476036c423d9474bcd86a')
'28c7ec2cb6c84e7774daa281092d48b0a0719374ef196b03088ed66d20cb5eca52a42e7a141d9a71623aff24a17473dd8d32ba6779edb24af4788a765e3cef81')
validpgpkeys=('65F7C6B4206BD057A7EB73787180713BE58D1ADC') # VideoLAN Release Signing Key
prepare() {
cd ${pkgname}-${pkgver}
sed -i -e 's:truetype/freefont:TTF:g' modules/text_renderer/freetype.c
sed -i -e 's:truetype/ttf-dejavu:TTF:g' modules/visualization/projectm.cpp
patch -p1 < "${srcdir}/lua53_compat.patch"
patch -p1 < "${srcdir}/vlc-2.2.6-fix-memleak.patch"
patch -p1 < "${srcdir}/0001-Revert-upnp-Add-support-for-libupnp-1.8.patch"
patch -Np1 < "${srcdir}/lua53_compat.patch"
patch -Np1 < "${srcdir}/vlc-2.2.6-fix-memleak.patch"
patch -Np1 < "${srcdir}/vlc-2.2.8-libupnp-1.6.24.patch"
}
build() {
@ -87,7 +86,7 @@ build() {
export PKG_CONFIG_PATH="/usr/lib/ffmpeg2.8/pkgconfig"
export CFLAGS+=" -I/usr/include/samba-4.0"
export CPPFLAGS+=" -I/usr/include/samba-4.0"
export CXXFLAGS+=" -std=gnu++98"
export CXXFLAGS+=" -std=c++11"
export LUAC=/usr/bin/luac
export LUA_LIBS="$(pkg-config --libs lua)"
export RCC=/usr/bin/rcc-qt4

View file

@ -0,0 +1,32 @@
From 9288c513fd7288ea85cd162aa610ca6d7e083992 Mon Sep 17 00:00:00 2001
From: anthraxx <levente@leventepolyak.net>
Date: Fri, 11 Jan 2018 23:57:53 +0100
Subject: [PATCH] avoid defining getter functions present in libupnp 1.6.24
---
modules/services_discovery/upnp.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index b265113..f18afd6 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -50,6 +50,7 @@ typedef Upnp_Action_Complete UpnpActionComplete;
typedef Upnp_Event UpnpEvent;
typedef Upnp_Event_Subscribe UpnpEventSubscribe;
+#if UPNP_VERSION < 10624
static const char* UpnpDiscovery_get_Location_cstr( const UpnpDiscovery* p_discovery )
{
return p_discovery->Location;
@@ -74,6 +75,7 @@ static const char* UpnpEventSubscribe_get_SID_cstr( const UpnpEventSubscribe* p_
{
return p_s->Sid;
}
+#endif
#else
typedef const void* UpnpEventPtr;
#endif
--
2.15.1