Update to libhunspell 1.7.2-r1 (#2175)
parent
05fd13f896
commit
f08b3f2046
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue