summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2024-08-02 06:31:11 -0400
committerGitHub <noreply@github.com>2024-08-02 13:31:11 +0300
commitf08b3f2046e9f72369c36fe39e71ced5d1943e8c (patch)
tree37ad014015ae5a60c51ef66120d17bb6f5604807
parent05fd13f89635e02745f96416bc44785863c19dde (diff)
Update to libhunspell 1.7.2-r1 (#2175)
-rw-r--r--autobuild.xml16
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake3
-rw-r--r--indra/cmake/Hunspell.cmake13
-rw-r--r--indra/llui/llspellcheck.cpp26
-rw-r--r--indra/newview/CMakeLists.txt1
-rwxr-xr-xindra/newview/viewer_manifest.py5
6 files changed, 25 insertions, 39 deletions
diff --git a/autobuild.xml b/autobuild.xml
index f3d14ac2b0..9e83c5f927 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -1112,11 +1112,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>d5757ab84d934fa358f299ab91e2e297beaa3dac</string>
+ <string>e71ae7a645603fe967a69aa5beb5b3009185e177</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-libhunspell/releases/download/v1.3.2.650fb94/libhunspell-1.3.2.650fb94-darwin64-650fb94.tar.zst</string>
+ <string>https://github.com/secondlife/3p-libhunspell/releases/download/v1.7.2-r1/libhunspell-1.7.2.10207243663-darwin64-10207243663.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -1126,11 +1126,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>6413d3bd4cd50c2a6b7f949eb4bd6f0c94feb984</string>
+ <string>275ffb7f60064d8008aed8406f80f34229f651fc</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-libhunspell/releases/download/v1.3.2.650fb94/libhunspell-1.3.2.650fb94-linux64-650fb94.tar.zst</string>
+ <string>https://github.com/secondlife/3p-libhunspell/releases/download/v1.7.2-r1/libhunspell-1.7.2.10207243663-linux64-10207243663.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -1140,11 +1140,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>c1be4a79b20435030b2e0e01b582c61b462c8376</string>
+ <string>89ff24e93eaeca7949ccdb5cc368f938f5b1f307</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-libhunspell/releases/download/v1.3.2.650fb94/libhunspell-1.3.2.650fb94-windows64-650fb94.tar.zst</string>
+ <string>https://github.com/secondlife/3p-libhunspell/releases/download/v1.7.2-r1/libhunspell-1.7.2.10207243663-windows64-10207243663.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -1155,9 +1155,9 @@
<key>license_file</key>
<string>LICENSES/hunspell.txt</string>
<key>copyright</key>
- <string>See hunspell.txt</string>
+ <string>LGPL 2.1</string>
<key>version</key>
- <string>1.3.2.650fb94</string>
+ <string>1.7.2.10207243663</string>
<key>name</key>
<string>libhunspell</string>
<key>description</key>
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index c2ba9231cc..2dc9d6080a 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -57,7 +57,6 @@ if(WINDOWS)
libapr-1.dll
libaprutil-1.dll
nghttp2.dll
- libhunspell.dll
)
# OpenSSL
@@ -185,7 +184,6 @@ elseif(DARWIN)
libaprutil-1.0.dylib
libaprutil-1.dylib
${EXPAT_COPY}
- libhunspell-1.3.0.dylib
libndofdev.dylib
libnghttp2.dylib
libnghttp2.14.dylib
@@ -231,7 +229,6 @@ elseif(LINUX)
libatk-1.0.so
libfreetype.so.6.6.2
libfreetype.so.6
- libhunspell-1.3.so.0.0.0
libopenjp2.so
libuuid.so.16
libuuid.so.16.0.22
diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake
index bb037c0237..129679febd 100644
--- a/indra/cmake/Hunspell.cmake
+++ b/indra/cmake/Hunspell.cmake
@@ -1,4 +1,5 @@
# -*- cmake -*-
+include(Linking)
include(Prebuilt)
include_guard()
@@ -8,10 +9,16 @@ add_library( ll::hunspell INTERFACE IMPORTED )
use_system_binary(hunspell)
use_prebuilt_binary(libhunspell)
if (WINDOWS)
- target_link_libraries( ll::hunspell INTERFACE libhunspell)
+ target_compile_definitions( ll::hunspell INTERFACE HUNSPELL_STATIC=1)
+ target_link_libraries( ll::hunspell INTERFACE
+ debug ${ARCH_PREBUILT_DIRS_DEBUG}/libhunspell.lib
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libhunspell.lib
+ )
elseif(DARWIN)
- target_link_libraries( ll::hunspell INTERFACE hunspell-1.3)
+ target_link_libraries( ll::hunspell INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libhunspell-1.7.a
+ )
elseif(LINUX)
- target_link_libraries( ll::hunspell INTERFACE hunspell-1.3)
+ target_link_libraries( ll::hunspell INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libhunspell-1.7.a
+ )
endif()
target_include_directories( ll::hunspell SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/hunspell)
diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp
index 9d8eadfd3f..16ffd352cf 100644
--- a/indra/llui/llspellcheck.cpp
+++ b/indra/llui/llspellcheck.cpp
@@ -30,12 +30,7 @@
#include "llsdserialize.h"
#include "llspellcheck.h"
-#if LL_WINDOWS
- #include <hunspell/hunspelldll.h>
- #pragma comment(lib, "libhunspell.lib")
-#else
- #include <hunspell/hunspell.hxx>
-#endif
+#include <hunspell/hunspell.hxx>
static const std::string DICT_DIR = "dictionaries";
static const std::string DICT_FILE_CUSTOM = "user_custom.dic";
@@ -64,11 +59,11 @@ void LLSpellChecker::initSingleton()
bool LLSpellChecker::checkSpelling(const std::string& word) const
{
- if ( (!mHunspell) || (word.length() < 3) || (0 != mHunspell->spell(word.c_str())) )
+ if ( (!mHunspell) || (word.length() < 3) || (0 != mHunspell->spell(word)) )
{
return true;
}
- if (mIgnoreList.size() > 0)
+ if (!mIgnoreList.empty())
{
std::string word_lower(word);
LLStringUtil::toLower(word_lower);
@@ -85,15 +80,8 @@ S32 LLSpellChecker::getSuggestions(const std::string& word, std::vector<std::str
return 0;
}
- char** suggestion_list; int suggestion_cnt = 0;
- if ( (suggestion_cnt = mHunspell->suggest(&suggestion_list, word.c_str())) != 0 )
- {
- for (int suggestion_index = 0; suggestion_index < suggestion_cnt; suggestion_index++)
- {
- suggestions.push_back(suggestion_list[suggestion_index]);
- }
- mHunspell->free_list(&suggestion_list, suggestion_cnt);
- }
+ suggestions = mHunspell->suggest(word);
+
return static_cast<S32>(suggestions.size());
}
@@ -194,7 +182,7 @@ void LLSpellChecker::addToCustomDictionary(const std::string& word)
{
if (mHunspell)
{
- mHunspell->add(word.c_str());
+ mHunspell->add(word);
}
addToDictFile(getDictionaryUserPath() + DICT_FILE_CUSTOM, word);
sSettingsChangeSignal();
@@ -422,7 +410,7 @@ bool LLSpellChecker::canRemoveDictionary(const std::string& dict_language)
const LLSD dict_info = getDictionaryData(dict_language);
return
(dict_info["user_installed"].asBoolean()) &&
- ( (!getUseSpellCheck()) || (!LLSpellChecker::instance().isActiveDictionary(dict_language)) );
+ ( (!getUseSpellCheck()) || (!isActiveDictionary(dict_language)) );
}
void LLSpellChecker::removeDictionary(const std::string& dict_language)
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index a34354d287..4c5deb4974 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -1729,7 +1729,6 @@ if (WINDOWS)
${CMAKE_SOURCE_DIR}/../etc/message.xml
${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
${SHARED_LIB_STAGING_DIR}/openjp2.dll
- ${SHARED_LIB_STAGING_DIR}/libhunspell.dll
${SHARED_LIB_STAGING_DIR}/llwebrtc.dll
#${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/SLVoice.exe
#${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/libsndfile-1.dll
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index a25efc5de4..09397a0989 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -587,9 +587,6 @@ class Windows_x86_64_Manifest(ViewerManifest):
# HTTP/2
self.path("nghttp2.dll")
- # Hunspell
- self.path("libhunspell.dll")
-
# BugSplat
if self.args.get('bugsplat'):
self.path("BsSndRpt64.exe")
@@ -930,7 +927,6 @@ class Darwin_x86_64_Manifest(ViewerManifest):
with self.prefix(src=relpkgdir, dst=""):
self.path("libndofdev.dylib")
- self.path("libhunspell-*.dylib")
with self.prefix(src_dst="cursors_mac"):
self.path("*.tif")
@@ -1336,7 +1332,6 @@ class Linux_i686_Manifest(LinuxManifest):
self.path("libdirectfb-1.4.so.5")
self.path("libfusion-1.4.so.5")
self.path("libdirect-1.4.so.5*")
- self.path("libhunspell-1.3.so*")
self.path("libalut.so*")
self.path("libopenal.so*")
self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname