summaryrefslogtreecommitdiff
path: root/hunspell
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@verizon.net>2012-10-28 13:43:54 -0400
committerPeter Foley <pefoley2@verizon.net>2012-10-28 14:23:32 -0400
commit2e4ab69246bc93fbc8cbbfc9f74c03612e611e11 (patch)
tree8750d4a589ea150e588d875d5b3aaa223870fab6 /hunspell
parent0b79b4e4657a3ac8fdc27e0e2922524c1f819d5a (diff)
convert hunspell to gbuild
Change-Id: I285292ca7f7252399c3898ca49f73727ab569fca
Diffstat (limited to 'hunspell')
-rw-r--r--hunspell/ExternalPackage_hunspell.mk22
-rw-r--r--hunspell/ExternalProject_hunspell.mk28
-rw-r--r--hunspell/Makefile7
-rw-r--r--hunspell/Module_hunspell.mk28
-rw-r--r--hunspell/StaticLibrary_libhunspell.mk35
-rw-r--r--hunspell/UnpackedTarball_hunspell.mk30
-rw-r--r--hunspell/hunspell-static.patch11
-rw-r--r--hunspell/hunspell-wntconfig.patch4
-rw-r--r--hunspell/makefile.mk119
-rw-r--r--hunspell/prj/d.lst6
-rw-r--r--hunspell/prj/dmake0
11 files changed, 150 insertions, 140 deletions
diff --git a/hunspell/ExternalPackage_hunspell.mk b/hunspell/ExternalPackage_hunspell.mk
new file mode 100644
index 000000000000..5936b4006c0a
--- /dev/null
+++ b/hunspell/ExternalPackage_hunspell.mk
@@ -0,0 +1,22 @@
+# -*- 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_ExternalPackage_ExternalPackage,hunspell,hunspell))
+
+ifneq ($(COM),MSC)
+
+$(eval $(call gb_ExternalPackage_use_external_project,hunspell,hunspell))
+
+$(eval $(call gb_ExternalPackage_add_files,hunspell,lib,\
+ src/hunspell/.libs/libhunspell-1.3.a \
+))
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/hunspell/ExternalProject_hunspell.mk b/hunspell/ExternalProject_hunspell.mk
new file mode 100644
index 000000000000..a374f13ae1f3
--- /dev/null
+++ b/hunspell/ExternalProject_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_ExternalProject_ExternalProject,hunspell))
+
+$(eval $(call gb_ExternalProject_use_unpacked,hunspell,hunspell))
+
+$(eval $(call gb_ExternalProject_register_targets,hunspell,\
+ build \
+))
+
+$(call gb_ExternalProject_get_state_target,hunspell,build):
+ cd $(EXTERNAL_WORKDIR) \
+ && ./configure --disable-shared --disable-nls --with-pic \
+ $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM))\
+ $(if $(filter AIX,$(OS)),CFLAGS="-D_LINUX_SOURCE_COMPAT") \
+ $(if $(filter C53,$(COM)),CFLAGS="-xc99=none") \
+ $(if $(filter-out WNTGCC,$(GUI)$(COM)),,LDFLAGS="-Wl,--enable-runtime-pseudo-reloc-v2") \
+ && $(GNUMAKE) -j$(EXTMAXPROCESS) \
+ && touch $@
+
+# vim: set noet sw=4 ts=4:
diff --git a/hunspell/Makefile b/hunspell/Makefile
new file mode 100644
index 000000000000..ccb1c85a04da
--- /dev/null
+++ b/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/hunspell/Module_hunspell.mk b/hunspell/Module_hunspell.mk
new file mode 100644
index 000000000000..376ac35f6ea8
--- /dev/null
+++ b/hunspell/Module_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_Module_Module,hunspell))
+
+ifeq ($(SYSTEM_HUNSPELL),NO)
+$(eval $(call gb_Module_add_targets,hunspell,\
+ UnpackedTarball_hunspell \
+ ExternalPackage_hunspell \
+))
+ifeq ($(COM),MSC)
+$(eval $(call gb_Module_add_targets,hunspell,\
+ StaticLibrary_libhunspell \
+))
+else
+$(eval $(call gb_Module_add_targets,hunspell,\
+ ExternalProject_hunspell \
+))
+endif
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/hunspell/StaticLibrary_libhunspell.mk b/hunspell/StaticLibrary_libhunspell.mk
new file mode 100644
index 000000000000..334897bb2cf6
--- /dev/null
+++ b/hunspell/StaticLibrary_libhunspell.mk
@@ -0,0 +1,35 @@
+# -*- 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,libhunspell))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,libhunspell,hunspell))
+
+$(eval $(call gb_StaticLibrary_set_warnings_not_errors,libhunspell))
+
+$(eval $(call gb_StaticLibrary_add_defs,libhunspell,\
+ -DHUNSPELL_STATIC \
+ -DOPENOFFICEORG \
+))
+
+$(eval $(call gb_StaticLibrary_add_generated_cxxobjects,libhunspell,\
+ UnpackedTarball/hunspell/src/hunspell/affentry \
+ UnpackedTarball/hunspell/src/hunspell/affixmgr \
+ UnpackedTarball/hunspell/src/hunspell/dictmgr \
+ 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/hunspell/UnpackedTarball_hunspell.mk b/hunspell/UnpackedTarball_hunspell.mk
new file mode 100644
index 000000000000..9ba9dc309a46
--- /dev/null
+++ b/hunspell/UnpackedTarball_hunspell.mk
@@ -0,0 +1,30 @@
+ -*- 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_add_patches,hunspell,\
+ hunspell/hunspell-twoaffixcompound.patch \
+ hunspell/hunspell-solaris.patch \
+ hunspell/hunspell-1.3.2-overflow.patch \
+ hunspell/hunspell-android.patch \
+ hunspell/hunspell-1.3.2-nullptr.patch \
+ hunspell/hunspell-1.3.2-literal.patch \
+ hunspell/hunspell-1.3.2-compound.patch \
+))
+
+ifeq ($(COM),MSC)
+$(eval $(call gb_UnpackedTarball_set_post_action,hunspell,\
+ touch src/hunspell/config.h \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/hunspell/hunspell-static.patch b/hunspell/hunspell-static.patch
deleted file mode 100644
index daab90ce9a75..000000000000
--- a/hunspell/hunspell-static.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- misc/hunspell-1.3.2/src/hunspell/makefile.mk 2010-06-17 15:56:41.000000000 +0200
-+++ misc/build/hunspell-1.3.2/src/hunspell/makefile.mk 2011-02-10 20:47:22.000000000 +0100
-@@ -39,7 +39,7 @@
-
- # --- Files --------------------------------------------------------
-
--CFLAGS+=-I..$/..$/
-+CFLAGS+=-I..$/..$/ -DHUNSPELL_STATIC
- CDEFS+=-DOPENOFFICEORG
-
- SLOFILES= \
diff --git a/hunspell/hunspell-wntconfig.patch b/hunspell/hunspell-wntconfig.patch
deleted file mode 100644
index cc353b1a2118..000000000000
--- a/hunspell/hunspell-wntconfig.patch
+++ /dev/null
@@ -1,4 +0,0 @@
---- misc/hunspell-1.3.2/config.h 2010-02-25 14:38:38.000000000 +0000
-+++ misc/build/hunspell-1.3.2/config.h 2010-02-25 14:38:42.000000000 +0000
-@@ -1 +0,0 @@
--dummy
diff --git a/hunspell/makefile.mk b/hunspell/makefile.mk
deleted file mode 100644
index 16a1adbc7257..000000000000
--- a/hunspell/makefile.mk
+++ /dev/null
@@ -1,119 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=.
-
-PRJNAME=hunspell
-TARGET=hunspell
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-TARFILE_NAME=hunspell-1.3.2
-TARFILE_MD5=3121aaf3e13e5d88dfff13fb4a5f1ab8
-ADDITIONAL_FILES+=config.h
-
-# hunspell-1.3.2-nullptr.patch, hunspell-1.3.2-literal.patch: reported upstream
-# as <https://sourceforge.net/tracker/?func=detail&aid=3557292&group_id=143754&
-# atid=756395> "Some C++11 related fixes"
-PATCH_FILES=\
- hunspell-twoaffixcompound.patch \
- hunspell-static.patch \
- hunspell-wntconfig.patch \
- hunspell-solaris.patch \
- hunspell-1.3.2-overflow.patch \
- hunspell-android.patch \
- hunspell-1.3.2-nullptr.patch \
- hunspell-1.3.2-literal.patch \
- hunspell-1.3.2-compound.patch
-
-.IF "$(GUI)"=="UNX"
-
-#relative to CONFIGURE_DIR
-CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) configure
-CONFIGURE_FLAGS= --disable-shared --disable-nls --with-pic
-.IF "$(COMNAME)"=="sunpro5"
-CONFIGURE_FLAGS+= CFLAGS=-xc99=none
-.ENDIF # "$(COMNAME)"=="sunpro5"
-
-.IF "$(OS)"=="AIX"
-CONFIGURE_FLAGS+= CFLAGS=-D_LINUX_SOURCE_COMPAT
-.ELIF "$(OS)" == "MACOSX"
-CONFIGURE_FLAGS += \
- --prefix=/@.__________________________________________________$(EXTRPATH)
-.END
-
-.IF "$(SYSBASE)"!=""
-.IF "$(EXTRA_CFLAGS)"!=""
-CONFIGURE_FLAGS+= CFLAGS="$(EXTRA_CFLAGS)" CXXFLAGS="$(EXTRA_CFLAGS)"
-.ENDIF # "$(EXTRA_CFLAGS)"!=""
-.ELIF "$(OS)"=="MACOSX" # "$(SYSBASE)"!=""
-CONFIGURE_FLAGS+=CPPFLAGS="$(EXTRA_CDEFS)"
-.ENDIF
-
-.IF "$(CROSS_COMPILING)"=="YES"
-CONFIGURE_FLAGS+=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) LIBS="$(STDLIBCUIMT)"
-CONFIGURE_FLAGS:=$(subst,CPPRUNTIME,$(STDLIBCPP) $(CONFIGURE_FLAGS))
-.ENDIF
-
-BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS)
-
-OUT2LIB=$(BUILD_DIR)$/src$/hunspell$/.libs$/libhunspell-1.3.a
-
-.ENDIF # "$(GUI)"=="UNX"
-
-
-.IF "$(GUI)"=="WNT"
-.IF "$(COM)"=="GCC"
-CONFIGURE_ACTION=configure
-
-CONFIGURE_FLAGS= --disable-shared --disable-nls --with-pic LDFLAGS=-Wl,--enable-runtime-pseudo-reloc-v2
-
-.IF "$(CROSS_COMPILING)"=="YES"
-CONFIGURE_FLAGS+=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
-.ENDIF
-
-BUILD_ACTION=make
-OUT2LIB=$(BUILD_DIR)$/src$/hunspell$/.libs$/libhunspell-1.3.a
-.ELSE
-BUILD_ACTION=cd src/hunspell && dmake
-.ENDIF
-.ENDIF # "$(GUI)"=="WNT"
-
-OUT2INC= \
- $(BUILD_DIR)$/src$/hunspell$/*.hxx \
- $(BUILD_DIR)$/src$/hunspell$/*.h
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : set_ext.mk
-.INCLUDE : target.mk
-.INCLUDE : tg_ext.mk
-
diff --git a/hunspell/prj/d.lst b/hunspell/prj/d.lst
index da3b58c94567..e69de29bb2d1 100644
--- a/hunspell/prj/d.lst
+++ b/hunspell/prj/d.lst
@@ -1,6 +0,0 @@
-..\%__SRC%\lib\lib*.* %_DEST%\lib\lib*.*
-..\%__SRC%\slb\libhunspell.lib %_DEST%\lib\libhunspell.lib
-
-mkdir: %_DEST%\inc\hunspell
-..\%__SRC%\inc\*.hxx %_DEST%\inc\hunspell\*.hxx
-..\%__SRC%\inc\*.h %_DEST%\inc\hunspell\*.h
diff --git a/hunspell/prj/dmake b/hunspell/prj/dmake
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/hunspell/prj/dmake
+++ /dev/null