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
6 Now that upstream provides a stable/versioned API, it will be
7 easier to deal with than with submodules.
9 #diff --git a/.gitmodules b/.gitmodules
10 #index cfce54a..0c618ee 100644
14 # [submodule "spice-common"]
16 # url = ../spice-common
17 #-[submodule "gtk/phodav"]
19 #- url = git://git.gnome.org/phodav
20 #diff --git a/autogen.sh b/autogen.sh
21 #index d71be70..7b4415f 100755
24 #@@ -6,7 +6,6 @@ srcdir=`dirname $0`
25 # test -z "$srcdir" && srcdir=.
27 # git submodule update --init --recursive
28 #-(cd "$srcdir/gtk/phodav/" && intltoolize -f)
31 # autoreconf -v --force --install
32 diff --git a/configure.ac b/configure.ac
33 index fa3a2e4..45417d2 100644
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)
40 -AC_CONFIG_SUBDIRS([gtk/phodav])
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)
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]))
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}
61 + PhoDAV: ${have_phodav}
63 Now type 'make' to build $PACKAGE
65 diff --git a/gtk/Makefile.am b/gtk/Makefile.am
66 index 2e38cce..e28220c 100644
77 @@ -97,6 +96,7 @@ SPICE_COMMON_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 \
93 @@ -202,6 +201,7 @@ libspice_client_glib_2_0_la_LIBADD = \
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
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/>.
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)
119 static void new_connection(SoupSocket *sock,
122 @@ -715,12 +718,14 @@ static PhodavServer* webdav_server_new(SpiceSession *session)
126 +#endif /* USE_PHODAV */
128 static PhodavServer* phodav_server_get(SpiceSession *session, gint *port)
130 g_return_val_if_fail(SPICE_IS_SESSION(session), NULL);
132 - PhodavServer *self;
134 + PhodavServer *self = NULL;
135 static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
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);
143 + g_return_val_if_reached(NULL);
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)
155 spice_channel_type_to_string(SPICE_CHANNEL_USBREDIR),
158 spice_channel_type_to_string(SPICE_CHANNEL_WEBDAV),
163 @@ -2010,10 +2012,12 @@ SpiceChannel *spice_channel_new(SpiceSession *s, int type, int id)
168 case SPICE_CHANNEL_WEBDAV: {
169 gtype = SPICE_TYPE_WEBDAV_CHANNEL;
173 case SPICE_CHANNEL_PORT:
174 gtype = SPICE_TYPE_PORT_CHANNEL;
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
181 #ifndef __SPICE_CLIENT_SESSION_PRIV_H__
182 #define __SPICE_CLIENT_SESSION_PRIV_H__
190 +#include <libphodav/phodav.h>
192 +typedef struct _PhodavServer PhodavServer;
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"
203 cgit v0.9.0.2-2-gbebe