dev-libs/ptexenc: arm64 stable wrt bug #723404
[gentoo.git] / dev-libs / ptexenc / ptexenc-1.3.8_p20200406.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 inherit libtool
7
8 DESCRIPTION="Library for Japanese pTeX providing a better way of handling character encodings"
9 HOMEPAGE="http://tutimura.ath.cx/ptexlive/?ptexenc"
10 SRC_URI="https://dev.gentoo.org/~zlogene/distfiles/texlive/texlive-${PV#*_p}-source.tar.xz"
11 # http://tutimura.ath.cx/~nob/tex/ptexlive/ptexenc/${P}.tar.xz
12
13 LICENSE="BSD"
14 SLOT="0"
15 KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86 ~ppc-macos ~x64-macos ~x86-macos"
16 IUSE="iconv static-libs"
17
18 DEPEND="iconv? ( virtual/libiconv )
19         dev-libs/kpathsea"
20 RDEPEND="${DEPEND}"
21
22 S=${WORKDIR}/texlive-${PV#*_p}-source/texk/${PN}
23
24 src_prepare() {
25         default
26
27         # https://bugs.gentoo.org/show_bug.cgi?id=377141
28         sed -i '/^LIBS/s:@LIBS@:@LIBS@ @KPATHSEA_LIBS@:' "${S}"/Makefile.in || die
29
30         cd "${WORKDIR}/texlive-${PV#*_p}-source"
31         S="${WORKDIR}/texlive-${PV#*_p}-source" elibtoolize #sane .so versionning on gfbsd
32 }
33
34 src_configure() {
35         econf \
36                 --with-system-kpathsea \
37                 $(use_enable static-libs static) \
38                 $(use_enable iconv kanji-iconv)
39 }
40
41 src_install() {
42         default
43         find "${D}" -name '*.la' -delete || die
44
45         insinto /usr/include/ptexenc
46         doins ptexenc/unicode-jp.h
47         use iconv && doins ptexenc/kanjicnv.h
48
49         dodoc ChangeLog README
50 }