Skip to content

Commit 658e833

Browse files
author
Neeraj Deshpande
authored
Merge pull request #432 from WebPlatformForEmbedded/main-update-libsoup
Upgraded libsoup version to 2.74.
2 parents b78663a + a030a97 commit 658e833

File tree

11 files changed

+173
-62
lines changed

11 files changed

+173
-62
lines changed

package/Config.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1703,6 +1703,7 @@ menu "Networking"
17031703
source "package/libpagekite/Config.in"
17041704
source "package/libpcap/Config.in"
17051705
source "package/libpjsip/Config.in"
1706+
source "package/libpsl/Config.in"
17061707
source "package/librsync/Config.in"
17071708
source "package/libshairplay/Config.in"
17081709
source "package/libshout/Config.in"

package/libpsl/Config.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
config BR2_PACKAGE_LIBPSL
2+
bool "libpsl"
3+
depends on BR2_USE_WCHAR # libunistring, icu
4+
select BR2_PACKAGE_LIBIDN2 if !BR2_PACKAGE_ICU && !BR2_PACKAGE_LIBIDN
5+
select BR2_PACKAGE_LIBUNISTRING if !BR2_PACKAGE_ICU
6+
help
7+
C library to handle the Public Suffix List of TLDs.
8+
9+
https://github.com/rockdaboot/libpsl
10+
11+
comment "libpsl needs a toolchain w/ wchar"
12+
depends on !BR2_USE_WCHAR

package/libpsl/libpsl.hash

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Locally generated
2+
sha256 ac6ce1e1fbd4d0254c4ddb9d37f1fa99dec83619c1253328155206b896210d4c libpsl-0.21.1.tar.gz
3+
4+
# Hashes for license files:
5+
sha256 7903413e7aa0bbcb77aa19150a3f1034edc0a760cff174f9a53efe4de6f056a4 COPYING
6+
sha256 1d7f52747a9169751cdf2641a8299c0098e9ecdf9429296ffd55bdb14c9ed5b3 src/LICENSE.chromium

package/libpsl/libpsl.mk

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
################################################################################
2+
#
3+
# libpsl
4+
#
5+
################################################################################
6+
7+
LIBPSL_VERSION = 0.21.1
8+
LIBPSL_SITE = https://github.com/rockdaboot/libpsl/releases/download/$(LIBPSL_VERSION)
9+
LIBPSL_LICENSE = MIT, BSD-3-Clause
10+
LIBPSL_LICENSE_FILES = COPYING src/LICENSE.chromium
11+
LIBPSL_DEPENDENCIES = host-pkgconf
12+
LIBPSL_INSTALL_STAGING = YES
13+
14+
# The order of checks is the same as done by libpsl when configured.
15+
ifeq ($(BR2_PACKAGE_LIBIDN2)$(BR2_PACKAGE_LIBUNISTRING),yy)
16+
LIBPSL_CONF_OPTS += -Druntime=libidn2 -Dbuiltin=libidn2
17+
LIBPSL_DEPENDENCIES += libidn2 libunistring
18+
else ifeq ($(BR2_PACKAGE_ICU),y)
19+
LIBPSL_CONF_OPTS += -Druntime=libicu -Dbuiltin=libicu
20+
LIBPSL_DEPENDENCIES += icu
21+
else
22+
LIBPSL_CONF_OPTS += -Druntime=libidn -Dbuiltin=libidn
23+
LIBPSL_DEPENDENCIES += libidn libunistring
24+
endif
25+
26+
$(eval $(meson-package))

package/libsoup/0001-Revert-tld-parser-use-Python-3.patch

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
From 5c3d431bdb094c59997f2a23e31e83f815ab667c Mon Sep 17 00:00:00 2001
2+
From: Fabrice Fontaine <[email protected]>
3+
Date: Thu, 1 Jul 2021 22:09:23 +0200
4+
Subject: [PATCH] meson.build: set c_std to gnu99
5+
6+
Set c_std to gnu99 to avoid the following build failure with gcc 4.8:
7+
8+
In file included from /tmp/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/resolv.h:65:0,
9+
from /tmp/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/glib-2.0/gio/gnetworking.h:40,
10+
from ../libsoup/soup-address.c:14:
11+
/tmp/instance-0/output-1/host/arm-buildroot-linux-gnueabi/sysroot/usr/include/arpa/nameser.h:115:2: error: unknown type name 'u_char'
12+
const u_char *_msg, *_eom;
13+
^
14+
15+
Fixes:
16+
- http://autobuild.buildroot.org/results/56b9cb987e25b99d6fed16c537552f47c3376f21
17+
18+
Signed-off-by: Fabrice Fontaine <[email protected]>
19+
[Upstream status:
20+
https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/241]
21+
---
22+
meson.build | 2 +-
23+
1 file changed, 1 insertion(+), 1 deletion(-)
24+
25+
diff --git a/meson.build b/meson.build
26+
index 4dfd8c15..a5ebc63a 100644
27+
--- a/meson.build
28+
+++ b/meson.build
29+
@@ -2,6 +2,6 @@ project('libsoup', 'c',
30+
version: '2.74.0',
31+
meson_version : '>= 0.50',
32+
license : 'LGPL2',
33+
- default_options : 'c_std=c99')
34+
+ default_options : 'c_std=gnu99')
35+
36+
gnome = import('gnome')
37+
38+
--
39+
2.30.2
40+

package/libsoup/0002-soup-cookie-jar-add-API-to-set-limit-of-cookies.patch

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
diff -ruN libsoup.orig/libsoup/soup-cookie-jar.c libsoup/libsoup/soup-cookie-jar.c
2-
--- libsoup.orig/libsoup/soup-cookie-jar.c 2018-08-09 21:02:38.000000000 +0530
3-
+++ libsoup/libsoup/soup-cookie-jar.c 2021-01-12 00:13:00.018617423 +0530
4-
@@ -50,8 +50,12 @@
1+
diff -pruN libsoup-2.74.0.orig/libsoup/soup-cookie-jar.c libsoup-2.74.0/libsoup/soup-cookie-jar.c
2+
--- libsoup-2.74.0.orig/libsoup/soup-cookie-jar.c 2021-08-23 04:02:34.228970300 +0530
3+
+++ libsoup-2.74.0/libsoup/soup-cookie-jar.c 2022-04-11 15:29:34.207731786 +0530
4+
@@ -51,8 +51,12 @@ typedef struct {
55
GHashTable *domains, *serials;
66
guint serial;
77
SoupCookieJarAcceptPolicy accept_policy;
@@ -14,7 +14,7 @@ diff -ruN libsoup.orig/libsoup/soup-cookie-jar.c libsoup/libsoup/soup-cookie-jar
1414
static void soup_cookie_jar_session_feature_init (SoupSessionFeatureInterface *feature_interface, gpointer interface_data);
1515

1616
G_DEFINE_TYPE_WITH_CODE (SoupCookieJar, soup_cookie_jar, G_TYPE_OBJECT,
17-
@@ -234,6 +238,17 @@
17+
@@ -237,6 +241,17 @@ soup_cookie_jar_new (void)
1818
return g_object_new (SOUP_TYPE_COOKIE_JAR, NULL);
1919
}
2020

@@ -32,7 +32,7 @@ diff -ruN libsoup.orig/libsoup/soup-cookie-jar.c libsoup/libsoup/soup-cookie-jar
3232
/**
3333
* soup_cookie_jar_save:
3434
* @jar: a #SoupCookieJar
35-
@@ -258,10 +273,13 @@
35+
@@ -261,10 +276,13 @@ soup_cookie_jar_changed (SoupCookieJar *
3636
{
3737
SoupCookieJarPrivate *priv = soup_cookie_jar_get_instance_private (jar);
3838

@@ -47,8 +47,8 @@ diff -ruN libsoup.orig/libsoup/soup-cookie-jar.c libsoup/libsoup/soup-cookie-jar
4747
g_hash_table_insert (priv->serials, new, GUINT_TO_POINTER (priv->serial));
4848
}
4949

50-
@@ -433,6 +451,15 @@
51-
return get_cookies (jar, uri, for_http, TRUE);
50+
@@ -564,6 +582,15 @@ incoming_cookie_is_third_party (SoupCook
51+
return !g_hash_table_lookup (priv->domains, cookie->domain);
5252
}
5353

5454
+static unsigned cookie_size (SoupCookie *cookie)
@@ -61,9 +61,9 @@ diff -ruN libsoup.orig/libsoup/soup-cookie-jar.c libsoup/libsoup/soup-cookie-jar
6161
+}
6262
+
6363
/**
64-
* soup_cookie_jar_add_cookie:
64+
* soup_cookie_jar_add_cookie_full:
6565
* @jar: a #SoupCookieJar
66-
@@ -463,6 +490,11 @@
66+
@@ -618,6 +645,11 @@ soup_cookie_jar_add_cookie_full (SoupCoo
6767
return;
6868
}
6969

@@ -72,10 +72,10 @@ diff -ruN libsoup.orig/libsoup/soup-cookie-jar.c libsoup/libsoup/soup-cookie-jar
7272
+ return;
7373
+ }
7474
+
75-
priv = soup_cookie_jar_get_instance_private (jar);
7675
old_cookies = g_hash_table_lookup (priv->domains, cookie->domain);
7776
for (oc = old_cookies; oc; oc = oc->next) {
78-
@@ -498,6 +530,12 @@
77+
old_cookie = oc->data;
78+
@@ -657,6 +689,12 @@ soup_cookie_jar_add_cookie_full (SoupCoo
7979
soup_cookie_free (cookie);
8080
return;
8181
}
@@ -88,10 +88,10 @@ diff -ruN libsoup.orig/libsoup/soup-cookie-jar.c libsoup/libsoup/soup-cookie-jar
8888

8989
if (last)
9090
last->next = g_slist_append (NULL, cookie);
91-
diff -ruN libsoup.orig/libsoup/soup-cookie-jar.h libsoup/libsoup/soup-cookie-jar.h
92-
--- libsoup.orig/libsoup/soup-cookie-jar.h 2018-08-10 12:58:54.000000000 +0530
93-
+++ libsoup/libsoup/soup-cookie-jar.h 2021-01-11 23:51:29.206013391 +0530
94-
@@ -52,6 +52,9 @@
91+
diff -pruN libsoup-2.74.0.orig/libsoup/soup-cookie-jar.h libsoup-2.74.0/libsoup/soup-cookie-jar.h
92+
--- libsoup-2.74.0.orig/libsoup/soup-cookie-jar.h 2021-08-23 04:02:34.228970300 +0530
93+
+++ libsoup-2.74.0/libsoup/soup-cookie-jar.h 2022-04-11 15:18:31.560698362 +0530
94+
@@ -53,6 +53,9 @@ GType soup_cookie_ja
9595
SOUP_AVAILABLE_IN_2_24
9696
SoupCookieJar * soup_cookie_jar_new (void);
9797
SOUP_AVAILABLE_IN_2_24
@@ -101,3 +101,22 @@ diff -ruN libsoup.orig/libsoup/soup-cookie-jar.h libsoup/libsoup/soup-cookie-jar
101101
char * soup_cookie_jar_get_cookies (SoupCookieJar *jar,
102102
SoupURI *uri,
103103
gboolean for_http);
104+
diff -pruN libsoup-2.74.0.orig/libsoup/soup-proxy-resolver-default.h libsoup-2.74.0/libsoup/soup-proxy-resolver-default.h
105+
--- libsoup-2.74.0.orig/libsoup/soup-proxy-resolver-default.h 2021-08-23 04:02:34.228970300 +0530
106+
+++ libsoup-2.74.0/libsoup/soup-proxy-resolver-default.h 2022-04-11 17:47:21.294605162 +0530
107+
@@ -8,6 +8,8 @@
108+
109+
#include <libsoup/soup-types.h>
110+
111+
+G_BEGIN_DECLS
112+
+
113+
#define SOUP_PROXY_RESOLVER_DEFAULT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SOUP_TYPE_PROXY_RESOLVER_DEFAULT, SoupProxyResolverDefault))
114+
#define SOUP_PROXY_RESOLVER_DEFAULT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_PROXY_RESOLVER_DEFAULT, SoupProxyResolverDefaultClass))
115+
#define SOUP_IS_PROXY_RESOLVER_DEFAULT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SOUP_TYPE_PROXY_RESOLVER_DEFAULT))
116+
@@ -28,4 +30,6 @@ SOUP_AVAILABLE_IN_2_4
117+
GType soup_proxy_resolver_default_get_type (void);
118+
#define SOUP_TYPE_PROXY_RESOLVER_DEFAULT (soup_proxy_resolver_default_get_type ())
119+
120+
+G_END_DECLS
121+
+
122+
#endif /* __SOUP_PROXY_RESOLVER_DEFAULT_H__ */

package/libsoup/Config.in

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
config BR2_PACKAGE_LIBSOUP
22
bool "libsoup"
3-
depends on BR2_USE_WCHAR # glib2 and gnutls
3+
depends on BR2_USE_WCHAR # glib2, gnutls and libpsl
44
depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
55
depends on BR2_USE_MMU # glib2
66
select BR2_PACKAGE_LIBXML2
77
select BR2_PACKAGE_LIBGLIB2
8+
select BR2_PACKAGE_LIBPSL
89
select BR2_PACKAGE_SQLITE
910
help
1011
libsoup is an HTTP client/server library. It uses GObject
@@ -23,8 +24,8 @@ config BR2_PACKAGE_LIBSOUP_GNOME
2324
config BR2_PACKAGE_LIBSOUP_SSL
2425
bool "https support"
2526
depends on !BR2_STATIC_LIBS # glib-networking, gnutls
26-
select BR2_PACKAGE_GLIB_NETWORKING
27-
select BR2_PACKAGE_GNUTLS
27+
select BR2_PACKAGE_GLIB_NETWORKING # runtime
28+
select BR2_PACKAGE_GNUTLS # runtime
2829
help
2930
Enable HTTPS (SSL) support.
3031

package/libsoup/libsoup.hash

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# From https://ftp.gnome.org/pub/GNOME/sources/libsoup/2.62/libsoup-2.62.3.sha256sum
2-
sha256 d312ade547495c2093ff8bda61f9b9727a98cfdae339f3263277dd39c0451172 libsoup-2.62.3.tar.xz
1+
# From https://ftp.gnome.org/pub/GNOME/sources/libsoup/2.74/libsoup-2.74.0.sha256sum
2+
sha256 33b1d4e0d639456c675c227877e94a8078d731233e2d57689c11abcef7d3c48e libsoup-2.74.0.tar.xz
33
# Locally calculated
44
sha256 b7993225104d90ddd8024fd838faf300bea5e83d91203eab98e29512acebd69c COPYING

package/libsoup/libsoup.mk

Lines changed: 46 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,61 @@
44
#
55
################################################################################
66

7-
LIBSOUP_VERSION_MAJOR = 2.62
8-
LIBSOUP_VERSION = $(LIBSOUP_VERSION_MAJOR).3
7+
LIBSOUP_VERSION_MAJOR = 2.74
8+
LIBSOUP_VERSION = $(LIBSOUP_VERSION_MAJOR).0
99
LIBSOUP_SOURCE = libsoup-$(LIBSOUP_VERSION).tar.xz
1010
LIBSOUP_SITE = http://ftp.gnome.org/pub/gnome/sources/libsoup/$(LIBSOUP_VERSION_MAJOR)
1111
LIBSOUP_LICENSE = LGPL-2.0+
1212
LIBSOUP_LICENSE_FILES = COPYING
13+
LIBSOUP_CPE_ID_VENDOR = gnome
1314
LIBSOUP_INSTALL_STAGING = YES
14-
LIBSOUP_CONF_ENV = ac_cv_path_GLIB_GENMARSHAL=$(LIBGLIB2_HOST_BINARY)
15-
LIBSOUP_CONF_OPTS = --disable-glibtest --enable-vala=no --with-gssapi=no
16-
LIBSOUP_DEPENDENCIES = host-pkgconf host-libglib2 \
17-
libglib2 libxml2 sqlite host-intltool
15+
LIBSOUP_DEPENDENCIES = \
16+
host-intltool \
17+
host-libglib2 \
18+
host-pkgconf \
19+
libglib2 \
20+
libpsl \
21+
libxml2 \
22+
sqlite \
23+
$(TARGET_NLS_DEPENDENCIES)
1824

19-
ifeq ($(BR2_PACKAGE_LIBSOUP_GNOME),y)
20-
LIBSOUP_CONF_OPTS += --with-gnome
25+
LIBSOUP_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS)
26+
27+
LIBSOUP_CONF_OPTS = \
28+
-Dgtk_doc=false \
29+
-Dntlm=disabled \
30+
-Dsysprof=disabled \
31+
-Dtests=false \
32+
-Dtls_check=false \
33+
-Dvapi=disabled
34+
35+
ifeq ($(BR2_PACKAGE_BROTLI),y)
36+
LIBSOUP_CONF_OPTS += -Dbrotli=enabled
37+
LIBSOUP_DEPENDENCIES += brotli
38+
else
39+
LIBSOUP_CONF_OPTS += -Dbrotli=disabled
40+
endif
41+
42+
ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
43+
LIBSOUP_CONF_OPTS += -Dintrospection=enabled
44+
LIBSOUP_DEPENDENCIES += gobject-introspection
2145
else
22-
LIBSOUP_CONF_OPTS += --without-gnome
46+
LIBSOUP_CONF_OPTS += -Dintrospection=disabled
2347
endif
2448

25-
ifeq ($(BR2_PACKAGE_LIBSOUP_SSL),y)
26-
LIBSOUP_DEPENDENCIES += glib-networking
49+
ifeq ($(BR2_PACKAGE_LIBKRB5),y)
50+
LIBSOUP_CONF_OPTS += \
51+
-Dgssapi=enabled \
52+
-Dkrb5_config=$(STAGING_DIR)/usr/bin/krb5-config
53+
LIBSOUP_DEPENDENCIES += libkrb5
54+
else
55+
LIBSOUP_CONF_OPTS += -Dgssapi=disabled
56+
endif
57+
58+
ifeq ($(BR2_PACKAGE_LIBSOUP_GNOME),y)
59+
LIBSOUP_CONF_OPTS += -Dgnome=true
2760
else
28-
LIBSOUP_CONF_OPTS += --disable-tls-check
61+
LIBSOUP_CONF_OPTS += -Dgnome=false
2962
endif
3063

31-
$(eval $(autotools-package))
64+
$(eval $(meson-package))

0 commit comments

Comments
 (0)