diff --git a/TECkit_2_5_1-includes.patch b/TECkit_2_5_1-includes.patch new file mode 100644 index 0000000000000000000000000000000000000000..3787f2c796a42d812901c55cba3159dfd1cf2521 --- /dev/null +++ b/TECkit_2_5_1-includes.patch @@ -0,0 +1,11 @@ +diff -ru TECkit_2_5_1.orig/source/Compiler.cpp TECkit_2_5_1/source/Compiler.cpp +--- TECkit_2_5_1.orig/source/Compiler.cpp 2009-03-05 10:29:22.000000000 +0000 ++++ TECkit_2_5_1/source/Compiler.cpp 2009-03-05 10:29:50.000000000 +0000 +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + #include "zlib.h" + diff --git a/teckit-2.5.7-Remove-compressed-image-test.patch b/teckit-2.5.7-Remove-compressed-image-test.patch new file mode 100644 index 0000000000000000000000000000000000000000..2ee71116cd543f21fe231f83ca4cc8acd3c47542 --- /dev/null +++ b/teckit-2.5.7-Remove-compressed-image-test.patch @@ -0,0 +1,50 @@ +From 99f5259cf419c53c805c856ff59f28ce916e4743 Mon Sep 17 00:00:00 2001 +From: Jeremy Linton +Date: Mon, 21 May 2018 16:00:59 -0500 +Subject: [PATCH] Remove compressed image test +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The binary representation of a compressed block of data +can vary depending on small implementation details in the +compression library. Lets depend on the tests following +the binary image comparison to decompress the .tec file +and validate that the compress/decompress logic is functional. + +Signed-off-by: Jeremy Linton +Petr Písař: Ported to 2.5.7 from 99f5259cf419c53c805c856ff59f28ce916e4743. +--- + test/Makefile.am | 1 - + test/dotests.pl | 4 +++- + +diff --git a/test/Makefile.am b/test/Makefile.am +index 009b736..53d5198 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -7,7 +7,6 @@ check_DATA += mrk.sf.legacy.txt.orig + check_DATA += mrk.txt + check_DATA += NormalizationTest.txt + check_DATA += SILGreek2004-04-27.map +-check_DATA += SILGreek2004-04-27.tec.orig + check_DATA += SILGreek2004-04-27.uncompressed.tec.orig + check_DATA += academy.tec + check_DATA += silipa93.tec +diff --git a/test/dotests.pl b/test/dotests.pl +index d8cc426..aa27401 100755 +--- a/test/dotests.pl ++++ b/test/dotests.pl +@@ -41,7 +41,9 @@ compare("${srcdir}SILGreek2004-04-27.uncompressed.tec.orig", "SILGreek.uncompres + dotest("compiling Greek mapping (compressed)", + "${bindir}teckit_compile ${srcdir}SILGreek2004-04-27.map -o SILGreek.tec"); + +-compare("${srcdir}SILGreek2004-04-27.tec.orig", "SILGreek.tec"); ++# Don't bother to check the compressed file as changes to the compression library can ++# slightly change the resulting image. The tests below which use the compressed file ++# should be sufficient to verify that it can be decompressed/used properly + + dotest("converting plain-text file to unicode", + "${bindir}txtconv -t SILGreek.tec -i ${srcdir}mrk.txt -o mrk.utf8.txt -nfc"); +-- +2.21.0 + diff --git a/teckit-2.5.7.tar.gz b/teckit-2.5.7.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..cf95be718382ce65774b0c69ae5c4109ae55af32 Binary files /dev/null and b/teckit-2.5.7.tar.gz differ diff --git a/teckit.spec b/teckit.spec new file mode 100644 index 0000000000000000000000000000000000000000..320ea7804a329d5d7b1673bb6266f0f5af2b4b40 --- /dev/null +++ b/teckit.spec @@ -0,0 +1,69 @@ +Name: teckit +Version: 2.5.7 +Release: 3 +Summary: A library and compiler for mapping and transposition +License: LGPLv2+ or CPL +URL: http://scripts.sil.org/teckit +Source0: https://github.com/silnrsi/teckit/releases/download/v%{version}/teckit-%{version}.tar.gz +BuildRequires: expat-devel zlib-devel libtool +Patch0000: TECkit_2_5_1-includes.patch + +%description +Resort to this library dedicated to encoding conversions and make sure +the development and testing of mapping tables raises no issues whatsoever. + +%package devel +Summary: Libraries and header files for developing applications that use teckit +Requires: %{name} = %{version}-%{release} + +%description devel +Libraries and header files for developing applications that use teckit. + +%package help +Summary: Help documents for teckit package + +%description help +Help documents for teckit package. + +%prep +%autosetup -n %{name}-%{version} -p1 + +rm -r zlib* + +%build +%configure --disable-static +%make_build V=1 + +%install +%make_install +%delete_la + +%check +make check + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%post devel -p /sbin/ldconfig + +%postun devel -p /sbin/ldconfig + +%files +%license COPYING AUTHORS +%license license/{LICENSING.txt,License_CPLv05.txt,License_LGPLv21.txt} +%{_bindir}/{sfconv,teckit_compile,txtconv} +%{_libdir}/{libTECkit.so.*,libTECkit_Compiler.so.*} + +%files devel +%{_includedir}/teckit/ +%{_libdir}/{libTECkit.so,libTECkit_Compiler.so,pkgconfig/teckit.pc} + +%files help +%doc INSTALL NEWS README +%doc docs/*.pdf +%{_mandir}/man1/* + +%changelog +* Thu Dec 12 2019 wutao - 2.5.7-3 +- Package init