net-libs/libsoup: ppc stable wrt bug #717144
[gentoo.git] / net-libs / libsoup / libsoup-2.70.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 VALA_USE_DEPEND="vapigen"
6
7 inherit gnome.org meson multilib-minimal vala xdg
8
9 DESCRIPTION="HTTP client/server library for GNOME"
10 HOMEPAGE="https://wiki.gnome.org/Projects/libsoup"
11
12 LICENSE="LGPL-2.1+"
13 SLOT="2.4"
14
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 )"
19
20 KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ppc ~ppc64 ~s390 ~sparc x86"
21
22 DEPEND="
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}]
28         sys-libs/zlib
29         gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] )
30         introspection? ( >=dev-libs/gobject-introspection-1.54:= )
31         samba? ( net-fs/samba )
32 "
33 RDEPEND="${DEPEND}
34         >=net-libs/glib-networking-2.38.2[ssl?,${MULTILIB_USEDEP}]
35 "
36 BDEPEND="
37         dev-util/glib-utils
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) )
43 "
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]
48 #               net-misc/curl
49 #               net-libs/glib-networking[ssl])"
50
51 PATCHES=(
52         # Disable apache tests until they are usable on Gentoo, bug #326957
53         "${FILESDIR}"/disable-apache-tests.patch
54 )
55
56 src_prepare() {
57         use vala && vala_src_prepare
58         xdg_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
61 }
62
63 src_configure() {
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
68
69         multilib-minimal_src_configure
70 }
71
72 multilib_src_configure() {
73         local emesonargs=(
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
80                 -Dgnome=false
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
86         )
87         meson_src_configure
88 }
89
90 multilib_src_compile() {
91         meson_src_compile
92 }
93
94 multilib_src_test() {
95         meson_src_test
96 }
97
98 multilib_src_install() {
99         meson_src_install
100 }