Gentoo Archives: gentoo-commits

From: Benda XU <heroxbd@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libutf8proc/
Date: Sun, 04 Sep 2022 01:44:20
Message-Id: 1662255850.a0674c6c067a4039eee2783cf6e0a1a61ce143b6.heroxbd@gentoo
1 commit: a0674c6c067a4039eee2783cf6e0a1a61ce143b6
2 Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 4 01:42:57 2022 +0000
4 Commit: Benda XU <heroxbd <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 4 01:44:10 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0674c6c
7
8 dev-libs/libutf8proc: fix regression on Prefix.
9
10 The cleanup of commit 5640fe7f introduced a regression on pkg-config.
11 The make "prefix" variable should start with ${EPREFIX}, so that
12 libutf8proc.pc have prefix=EPREFIX/usr.
13
14 Otherwise libutf8proc.pc will contain prefix=/usr and inject a
15 -I/usr/include into the cflags, because non-EPREFIX /usr/include is
16 not a system include directory on Gentoo Prefix. This will result in
17 drawing in host headers and error out.
18
19 Reference: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5640fe7f3dd581cb33d57eda6b4eb932b201d15e
20 Package-Manager: Portage-3.0.30, Repoman-3.0.3
21 Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>
22
23 dev-libs/libutf8proc/libutf8proc-2.7.0-r1.ebuild | 58 ++++++++++++++++++++++++
24 1 file changed, 58 insertions(+)
25
26 diff --git a/dev-libs/libutf8proc/libutf8proc-2.7.0-r1.ebuild b/dev-libs/libutf8proc/libutf8proc-2.7.0-r1.ebuild
27 new file mode 100644
28 index 000000000000..2e009ba02e2d
29 --- /dev/null
30 +++ b/dev-libs/libutf8proc/libutf8proc-2.7.0-r1.ebuild
31 @@ -0,0 +1,58 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI="8"
36 +USE_RUBY="ruby25 ruby26 ruby27"
37 +
38 +inherit ruby-single toolchain-funcs
39 +
40 +DESCRIPTION="A clean C Library for processing UTF-8 Unicode data"
41 +HOMEPAGE="https://github.com/JuliaStrings/utf8proc"
42 +SRC_URI="https://github.com/JuliaStrings/${PN#lib}/archive/v${PV}.tar.gz -> ${P}.tar.gz
43 + cjk? ( https://dev.gentoo.org/~hattya/distfiles/${PN}-EastAsianWidth-14.0.0.xz )"
44 +
45 +LICENSE="MIT"
46 +SLOT="0/${PV}"
47 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~x64-macos"
48 +IUSE="cjk static-libs test"
49 +RESTRICT="!test? ( test )"
50 +
51 +BDEPEND="test? (
52 + =app-i18n/unicode-data-14.0*
53 + ${RUBY_DEPS}
54 + )"
55 +S="${WORKDIR}/${P#lib}"
56 +
57 +QA_PKGCONFIG_VERSION="$(ver_cut 1).5.0"
58 +
59 +src_prepare() {
60 + if use cjk; then
61 + einfo "Modifying East Asian Ambiguous (A) as wide ..."
62 + cp "${WORKDIR}"/${PN}-EastAsianWidth-14.0.0 ${PN#lib}_data.c || die
63 + fi
64 +
65 + default
66 +}
67 +
68 +src_compile() {
69 + emake \
70 + AR="$(tc-getAR)" \
71 + CC="$(tc-getCC)" \
72 + prefix="${EPREFIX}/usr" \
73 + libdir='$(prefix)'"/$(get_libdir)"
74 +}
75 +
76 +src_install() {
77 + emake \
78 + DESTDIR="${D}" \
79 + prefix="${EPREFIX}/usr" \
80 + libdir='$(prefix)'"/$(get_libdir)" \
81 + install
82 + use static-libs || find "${ED}" -name '*.a' -delete || die
83 +}
84 +
85 +src_test() {
86 + cp "${EPREFIX}"/usr/share/unicode-data/{DerivedCoreProperties,{Normalization,auxiliary/GraphemeBreak}Test}.txt data || die
87 +
88 + emake CC="$(tc-getCC)" check
89 +}