]> git.pld-linux.org Git - packages/spice-gtk.git/blob - spice-gtk-phodav.patch
- updated to 0.24
[packages/spice-gtk.git] / spice-gtk-phodav.patch
1 From d17d43ce5c43a83cbd7309f8d4fda3b802fa556a Mon Sep 17 00:00:00 2001
2 From: Marc-AndrĂ© Lureau <marcandre.lureau@redhat.com>
3 Date: Wed, 02 Apr 2014 11:49:36 +0000
4 Subject: Make phodav an optional external dependency
5
6 Now that upstream provides a stable/versioned API, it will be
7 easier to deal with than with submodules.
8 ---
9 #diff --git a/.gitmodules b/.gitmodules
10 #index cfce54a..0c618ee 100644
11 #--- a/.gitmodules
12 #+++ b/.gitmodules
13 #@@ -1,6 +1,3 @@
14 # [submodule "spice-common"]
15 #       path = spice-common
16 #       url = ../spice-common
17 #-[submodule "gtk/phodav"]
18 #-      path = gtk/phodav
19 #-      url = git://git.gnome.org/phodav
20 #diff --git a/autogen.sh b/autogen.sh
21 #index d71be70..7b4415f 100755
22 #--- a/autogen.sh
23 #+++ b/autogen.sh
24 #@@ -6,7 +6,6 @@ srcdir=`dirname $0`
25 # test -z "$srcdir" && srcdir=.
26
27 # git submodule update --init --recursive
28 #-(cd "$srcdir/gtk/phodav/" && intltoolize -f)
29
30 # gtkdocize
31 # autoreconf -v --force --install
32 diff --git a/configure.ac b/configure.ac
33 index fa3a2e4..45417d2 100644
34 --- a/configure.ac
35 +++ b/configure.ac
36 @@ -75,8 +75,6 @@ AC_CONFIG_SUBDIRS([spice-common])
37  COMMON_CFLAGS='-I ${top_srcdir}/spice-common/ -I ${top_srcdir}/spice-common/spice-protocol/'
38  AC_SUBST(COMMON_CFLAGS)
39  
40 -AC_CONFIG_SUBDIRS([gtk/phodav])
41 -
42  SPICE_GTK_MAJOR_VERSION=`echo $PACKAGE_VERSION | cut -d. -f1`
43  SPICE_GTK_MINOR_VERSION=`echo $PACKAGE_VERSION | cut -d. -f2`
44  SPICE_GTK_MICRO_VERSION=`echo $PACKAGE_VERSION | cut -d. -f3 | cut -d- -f1`
45 @@ -273,6 +271,11 @@ PKG_CHECK_MODULES(SOUP, libsoup-2.4)
46  AC_SUBST(SOUP_CFLAGS)
47  AC_SUBST(SOUP_LIBS)
48  
49 +PKG_CHECK_MODULES(PHODAV, [libphodav-1.0], [have_phodav=yes], [have_phodav=no])
50 +AC_SUBST(PHODAV_CFLAGS)
51 +AC_SUBST(PHODAV_LIBS)
52 +AS_IF([test "x$have_phodav" = "xyes"],
53 +       AC_DEFINE(USE_PHODAV, [1], [Define if supporting phodav]))
54  
55  AC_ARG_WITH([audio],
56    AS_HELP_STRING([--with-audio=@<:@gstreamer/pulse/auto/no@:>@], [Select audio backend @<:@default=auto@:>@]),
57 @@ -750,6 +753,7 @@ AC_MSG_NOTICE([
58          Smartcard support:        ${have_smartcard}
59          USB redirection support:  ${have_usbredir} ${with_usbredir_hotplug}
60          DBus:                     ${have_dbus}
61 +        PhoDAV:                   ${have_phodav}
62  
63          Now type 'make' to build $PACKAGE
64  
65 diff --git a/gtk/Makefile.am b/gtk/Makefile.am
66 index 2e38cce..e28220c 100644
67 --- a/gtk/Makefile.am
68 +++ b/gtk/Makefile.am
69 @@ -1,6 +1,5 @@
70  NULL =
71 -
72 -SUBDIRS = phodav
73 +SUBDIRS =
74  
75  if WITH_CONTROLLER
76  SUBDIRS += controller
77 @@ -97,6 +96,7 @@ SPICE_COMMON_CPPFLAGS =                                               \
78         $(USBREDIR_CFLAGS)                                      \
79         $(GUDEV_CFLAGS)                                         \
80         $(SOUP_CFLAGS)                                          \
81 +       $(PHODAV_CFLAGS)                                        \
82         $(NULL)
83  
84  AM_CPPFLAGS =                                  \
85 @@ -186,7 +186,6 @@ libspice_client_glib_2_0_la_LDFLAGS =       \
86  libspice_client_glib_2_0_la_LIBADD =                                   \
87         $(top_builddir)/spice-common/common/libspice-common.la          \
88         $(top_builddir)/spice-common/common/libspice-common-client.la   \
89 -       phodav/libphodav.la                                             \
90         $(GLIB2_LIBS)                                                   \
91         $(SOUP_LIBS)                                                    \
92         $(GOBJECT2_LIBS)                                                \
93 @@ -202,6 +201,7 @@ libspice_client_glib_2_0_la_LIBADD =                                        \
94         $(SMARTCARD_LIBS)                                               \
95         $(USBREDIR_LIBS)                                                \
96         $(GUDEV_LIBS)                                                   \
97 +       $(PHODAV_LIBS)                                                  \
98         $(NULL)
99  
100  if WITH_POLKIT
101 diff --git a/gtk/channel-webdav.c b/gtk/channel-webdav.c
102 index 2bee513..c619e48 100644
103 --- a/gtk/channel-webdav.c
104 +++ b/gtk/channel-webdav.c
105 @@ -15,6 +15,8 @@
106     You should have received a copy of the GNU Lesser General Public
107     License along with this library; if not, see <http://www.gnu.org/licenses/>.
108  */
109 +#include "config.h"
110 +
111  #include "spice-client.h"
112  #include "spice-common.h"
113  #include "spice-channel-priv.h"
114 @@ -642,6 +644,7 @@ static void spice_webdav_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg)
115  
116  
117  
118 +#ifdef USE_PHODAV
119  static void new_connection(SoupSocket *sock,
120                             SoupSocket *new,
121                             gpointer    user_data)
122 @@ -715,12 +718,14 @@ static PhodavServer* webdav_server_new(SpiceSession *session)
123  
124      return dav;
125  }
126 +#endif /* USE_PHODAV */
127  
128  static PhodavServer* phodav_server_get(SpiceSession *session, gint *port)
129  {
130      g_return_val_if_fail(SPICE_IS_SESSION(session), NULL);
131  
132 -    PhodavServer *self;
133 +#ifdef USE_PHODAV
134 +    PhodavServer *self = NULL;
135      static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
136  
137      g_static_mutex_lock(&mutex);
138 @@ -735,4 +740,7 @@ static PhodavServer* phodav_server_get(SpiceSession *session, gint *port)
139          *port = phodav_server_get_port(self);
140  
141      return self;
142 +#else
143 +    g_return_val_if_reached(NULL);
144 +#endif
145  }
146 #diff --git a/gtk/phodav b/gtk/phodav
147 #deleted file mode 160000
148 #-Subproject 2f53900e88eab21b5bd023145e0a6cce3b9cfe0
149 diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
150 index 6f3f689..e460590 100644
151 --- a/gtk/spice-channel.c
152 +++ b/gtk/spice-channel.c
153 @@ -1945,7 +1945,9 @@ gchar *spice_channel_supported_string(void)
154  #ifdef USE_USBREDIR
155                       spice_channel_type_to_string(SPICE_CHANNEL_USBREDIR),
156  #endif
157 +#ifdef USE_PHODAV
158                       spice_channel_type_to_string(SPICE_CHANNEL_WEBDAV),
159 +#endif
160                       NULL);
161  }
162  
163 @@ -2010,10 +2012,12 @@ SpiceChannel *spice_channel_new(SpiceSession *s, int type, int id)
164          break;
165      }
166  #endif
167 +#ifdef USE_PHODAV
168      case SPICE_CHANNEL_WEBDAV: {
169          gtype = SPICE_TYPE_WEBDAV_CHANNEL;
170          break;
171      }
172 +#endif
173      case SPICE_CHANNEL_PORT:
174          gtype = SPICE_TYPE_PORT_CHANNEL;
175          break;
176 diff --git a/gtk/spice-session-priv.h b/gtk/spice-session-priv.h
177 index 94535a8..4b2c151 100644
178 --- a/gtk/spice-session-priv.h
179 +++ b/gtk/spice-session-priv.h
180 @@ -18,12 +18,20 @@
181  #ifndef __SPICE_CLIENT_SESSION_PRIV_H__
182  #define __SPICE_CLIENT_SESSION_PRIV_H__
183  
184 +#include "config.h"
185 +
186  #include <glib.h>
187  #include <gio/gio.h>
188 +
189 +#ifdef USE_PHODAV
190 +#include <libphodav/phodav.h>
191 +#else
192 +typedef struct _PhodavServer PhodavServer;
193 +#endif
194 +
195  #include "desktop-integration.h"
196  #include "spice-session.h"
197  #include "spice-gtk-session.h"
198 -#include "phodav/libphodav/phodav.h"
199  #include "spice-channel-cache.h"
200  #include "decode.h"
201  
202 --
203 cgit v0.9.0.2-2-gbebe
This page took 0.062399 seconds and 3 git commands to generate.