import libunibreak-6.1-2.el10

i10ce changed/i10ce/libunibreak-6.1-2.el10
MSVSphere Packaging Team 3 days ago
commit 18d1e938b0
Signed by: sys_gitsync
GPG Key ID: B2B0B9F29E528FE8

2
.gitignore vendored

@ -0,0 +1,2 @@
SOURCES/libunibreak-libunibreak_6_1.tar.gz
SOURCES/libunibreak-test-data.tar.gz

@ -0,0 +1,2 @@
b6e2cdef98a28d487f872ee83943c15a198a9f3a SOURCES/libunibreak-libunibreak_6_1.tar.gz
404ca34b216a53e3687fdf8f14327fd591ae96df SOURCES/libunibreak-test-data.tar.gz

@ -0,0 +1,3 @@
# libunibreak
The libunibreak package

@ -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,54 @@
#!/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
# the side cache.
ARCHIVE="libunibreak-test-data.tar.gz"
# Get current archive from side cache and unpack.
fedpkg sources
tar xzf ${ARCHIVE}
# Ensure timestamp of src/ doesn't differ across runs
touch -r src .timestamp
pushd src
# These are needed for regenerating src/*data.c
wget -Nc https://www.unicode.org/Public/UNIDATA/LineBreak.txt
wget -Nc https://www.unicode.org/Public/UNIDATA/auxiliary/WordBreakProperty.txt
wget -Nc https://www.unicode.org/Public/UNIDATA/auxiliary/GraphemeBreakProperty.txt
wget -Nc https://www.unicode.org/Public/UNIDATA/DerivedCoreProperties.txt
wget -Nc https://www.unicode.org/Public/UNIDATA/EastAsianWidth.txt
wget -Nc https://www.unicode.org/Public/UNIDATA/emoji/emoji-data.txt
# These are needed for the tests.
# Upstream provides them, but also provides means of updating them, by means
# of fresh downloads from the Unicode website.
# However, we'd like to use upstream's version in order to ensure tests are
# working as intended. Uncomment, if needed.
#wget -Nc https://www.unicode.org/Public/UNIDATA/auxiliary/LineBreakTest.txt
#wget -Nc https://www.unicode.org/Public/UNIDATA/auxiliary/WordBreakTest.txt
#wget -Nc https://www.unicode.org/Public/UNIDATA/auxiliary/GraphemeBreakTest.txt
popd
# Set timestamp on src/
touch -c -r .timestamp src
# Create archive
if [ -f ${ARCHIVE} ]; then
mv -vf ${ARCHIVE} ${ARCHIVE}.bak
fi
tar cvzf ${ARCHIVE} src/
rm -rvf src .timestamp
echo
echo "All files downloaded and archived."
echo "Don't forget to upload ${ARCHIVE} to the side cache."
echo

@ -0,0 +1,66 @@
diff --git a/src/Makefile.am b/src/Makefile.am
index 9a2b420..604180b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -57,26 +57,7 @@ distclean-local:
rm -f LineBreak.txt WordBreakData.txt GraphemeBreakData.txt DerivedCoreProperties.txt EastAsianWidth.txt emoji-data.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
-
-DerivedCoreProperties.txt:
- wget https://www.unicode.org/Public/UNIDATA/DerivedCoreProperties.txt
-
-EastAsianWidth.txt:
- wget https://www.unicode.org/Public/UNIDATA/EastAsianWidth.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
@@ -84,27 +65,23 @@ linebreakdata: LineBreak.txt
cat ${srcdir}/linebreakdata1.tmpl tmp.txt tmp.c > ${srcdir}/linebreakdata.c
rm tmp.txt tmp.c
-wordbreakdata: WordBreakProperty.txt
+wordbreakdata:
${srcdir}/generate_word_break.py > ${srcdir}/wordbreakdata.c
-graphemebreakdata: GraphemeBreakProperty.txt
+graphemebreakdata:
${srcdir}/generate_grapheme_break.py > ${srcdir}/graphemebreakdata.c
-eastasianwidthdata: EastAsianWidth.txt
+eastasianwidthdata:
${srcdir}/generate_east_asian_width.py > ${srcdir}/eastasianwidthdata.c
-indicconjunctbreakdata: DerivedCoreProperties.txt
+indicconjunctbreakdata:
${srcdir}/generate_indic_conjunct_break.py > ${srcdir}/indicconjunctbreakdata.c
-emojidata: emoji-data.txt
+emojidata:
${srcdir}/generate_extended_pictographic.py > ${srcdir}/emojidata.c
update-test:
- rm -f WordBreakTest.txt GraphemeBreakTest.txt
- rm -f ${srcdir}/WordBreakTest.txt ${srcdir}/GraphemeBreakTest.txt
- wget http://www.unicode.org/Public/UNIDATA/auxiliary/WordBreakTest.txt
- wget http://www.unicode.org/Public/UNIDATA/auxiliary/GraphemeBreakTest.txt
- [ -f ${srcdir}/WordBreakTest.txt ] || mv -f WordBreakTest.txt GraphemeBreakTest.txt ${srcdir}
+ [ -f ${srcdir}/WordBreakTest.txt && -f ${srcdir}/GraphemeBreakTest.txt ] || exit 42
# Tests

@ -0,0 +1,37 @@
diff --git a/src/tests.c b/src/tests.c
index 2135144..658c919 100644
--- a/src/tests.c
+++ b/src/tests.c
@@ -57,7 +57,7 @@ int main(int argc, char *argv[])
clock_t t1;
clock_t t2;
- char noBreak, mustBreak, insideChar;
+ char noBreak, mustBreak;
const unsigned int *testSkips; /* Zero terminated array of line numbers to skip in the test. */
if (argc != 2)
@@ -72,7 +72,6 @@ int main(int argc, char *argv[])
testType = TEST_TYPE_LINE;
noBreak = LINEBREAK_NOBREAK;
mustBreak = LINEBREAK_MUSTBREAK;
- insideChar = LINEBREAK_INSIDEACHAR;
testSkips = testSkipsLine;
break;
case 'w':
@@ -80,7 +79,6 @@ int main(int argc, char *argv[])
testType = TEST_TYPE_WORD;
noBreak = WORDBREAK_NOBREAK;
mustBreak = WORDBREAK_BREAK;
- insideChar = WORDBREAK_INSIDEACHAR;
testSkips = testSkipsWord;
break;
case 'g':
@@ -88,7 +86,6 @@ int main(int argc, char *argv[])
testType = TEST_TYPE_GRAPHEME;
noBreak = GRAPHEMEBREAK_NOBREAK;
mustBreak = GRAPHEMEBREAK_BREAK;
- insideChar = GRAPHEMEBREAK_INSIDEACHAR;
testSkips = testSkipsGrapheme;
break;
default:

@ -0,0 +1,191 @@
## START: Set by rpmautospec
## (rpmautospec version 0.7.2)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 2;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
%global forgeurl https://github.com/adah1972/libunibreak
Name: libunibreak
Version: 6.1
Release: %autorelease
Summary: A Unicode line-breaking library
# Upstream uses tags of the form `libunibreak_X_Y`
%global tag %{name}_%{lua: v = string.gsub(rpm.expand('%{version}'), '%.', '_'); print(v) }
%forgemeta
# SPDX identifier
License: Zlib
URL: %forgeurl
Source0: %forgesource
# test files from Unicode, see `download_sources_for_offline_build.sh`
# License: Unicode-3.0
Source1: libunibreak-test-data.tar.gz
# don't download test data
Patch: offline_files.patch
# remove unused var and other build fixes
Patch: remove_unused_var.patch
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
BuildRequires: gcc
BuildRequires: make
BuildRequires: automake, autoconf, libtool
%description
Libunibreak is an implementation of the line breaking and word
breaking algorithms as described in Unicode Standard Annex 14 and
Unicode Standard Annex 29. It is designed to be used in a generic text
renderer.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%forgeautosetup -p1
# Install test data files
tar xzf %{SOURCE1}
# Fix shebang and permissions of Python scripts
sed -r -i 's|^(#!/usr/bin/)env (python)|\1\23|' src/*.py
chmod a+x src/*.py
%build
./autogen.sh
%configure --disable-static
%make_build
%install
%make_install
find %{buildroot} -name '*.la' -exec rm -f {} ';'
%check
%make_build check
%ldconfig_scriptlets
%files
%doc AUTHORS NEWS README.md
%license LICENCE
%{_libdir}/*.so.*
%files devel
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%changelog
* Mon Dec 23 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 6.1-2
- Rebuilt for MSVSphere 10
## START: Generated by rpmautospec
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Sun Mar 03 2024 Sandro <devel@penguinpee.nl> - 6.1-1
- Update to 6.1 (RHBZ#2266204)
- Update script for downloading test data
- Store test data in side cache (instead of dist-git)
- Rebase patches and drop no longer required patch
- Use glob in .gitignore
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Nov 09 2023 Sandro <devel@penguinpee.nl> - 5.1-7
- Fix Release:
* Wed Nov 01 2023 Sandro <devel@penguinpee.nl> - 5.1-6
- Stop building for i686
* Wed Nov 01 2023 Sandro <devel@penguinpee.nl> - 5.1-5
- Drop `liblinebreak` Provides: and Obsoletes:
* Wed Nov 01 2023 Sandro <devel@penguinpee.nl> - 5.1-4
- Drop changes for regenerating src/*data.c
* Tue Oct 31 2023 Sandro <devel@penguinpee.nl> - 5.1-3
- Migrate to SPDX license
* Tue Oct 31 2023 Sandro <devel@penguinpee.nl> - 5.1-2
- Rename patches and stop enumeration
- Update patches as required
- Add script for updating external sources
- Add BRs for running `autogen.sh`
* Mon Oct 30 2023 Sandro <devel@penguinpee.nl> - 5.1-1
- Update to 5.1
* Mon Oct 30 2023 Sandro <devel@penguinpee.nl> - 4.0-17
- Add missing dependencies for `autogen.sh`
- Update patch
* Mon Oct 30 2023 Sandro <devel@penguinpee.nl> - 4.0-16
- Use forge macros
- Mangle the version (upstream uses lubunibreak_X_Y tags)
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sun Aug 15 2021 Andy Mender <andymenderunix@@fedoraproject.org> - 4.0-9
- Switch URL to GitHub
- Add patch to remove unused var in tests.c
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Aug 28 2018 Michel Alexandre Salim <salimma@fedoraproject.org> - 4.0-2
- Properly disable broken tests, run the rest
* Thu Aug 23 2018 Michel Alexandre Salim <salimma@fedoraproject.org> - 4.0-1
- Update to 4.0
* Sat Jun 4 2016 Michel Alexandre Salim <salimma@fedoraproject.org> - 3.0-1
- Initial package
## END: Generated by rpmautospec
Loading…
Cancel
Save