summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2023-05-19 22:14:37 -0400
committerMike Gilbert <floppym@gentoo.org>2023-05-19 22:17:22 -0400
commitdcd2a5a59bca9b11abdb5a7b56d8efe966ff3928 (patch)
tree8b1766f5556e3a175263c8c96e2a320cd7748b92 /net-vpn
parentapp-crypt/pinentry: Stabilize 1.2.1-r3 x86, #906793 (diff)
downloadgentoo-dcd2a5a59bca9b11abdb5a7b56d8efe966ff3928.tar.gz
gentoo-dcd2a5a59bca9b11abdb5a7b56d8efe966ff3928.tar.bz2
gentoo-dcd2a5a59bca9b11abdb5a7b56d8efe966ff3928.zip
net-vpn/openconnect: fix build failure
Closes: https://bugs.gentoo.org/906662 Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'net-vpn')
-rw-r--r--net-vpn/openconnect/files/openconnect-9.11-json-cflags.patch57
-rw-r--r--net-vpn/openconnect/openconnect-9.11.ebuild11
2 files changed, 63 insertions, 5 deletions
diff --git a/net-vpn/openconnect/files/openconnect-9.11-json-cflags.patch b/net-vpn/openconnect/files/openconnect-9.11-json-cflags.patch
new file mode 100644
index 000000000000..c09e87bff7c9
--- /dev/null
+++ b/net-vpn/openconnect/files/openconnect-9.11-json-cflags.patch
@@ -0,0 +1,57 @@
+From ce49cf495276c737fe95725da8f0773742fb838d Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Thu, 18 May 2023 15:04:17 -0400
+Subject: [PATCH] Move JSON_CFLAGS before LIBPROXY_CFLAGS
+
+Depending on build options, libproxy-1.0.pc depends indirectly
+on json-c.pc:
+
+libproxy-1.0 -> gio-2.0 -> mount -> libcryptsetup -> json-c
+
+This causes "pkg-config --cflags libproxy-1.0" to emit
+"-I/usr/include/json-c".
+
+json-c installs a "json.h" file that conflicts with the one provided by
+json-parser. If json-c comes before json-parser on the compiler command,
+we get a build failure:
+
+openconnect-internal.h:1654:59: error: unknown type name 'json_value'
+
+[ dwmw2: This is a combination of at *least* three different bugs in
+ three different packages conspiring to be my problem. See
+ https://gitlab.com/openconnect/openconnect/-/merge_requests/476#note_1397129468
+ But still, working around it does no harm for now.
+ Ironically, if the presence of json-c on the include path
+ wasn't *entirely* gratuitous then hiding it by putting it
+ last wouldn't actually work because then something would
+ fail to include the json-c version of <json.h> instead. ]
+
+Bug: https://bugs.gentoo.org/906662
+Signed-off-by: Mike Gilbert <floppym@gentoo.org>
+Signed-off-by: David Woodhouse <dwmw2@infradead.org>
+---
+ Makefile.am | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 495b46f2..a09c0614 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -128,10 +128,10 @@ endif
+
+ libopenconnect_la_SOURCES = version.c $(library_srcs)
+ libopenconnect_la_CFLAGS = $(AM_CFLAGS) $(SSL_CFLAGS) $(DTLS_SSL_CFLAGS) \
+- $(LIBXML2_CFLAGS) $(LIBPROXY_CFLAGS) $(ZLIB_CFLAGS) $(P11KIT_CFLAGS) \
+- $(TSS_CFLAGS) $(LIBSTOKEN_CFLAGS) $(LIBPSKC_CFLAGS) $(GSSAPI_CFLAGS) \
+- $(INTL_CFLAGS) $(ICONV_CFLAGS) $(LIBPCSCLITE_CFLAGS) $(LIBP11_CFLAGS) \
+- $(LIBLZ4_CFLAGS) $(JSON_CFLAGS)
++ $(LIBXML2_CFLAGS) $(JSON_CFLAGS) $(LIBPROXY_CFLAGS) $(ZLIB_CFLAGS) \
++ $(P11KIT_CFLAGS) $(TSS_CFLAGS) $(LIBSTOKEN_CFLAGS) $(LIBPSKC_CFLAGS) \
++ $(GSSAPI_CFLAGS) $(INTL_CFLAGS) $(ICONV_CFLAGS) $(LIBPCSCLITE_CFLAGS) \
++ $(LIBP11_CFLAGS) $(LIBLZ4_CFLAGS)
+ libopenconnect_la_LIBADD = $(SSL_LIBS) $(DTLS_SSL_LIBS) \
+ $(LIBXML2_LIBS) $(LIBPROXY_LIBS) $(ZLIB_LIBS) $(P11KIT_LIBS) \
+ $(TSS_LIBS) $(LIBSTOKEN_LIBS) $(LIBPSKC_LIBS) $(GSSAPI_LIBS) \
+--
+GitLab
+
diff --git a/net-vpn/openconnect/openconnect-9.11.ebuild b/net-vpn/openconnect/openconnect-9.11.ebuild
index bda422a32553..c0d892b7dd16 100644
--- a/net-vpn/openconnect/openconnect-9.11.ebuild
+++ b/net-vpn/openconnect/openconnect-9.11.ebuild
@@ -6,11 +6,11 @@ EAPI=8
PYTHON_COMPAT=( python3_{9..11} )
PYTHON_REQ_USE="xml(+)"
-inherit linux-info python-any-r1
+inherit autotools linux-info python-any-r1
if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://gitlab.com/openconnect/openconnect.git"
- inherit git-r3 autotools
+ inherit git-r3
else
inherit verify-sig
SRC_URI="https://www.infradead.org/openconnect/download/${P}.tar.gz
@@ -97,10 +97,11 @@ src_unpack() {
}
src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}/openconnect-9.11-json-cflags.patch"
+ )
default
- if [[ ${PV} == 9999 ]]; then
- eautoreconf
- fi
+ eautoreconf
}
src_configure() {