commit: 3a3613389f96edbe77799355d947bd27e2f43a8f
Author: Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Wed May 6 12:35:55 2020 +0000
Commit: Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Wed May 6 12:43:00 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a361338
dev-libs/libutf8proc: fix tests
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Akinori Hattori <hattya <AT> gentoo.org>
.../files/libutf8proc-2.3.0-tests-nofetch.patch | 33 ----------------------
.../files/libutf8proc-grapheme-test.patch | 23 +++++++++++++++
dev-libs/libutf8proc/libutf8proc-2.4.0.ebuild | 5 ++--
3 files changed, 26 insertions(+), 35 deletions(-)
diff --git a/dev-libs/libutf8proc/files/libutf8proc-2.3.0-tests-nofetch.patch
b/dev-libs/libutf8proc/files/libutf8proc-2.3.0-tests-nofetch.patch
deleted file mode 100644
index f438fdd9779..00000000000
--- a/dev-libs/libutf8proc/files/libutf8proc-2.3.0-tests-nofetch.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff --git a/data/Makefile b/data/Makefile
-index f5d1dd9..60c09e3 100644
---- a/data/Makefile
-+++ b/data/Makefile
-@@ -10,6 +10,7 @@ PERL=perl
- MAKE=make
- JULIA=julia
- CURLFLAGS = --retry 5 --location
-+UDATA=${EPREFIX}/usr/share/unicode-data
-
- .PHONY: clean
-
-@@ -25,6 +26,7 @@ CharWidths.txt: charwidths.jl EastAsianWidth.txt
- UNICODE_VERSION=12.0.0
-
- UnicodeData.txt:
-+ cp $(UDATA)/$@ $@
- $(CURL) $(CURLFLAGS) -o $@ -O
http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/UnicodeData.txt
-
- EastAsianWidth.txt:
-@@ -43,10 +45,10 @@ CaseFolding.txt:
- $(CURL) $(CURLFLAGS) -o $@ -O
$(URLCACHE)http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/CaseFolding.txt
-
- NormalizationTest.txt:
-- $(CURL) $(CURLFLAGS) -o $@ -O
$(URLCACHE)http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/NormalizationTest.txt
-+ cp $(UDATA)/$@ $@
-
- GraphemeBreakTest.txt:
-- $(CURL) $(CURLFLAGS)
$(URLCACHE)http://www.unicode.org/Public/$(UNICODE_VERSION)/ucd/auxiliary/GraphemeBreakTest.txt
| $(PERL) -pe 's,÷,/,g;s,×,+,g' > $@
-+ cat $(UDATA)/auxiliary/$@ | $(PERL) -pe 's,÷,/,g;s,×,+,g' > $@
-
- emoji-data.txt:
- $(CURL) $(CURLFLAGS) -o $@ -O
$(URLCACHE)http://unicode.org/Public/emoji/`echo $(UNICODE_VERSION) | cut -d.
-f1-2`/emoji-data.txt
diff --git a/dev-libs/libutf8proc/files/libutf8proc-grapheme-test.patch
b/dev-libs/libutf8proc/files/libutf8proc-grapheme-test.patch
new file mode 100644
index 00000000000..64ebc26f671
--- /dev/null
+++ b/dev-libs/libutf8proc/files/libutf8proc-grapheme-test.patch
@@ -0,0 +1,23 @@
+https://github.com/JuliaStrings/utf8proc/commit/11bb3d9dc796bb006c79c2962a7d19abcadfb3df
+
+Author: Steven G. Johnson <[email protected]>
+
+--- a/test/graphemetest.c
++++ b/test/graphemetest.c
+@@ -18,12 +18,12 @@ int main(int argc, char **argv)
+
+ while (buf[bi]) {
+ bi = skipspaces(buf, bi);
+- if (buf[bi] == '/') { /* grapheme break */
++ if ((uint8_t)buf[bi] == 0xc3 && (uint8_t)buf[bi+1] == 0xb7) { /*
U+00f7 = grapheme break */
+ src[si++] = '/';
+- bi++;
++ bi += 2;
+ }
+- else if (buf[bi] == '+') { /* no break */
+- bi++;
++ else if ((uint8_t)buf[bi] == 0xc3 && (uint8_t)buf[bi+1] == 0x97)
{ /* U+00d7 = no break */
++ bi += 2;
+ }
+ else if (buf[bi] == '#') { /* start of comments */
+ break;
diff --git a/dev-libs/libutf8proc/libutf8proc-2.4.0.ebuild
b/dev-libs/libutf8proc/libutf8proc-2.4.0.ebuild
index 65b7342ae30..7998589fb90 100644
--- a/dev-libs/libutf8proc/libutf8proc-2.4.0.ebuild
+++ b/dev-libs/libutf8proc/libutf8proc-2.4.0.ebuild
@@ -22,8 +22,7 @@ S="${WORKDIR}/${P#lib}"
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"
+ "${FILESDIR}"/${PN}-grapheme-test.patch
)
src_compile() {
@@ -48,5 +47,7 @@ src_install() {
}
src_test() {
+ cp
"${EPREFIX}"/usr/share/unicode-data/{Normalization,auxiliary/GraphemeBreak}Test.txt
data || die
+
emake CC="$(tc-getCC)" check
}