summaryrefslogtreecommitdiff
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
parent7bcf400f379613d52787f213ee867a24637d4ead (diff)
convert hyphen to gbuild
Change-Id: I55b3832128aa096eb44b67a26ec2afeb6c573604
-rw-r--r--Makefile.top2
-rw-r--r--Module_tail_build.mk1
-rw-r--r--RepositoryExternal.mk27
-rw-r--r--RepositoryModule_ooo.mk1
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.ac2
-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
-rw-r--r--lingucomponent/Library_hyphen.mk5
-rw-r--r--ooo.lst.in2
-rw-r--r--tail_build/prj/build.lst2
19 files changed, 177 insertions, 157 deletions
diff --git a/Makefile.top b/Makefile.top
index 19e5f73319d5..acdfcb90b0f6 100644
--- a/Makefile.top
+++ b/Makefile.top
@@ -91,6 +91,7 @@ helpcompiler\
hsqldb\
hunspell\
hwpfilter\
+hyphen\
i18npool\
i18nutil\
idl\
@@ -221,7 +222,6 @@ gdk-pixbuf\
gettext\
glib\
helpcontent2 \
-hyphen\
icu\
instsetoo_native\
libcroco\
diff --git a/Module_tail_build.mk b/Module_tail_build.mk
index a8a397a1dc39..bb6cfc2eb897 100644
--- a/Module_tail_build.mk
+++ b/Module_tail_build.mk
@@ -82,6 +82,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
$(call gb_Helper_optional,HSQLDB,hsqldb) \
$(call gb_Helper_optional,HUNSPELL,hunspell) \
hwpfilter \
+ $(call gb_Helper_optional,HYPHEN,hyphen) \
i18npool \
i18nutil \
idl \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index ca87908748ba..a1fc086a5990 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -336,6 +336,33 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
))
endif
+ifeq ($(SYSTEM_HYPH),YES)
+
+define gb_LinkTarget__use_hyphen
+$(call gb_LinkTarget_add_libs,$(1),$(HYPHEN_LIB))
+
+endef
+
+else # !SYSTEM_HYPH
+
+$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
+ hyphen \
+))
+
+define gb_LinkTarget__use_hyphen
+$(call gb_LinkTarget_use_unpacked,$(1),hyphen)
+$(call gb_LinkTarget_set_include,$(1),\
+ -I$(call gb_UnpackedTarball_get_dir,hyphen)\
+ $$(INCLUDE) \
+)
+$(call gb_LinkTarget_use_static_libraries,$(1),\
+ hyphen \
+)
+
+endef
+
+endif # SYSTEM_HYPH
+
ifeq ($(SYSTEM_HUNSPELL),YES)
define gb_LinkTarget__use_hunspell
diff --git a/RepositoryModule_ooo.mk b/RepositoryModule_ooo.mk
index a0559b6516ec..752bfdc35875 100644
--- a/RepositoryModule_ooo.mk
+++ b/RepositoryModule_ooo.mk
@@ -88,6 +88,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
$(call gb_Helper_optional,HSQLDB,hsqldb) \
$(call gb_Helper_optional,HUNSPELL,hunspell) \
hwpfilter \
+ $(call gb_Helper_optional,HYPHEN,hyphen) \
i18npool \
i18nutil \
idl \
diff --git a/config_host.mk.in b/config_host.mk.in
index 08d1bed00b10..48758f172966 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -266,6 +266,7 @@ export HUNSPELL_TARBALL=@HUNSPELL_TARBALL@
export HUNSPELL_CFLAGS=@HUNSPELL_CFLAGS@
export HUNSPELL_LIBS=@HUNSPELL_LIBS@
export HYPHEN_LIB=@HYPHEN_LIB@
+export HYPHEN_TARBALL=@HYPHEN_TARBALL@
export HYPH_SYSTEM_DIR=@HYPH_SYSTEM_DIR@
export ICECREAM_RUN=@ICECREAM_RUN@
export ICU_MAJOR=@ICU_MAJOR@
diff --git a/configure.ac b/configure.ac
index e9b448be112f..9517836e9b8b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8891,10 +8891,12 @@ if test "$with_system_altlinuxhyph" = "yes"; then
else
AC_MSG_RESULT([internal])
SYSTEM_HYPH=NO
+ HYPHEN_TARBALL="a2f6010987e1c601274ab5d63b72c944-hyphen-2.8.4.tar.gz"
BUILD_TYPE="$BUILD_TYPE HYPHEN"
fi
AC_SUBST(SYSTEM_HYPH)
AC_SUBST(HYPHEN_LIB)
+AC_SUBST(HYPHEN_TARBALL)
AC_SUBST([MINGW_HYPHEN_DLL])
dnl ===================================================================
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
diff --git a/lingucomponent/Library_hyphen.mk b/lingucomponent/Library_hyphen.mk
index aec8dba3502e..2d6d76b6c49e 100644
--- a/lingucomponent/Library_hyphen.mk
+++ b/lingucomponent/Library_hyphen.mk
@@ -53,10 +53,7 @@ $(eval $(call gb_Library_use_static_libraries,hyphen,\
$(eval $(call gb_Library_use_externals,hyphen,\
hunspell \
-))
-
-$(eval $(call gb_Library_add_libs,hyphen,\
- $(if $(filter MSC,$(COM)),hyphen.lib,-lhyphen) \
+ hyphen \
))
$(eval $(call gb_Library_add_exception_objects,hyphen,\
diff --git a/ooo.lst.in b/ooo.lst.in
index 44caf0816e6d..17bc578c4a63 100644
--- a/ooo.lst.in
+++ b/ooo.lst.in
@@ -1,5 +1,4 @@
http://dev-www.libreoffice.org/src
-a2f6010987e1c601274ab5d63b72c944-hyphen-2.8.4.tar.gz
51a40a81b3b7abe8a5c33670bd3da0ce-openssl-0.9.8v.tar.gz
c63f411b3ad147db2bcce1bf262a0e02-pixman-0.24.4.tar.bz2
6097739c841f671cb21332b9cc593ae7-libexttextcat-3.3.1.tar.bz2
@@ -60,6 +59,7 @@ fa6a2f85bd28baab035b2c95e722713f-liblangtag-0.2.tar.bz2
@GRAPHITE_TARBALL@
@HSQLDB_TARBALL@
@HUNSPELL_TARBALL@
+@HYPHEN_TARBALL@
@JFREEREPORT_FLOW_ENGINE_TARBALL@
@JFREEREPORT_FLUTE_TARBALL@
@JFREEREPORT_LIBBASE_TARBALL@
diff --git a/tail_build/prj/build.lst b/tail_build/prj/build.lst
index 635fdef7a223..8051c98bb404 100644
--- a/tail_build/prj/build.lst
+++ b/tail_build/prj/build.lst
@@ -1,2 +1,2 @@
-tb tail_build : BERKELEYDB:berkeleydb BOOST:boost CAIRO:cairo CPPUNIT:cppunit EXPAT:expat GETTEXT:gettext GLIB:glib GDK_PIXBUF:gdk-pixbuf PANGO:pango LIBCROCO:libcroco LIBGSF:libgsf HYPHEN:hyphen ICU:icu JPEG:jpeg LCMS2:lcms2 LIBEXTTEXTCAT:libexttextcat LIBLANGTAG:liblangtag LIBXML2:libxml2 libxmlsec LIBXSLT:libxslt LPSOLVE:lpsolve MOZ:moz NSS:nss OPENSSL:openssl PYTHON:python REDLAND:redland XPDF:xpdf ZLIB:zlib external solenv soltools NULL
+tb tail_build : BERKELEYDB:berkeleydb BOOST:boost CAIRO:cairo CPPUNIT:cppunit EXPAT:expat GETTEXT:gettext GLIB:glib GDK_PIXBUF:gdk-pixbuf PANGO:pango LIBCROCO:libcroco LIBGSF:libgsf ICU:icu JPEG:jpeg LCMS2:lcms2 LIBEXTTEXTCAT:libexttextcat LIBLANGTAG:liblangtag LIBXML2:libxml2 libxmlsec LIBXSLT:libxslt LPSOLVE:lpsolve MOZ:moz NSS:nss OPENSSL:openssl PYTHON:python REDLAND:redland XPDF:xpdf ZLIB:zlib external solenv soltools NULL
tb tail_build\prj nmake - all tb_prj NULL