[packages/gmyth-upnp] - fix building with libupnp 1.14 - rel 10

baggins baggins at pld-linux.org
Sat Oct 24 11:12:22 CEST 2020


commit d9b7b2ec0f6e42e829b2907c90afadfafb8583a4
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Oct 24 11:12:04 2020 +0200

    - fix building with libupnp 1.14
    - rel 10

 gmyth-upnp.spec    |  6 +++--
 libupnp-1.14.patch | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 77 insertions(+), 2 deletions(-)
---
diff --git a/gmyth-upnp.spec b/gmyth-upnp.spec
index ab5d269..15f02be 100644
--- a/gmyth-upnp.spec
+++ b/gmyth-upnp.spec
@@ -2,18 +2,19 @@ Summary:	Myth TV UPnP library based upon GLib/GObject paradigm
 Summary(pl.UTF-8):	Biblioteka Myth TV UPnP oparta na paradygmacie GLib/GObject
 Name:		gmyth-upnp
 Version:	0.7.1
-Release:	9
+Release:	10
 License:	LGPL v2+
 Group:		Libraries
 Source0:	http://downloads.sourceforge.net/gmyth/%{name}-%{version}.tar.gz
 # Source0-md5:	f569d565c9cb12d50e88d23a603c7fcb
+Patch0:		libupnp-1.14.patch
 URL:		http://gmyth.sourceforge.net/
 BuildRequires:	autoconf >= 2.52
 BuildRequires:	automake >= 1.6
 BuildRequires:	glib2-devel >= 2.0
 BuildRequires:	gmyth-devel >= 0.7.1
 BuildRequires:	libtool
-BuildRequires:	libupnp1.6-devel
+BuildRequires:	libupnp-devel
 BuildRequires:	pkgconfig
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -52,6 +53,7 @@ Statyczna biblioteka gmyth.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %{__libtoolize}
diff --git a/libupnp-1.14.patch b/libupnp-1.14.patch
new file mode 100644
index 0000000..d8b5043
--- /dev/null
+++ b/libupnp-1.14.patch
@@ -0,0 +1,73 @@
+diff -ur gmyth-upnp-0.7.1/src/gmyth_upnp.c gmyth-upnp-0.7.1-libupnp-1.14/src/gmyth_upnp.c
+--- gmyth-upnp-0.7.1/src/gmyth_upnp.c	2008-03-03 14:49:54.000000000 +0100
++++ gmyth-upnp-0.7.1-libupnp-1.14/src/gmyth_upnp.c	2020-10-24 11:10:12.804310963 +0200
+@@ -138,7 +138,7 @@
+     priv->servers = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
+ 
+     /* initalize upnp client */
+-    ret = UpnpInit (NULL, 0);
++    ret = UpnpInit2 (NULL, 0);
+     if (ret != UPNP_E_SUCCESS)
+         g_warning ("Fail to inilialize upnp SDK: %d", ret);
+     else
+@@ -423,27 +423,27 @@
+         case UPNP_DISCOVERY_ADVERTISEMENT_ALIVE:
+         case UPNP_DISCOVERY_SEARCH_RESULT:
+         {
+-            struct Upnp_Discovery *d_event;
++            UpnpDiscovery *d_event;
+ 
+-            d_event = (struct Upnp_Discovery *) e;
++            d_event = (UpnpDiscovery *) e;
+ 
+-            if (strcmp (d_event->ServiceType, UPNP_SERVICE_FILTER) != 0)
++            if (strcmp (UpnpDiscovery_get_ServiceType_cstr(d_event), UPNP_SERVICE_FILTER) != 0)
+             {
+-                g_warning ("invalid device : %s", d_event->DeviceId);
++                g_warning ("invalid device : %s", UpnpDiscovery_get_DeviceID_cstr(d_event));
+                 break;
+             }
+ 
+ 
+-            if (d_event->ErrCode != UPNP_E_SUCCESS)
++            if (UpnpDiscovery_get_ErrCode(d_event) != UPNP_E_SUCCESS)
+             {
+-                g_warning ("Error in Discovery: %d", d_event->ErrCode);
++                g_warning ("Error in Discovery: %d", UpnpDiscovery_get_ErrCode(d_event));
+                 break;
+             }
+ 
+-            if (_find_service_by_uuid (GMYTH_UPNP (singleton), d_event->DeviceId) == NULL)
++            if (_find_service_by_uuid (GMYTH_UPNP (singleton), UpnpDiscovery_get_DeviceID_cstr(d_event)) == NULL)
+                 _append_mythtv_server_from_loation (singleton,
+-                                                    d_event->DeviceId,
+-                                                    d_event->Location);
++                                                    UpnpDiscovery_get_DeviceID_cstr(d_event),
++                                                    UpnpDiscovery_get_Location_cstr(d_event));
+ 
+ 
+             break;
+@@ -451,18 +451,18 @@
+         case UPNP_DISCOVERY_ADVERTISEMENT_BYEBYE:
+         {
+             GMythUPnPPrivate *priv;
+-            struct Upnp_Discovery *d_event;
++            UpnpDiscovery *d_event;
+ 
+-            d_event = (struct Upnp_Discovery *) e;
+-            if (d_event->ErrCode != UPNP_E_SUCCESS)
++            d_event = (UpnpDiscovery *) e;
++            if (UpnpDiscovery_get_ErrCode(d_event) != UPNP_E_SUCCESS)
+             {
+-                g_warning ("Error in Discovery: %d", d_event->ErrCode);
++                g_warning ("Error in Discovery: %d", UpnpDiscovery_get_ErrCode(d_event));
+                 break;
+             }
+ 
+             priv = GMYTH_UPNP_GET_PRIVATE (singleton);
+             _remove_mythtv_server (singleton,
+-                                   d_event->DeviceId);
++                                   UpnpDiscovery_get_DeviceID_cstr(d_event));
+ 
+             break;
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gmyth-upnp.git/commitdiff/d9b7b2ec0f6e42e829b2907c90afadfafb8583a4



More information about the pld-cvs-commit mailing list