dev-libs/libutf8proc: bump to 2.4.0
[gentoo.git] / dev-libs / libutf8proc / libutf8proc-2.4.0.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit toolchain-funcs
7
8 MY_P="${P#lib}"
9 DESCRIPTION="mapping tool for UTF-8 strings"
10 HOMEPAGE="https://github.com/JuliaStrings/utf8proc"
11 SRC_URI="https://github.com/JuliaStrings/utf8proc/archive/v${PV}.tar.gz -> ${P}.tar.gz"
12
13 LICENSE="MIT"
14 SLOT="0/${PV}"
15 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
16 IUSE="test"
17
18 S="${WORKDIR}/${MY_P}"
19
20 BDEPEND="test? ( =app-i18n/unicode-data-12.0* )"
21
22 PATCHES=(
23         # Don't build or install static libs
24         "${FILESDIR}/${PN}-2.3.0-no-static.patch"
25         # use app-i18n/unicode-data for test data instead of curl
26         "${FILESDIR}/${PN}-2.3.0-tests-nofetch.patch"
27 )
28
29 _emake() {
30         emake CC=$(tc-getCC) AR=$(tc-getAR) "$@"
31 }
32
33 src_compile() {
34         _emake
35 }
36
37 src_install() {
38         _emake DESTDIR="${D}" \
39                 prefix="${EPREFIX}/usr" \
40                 libdir="${EPREFIX}/usr/$(get_libdir)" \
41                 install
42         # This package used to use netsurf's version as an upstream, which lives in
43         # its own little world. Unlike julia's version, it puts its header file
44         # in libutf8proc/utf8proc.h instead of utf8proc.h. The problem is that
45         # revdeps are *already* patched to ajust to this. As a transitionary
46         # measure until we unpatch revdeps, we add a symlink to utf8proc.h.
47         dodir /usr/include/libutf8proc
48         dosym ../utf8proc.h /usr/include/libutf8proc/utf8proc.h
49 }
50
51 src_test() {
52         _emake check
53 }