]> git.pld-linux.org Git - packages/gmyth-upnp.git/commitdiff
- fix building with libupnp 1.14 master auto/th/gmyth-upnp-0.7.1-10
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 24 Oct 2020 09:12:04 +0000 (11:12 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 24 Oct 2020 09:12:04 +0000 (11:12 +0200)
- rel 10

gmyth-upnp.spec
libupnp-1.14.patch [new file with mode: 0644]

index ab5d2693c8052e894e8f12f0261c75533131ab32..15f02be75797e283354674d73282f56570156df2 100644 (file)
@@ -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 (file)
index 0000000..d8b5043
--- /dev/null
@@ -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;
This page took 0.088098 seconds and 4 git commands to generate.