diff --git a/OpenCC-ver.1.0.5.tar.gz b/OpenCC-ver.1.0.5.tar.gz deleted file mode 100644 index 0d54bde..0000000 Binary files a/OpenCC-ver.1.0.5.tar.gz and /dev/null differ diff --git a/OpenCC-ver.1.1.3.tar.gz b/OpenCC-ver.1.1.3.tar.gz new file mode 100644 index 0000000..ef999b2 Binary files /dev/null and b/OpenCC-ver.1.1.3.tar.gz differ diff --git a/modify-some-trans-error.patch b/modify-some-trans-error.patch deleted file mode 100644 index 0ab9657..0000000 --- a/modify-some-trans-error.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 8cef5bef12bbd8c9c2ccf6a3c727cbf4cfac34c9 Mon Sep 17 00:00:00 2001 -From: si-gui <245140120@qq.com> -Date: Sun, 29 Aug 2021 06:11:13 +0800 -Subject: [PATCH] modify some trans error - ---- - data/dictionary/STPhrases.txt | 4 ++++ - data/dictionary/TSPhrases.txt | 6 +++--- - 2 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/data/dictionary/STPhrases.txt b/data/dictionary/STPhrases.txt -index 28f14fd..abfe26c 100644 ---- a/data/dictionary/STPhrases.txt -+++ b/data/dictionary/STPhrases.txt -@@ -48931,3 +48931,7 @@ - 龚胜 龔勝 - 龟卜 龜卜 - 龟鉴 龜鑑 -+芯片面积 芯片面積 -+正則表達式 正則表示式 -+衍生发行版 衍生發行版 -+可是只有他才能完成这个任务 可是只有他才能完成這個任務 -diff --git a/data/dictionary/TSPhrases.txt b/data/dictionary/TSPhrases.txt -index 03da389..6013ce3 100644 ---- a/data/dictionary/TSPhrases.txt -+++ b/data/dictionary/TSPhrases.txt -@@ -30,10 +30,10 @@ - 乾隆年間 乾隆年间 - 乾隆皇帝 乾隆皇帝 - 以免藉口 以免借口 --以功覆過 以功复过 -+以功覆過 以功覆过 - 侔德覆載 侔德复载 - 傢俱 家具 --傷亡枕藉 伤亡枕借 -+傷亡枕藉 伤亡枕藉 - 八濛山 八濛山 - 凌藉 凌借 - 出醜狼藉 出丑狼借 -@@ -121,7 +121,7 @@ - 滑藉 滑借 - 牴牾 抵牾 - 牴觸 抵触 --狐藉虎威 狐借虎威 -+狐藉虎威 狐藉虎威 - 珍珠項鍊 珍珠项链 - 甚鉅 甚钜 - 申覆 申复 --- -2.30.0 - diff --git a/opencc-check-bounds.patch b/opencc-check-bounds.patch deleted file mode 100644 index 9ed7c20..0000000 --- a/opencc-check-bounds.patch +++ /dev/null @@ -1,35 +0,0 @@ -Index: OpenCC-ver.1.0.5/src/BinaryDict.cpp -=================================================================== ---- OpenCC-ver.1.0.5.orig/src/BinaryDict.cpp -+++ OpenCC-ver.1.0.5/src/BinaryDict.cpp -@@ -63,6 +63,12 @@ void BinaryDict::SerializeToFile(FILE* f - } - - BinaryDictPtr BinaryDict::NewFromFile(FILE* fp) { -+ size_t offsetBound, savedOffset; -+ savedOffset = ftell(fp); -+ fseek(fp, 0L, SEEK_END); -+ offsetBound = ftell(fp) - savedOffset; -+ fseek(fp, savedOffset, SEEK_SET); -+ - BinaryDictPtr dict(new BinaryDict(LexiconPtr(new Lexicon))); - - // Number of items -@@ -109,7 +115,7 @@ BinaryDictPtr BinaryDict::NewFromFile(FI - // Key offset - size_t keyOffset; - unitsRead = fread(&keyOffset, sizeof(size_t), 1, fp); -- if (unitsRead != 1) { -+ if (unitsRead != 1 || keyOffset >= offsetBound) { - throw InvalidFormat("Invalid OpenCC binary dictionary (keyOffset)"); - } - const char* key = dict->keyBuffer.c_str() + keyOffset; -@@ -118,7 +124,7 @@ BinaryDictPtr BinaryDict::NewFromFile(FI - for (size_t j = 0; j < numValues; j++) { - size_t valueOffset; - unitsRead = fread(&valueOffset, sizeof(size_t), 1, fp); -- if (unitsRead != 1) { -+ if (unitsRead != 1 || valueOffset >= offsetBound) { - throw InvalidFormat("Invalid OpenCC binary dictionary (valueOffset)"); - } - const char* value = dict->valueBuffer.c_str() + valueOffset; diff --git a/opencc-fixes-cmake.patch b/opencc-fixes-cmake.patch deleted file mode 100644 index c70ce95..0000000 --- a/opencc-fixes-cmake.patch +++ /dev/null @@ -1,26 +0,0 @@ -Index: OpenCC-ver.1.0.5/CMakeLists.txt -=================================================================== ---- OpenCC-ver.1.0.5.orig/CMakeLists.txt -+++ OpenCC-ver.1.0.5/CMakeLists.txt -@@ -68,7 +68,7 @@ set (DIR_PREFIX ${CMAKE_INSTALL_PREFIX}) - set (DIR_INCLUDE ${DIR_PREFIX}/include/) - set (DIR_SHARE ${DIR_PREFIX}/share/) - set (DIR_ETC ${DIR_PREFIX}/etc/) --set (DIR_LIBRARY ${DIR_PREFIX}/lib${LIB_SUFFIX}/) -+set (DIR_LIBRARY ${LIB_INSTALL_DIR}) - - if (DEFINED SHARE_INSTALL_PREFIX) - set (DIR_SHARE ${SHARE_INSTALL_PREFIX}) -Index: OpenCC-ver.1.0.5/data/CMakeLists.txt -=================================================================== ---- OpenCC-ver.1.0.5.orig/data/CMakeLists.txt -+++ OpenCC-ver.1.0.5/data/CMakeLists.txt -@@ -1,6 +1,6 @@ - set(OPENCC_DICT_BIN opencc_dict) --set(DICT_MERGE_BIN python ${CMAKE_CURRENT_SOURCE_DIR}/scripts/merge.py) --set(DICT_REVERSE_BIN python ${CMAKE_CURRENT_SOURCE_DIR}/scripts/reverse.py) -+set(DICT_MERGE_BIN python3 ${CMAKE_CURRENT_SOURCE_DIR}/scripts/merge.py) -+set(DICT_REVERSE_BIN python3 ${CMAKE_CURRENT_SOURCE_DIR}/scripts/reverse.py) - set(DICT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/dictionary) - set(DICT_GENERATED_DIR ${CMAKE_CURRENT_BINARY_DIR}) - diff --git a/opencc-stop-copy.patch b/opencc-stop-copy.patch deleted file mode 100644 index 73ba065..0000000 --- a/opencc-stop-copy.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 6a1e149b643d07b465b348e23a696f8df800cdc4 Mon Sep 17 00:00:00 2001 -Subject: [PATCH] opencc stop copy - ---- - data/CMakeLists.txt | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt -index 3989bad..c9b20c1 100644 ---- a/data/CMakeLists.txt -+++ b/data/CMakeLists.txt -@@ -109,8 +109,6 @@ foreach(DICT ${DICTS}) - ${DICT}.ocd - COMMENT - "Building ${DICT}.ocd" -- COMMAND -- ${CMAKE_COMMAND} -E copy "$" "$" - COMMAND - ${OPENCC_DICT_BIN} - --input ${DICT_${DICT}_INPUT} --- -2.23.0 - diff --git a/opencc.spec b/opencc.spec index 2ea00b3..6d70d46 100644 --- a/opencc.spec +++ b/opencc.spec @@ -1,14 +1,10 @@ Name: opencc -Version: 1.0.5 -Release: 6 +Version: 1.1.3 +Release: 1 Summary: Simplified Chinese Traditional Conversion Library License: ASL 2.0 URL: https://github.com/BYVoid/OpenCC Source0: https://github.com/BYVoid/OpenCC/archive/ver.%{version}.tar.gz#/OpenCC-ver.%{version}.tar.gz -Patch0001: opencc-fixes-cmake.patch -Patch0002: opencc-check-bounds.patch -Patch0003: opencc-stop-copy.patch -Patch0004: modify-some-trans-error.patch Provides: %{name}-tools = %{version}-%{release} Obsoletes: %{name}-tools < %{version}-%{release} @@ -69,6 +65,9 @@ ctest %{_datadir}/opencc/doc %changelog +* Thu Dec 30 2021 houyingchao - 1.1.3-1 +- Upgrade to 1.1.3 version + * Sat Aug 28 2021 sunguoshuai - 1.0.5-6 - Modify some trans error