diff options
Diffstat (limited to 'external/hunspell')
-rw-r--r-- | external/hunspell/0001-invalid-read-memory-access-624.patch | 25 | ||||
-rw-r--r-- | external/hunspell/ExternalProject_hunspell.mk | 36 | ||||
-rw-r--r-- | external/hunspell/Makefile | 7 | ||||
-rw-r--r-- | external/hunspell/Module_hunspell.mk | 25 | ||||
-rw-r--r-- | external/hunspell/README | 4 | ||||
-rw-r--r-- | external/hunspell/StaticLibrary_hunspell.mk | 36 | ||||
-rw-r--r-- | external/hunspell/UnpackedTarball_hunspell.mk | 28 |
7 files changed, 161 insertions, 0 deletions
diff --git a/external/hunspell/0001-invalid-read-memory-access-624.patch b/external/hunspell/0001-invalid-read-memory-access-624.patch new file mode 100644 index 000000000..66b55e755 --- /dev/null +++ b/external/hunspell/0001-invalid-read-memory-access-624.patch @@ -0,0 +1,25 @@ +From ac938e2ecb48ab4dd21298126c7921689d60571b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com> +Date: Tue, 12 Nov 2019 20:03:15 +0000 +Subject: [PATCH] invalid read memory access #624 + +--- + src/hunspell/suggestmgr.cxx | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/hunspell/suggestmgr.cxx b/src/hunspell/suggestmgr.cxx +index dba084e..c23f165 100644 +--- a/src/hunspell/suggestmgr.cxx ++++ b/src/hunspell/suggestmgr.cxx +@@ -2040,7 +2040,7 @@ int SuggestMgr::leftcommonsubstring( + int l2 = su2.size(); + // decapitalize dictionary word + if (complexprefixes) { +- if (su1[l1 - 1] == su2[l2 - 1]) ++ if (l1 && l2 && su1[l1 - 1] == su2[l2 - 1]) + return 1; + } else { + unsigned short idx = su2.empty() ? 0 : (su2[0].h << 8) + su2[0].l; +-- +2.23.0 + diff --git a/external/hunspell/ExternalProject_hunspell.mk b/external/hunspell/ExternalProject_hunspell.mk new file mode 100644 index 000000000..43da1c254 --- /dev/null +++ b/external/hunspell/ExternalProject_hunspell.mk @@ -0,0 +1,36 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalProject_ExternalProject,hunspell)) + +$(eval $(call gb_ExternalProject_register_targets,hunspell,\ + build \ +)) + +hunspell_CPPCLAGS=$(CPPFLAGS) + +ifneq (,$(filter ANDROID DRAGONFLY FREEBSD iOS LINUX NETBSD OPENBSD,$(OS))) +ifneq (,$(gb_ENABLE_DBGUTIL)) +hunspell_CPPFLAGS+=-D_GLIBCXX_DEBUG +endif +endif + +$(call gb_ExternalProject_get_state_target,hunspell,build): + $(call gb_Trace_StartRange,hunspell,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + ./configure --disable-shared --disable-nls --with-pic \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM))\ + $(if $(filter AIX,$(OS)),CFLAGS="-D_LINUX_SOURCE_COMPAT") \ + $(if $(hunspell_CPPFLAGS),CPPFLAGS='$(hunspell_CPPFLAGS)') \ + CXXFLAGS="$(CXXFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) $(if $(debug),$(gb_DEBUGINFO_FLAGS))" \ + && cd src/hunspell && $(MAKE) \ + ) + $(call gb_Trace_EndRange,hunspell,EXTERNAL) + +# vim: set noet sw=4 ts=4: diff --git a/external/hunspell/Makefile b/external/hunspell/Makefile new file mode 100644 index 000000000..e4968cf85 --- /dev/null +++ b/external/hunspell/Makefile @@ -0,0 +1,7 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/external/hunspell/Module_hunspell.mk b/external/hunspell/Module_hunspell.mk new file mode 100644 index 000000000..505a9fb0c --- /dev/null +++ b/external/hunspell/Module_hunspell.mk @@ -0,0 +1,25 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Module_Module,hunspell)) + +$(eval $(call gb_Module_add_targets,hunspell,\ + UnpackedTarball_hunspell \ +)) +ifeq ($(COM),MSC) +$(eval $(call gb_Module_add_targets,hunspell,\ + StaticLibrary_hunspell \ +)) +else +$(eval $(call gb_Module_add_targets,hunspell,\ + ExternalProject_hunspell \ +)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/hunspell/README b/external/hunspell/README new file mode 100644 index 000000000..1221735ca --- /dev/null +++ b/external/hunspell/README @@ -0,0 +1,4 @@ +Library for spell checking. + +From: +[http://hunspell.sourceforge.net/]. diff --git a/external/hunspell/StaticLibrary_hunspell.mk b/external/hunspell/StaticLibrary_hunspell.mk new file mode 100644 index 000000000..02d534f69 --- /dev/null +++ b/external/hunspell/StaticLibrary_hunspell.mk @@ -0,0 +1,36 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_StaticLibrary_StaticLibrary,hunspell)) + +$(eval $(call gb_StaticLibrary_use_unpacked,hunspell,hunspell)) + +$(eval $(call gb_StaticLibrary_use_external,hunspell,icu_headers)) + +$(eval $(call gb_StaticLibrary_set_warnings_disabled,hunspell)) + +$(eval $(call gb_StaticLibrary_add_defs,hunspell,\ + -DHUNSPELL_STATIC \ + -DOPENOFFICEORG \ +)) + +$(eval $(call gb_StaticLibrary_add_generated_exception_objects,hunspell,\ + UnpackedTarball/hunspell/src/hunspell/affentry \ + UnpackedTarball/hunspell/src/hunspell/affixmgr \ + UnpackedTarball/hunspell/src/hunspell/csutil \ + UnpackedTarball/hunspell/src/hunspell/hashmgr \ + UnpackedTarball/hunspell/src/hunspell/suggestmgr \ + UnpackedTarball/hunspell/src/hunspell/phonet \ + UnpackedTarball/hunspell/src/hunspell/hunzip \ + UnpackedTarball/hunspell/src/hunspell/filemgr \ + UnpackedTarball/hunspell/src/hunspell/replist \ + UnpackedTarball/hunspell/src/hunspell/hunspell \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/hunspell/UnpackedTarball_hunspell.mk b/external/hunspell/UnpackedTarball_hunspell.mk new file mode 100644 index 000000000..1cd24e225 --- /dev/null +++ b/external/hunspell/UnpackedTarball_hunspell.mk @@ -0,0 +1,28 @@ + -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,hunspell)) + +$(eval $(call gb_UnpackedTarball_set_tarball,hunspell,$(HUNSPELL_TARBALL))) + +$(eval $(call gb_UnpackedTarball_update_autoconf_configs,hunspell)) + +ifeq ($(COM),MSC) +$(eval $(call gb_UnpackedTarball_set_post_action,hunspell,\ + touch src/hunspell/config.h \ +)) +endif + +$(eval $(call gb_UnpackedTarball_set_patchlevel,hunspell,1)) + +$(eval $(call gb_UnpackedTarball_add_patches,hunspell, \ + external/hunspell/0001-invalid-read-memory-access-624.patch \ +)) + +# vim: set noet sw=4 ts=4: |