From 2b31623cabec12ddf48ed57818f3274b392a702c Mon Sep 17 00:00:00 2001 From: sajitk Date: Fri, 11 Sep 2015 07:44:00 +0200 Subject: [PATCH] Bug 1200065 - Split Mozilla specific code from extensions/spellcheck/hunspell directory to glue directory and adjusted moz.build files. r=glandium --HG-- rename : extensions/spellcheck/hunspell/src/PRemoteSpellcheckEngine.ipdl => extensions/spellcheck/hunspell/glue/PRemoteSpellcheckEngine.ipdl rename : extensions/spellcheck/hunspell/src/RemoteSpellCheckEngineChild.cpp => extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineChild.cpp rename : extensions/spellcheck/hunspell/src/RemoteSpellCheckEngineChild.h => extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineChild.h rename : extensions/spellcheck/hunspell/src/RemoteSpellCheckEngineParent.cpp => extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineParent.cpp rename : extensions/spellcheck/hunspell/src/RemoteSpellCheckEngineParent.h => extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineParent.h rename : extensions/spellcheck/hunspell/src/hunspell_alloc_hooks.h => extensions/spellcheck/hunspell/glue/hunspell_alloc_hooks.h rename : extensions/spellcheck/hunspell/src/hunspell_fopen_hooks.h => extensions/spellcheck/hunspell/glue/hunspell_fopen_hooks.h rename : extensions/spellcheck/hunspell/src/moz.build => extensions/spellcheck/hunspell/glue/moz.build rename : extensions/spellcheck/hunspell/src/mozHunspell.cpp => extensions/spellcheck/hunspell/glue/mozHunspell.cpp rename : extensions/spellcheck/hunspell/src/mozHunspell.h => extensions/spellcheck/hunspell/glue/mozHunspell.h rename : extensions/spellcheck/hunspell/src/mozHunspellAllocator.h => extensions/spellcheck/hunspell/glue/mozHunspellAllocator.h rename : extensions/spellcheck/hunspell/src/mozHunspellDirProvider.cpp => extensions/spellcheck/hunspell/glue/mozHunspellDirProvider.cpp rename : extensions/spellcheck/hunspell/src/mozHunspellDirProvider.h => extensions/spellcheck/hunspell/glue/mozHunspellDirProvider.h --- .../PRemoteSpellcheckEngine.ipdl | 0 .../RemoteSpellCheckEngineChild.cpp | 0 .../RemoteSpellCheckEngineChild.h | 0 .../RemoteSpellCheckEngineParent.cpp | 0 .../RemoteSpellCheckEngineParent.h | 0 .../{src => glue}/hunspell_alloc_hooks.h | 0 .../{src => glue}/hunspell_fopen_hooks.h | 0 extensions/spellcheck/hunspell/glue/moz.build | 35 +++++++++++++ .../hunspell/{src => glue}/mozHunspell.cpp | 0 .../hunspell/{src => glue}/mozHunspell.h | 0 .../{src => glue}/mozHunspellAllocator.h | 0 .../{src => glue}/mozHunspellDirProvider.cpp | 0 .../{src => glue}/mozHunspellDirProvider.h | 0 extensions/spellcheck/hunspell/moz.build | 6 ++- extensions/spellcheck/hunspell/src/moz.build | 52 ++++++------------- extensions/spellcheck/src/moz.build | 1 + tools/rewriting/ThirdPartyPaths.txt | 3 +- 17 files changed, 56 insertions(+), 41 deletions(-) rename extensions/spellcheck/hunspell/{src => glue}/PRemoteSpellcheckEngine.ipdl (100%) rename extensions/spellcheck/hunspell/{src => glue}/RemoteSpellCheckEngineChild.cpp (100%) rename extensions/spellcheck/hunspell/{src => glue}/RemoteSpellCheckEngineChild.h (100%) rename extensions/spellcheck/hunspell/{src => glue}/RemoteSpellCheckEngineParent.cpp (100%) rename extensions/spellcheck/hunspell/{src => glue}/RemoteSpellCheckEngineParent.h (100%) rename extensions/spellcheck/hunspell/{src => glue}/hunspell_alloc_hooks.h (100%) rename extensions/spellcheck/hunspell/{src => glue}/hunspell_fopen_hooks.h (100%) create mode 100644 extensions/spellcheck/hunspell/glue/moz.build rename extensions/spellcheck/hunspell/{src => glue}/mozHunspell.cpp (100%) rename extensions/spellcheck/hunspell/{src => glue}/mozHunspell.h (100%) rename extensions/spellcheck/hunspell/{src => glue}/mozHunspellAllocator.h (100%) rename extensions/spellcheck/hunspell/{src => glue}/mozHunspellDirProvider.cpp (100%) rename extensions/spellcheck/hunspell/{src => glue}/mozHunspellDirProvider.h (100%) diff --git a/extensions/spellcheck/hunspell/src/PRemoteSpellcheckEngine.ipdl b/extensions/spellcheck/hunspell/glue/PRemoteSpellcheckEngine.ipdl similarity index 100% rename from extensions/spellcheck/hunspell/src/PRemoteSpellcheckEngine.ipdl rename to extensions/spellcheck/hunspell/glue/PRemoteSpellcheckEngine.ipdl diff --git a/extensions/spellcheck/hunspell/src/RemoteSpellCheckEngineChild.cpp b/extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineChild.cpp similarity index 100% rename from extensions/spellcheck/hunspell/src/RemoteSpellCheckEngineChild.cpp rename to extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineChild.cpp diff --git a/extensions/spellcheck/hunspell/src/RemoteSpellCheckEngineChild.h b/extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineChild.h similarity index 100% rename from extensions/spellcheck/hunspell/src/RemoteSpellCheckEngineChild.h rename to extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineChild.h diff --git a/extensions/spellcheck/hunspell/src/RemoteSpellCheckEngineParent.cpp b/extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineParent.cpp similarity index 100% rename from extensions/spellcheck/hunspell/src/RemoteSpellCheckEngineParent.cpp rename to extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineParent.cpp diff --git a/extensions/spellcheck/hunspell/src/RemoteSpellCheckEngineParent.h b/extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineParent.h similarity index 100% rename from extensions/spellcheck/hunspell/src/RemoteSpellCheckEngineParent.h rename to extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineParent.h diff --git a/extensions/spellcheck/hunspell/src/hunspell_alloc_hooks.h b/extensions/spellcheck/hunspell/glue/hunspell_alloc_hooks.h similarity index 100% rename from extensions/spellcheck/hunspell/src/hunspell_alloc_hooks.h rename to extensions/spellcheck/hunspell/glue/hunspell_alloc_hooks.h diff --git a/extensions/spellcheck/hunspell/src/hunspell_fopen_hooks.h b/extensions/spellcheck/hunspell/glue/hunspell_fopen_hooks.h similarity index 100% rename from extensions/spellcheck/hunspell/src/hunspell_fopen_hooks.h rename to extensions/spellcheck/hunspell/glue/hunspell_fopen_hooks.h diff --git a/extensions/spellcheck/hunspell/glue/moz.build b/extensions/spellcheck/hunspell/glue/moz.build new file mode 100644 index 000000000000..6b591e330a0f --- /dev/null +++ b/extensions/spellcheck/hunspell/glue/moz.build @@ -0,0 +1,35 @@ +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# 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/. + +SOURCES += [ + 'mozHunspell.cpp', + 'mozHunspellDirProvider.cpp', + 'RemoteSpellCheckEngineChild.cpp', + 'RemoteSpellCheckEngineParent.cpp', +] + +CXXFLAGS += CONFIG['MOZ_HUNSPELL_CFLAGS'] + +FINAL_LIBRARY = 'xul' + +LOCAL_INCLUDES += [ + '../src', + '/dom/base', + '/editor/libeditor', + '/extensions/spellcheck/src', +] + +include('/ipc/chromium/chromium-config.mozbuild') + +IPDL_SOURCES = [ + 'PRemoteSpellcheckEngine.ipdl', +] + +EXPORTS.mozilla += [ + 'RemoteSpellCheckEngineChild.h', + 'RemoteSpellCheckEngineParent.h', +] + diff --git a/extensions/spellcheck/hunspell/src/mozHunspell.cpp b/extensions/spellcheck/hunspell/glue/mozHunspell.cpp similarity index 100% rename from extensions/spellcheck/hunspell/src/mozHunspell.cpp rename to extensions/spellcheck/hunspell/glue/mozHunspell.cpp diff --git a/extensions/spellcheck/hunspell/src/mozHunspell.h b/extensions/spellcheck/hunspell/glue/mozHunspell.h similarity index 100% rename from extensions/spellcheck/hunspell/src/mozHunspell.h rename to extensions/spellcheck/hunspell/glue/mozHunspell.h diff --git a/extensions/spellcheck/hunspell/src/mozHunspellAllocator.h b/extensions/spellcheck/hunspell/glue/mozHunspellAllocator.h similarity index 100% rename from extensions/spellcheck/hunspell/src/mozHunspellAllocator.h rename to extensions/spellcheck/hunspell/glue/mozHunspellAllocator.h diff --git a/extensions/spellcheck/hunspell/src/mozHunspellDirProvider.cpp b/extensions/spellcheck/hunspell/glue/mozHunspellDirProvider.cpp similarity index 100% rename from extensions/spellcheck/hunspell/src/mozHunspellDirProvider.cpp rename to extensions/spellcheck/hunspell/glue/mozHunspellDirProvider.cpp diff --git a/extensions/spellcheck/hunspell/src/mozHunspellDirProvider.h b/extensions/spellcheck/hunspell/glue/mozHunspellDirProvider.h similarity index 100% rename from extensions/spellcheck/hunspell/src/mozHunspellDirProvider.h rename to extensions/spellcheck/hunspell/glue/mozHunspellDirProvider.h diff --git a/extensions/spellcheck/hunspell/moz.build b/extensions/spellcheck/hunspell/moz.build index 6127b028cfb9..2833fd1a7622 100644 --- a/extensions/spellcheck/hunspell/moz.build +++ b/extensions/spellcheck/hunspell/moz.build @@ -4,7 +4,9 @@ # 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 += ['src'] +DIRS += ['glue'] +if not CONFIG['MOZ_NATIVE_HUNSPELL']: + DIRS += ['src'] if CONFIG['ENABLE_TESTS']: - XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini'] + XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini'] diff --git a/extensions/spellcheck/hunspell/src/moz.build b/extensions/spellcheck/hunspell/src/moz.build index bffc09d8fc33..bbc052adf935 100644 --- a/extensions/spellcheck/hunspell/src/moz.build +++ b/extensions/spellcheck/hunspell/src/moz.build @@ -5,52 +5,30 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. SOURCES += [ - 'mozHunspell.cpp', - 'mozHunspellDirProvider.cpp', - 'RemoteSpellCheckEngineChild.cpp', - 'RemoteSpellCheckEngineParent.cpp', + 'affentry.cxx', + 'affixmgr.cxx', + 'csutil.cxx', + 'dictmgr.cxx', + 'filemgr.cxx', + 'hashmgr.cxx', + 'hunspell.cxx', + 'hunzip.cxx', + 'phonet.cxx', + 'replist.cxx', + 'suggestmgr.cxx', ] -if not CONFIG['MOZ_NATIVE_HUNSPELL']: - SOURCES += [ - 'affentry.cxx', - 'affixmgr.cxx', - 'csutil.cxx', - 'dictmgr.cxx', - 'filemgr.cxx', - 'hashmgr.cxx', - 'hunspell.cxx', - 'hunzip.cxx', - 'phonet.cxx', - 'replist.cxx', - 'suggestmgr.cxx', - ] - # This variable is referenced in configure.in. Make sure to change that file - # too if you need to change this variable. - DEFINES['HUNSPELL_STATIC'] = True -else: - CXXFLAGS += CONFIG['MOZ_HUNSPELL_CFLAGS'] +# This variable is referenced in configure.in. Make sure to change that file +# too if you need to change this variable. +DEFINES['HUNSPELL_STATIC'] = True FINAL_LIBRARY = 'xul' LOCAL_INCLUDES += [ - '/dom/base', - '/editor/libeditor', - '/extensions/spellcheck/src', + '../glue', ] -# XXX: This directory is a mix of Mozilla code and third-party code. We should -# put the Mozilla code in a separate directory and disallow compiler warnings -# there (bug 1200065). Until then, allow warnings for all of the code. ALLOW_COMPILER_WARNINGS = True include('/ipc/chromium/chromium-config.mozbuild') -IPDL_SOURCES = [ - 'PRemoteSpellcheckEngine.ipdl', -] - -EXPORTS.mozilla += [ - 'RemoteSpellCheckEngineChild.h', - 'RemoteSpellCheckEngineParent.h', -] diff --git a/extensions/spellcheck/src/moz.build b/extensions/spellcheck/src/moz.build index 95e3fbddf3f5..14d721caeb6e 100644 --- a/extensions/spellcheck/src/moz.build +++ b/extensions/spellcheck/src/moz.build @@ -19,6 +19,7 @@ SOURCES += [ FINAL_LIBRARY = 'xul' LOCAL_INCLUDES += [ + '../hunspell/glue', '../hunspell/src', '/dom/base', '/editor/libeditor', diff --git a/tools/rewriting/ThirdPartyPaths.txt b/tools/rewriting/ThirdPartyPaths.txt index 42211ef17655..0e7035b96d61 100644 --- a/tools/rewriting/ThirdPartyPaths.txt +++ b/tools/rewriting/ThirdPartyPaths.txt @@ -2,8 +2,7 @@ browser/components/translation/cld2/ build/stlport/ db/sqlite3/src/ dom/media/platforms/ffmpeg/libav -extensions/spellcheck/hunspell/src/*.cxx -extensions/spellcheck/hunspell/src/*.hxx +extensions/spellcheck/hunspell/src/ gfx/2d/convolver gfx/2d/image_operations gfx/angle/