summaryrefslogtreecommitdiff
path: root/hyphen
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@verizon.net>2012-11-03 13:54:46 -0400
committerPeter Foley <pefoley2@verizon.net>2012-11-03 14:45:45 -0400
commitdd584cb4eaad85d458ee2dc58480ec3ea7a2a311 (patch)
tree502aeb6555337f15d3fb20768585f7feabae3e2a /hyphen
parent7bcf400f379613d52787f213ee867a24637d4ead (diff)
convert hyphen to gbuild
Change-Id: I55b3832128aa096eb44b67a26ec2afeb6c573604
Diffstat (limited to 'hyphen')
-rw-r--r--hyphen/ExternalPackage_hyphen.mk28
-rw-r--r--hyphen/ExternalProject_hyphen.mk30
-rw-r--r--hyphen/Makefile7
-rw-r--r--hyphen/Module_hyphen.mk32
-rw-r--r--hyphen/StaticLibrary_hyphen.mk22
-rw-r--r--hyphen/UnpackedTarball_hyphen.mk22
-rw-r--r--hyphen/hyphen-build.patch32
-rw-r--r--hyphen/makefile.mk113
-rw-r--r--hyphen/prj/d.lst5
-rw-r--r--hyphen/prj/dmake0
10 files changed, 141 insertions, 150 deletions
diff --git a/hyphen/ExternalPackage_hyphen.mk b/hyphen/ExternalPackage_hyphen.mk
new file mode 100644
index 000000000000..cae07649ff85
--- /dev/null
+++ b/hyphen/ExternalPackage_hyphen.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_ExternalPackage_ExternalPackage,hyphen,hyphen))
+
+ifneq ($(COM),MSC)
+
+$(eval $(call gb_ExternalPackage_use_external_project,hyphen,hyphen))
+
+ifeq ($(SYSTEM_HYPH),NO)
+$(eval $(call gb_ExternalPackage_add_file,hyphen,lib/libhyphen.a,.libs/libhyphen.a))
+endif
+
+endif
+
+ifeq ($(WITH_MYSPELL_DICTS),YES)
+$(eval $(call gb_ExternalPackage_add_files,hyphen,bin,\
+ hyph_en_US.dic \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/hyphen/ExternalProject_hyphen.mk b/hyphen/ExternalProject_hyphen.mk
new file mode 100644
index 000000000000..474e7b2bd033
--- /dev/null
+++ b/hyphen/ExternalProject_hyphen.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_ExternalProject_ExternalProject,hyphen))
+
+$(eval $(call gb_ExternalProject_use_unpacked,hyphen,hyphen))
+
+$(eval $(call gb_ExternalProject_use_package,hyphen,hunspell))
+
+$(eval $(call gb_ExternalProject_register_targets,hyphen,\
+ build \
+))
+
+$(call gb_ExternalProject_get_state_target,hyphen,build):
+ cd $(EXTERNAL_WORKDIR) \
+ && ./configure --disable-shared \
+ $(if $(filter-out IOS,$(OS)),--with-pic) \
+ $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) gio_can_sniff=no) \
+ $(if $(filter C52U,$(COM)$(CPU)),CFLAGS="-m64") \
+ && $(MAKE) \
+ $(if $(filter YESYES,$(SYSTEM_HYPH)$(WITH_MYSPELL_DICTS)),hyph_en_US.dic) \
+ && touch $@
+
+# vim: set noet sw=4 ts=4:
diff --git a/hyphen/Makefile b/hyphen/Makefile
new file mode 100644
index 000000000000..ccb1c85a04da
--- /dev/null
+++ b/hyphen/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/hyphen/Module_hyphen.mk b/hyphen/Module_hyphen.mk
new file mode 100644
index 000000000000..2ab3245d17a3
--- /dev/null
+++ b/hyphen/Module_hyphen.mk
@@ -0,0 +1,32 @@
+# -*- 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,hyphen))
+
+ifneq ($(or $(filter NO,$(SYSTEM_HYPH)),$(filter TRUE,$(WITH_MYSPELL_DICTS))),)
+$(eval $(call gb_Module_add_targets,hyphen,\
+ UnpackedTarball_hyphen \
+ ExternalPackage_hyphen \
+))
+ifeq ($(COM),MSC)
+
+ifeq ($(SYSTEM_HYPH),NO)
+$(eval $(call gb_Module_add_targets,hyphen,\
+ StaticLibrary_hyphen \
+))
+endif
+
+else
+$(eval $(call gb_Module_add_targets,hyphen,\
+ ExternalProject_hyphen \
+))
+endif
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/hyphen/StaticLibrary_hyphen.mk b/hyphen/StaticLibrary_hyphen.mk
new file mode 100644
index 000000000000..81eddf17d850
--- /dev/null
+++ b/hyphen/StaticLibrary_hyphen.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_StaticLibrary_StaticLibrary,hyphen))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,hyphen,hyphen))
+
+$(eval $(call gb_StaticLibrary_set_warnings_not_errors,hyphen))
+
+$(eval $(call gb_StaticLibrary_add_generated_cobjects,hyphen,\
+ UnpackedTarball/hyphen/hyphen \
+ UnpackedTarball/hyphen/hnjalloc \
+))
+
+
+# vim: set noet sw=4 ts=4:
diff --git a/hyphen/UnpackedTarball_hyphen.mk b/hyphen/UnpackedTarball_hyphen.mk
new file mode 100644
index 000000000000..58049e92b5fe
--- /dev/null
+++ b/hyphen/UnpackedTarball_hyphen.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_UnpackedTarball_UnpackedTarball,hyphen))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,hyphen,$(HYPHEN_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_add_patches,hyphen,\
+ hyphen/hyphen-lenwaswrong.patch \
+ hyphen/hyphen-fdo43931.patch \
+ hyphen/hyphen-android.patch \
+ hyphen/hyphen-rhmin.patch \
+ hyphen/hyphen-build.patch \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/hyphen/hyphen-build.patch b/hyphen/hyphen-build.patch
index 7b8ceaa47d29..6df2bb680cdb 100644
--- a/hyphen/hyphen-build.patch
+++ b/hyphen/hyphen-build.patch
@@ -36,35 +36,3 @@
clean-local:
rm -rf hyphen.us* hyph_en_US.dic
---- misc/hyphen-2.8.4/makefile.mk 2010-12-02 10:35:40.265625000 +0100
-+++ misc/build/hyphen-2.8.4/makefile.mk 2010-12-02 10:25:45.750000000 +0100
-@@ -1 +1,28 @@
--dummy
-+PRJ = ..$/..$/..$/..
-+
-+PRJNAME = hyphen
-+TARGET = hyphen
-+CFLAGSCALL=gsd
-+
-+USE_DEFFILE=TRUE
-+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
-+UWINAPILIB=
-+
-+.INCLUDE : settings.mk
-+
-+# --- Files --------------------------------------------------------
-+
-+# !! not to be compiled because those belong to a stand alone programs: !!
-+# $(SLO)$/createfp.obj\
-+# $(SLO)$/testtextcat.obj
-+
-+SLOFILES= \
-+ $(SLO)$/hyphen.obj\
-+ $(SLO)$/hnjalloc.obj
-+
-+# --- Targets ------------------------------------------------------
-+
-+ALL: ALLTAR
-+
-+.INCLUDE : target.mk
-+
diff --git a/hyphen/makefile.mk b/hyphen/makefile.mk
deleted file mode 100644
index bfbd320dfc0a..000000000000
--- a/hyphen/makefile.mk
+++ /dev/null
@@ -1,113 +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=hyphen
-TARGET=hyphen
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-TARFILE_NAME=hyphen-2.8.4
-TARFILE_MD5=a2f6010987e1c601274ab5d63b72c944
-
-ADDITIONAL_FILES += makefile.mk
-
-PATCH_FILES= \
- hyphen-build.patch \
- hyphen-android.patch \
- hyphen-fdo43931.patch \
- hyphen-lenwaswrong.patch \
- hyphen-rhmin.patch
-
-.IF "$(GUI)"=="UNX"
-CONFIGURE_DIR=$(BUILD_DIR)
-
-#relative to CONFIGURE_DIR
-# still needed also in system-hyphen case as it creates the makefile
-CONFIGURE_ACTION=configure
-CONFIGURE_FLAGS=--disable-shared
-
-.IF "$(OS)"!="IOS"
-CONFIGURE_FLAGS+= --with-pic
-.ENDIF
-
-.IF "$(COM)"=="C52" && "$(CPU)"=="U"
-LCL_CONFIGURE_CFLAGS+=-m64
-.ENDIF
-
-.IF "$(SYSBASE)"!=""
-.IF "$(EXTRA_CFLAGS)"!=""
-LCL_CONFIGURE_CFLAGS+=$(EXTRA_CFLAGS)
-CONFIGURE_FLAGS+=CXXFLAGS="$(EXTRA_CFLAGS)"
-.ENDIF # "$(EXTRA_CFLAGS)"!=""
-.ELIF "$(OS)"=="MACOSX" # "$(SYSBASE)"!=""
-CONFIGURE_FLAGS+=CPPFLAGS="$(EXTRA_CDEFS)"
-.ENDIF
-
-.IF "$(LCL_CONFIGURE_CFLAGS)"!=""
-CONFIGURE_FLAGS+=CFLAGS='$(LCL_CONFIGURE_CFLAGS)'
-.ENDIF
-
-.IF "$(SYSTEM_HYPH)" == "YES" && "$(WITH_MYSPELL_DICTS)" == "YES"
-BUILD_ACTION=make hyph_en_US.dic
-.ELIF "$(SYSTEM_HYPH)" == "YES" && "$(WITH_MYSPELL_DICTS)" != "YES"
-@all:
- echo "Nothing to do here."
-.ELSE
-BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS)
-OUT2INC += hyphen.h
-.ENDIF
-
-.ENDIF # "$(GUI)"=="UNX"
-
-.IF "$(GUI)"=="WNT"
-.IF "$(COM)"=="GCC"
-CONFIGURE_ACTION=configure
-CONFIGURE_FLAGS= --disable-shared --with-pic
-
-BUILD_ACTION=make
-
-.ELSE
-BUILD_ACTION=dmake
-.ENDIF # "$(COM)"=="GCC"
-OUT2INC += hyphen.h
-.ENDIF # "$(GUI)"=="WNT"
-
-.IF "$(CROSS_COMPILING)"=="YES"
-CONFIGURE_FLAGS+= --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
-.ENDIF
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : set_ext.mk
-.INCLUDE : target.mk
-.INCLUDE : tg_ext.mk
diff --git a/hyphen/prj/d.lst b/hyphen/prj/d.lst
index 0588179ef9b7..e69de29bb2d1 100644
--- a/hyphen/prj/d.lst
+++ b/hyphen/prj/d.lst
@@ -1,5 +0,0 @@
-..\%__SRC%\slb\hyphen.lib %_DEST%\lib\hyphen.lib
-
-..\%__SRC%\inc\hyphen.h %_DEST%\inc\hyphen.h
-..\%__SRC%\misc\build\hyphen-2.8.4\.libs\libhyphen.a %_DEST%\lib\libhyphen.a
-..\%__SRC%\misc\build\hyphen-2.8.4\hyph_en_US.dic %_DEST%\bin\hyph_en_US.dic
diff --git a/hyphen/prj/dmake b/hyphen/prj/dmake
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/hyphen/prj/dmake
+++ /dev/null