Bug 1460600: Remove unsupported --enable-system-hunspell flag. r=glandium

Our bundled Hunspell now significantly differs from upstream Hunspell. Most
importantly, it supports loading dictionaries from jar: URIs, which is now a
requirement for loading bundled and extension dictionaries. This means that
system Hunspell libraries are no longer compatible with our spell checker
code. We should remove the option to use them so that users don't fall into
the trap of trying to use them.

MozReview-Commit-ID: 2ihJe6YOnGf

--HG--
extra : rebase_source : ceb091b9475a2b101156405a02a60015fc36da17
This commit is contained in:
Kris Maglione 2018-05-10 10:36:53 -07:00
Родитель d7faefdf92
Коммит f8506d46d0
9 изменённых файлов: 9 добавлений и 52 удалений

Просмотреть файл

@ -1270,11 +1270,6 @@ if CONFIG['MOZ_ENABLE_STARTUP_NOTIFICATION']:
'libsn/sn-util.h',
]
if CONFIG['MOZ_SYSTEM_HUNSPELL']:
system_headers += [
'hunspell.hxx',
]
if CONFIG['MOZ_SYSTEM_LIBEVENT']:
system_headers += [
'event2/event_compat.h',

Просмотреть файл

@ -13,12 +13,8 @@ UNIFIED_SOURCES += [
FINAL_LIBRARY = 'xul'
if CONFIG['MOZ_SYSTEM_HUNSPELL']:
CXXFLAGS += CONFIG['MOZ_HUNSPELL_CFLAGS']
else:
LOCAL_INCLUDES += ['../src']
LOCAL_INCLUDES += [
'../src',
'/dom/base',
'/extensions/spellcheck/src',
]
@ -34,6 +30,6 @@ EXPORTS.mozilla += [
'RemoteSpellCheckEngineParent.h',
]
# This variable is referenced in configure.in. Make sure to change that file
# too if you need to change this variable.
# This variable is referenced in mozilla-config.h.in. Make sure to change
# that file too if you need to change this variable.
DEFINES['HUNSPELL_STATIC'] = True

Просмотреть файл

@ -4,9 +4,7 @@
# 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/.
DIRS += ['glue']
if not CONFIG['MOZ_SYSTEM_HUNSPELL']:
DIRS += ['src']
DIRS += ['glue', 'src']
if CONFIG['ENABLE_TESTS']:
XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']

Просмотреть файл

@ -1,18 +1,6 @@
#ifndef HUNSPELL_VISIBILITY_H_
#define HUNSPELL_VISIBILITY_H_
#if defined(HUNSPELL_STATIC)
# define LIBHUNSPELL_DLL_EXPORTED
#elif defined(_MSC_VER)
# if defined(BUILDING_LIBHUNSPELL)
# define LIBHUNSPELL_DLL_EXPORTED __declspec(dllexport)
# else
# define LIBHUNSPELL_DLL_EXPORTED __declspec(dllimport)
# endif
#elif defined(BUILDING_LIBHUNSPELL) && 1
# define LIBHUNSPELL_DLL_EXPORTED __attribute__((__visibility__("default")))
#else
# define LIBHUNSPELL_DLL_EXPORTED
#endif
#define LIBHUNSPELL_DLL_EXPORTED
#endif

Просмотреть файл

@ -15,8 +15,8 @@ UNIFIED_SOURCES += [
'suggestmgr.cxx',
]
# This variable is referenced in configure.in. Make sure to change that file
# too if you need to change this variable.
# This variable is referenced in mozilla-config.h.in. Make sure to change
# that file too if you need to change this variable.
DEFINES['HUNSPELL_STATIC'] = True
FINAL_LIBRARY = 'xul'

Просмотреть файл

@ -17,13 +17,9 @@ UNIFIED_SOURCES += [
FINAL_LIBRARY = 'xul'
if CONFIG['MOZ_SYSTEM_HUNSPELL']:
CXXFLAGS += CONFIG['MOZ_HUNSPELL_CFLAGS']
else:
LOCAL_INCLUDES += ['../hunspell/src']
LOCAL_INCLUDES += [
'../hunspell/glue',
'../hunspell/src',
'/dom/base',
]
EXPORTS.mozilla += [

Просмотреть файл

@ -481,18 +481,6 @@ check_prog('HFS_TOOL', extra_programs.HFS_TOOL,
check_prog('RPMBUILD', extra_programs.RPMBUILD,
allow_missing=True)
option('--enable-system-hunspell',
help="Use system hunspell (located with pkgconfig)")
@depends('--enable-system-hunspell', compile_environment)
def check_for_hunspell(value, compile_env):
return value and compile_env
system_hunspell = pkg_check_modules('MOZ_HUNSPELL', 'hunspell',
when=check_for_hunspell)
set_config('MOZ_SYSTEM_HUNSPELL', depends_if(system_hunspell)(lambda _: True))
@depends(target)
@imports('os')

Просмотреть файл

@ -41,8 +41,7 @@
* Force-include hunspell_alloc_hooks.h and hunspell_fopen_hooks.h for hunspell,
* so that we don't need to modify them directly.
*
* HUNSPELL_STATIC is defined in extensions/spellcheck/hunspell/src/Makefile.in,
* unless --enable-system-hunspell is defined.
* HUNSPELL_STATIC is defined in extensions/spellcheck/hunspell/src/moz.build
*/
#if defined(HUNSPELL_STATIC)
#include "hunspell_alloc_hooks.h"

Просмотреть файл

@ -238,9 +238,6 @@ if CONFIG['MOZ_SYSTEM_JPEG']:
if CONFIG['MOZ_SYSTEM_PNG']:
OS_LIBS += CONFIG['MOZ_PNG_LIBS']
if CONFIG['MOZ_SYSTEM_HUNSPELL']:
OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']
if CONFIG['MOZ_SYSTEM_LIBEVENT']:
OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']