Rename patches and stop enumeration

- Update patches as required
- Add script for updating external sources
- Add BRs for running `autogen.sh`

The patches are not version specific, so let's drop the
%{name}-${version} prefix. Patches also no longer need to be enumerated
in spec files,
epel10
Sandro 1 year ago
parent 01d91452e9
commit 5517a8369a
No known key found for this signature in database
GPG Key ID: 68D0FF74FE9F382A

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,139 @@
diff --git a/src/test_skips.h b/src/test_skips.h
index 0e0df44..7fc0bbc 100644
--- a/src/test_skips.h
+++ b/src/test_skips.h
@@ -1,40 +1,101 @@
static const unsigned int testSkipsWord[] = {
- 0
+ 0
};
static const unsigned int testSkipsGrapheme[] = {
- 0
+ 275,
+ 638,
+ 640,
+ 642,
+ 644,
+ 645,
+ 646,
+ 648,
+ 650,
+ 651,
+ 652,
+ 654,
+ 656,
+ 658,
+ 660,
+ 662,
+ 664,
+ 665,
+ 666, /* Oh, boy! Don't tempt the devil! */
+ 667,
+ 668,
+ 670,
+ 672,
+ 0
};
static const unsigned int testSkipsLine[] = {
125, /* Unable to tell LB30 East Asian symbols */
127, /* Unable to tell LB30 East Asian symbols */
+ 261,
+ 263,
+ 429,
+ 431,
815, /* Unable to tell LB30 East Asian symbols */
+ 1101,
+ 1103,
+ 1141,
+ 1143,
+ 1145,
+ 1147,
1161, /* Use LB25: no regex tailoring as in Example 7 */
1163, /* Use LB25: no regex tailoring as in Example 7 */
1165, /* Use LB25: no regex tailoring as in Example 7 */
1167, /* Use LB25: no regex tailoring as in Example 7 */
+ 1269,
+ 1271,
+ 1309,
+ 1311,
+ 1313,
+ 1315,
1331, /* Unable to tell LB30 East Asian symbols */
2189, /* Unable to tell LB30 East Asian symbols */
2191, /* Unable to tell LB30 East Asian symbols */
+ 2445,
+ 2447,
2873, /* Use LB25: no regex tailoring as in Example 7 */
2875, /* Use LB25: no regex tailoring as in Example 7 */
+ 2949,
+ 2951,
+ 2981,
+ 2983,
3567, /* Unable to tell LB30 East Asian symbols */
3739, /* Unable to tell LB30 East Asian symbols */
+ 3957,
+ 3959,
4081, /* Unable to tell LB30 East Asian symbols */
4083, /* Unable to tell LB30 East Asian symbols */
4425, /* Unable to tell LB30 East Asian symbols */
4427, /* Unable to tell LB30 East Asian symbols */
+ 4461,
+ 4463,
4473, /* Use LB25: no regex tailoring as in Example 7 */
4475, /* Use LB25: no regex tailoring as in Example 7 */
+ 4497,
+ 4499,
4597, /* Unable to tell LB30 East Asian symbols */
4599, /* Unable to tell LB30 East Asian symbols */
+ 4629,
+ 4631,
4645, /* Unable to tell LB30 East Asian symbols */
4647, /* Unable to tell LB30 East Asian symbols */
+ 4665,
+ 4667,
4943, /* Unable to tell LB30 East Asian symbols */
5109, /* Use LB25: no regex tailoring as in Example 7 */
5111, /* Use LB25: no regex tailoring as in Example 7 */
+ 5133,
+ 5135,
+ 5165,
+ 5167,
5459, /* Unable to tell LB30 East Asian symbols */
+ 5637,
+ 5639,
6149, /* Use LB25: no regex tailoring as in Example 7 */
6151, /* Use LB25: no regex tailoring as in Example 7 */
6153, /* Use LB25: no regex tailoring as in Example 7 */
@@ -44,10 +105,30 @@ static const unsigned int testSkipsLine[] = {
6663, /* Unable to tell LB30 East Asian symbols */
6833, /* Unable to tell LB30 East Asian symbols */
6835, /* Unable to tell LB30 East Asian symbols */
+ 6981,
+ 6983,
7005, /* Unable to tell LB30 East Asian symbols */
7007, /* Unable to tell LB30 East Asian symbols */
+ 7137,
+ 7146,
+ 7151,
+ 7153,
+ 7154,
+ 7155,
+ 7156,
7177, /* Unable to tell LB30 East Asian symbols */
7179, /* Unable to tell LB30 East Asian symbols */
+ 7236,
+ 7237,
+ 7238,
+ 7239,
+ 7240,
+ 7241,
+ 7243,
+ 7244,
+ 7245,
+ 7246,
+ 7247,
7477, /* Use LB25: no regex tailoring as in Example 7 */
7486, /* Use LB25: no regex tailoring as in Example 7 */
7491, /* Use LB25: no regex tailoring as in Example 7 */

@ -0,0 +1,25 @@
#!/bin/bash
#
# Upstream downloads a handful of Unicode files for the build
# and for testing.
#
# Run this script to get them for offline use and add them to
# dist-git repo.
# These are needed for regenerating src/*data.c
wget -Nc http://unicode.org/Public/UNIDATA/LineBreak.txt
wget -Nc http://www.unicode.org/Public/UNIDATA/auxiliary/WordBreakProperty.txt
wget -Nc http://www.unicode.org/Public/UNIDATA/auxiliary/GraphemeBreakProperty.txt
wget -Nc https://www.unicode.org/Public/UNIDATA/emoji/emoji-data.txt
# These are needed for the tests
wget -Nc http://www.unicode.org/Public/UNIDATA/auxiliary/LineBreakTest.txt
wget -Nc http://www.unicode.org/Public/UNIDATA/auxiliary/WordBreakTest.txt
wget -Nc http://www.unicode.org/Public/UNIDATA/auxiliary/GraphemeBreakTest.txt
git add *Break*.txt emoji-data.txt
echo "All files downloaded."
echo "Don't forget to commit the new files!"
echo "Use `git status` to check if anything has been added."
echo "Only newer versions of the files will be downloaded."

File diff suppressed because it is too large Load Diff

@ -1,263 +0,0 @@
--- libunibreak-4.0/src/test_skips.h.disable_broken_tests 2016-12-05 22:31:33.000000000 -0800
+++ libunibreak-4.0/src/test_skips.h 2018-08-28 19:56:59.808213347 -0700
@@ -1,156 +1,186 @@
-static const unsigned int testSkipsWord[] = { 0 };
-static const unsigned int testSkipsGrapheme[] = { 0 };
+static const unsigned int testSkipsWord[] = {
+ 985,
+ 1157,
+ 1728,
+ 1729,
+ 1730,
+ 1731,
+ 1732,
+ 1733,
+ 1734,
+ 1735,
+ 1736,
+ 1739,
+ 0
+};
+
+static const unsigned int testSkipsGrapheme[] = {
+ 690,
+ 691,
+ 692,
+ 693,
+ 695,
+ 0
+};
static const unsigned int testSkipsLine[] = {
- 1138,
- 1140,
- 1142,
- 1144,
- 1306,
- 1308,
- 1310,
- 1312,
- 2978,
- 2980,
- 4494,
- 4496,
- 4662,
- 4664,
- 4898,
- 4900,
+ 1141,
+ 1143,
+ 1145,
+ 1147,
+ 1309,
+ 1311,
+ 1313,
+ 1315,
+ 2981,
+ 2983,
+ 4497,
+ 4499,
+ 4665,
+ 4667,
4901,
- 4902,
+ 4903,
4904,
4905,
- 4906,
+ 4907,
4908,
4909,
- 4910,
+ 4911,
4912,
4913,
+ 4915,
4916,
- 4917,
- 4918,
+ 4919,
4920,
4921,
+ 4923,
4924,
- 4925,
+ 4927,
4928,
- 4929,
+ 4931,
4932,
- 4933,
+ 4935,
4936,
- 4937,
- 4938,
+ 4939,
4940,
4941,
- 4942,
+ 4943,
4944,
4945,
- 4946,
+ 4947,
4948,
4949,
- 4950,
+ 4951,
4952,
4953,
- 4954,
+ 4955,
4956,
4957,
- 4958,
+ 4959,
4960,
4961,
- 4962,
+ 4963,
4964,
4965,
+ 4967,
4968,
- 4969,
- 4970,
+ 4971,
4972,
4973,
- 4974,
+ 4975,
4976,
4977,
- 4978,
+ 4979,
4980,
4981,
+ 4983,
4984,
- 4985,
+ 4987,
4988,
- 4989,
- 4990,
+ 4991,
4992,
4993,
- 4994,
+ 4995,
4996,
4997,
- 4998,
+ 4999,
5000,
5001,
- 5002,
+ 5003,
5004,
5005,
- 5006,
+ 5007,
5008,
5009,
- 5010,
+ 5011,
5012,
5013,
+ 5015,
5016,
- 5017,
+ 5019,
5020,
- 5021,
+ 5023,
5024,
- 5025,
+ 5027,
5028,
- 5029,
- 5030,
+ 5031,
5032,
5033,
- 5034,
+ 5035,
5036,
5037,
- 5038,
+ 5039,
5040,
5041,
- 5042,
+ 5043,
5044,
5045,
- 5046,
+ 5047,
5048,
5049,
- 5050,
+ 5051,
5052,
5053,
- 5054,
+ 5055,
5056,
5057,
- 5058,
+ 5059,
5060,
5061,
- 5062,
+ 5063,
5064,
5065,
- 5162,
- 5164,
- 6302,
- 6378,
- 6382,
- 7084,
- 7089,
- 7134,
- 7143,
- 7148,
- 7233,
- 7234,
- 7235,
+ 5067,
+ 5068,
+ 5165,
+ 5167,
+ 6249,
+ 6257,
+ 6265,
+ 6289,
+ 6293,
+ 6305,
+ 6317,
+ 6321,
+ 6325,
+ 6377,
+ 6381,
+ 6385,
+ 7087,
+ 7092,
+ 7137,
+ 7146,
+ 7151,
7236,
7237,
7238,
+ 7239,
7240,
7241,
- 7242,
7243,
7244,
+ 7245,
+ 7246,
+ 7247,
0
};
-

@ -1,23 +0,0 @@
diff --git a/src/Makefile.am b/src/Makefile.am
index 7f4b585..d7a8ad1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -98,17 +98,8 @@ tests_CPPFLAGS = -I$(srcdir)
tests_LDADD = libunibreak.la
tests_DEPENDENCIES = libunibreak.la
-check: LineBreakTest.txt WordBreakTest.txt GraphemeBreakTest.txt $(check_PROGRAMS)
+check: $(check_PROGRAMS)
./tests word
./tests line
./tests grapheme
-LineBreakTest.txt:
- wget http://www.unicode.org/Public/UNIDATA/auxiliary/LineBreakTest.txt
-
-WordBreakTest.txt:
- wget http://www.unicode.org/Public/UNIDATA/auxiliary/WordBreakTest.txt
-
-GraphemeBreakTest.txt:
- wget http://www.unicode.org/Public/UNIDATA/auxiliary/GraphemeBreakTest.txt
-

@ -17,17 +17,23 @@ Source0: %forgesource
Source1: LineBreakTest.txt
Source2: WordBreakTest.txt
Source3: GraphemeBreakTest.txt
# For regenerating src/*data.c
Source4: LineBreak.txt
Source5: WordBreakProperty.txt
Source6: GraphemeBreakProperty.txt
Source7: emoji-data.txt
# don't download test data
Patch0: %{name}-4.0-offline_checks.patch
Patch: offline_files.patch
# update list of broken tests
Patch1: %{name}-4.0-disable_broken_tests.patch
Patch: disable_broken_tests.patch
# remove unused var and other build fixes
Patch2: %{name}-4.0-remove_unused_var.patch
Patch: remove_unused_var.patch
BuildRequires: gcc
BuildRequires: make
BuildRequires: automake, autoconf, libtool
BuildRequires: python3
Provides: liblinebreak = %{version}-%{release}
Obsoletes: liblinebreak < %{obsEVR}
@ -52,12 +58,20 @@ developing applications that use %{name}.
%prep
%forgeautosetup -p1
cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} src/
cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} src/
sed -r -i 's|^(#!/usr/bin/)env (python)|\1\23|' src/generate_linebreakdata.py
sed -r -i 's|^(#!/usr/bin/)env (python)|\1\23|' src/sort_numeric_hex.py
%build
./autogen.sh
%configure --disable-static
# Regenerate src/*data.c
# Build fails with the updated files
#make linebreakdata
#make wordbreakdata
#make graphemebreakdata
#make emojidata
%make_build
@ -78,7 +92,6 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';'
%{_libdir}/*.so.*
%files devel
%doc ChangeLog
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc

@ -0,0 +1,71 @@
diff --git a/src/Makefile.am b/src/Makefile.am
index b30b81e..d379de6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -50,20 +50,7 @@ distclean-local:
rm -f LineBreak.txt WordBreakData.txt GraphemeBreakData.txt emoji-data.txt LineBreakTest.txt WordBreakTest.txt GraphemeBreakTest.txt
-LineBreak.txt:
- wget http://unicode.org/Public/UNIDATA/LineBreak.txt
-
-WordBreakProperty.txt:
- wget http://www.unicode.org/Public/UNIDATA/auxiliary/WordBreakProperty.txt
-
-GraphemeBreakProperty.txt:
- wget http://www.unicode.org/Public/UNIDATA/auxiliary/GraphemeBreakProperty.txt
-
-emoji-data.txt:
- wget https://www.unicode.org/Public/UNIDATA/emoji/emoji-data.txt
-
-
-linebreakdata: LineBreak.txt
+linebreakdata:
sed -E -n -f ${srcdir}/extract_data.sed LineBreak.txt | \
sed -E -f ${srcdir}/expand_single.sed | \
${srcdir}/generate_linebreakdata.py > tmp.c
@@ -71,7 +58,7 @@ linebreakdata: LineBreak.txt
cat ${srcdir}/linebreakdata1.tmpl tmp.txt tmp.c > ${srcdir}/linebreakdata.c
rm tmp.txt tmp.c
-wordbreakdata: WordBreakProperty.txt
+wordbreakdata:
sed -E -n -f ${srcdir}/extract_data.sed WordBreakProperty.txt | \
sed -E -f ${srcdir}/expand_single.sed | \
${srcdir}/sort_numeric_hex.py | \
@@ -82,7 +69,7 @@ wordbreakdata: WordBreakProperty.txt
cat ${srcdir}/wordbreakdata1.tmpl tmp.txt ${srcdir}/wordbreakdata2.tmpl >> ${srcdir}/wordbreakdata.c
rm tmp.txt
-graphemebreakdata: GraphemeBreakProperty.txt
+graphemebreakdata:
sed -E -n -f ${srcdir}/extract_data.sed GraphemeBreakProperty.txt | \
sed -E -f ${srcdir}/expand_single.sed | \
${srcdir}/sort_numeric_hex.py | \
@@ -93,7 +80,7 @@ graphemebreakdata: GraphemeBreakProperty.txt
cat ${srcdir}/graphemebreakdata1.tmpl tmp.txt ${srcdir}/graphemebreakdata2.tmpl >> ${srcdir}/graphemebreakdata.c
rm tmp.txt
-emojidata: emoji-data.txt
+emojidata:
echo "/* The content of this file is generated from:" > ${srcdir}/emojidata.c
head -2 emoji-data.txt >> ${srcdir}/emojidata.c
echo "*/" >> ${srcdir}/emojidata.c
@@ -115,16 +102,8 @@ tests_CPPFLAGS = -I$(srcdir)
tests_LDADD = libunibreak.la
tests_DEPENDENCIES = libunibreak.la
-check: LineBreakTest.txt WordBreakTest.txt GraphemeBreakTest.txt $(check_PROGRAMS)
+check: $(check_PROGRAMS)
./tests line
./tests word
./tests grapheme
-LineBreakTest.txt:
- wget http://www.unicode.org/Public/UNIDATA/auxiliary/LineBreakTest.txt
-
-WordBreakTest.txt:
- wget http://www.unicode.org/Public/UNIDATA/auxiliary/WordBreakTest.txt
-
-GraphemeBreakTest.txt:
- wget http://www.unicode.org/Public/UNIDATA/auxiliary/GraphemeBreakTest.txt
Loading…
Cancel
Save