dev-qt/qtopengl: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / net-libs / libpsl / libpsl-0.21.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
6 PYTHON_COMPAT=(python3_{6,7,8})
7 inherit multilib-minimal python-any-r1
8
9 DESCRIPTION="C library for the Public Suffix List"
10 HOMEPAGE="https://github.com/rockdaboot/libpsl"
11 SRC_URI="https://github.com/rockdaboot/${PN}/releases/download/${P}/${P}.tar.gz"
12
13 LICENSE="MIT"
14 SLOT="0"
15 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ppc ppc64 ~riscv s390 sparc x86"
16 IUSE="icu +idn +man"
17
18 RDEPEND="
19         icu? ( !idn? ( dev-libs/icu:=[${MULTILIB_USEDEP}] ) )
20         idn? (
21                 dev-libs/libunistring[${MULTILIB_USEDEP}]
22                 net-dns/libidn2:=[${MULTILIB_USEDEP}]
23         )
24 "
25 DEPEND="${RDEPEND}"
26 BDEPEND="${PYTHON_DEPS}
27         dev-util/gtk-doc-am
28         sys-devel/gettext
29         virtual/pkgconfig
30         man? ( dev-libs/libxslt )
31 "
32
33 pkg_pretend() {
34         if use icu && use idn ; then
35                 ewarn "\"icu\" and \"idn\" USE flags are enabled."
36                 ewarn "Using \"idn\"."
37         fi
38 }
39
40 multilib_src_configure() {
41         local myeconfargs=(
42                 --disable-asan
43                 --disable-cfi
44                 --disable-ubsan
45                 $(use_enable man)
46         )
47
48         # Prefer idn even if icu is in USE as well
49         if use idn ; then
50                 myeconfargs+=(
51                         --enable-builtin=libidn2
52                         --enable-runtime=libidn2
53                 )
54         elif use icu ; then
55                 myeconfargs+=(
56                         --enable-builtin=libicu
57                         --enable-runtime=libicu
58                 )
59         else
60                 myeconfargs+=( --disable-runtime )
61         fi
62
63         ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
64 }
65
66 multilib_src_install() {
67         default
68
69         find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die
70 }