Commit 33f8055c authored by Bertrand Lorentz's avatar Bertrand Lorentz

WebBrowser: Depend on libsoup >= 2.42, drop libsoup-gnome dependency

Since 2.42, libsoup-gnome is deprecated and all features are now
provided by libsoup itself, with saner defaults. So we now require
version 2.42, which allows us to drop the dependency on libsoup-gnome.

Note that we still use the GNOME proxy settings when available, as this
is now done by default by libsoup itself.
parent 1a0f5acc
......@@ -39,6 +39,7 @@ acceptable; higher versions are fine.
* gio-sharp 2.99.1
* gdata-sharp-youtube 1.4
* webkit-1.0 1.2.2
* libsoup 2.42
* gudev-sharp 3.0
* gkeyfile-sharp 0.1
* libgpod-sharp 0.7.95
......
AC_DEFUN([BANSHEE_CHECK_LIBWEBKIT],
[
WEBKIT_MIN_VERSION=1.2.2
SOUP_MIN_VERSION=2.26
SOUP_GNOME_MIN_VERSION=2.26
SOUP_MIN_VERSION=2.42
AC_ARG_ENABLE(webkit, AC_HELP_STRING([--disable-webkit], [Disable extensions which require WebKit]), , enable_webkit="yes")
......@@ -15,29 +14,10 @@ AC_DEFUN([BANSHEE_CHECK_LIBWEBKIT],
AC_SUBST(LIBWEBKIT_LIBS)
AC_SUBST(LIBWEBKIT_CFLAGS)
AM_CONDITIONAL(HAVE_LIBWEBKIT, [test x$have_libwebkit = xyes])
PKG_CHECK_MODULES(LIBSOUP_2_38,
libsoup-gnome-2.4 >= 2.38,
have_libsoup_2_28=yes, have_libsoup_2_28=no)
if test x$have_libsoup_2_28 = xyes; then
AC_DEFINE(HAVE_LIBSOUP_2_38, 1, [libsoup-gnome-2.4 >= 2.38 detected])
fi
have_libsoup_gnome=no
PKG_CHECK_MODULES(LIBSOUP_GNOME,
libsoup-gnome-2.4 >= $SOUP_GNOME_MIN_VERSION,
have_libsoup_gnome=$have_libwebkit, have_libsoup_gnome=no)
AC_SUBST(LIBSOUP_GNOME_LIBS)
AC_SUBST(LIBSOUP_GNOME_CFLAGS)
AM_CONDITIONAL(HAVE_LIBSOUP_GNOME, [test x$have_libsoup_gnome = xyes])
if test x$have_libsoup_gnome = xyes; then
AC_DEFINE(HAVE_LIBSOUP_GNOME, 1, [libsoup-gnome-2.4 detected])
fi
else
have_libwebkit=no
have_libsoup_gnome=no
AM_CONDITIONAL(HAVE_LIBWEBKIT, false)
AM_CONDITIONAL(HAVE_LIBSOUP_GNOME, false)
fi
])
......@@ -354,7 +354,6 @@ ${PACKAGE}-${VERSION}
Extra Features:
Web Browser: ${have_libwebkit} (webkit-1.0 >= $WEBKIT_MIN_VERSION, libsoup-2.4 >= $SOUP_MIN_VERSION)
+ GNOME Proxy ${have_libsoup_gnome} (libsoup-gnome-2.4 >= $SOUP_GNOME_MIN_VERSION)
DAAP: ${enable_daap}
GIO Backend: ${enable_gio} (gio-sharp >= $GIOSHARP_REQUIRED)
GIO Hardware: ${enable_gio_hardware} (gudev-sharp >= $GUDEVSHARP_REQUIRED)
......
......@@ -11,11 +11,6 @@ libossifer_la_CFLAGS = $(LIBWEBKIT_CFLAGS) -D_FORTIFY_SOURCE=2 -ggdb3 -Wall
libossifer_la_LIBADD = $(LIBWEBKIT_LIBS)
libossifer_la_LDFLAGS = -avoid-version -module
if HAVE_LIBSOUP_GNOME
libossifer_la_CFLAGS += $(LIBSOUP_GNOME_CFLAGS)
libossifer_la_LIBADD += $(LIBSOUP_GNOME_LIBS)
endif
all: $(top_builddir)/bin/libossifer.so
$(top_builddir)/bin/libossifer.so: libossifer.la
......
#include <config.h>
#include <webkit/webkit.h>
#ifdef HAVE_LIBSOUP_GNOME
# include <libsoup/soup-gnome.h>
#endif
typedef struct OssiferSession OssiferSession;
typedef void (* OssiferSessionCookieJarChanged)
......@@ -50,19 +46,12 @@ ossifer_session_initialize (const gchar *cookie_db_path,
session = webkit_get_default_session ();
#ifdef HAVE_LIBSOUP_2_38
g_object_set (session,
SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, TRUE,
NULL);
#endif
#ifdef HAVE_LIBSOUP_GNOME
path = g_strdup_printf ("%s.sqlite", cookie_db_path);
cookie_jar = soup_cookie_jar_sqlite_new (path, FALSE);
#else
path = g_strdup_printf ("%s.txt", cookie_db_path);
cookie_jar = soup_cookie_jar_text_new (path, FALSE);
#endif
cookie_jar = soup_cookie_jar_db_new (path, FALSE);
soup_session_add_feature (session, SOUP_SESSION_FEATURE (cookie_jar));
g_object_unref (cookie_jar);
g_free (path);
......@@ -71,10 +60,6 @@ ossifer_session_initialize (const gchar *cookie_db_path,
G_CALLBACK (ossifer_session_cookie_jar_changed),
session_instance);
#ifdef HAVE_LIBSOUP_GNOME
soup_session_add_feature_by_type (session, SOUP_TYPE_PROXY_RESOLVER_GNOME);
#endif
return session_instance;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment