2459e19b33c33281765ea422117489f6a9955487
[gentoo.git] / net-dns / idnkit / idnkit-1.0-r2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="5"
5
6 inherit autotools eutils
7
8 DESCRIPTION="Toolkit for Internationalized Domain Names (IDN)"
9 HOMEPAGE="https://www.nic.ad.jp/ja/idn/idnkit/download/"
10 SRC_URI="https://www.nic.ad.jp/ja/idn/idnkit/download/sources/${P}-src.tar.gz"
11
12 LICENSE="JNIC"
13 SLOT="0"
14 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 s390 sparc x86"
15 IUSE="static-libs"
16
17 DEPEND="virtual/libiconv"
18
19 S=${WORKDIR}/${P}-src
20
21 src_prepare() {
22         # Bug 263135, old broken libtool bundled
23         rm -f aclocal.m4 || die "rm failed"
24         epatch "${FILESDIR}"/${P}-autotools.patch
25         epatch "${FILESDIR}"/${P}-test-subdirs.patch
26         mv configure.{in,ac} || die
27         eautoreconf
28 }
29
30 src_configure() {
31         local myconf=""
32         if has_version dev-libs/libiconv; then
33                 myconf="--with-iconv"
34         fi
35         econf $(use_enable static-libs static) ${myconf}
36 }
37
38 src_install() {
39         default
40         use static-libs || find "${ED}" -name 'lib*.la' -delete
41         dodoc ChangeLog DISTFILES NEWS README README.ja
42 }