download.lst | 4 external/hunspell/0001-check-len-in-cpdpat_check-like-r1-blen-is-checked-63.patch | 27 --- external/hunspell/0001-fix-LibreOffice-build-problem-with-basic_string-appe.patch | 84 ++++++++++ external/hunspell/0001-improve-630-test-case-from-0m1.836s-0m1.223s-785.patch | 52 ------ external/hunspell/0001-improve-630-test-case-from-0m2.427s-0m1.836s-781.patch | 40 ---- external/hunspell/UnpackedTarball_hunspell.mk | 4 6 files changed, 87 insertions(+), 124 deletions(-)
New commits: commit 247e161cf1dca6811998b67d1138062fa4e14381 Author: László Németh <nem...@numbertext.org> AuthorDate: Thu Dec 29 22:09:55 2022 +0100 Commit: László Németh <nem...@numbertext.org> CommitDate: Fri Dec 30 13:40:57 2022 +0000 upgrade to hunspell 1.7.2 Change-Id: If969eccc73926911a4a09440623adf83b8e2c520 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144869 Tested-by: Jenkins Reviewed-by: László Németh <nem...@numbertext.org> diff --git a/download.lst b/download.lst index 4bf163be50c7..de7a832422a0 100644 --- a/download.lst +++ b/download.lst @@ -228,8 +228,8 @@ HSQLDB_TARBALL := 17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip # three static lines # so that git cherry-pick # will not run into conflicts -HUNSPELL_SHA256SUM := b2d9c5369c2cc7f321cb5983fda2dbf007dce3d9e17519746840a6f0c4bf7444 -HUNSPELL_TARBALL := hunspell-1.7.1.tar.gz +HUNSPELL_SHA256SUM := 11ddfa39afe28c28539fe65fc4f1592d410c1e9b6dd7d8a91ca25d85e9ec65b8 +HUNSPELL_TARBALL := hunspell-1.7.2.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/hunspell/0001-check-len-in-cpdpat_check-like-r1-blen-is-checked-63.patch b/external/hunspell/0001-check-len-in-cpdpat_check-like-r1-blen-is-checked-63.patch deleted file mode 100644 index 58b68d0dda43..000000000000 --- a/external/hunspell/0001-check-len-in-cpdpat_check-like-r1-blen-is-checked-63.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 56ad6310c95695d25f936d3f89f6ee3d787df274 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caol...@redhat.com> -Date: Mon, 22 Aug 2022 21:21:36 +0100 -Subject: [PATCH] check 'len' in cpdpat_check like 'r1->blen' is checked (#633) - (#780) - -we should check len against pos like we do r1->blen in the line above ---- - src/hunspell/affixmgr.cxx | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/hunspell/affixmgr.cxx b/src/hunspell/affixmgr.cxx -index 7ea1ea5..c2432c0 100644 ---- a/src/hunspell/affixmgr.cxx -+++ b/src/hunspell/affixmgr.cxx -@@ -1330,7 +1330,7 @@ int AffixMgr::cpdpat_check(const char* word, - ((checkcpdtable[i].pattern[0] == '0' && r1->blen <= pos && - strncmp(word + pos - r1->blen, r1->word, r1->blen) == 0) || - (checkcpdtable[i].pattern[0] != '0' && -- ((len = checkcpdtable[i].pattern.size()) != 0) && -+ ((len = checkcpdtable[i].pattern.size()) != 0) && len <= pos && - strncmp(word + pos - len, checkcpdtable[i].pattern.c_str(), len) == 0)))) { - return 1; - } --- -2.37.2 - diff --git a/external/hunspell/0001-fix-LibreOffice-build-problem-with-basic_string-appe.patch b/external/hunspell/0001-fix-LibreOffice-build-problem-with-basic_string-appe.patch new file mode 100644 index 000000000000..3c6f9831b2b4 --- /dev/null +++ b/external/hunspell/0001-fix-LibreOffice-build-problem-with-basic_string-appe.patch @@ -0,0 +1,84 @@ +From 1587ea4ab5e8d94c9c0d552f7ab61c217ebdcbeb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?L=C3=A1szl=C3=B3=20N=C3=A9meth?= <nem...@numbertext.org> +Date: Fri, 30 Dec 2022 12:20:02 +0100 +Subject: [PATCH] fix LibreOffice build problem with basic_string::append() + +--- + src/hunspell/affentry.cxx | 6 +++--- + src/hunspell/affixmgr.cxx | 8 ++++---- + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/src/hunspell/affentry.cxx b/src/hunspell/affentry.cxx +index 46e8b58..6ee23be 100644 +--- a/src/hunspell/affentry.cxx ++++ b/src/hunspell/affentry.cxx +@@ -290,7 +290,7 @@ struct hentry* PfxEntry::check_twosfx(const std::string& word, + // back any characters that would have been stripped + + std::string tmpword(strip); +- tmpword.append(word, start + appnd.size()); ++ tmpword.append(word, start + appnd.size(), tmpl); + + // now make sure all of the conditions on characters + // are met. Please see the appendix at the end of +@@ -338,7 +338,7 @@ std::string PfxEntry::check_twosfx_morph(const std::string& word, + // back any characters that would have been stripped + + std::string tmpword(strip); +- tmpword.append(word, start + appnd.size()); ++ tmpword.append(word, start + appnd.size(), tmpl); + + // now make sure all of the conditions on characters + // are met. Please see the appendix at the end of +@@ -386,7 +386,7 @@ std::string PfxEntry::check_morph(const std::string& word, + // back any characters that would have been stripped + + std::string tmpword(strip); +- tmpword.append(word, start + appnd.size()); ++ tmpword.append(word, start + appnd.size(), tmpl); + + // now make sure all of the conditions on characters + // are met. Please see the appendix at the end of +diff --git a/src/hunspell/affixmgr.cxx b/src/hunspell/affixmgr.cxx +index 4d1ad2f..a8931c1 100644 +--- a/src/hunspell/affixmgr.cxx ++++ b/src/hunspell/affixmgr.cxx +@@ -2465,7 +2465,7 @@ int AffixMgr::compound_check_morph(const std::string& word, + result.append(presult); + result.push_back(MSEP_FLD); + result.append(MORPH_PART); +- result.append(word, i); ++ result.append(word, i, word.size()); + if (complexprefixes && HENTRY_DATA(rv)) + result.append(HENTRY_DATA2(rv)); + if (!HENTRY_FIND(rv, MORPH_STEM)) { +@@ -2522,7 +2522,7 @@ int AffixMgr::compound_check_morph(const std::string& word, + result.append(presult); + result.push_back(MSEP_FLD); + result.append(MORPH_PART); +- result.append(word, i); ++ result.append(word, i, word.size()); + + if (HENTRY_DATA(rv)) { + if (complexprefixes) +@@ -2573,7 +2573,7 @@ int AffixMgr::compound_check_morph(const std::string& word, + if (!m.empty()) { + result.push_back(MSEP_FLD); + result.append(MORPH_PART); +- result.append(word, i); ++ result.append(word, i, word.size()); + line_uniq_app(m, MSEP_REC); + result.append(m); + } +@@ -2665,7 +2665,7 @@ int AffixMgr::compound_check_morph(const std::string& word, + if (!m.empty()) { + result.push_back(MSEP_FLD); + result.append(MORPH_PART); +- result.append(word, i); ++ result.append(word, i, word.size()); + line_uniq_app(m, MSEP_REC); + result.push_back(MSEP_FLD); + result.append(m); +-- +2.17.1 + diff --git a/external/hunspell/0001-improve-630-test-case-from-0m1.836s-0m1.223s-785.patch b/external/hunspell/0001-improve-630-test-case-from-0m1.836s-0m1.223s-785.patch deleted file mode 100644 index a42d38f5153a..000000000000 --- a/external/hunspell/0001-improve-630-test-case-from-0m1.836s-0m1.223s-785.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 75ebf084f941c0fe72904b6167079d9190f885e5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caol...@redhat.com> -Date: Tue, 23 Aug 2022 11:44:36 +0100 -Subject: [PATCH] improve #630 test case from 0m1.836s -> 0m1.223s (#785) - ---- - src/hunspell/csutil.cxx | 16 ++++++++++------ - 1 file changed, 10 insertions(+), 6 deletions(-) - -diff --git a/src/hunspell/csutil.cxx b/src/hunspell/csutil.cxx -index e9cce47..5caa771 100644 ---- a/src/hunspell/csutil.cxx -+++ b/src/hunspell/csutil.cxx -@@ -171,8 +171,10 @@ std::string& u16_u8(std::string& dest, const std::vector<w_char>& src) { - } - - int u8_u16(std::vector<w_char>& dest, const std::string& src) { -- dest.clear(); -- dest.reserve(src.size()); -+ // faster to oversize initially, assign to elements and resize to what's used -+ // than to reserve and push_back -+ dest.resize(src.size()); -+ std::vector<w_char>::iterator u16 = dest.begin(); - std::string::const_iterator u8 = src.begin(); - std::string::const_iterator u8_max = src.end(); - -@@ -254,16 +256,18 @@ int u8_u16(std::vector<w_char>& dest, const std::string& src) { - src.c_str()); - u2.h = 0xff; - u2.l = 0xfd; -- dest.push_back(u2); -+ *u16++ = u2; -+ dest.resize(u16 - dest.begin()); - return -1; - } - } -- dest.push_back(u2); -+ *u16++ = u2; - ++u8; - } - -- dest.shrink_to_fit(); -- return dest.size(); -+ int size = u16 - dest.begin(); -+ dest.resize(size); -+ return size; - } - - namespace { --- -2.37.2 - diff --git a/external/hunspell/0001-improve-630-test-case-from-0m2.427s-0m1.836s-781.patch b/external/hunspell/0001-improve-630-test-case-from-0m2.427s-0m1.836s-781.patch deleted file mode 100644 index c3de49178ada..000000000000 --- a/external/hunspell/0001-improve-630-test-case-from-0m2.427s-0m1.836s-781.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 211e1e6f36756579b86fa12891af3e5843cd8907 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caol...@redhat.com> -Date: Tue, 23 Aug 2022 10:18:31 +0100 -Subject: [PATCH] improve #630 test case from 0m2.427s -> 0m1.836s (#781) - ---- - src/hunspell/csutil.cxx | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/hunspell/csutil.cxx b/src/hunspell/csutil.cxx -index fbaa768..e9cce47 100644 ---- a/src/hunspell/csutil.cxx -+++ b/src/hunspell/csutil.cxx -@@ -134,6 +134,7 @@ void myopen(std::ifstream& stream, const char* path, std::ios_base::openmode mod - - std::string& u16_u8(std::string& dest, const std::vector<w_char>& src) { - dest.clear(); -+ dest.reserve(src.size()); - std::vector<w_char>::const_iterator u2 = src.begin(); - std::vector<w_char>::const_iterator u2_max = src.end(); - while (u2 < u2_max) { -@@ -171,6 +172,7 @@ std::string& u16_u8(std::string& dest, const std::vector<w_char>& src) { - - int u8_u16(std::vector<w_char>& dest, const std::string& src) { - dest.clear(); -+ dest.reserve(src.size()); - std::string::const_iterator u8 = src.begin(); - std::string::const_iterator u8_max = src.end(); - -@@ -260,6 +262,7 @@ int u8_u16(std::vector<w_char>& dest, const std::string& src) { - ++u8; - } - -+ dest.shrink_to_fit(); - return dest.size(); - } - --- -2.37.2 - diff --git a/external/hunspell/UnpackedTarball_hunspell.mk b/external/hunspell/UnpackedTarball_hunspell.mk index 33614a39292d..2b8823021998 100644 --- a/external/hunspell/UnpackedTarball_hunspell.mk +++ b/external/hunspell/UnpackedTarball_hunspell.mk @@ -22,9 +22,7 @@ endif $(eval $(call gb_UnpackedTarball_set_patchlevel,hunspell,1)) $(eval $(call gb_UnpackedTarball_add_patches,hunspell, \ - external/hunspell/0001-check-len-in-cpdpat_check-like-r1-blen-is-checked-63.patch \ - external/hunspell/0001-improve-630-test-case-from-0m2.427s-0m1.836s-781.patch \ - external/hunspell/0001-improve-630-test-case-from-0m1.836s-0m1.223s-785.patch \ + external/hunspell/0001-fix-LibreOffice-build-problem-with-basic_string-appe.patch \ )) # vim: set noet sw=4 ts=4: