1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 VALA_USE_DEPEND="vapigen"
7 inherit gnome.org meson multilib-minimal vala xdg
9 DESCRIPTION="HTTP client/server library for GNOME"
10 HOMEPAGE="https://wiki.gnome.org/Projects/libsoup"
15 # TODO: Default enable brotli at some point? But in 2.70.0 not advertised to servers yet - https://gitlab.gnome.org/GNOME/libsoup/issues/146
16 IUSE="brotli gssapi gtk-doc +introspection samba ssl test +vala"
17 RESTRICT="!test? ( test )"
18 REQUIRED_USE="vala? ( introspection )"
20 KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ppc ~ppc64 ~s390 ~sparc x86"
23 >=dev-libs/glib-2.58:2[${MULTILIB_USEDEP}]
24 >=dev-db/sqlite-3.8.2:3[${MULTILIB_USEDEP}]
25 >=dev-libs/libxml2-2.9.1-r4:2[${MULTILIB_USEDEP}]
26 brotli? ( >=app-arch/brotli-1.0.6-r1:=[${MULTILIB_USEDEP}] )
27 >=net-libs/libpsl-0.20[${MULTILIB_USEDEP}]
29 gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] )
30 introspection? ( >=dev-libs/gobject-introspection-1.54:= )
31 samba? ( net-fs/samba )
34 >=net-libs/glib-networking-2.38.2[ssl?,${MULTILIB_USEDEP}]
38 gtk-doc? ( >=dev-util/gtk-doc-1.20
39 app-text/docbook-xml-dtd:4.1.2 )
40 >=sys-devel/gettext-0.19.8
41 >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
42 vala? ( $(vala_depend) )
44 # test? ( www-servers/apache[ssl,apache2_modules_auth_digest,apache2_modules_alias,apache2_modules_auth_basic,
45 # apache2_modules_authn_file,apache2_modules_authz_host,apache2_modules_authz_user,apache2_modules_dir,
46 # apache2_modules_mime,apache2_modules_proxy,apache2_modules_proxy_http,apache2_modules_proxy_connect]
47 # dev-lang/php[apache2,xmlrpc]
49 # net-libs/glib-networking[ssl])"
52 # Disable apache tests until they are usable on Gentoo, bug #326957
53 "${FILESDIR}"/disable-apache-tests.patch
57 use vala && vala_src_prepare
59 # https://gitlab.gnome.org/GNOME/libsoup/issues/159 - could work with libnss-myhostname
60 sed -e '/hsts/d' -i tests/meson.build || die
64 # FIXME: we need addpredict to workaround bug #324779 until
65 # root cause (bug #249496) is solved
66 # But necessary while apache tests are disabled
67 #addpredict /usr/share/snmp/mibs/.index
69 multilib-minimal_src_configure
72 multilib_src_configure() {
74 $(meson_feature gssapi)
75 -Dkrb5_config="${CHOST}-krb5-config"
76 $(meson_feature samba ntlm)
77 $(meson_feature brotli)
78 -Dntlm_auth="${EPREFIX}/usr/bin/ntlm_auth"
79 -Dtls_check=false # disables check, we still rdep on glib-networking
81 -Dintrospection=$(multilib_native_usex introspection enabled disabled)
82 -Dvapi=$(multilib_native_usex vala enabled disabled)
83 -Dgtk_doc=$(multilib_native_usex gtk-doc true false)
84 $(meson_use test tests)
85 -Dinstalled_tests=false
90 multilib_src_compile() {
98 multilib_src_install() {