diff options
Diffstat (limited to 'dev-libs/libutf8proc/libutf8proc-2.4.0.ebuild')
-rw-r--r-- | dev-libs/libutf8proc/libutf8proc-2.4.0.ebuild | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/dev-libs/libutf8proc/libutf8proc-2.4.0.ebuild b/dev-libs/libutf8proc/libutf8proc-2.4.0.ebuild index 276a0508f63d..38e2c5e109a9 100644 --- a/dev-libs/libutf8proc/libutf8proc-2.4.0.ebuild +++ b/dev-libs/libutf8proc/libutf8proc-2.4.0.ebuild @@ -1,45 +1,48 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI="7" inherit toolchain-funcs -MY_P="${P#lib}" -DESCRIPTION="mapping tool for UTF-8 strings" +DESCRIPTION="A clean C Library for processing UTF-8 Unicode data" HOMEPAGE="https://github.com/JuliaStrings/utf8proc" -SRC_URI="https://github.com/JuliaStrings/utf8proc/archive/v${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI="https://github.com/JuliaStrings/${PN#lib}/archive/v${PV}.tar.gz -> ${P}.tar.gz + cjk? ( https://dev.gentoo.org/~hattya/distfiles/${PN}-EastAsianWidth-12.1.0.xz )" LICENSE="MIT" SLOT="0/${PV}" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux" -IUSE="test" +IUSE="cjk static-libs test" RESTRICT="!test? ( test )" -S="${WORKDIR}/${MY_P}" - BDEPEND="test? ( =app-i18n/unicode-data-12.0* )" +S="${WORKDIR}/${P#lib}" + +PATCHES=( "${FILESDIR}"/${PN}-grapheme-test.patch ) -PATCHES=( - # Don't build or install static libs - "${FILESDIR}/${PN}-2.3.0-no-static.patch" - # use app-i18n/unicode-data for test data instead of curl - "${FILESDIR}/${PN}-2.3.0-tests-nofetch.patch" -) +src_prepare() { + if use cjk; then + einfo "Modifying East Asian Ambiguous (A) as wide ..." + cp "${WORKDIR}"/${PN}-EastAsianWidth-12.1.0 ${PN#lib}_data.c || die + fi -_emake() { - emake CC=$(tc-getCC) AR=$(tc-getAR) "$@" + default } src_compile() { - _emake + emake \ + AR="$(tc-getAR)" \ + CC="$(tc-getCC)" } src_install() { - _emake DESTDIR="${D}" \ - prefix="${EPREFIX}/usr" \ - libdir="${EPREFIX}/usr/$(get_libdir)" \ + emake \ + DESTDIR="${ED}" \ + prefix="/usr" \ + libdir="/usr/$(get_libdir)" \ install + use static-libs || find "${ED}" -name '*.a' -delete || die # This package used to use netsurf's version as an upstream, which lives in # its own little world. Unlike julia's version, it puts its header file # in libutf8proc/utf8proc.h instead of utf8proc.h. The problem is that @@ -50,5 +53,7 @@ src_install() { } src_test() { - _emake check + cp "${EPREFIX}"/usr/share/unicode-data/{Normalization,auxiliary/GraphemeBreak}Test.txt data || die + + emake CC="$(tc-getCC)" check } |