diff options
author | Peter Foley <pefoley2@verizon.net> | 2012-11-09 17:25:56 -0500 |
---|---|---|
committer | Peter Foley <pefoley2@verizon.net> | 2012-11-09 17:48:15 -0500 |
commit | 31219f0f97d081d94d927b5c3d08bb8677b22506 (patch) | |
tree | 3ca7fa0cc4a17ec1290623b4519070ddf7849835 /libexttextcat | |
parent | a73c98a708ee41b8c4cf4f2063c5bc4b30044284 (diff) |
convert libexttextcat to gbuild
Change-Id: I633892a6d611e6481e49f9bd2739d3886563a24a
Diffstat (limited to 'libexttextcat')
-rw-r--r-- | libexttextcat/ExternalPackage_libexttextcat.mk | 19 | ||||
-rw-r--r-- | libexttextcat/ExternalProject_libexttextcat.mk | 27 | ||||
-rw-r--r-- | libexttextcat/Makefile | 7 | ||||
-rw-r--r-- | libexttextcat/Module_libexttextcat.mk | 29 | ||||
-rw-r--r-- | libexttextcat/StaticLibrary_exttextcat.mk | 25 | ||||
-rw-r--r-- | libexttextcat/UnpackedTarball_libexttextcat.mk | 18 | ||||
-rw-r--r-- | libexttextcat/Zip_fingerprint.mk | 37 | ||||
-rw-r--r-- | libexttextcat/makefile.mk | 94 | ||||
-rw-r--r-- | libexttextcat/prj/d.lst | 10 | ||||
-rw-r--r-- | libexttextcat/prj/dmake | 0 |
10 files changed, 162 insertions, 104 deletions
diff --git a/libexttextcat/ExternalPackage_libexttextcat.mk b/libexttextcat/ExternalPackage_libexttextcat.mk new file mode 100644 index 000000000000..c6140a446247 --- /dev/null +++ b/libexttextcat/ExternalPackage_libexttextcat.mk @@ -0,0 +1,19 @@ +# -*- 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,libexttextcat,libexttextcat)) + +ifneq ($(COM),MSC) + +$(eval $(call gb_ExternalPackage_use_external_project,libexttextcat,libexttextcat)) + +$(eval $(call gb_ExternalPackage_add_file,libexttextcat,lib/libexttextcat.a,src/.libs/libexttextcat-1.0.a)) + +endif +# vim: set noet sw=4 ts=4: diff --git a/libexttextcat/ExternalProject_libexttextcat.mk b/libexttextcat/ExternalProject_libexttextcat.mk new file mode 100644 index 000000000000..e792b3f975df --- /dev/null +++ b/libexttextcat/ExternalProject_libexttextcat.mk @@ -0,0 +1,27 @@ +# -*- 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,libexttextcat)) + +$(eval $(call gb_ExternalProject_use_unpacked,libexttextcat,libexttextcat)) + +$(eval $(call gb_ExternalProject_register_targets,libexttextcat,\ + build \ +)) + +$(call gb_ExternalProject_get_state_target,libexttextcat,build): + cd $(EXTERNAL_WORKDIR) \ + && ./configure --disable-shared --with-pic \ + $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ + CFLAGS="$(if $(filter TRUE,$(HAVE_GCC_VISIBILITY_FEATURE)),-fvisibility=hidden) \ + $(if $(filter AIX,$(OS)),-D_LINUX_SOURCE_COMPAT)" \ + && $(MAKE) \ + && touch $@ + +# vim: set noet sw=4 ts=4: diff --git a/libexttextcat/Makefile b/libexttextcat/Makefile new file mode 100644 index 000000000000..ccb1c85a04da --- /dev/null +++ b/libexttextcat/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/libexttextcat/Module_libexttextcat.mk b/libexttextcat/Module_libexttextcat.mk new file mode 100644 index 000000000000..7aa1e10a5ad9 --- /dev/null +++ b/libexttextcat/Module_libexttextcat.mk @@ -0,0 +1,29 @@ +# -*- 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,libexttextcat)) + +ifeq ($(SYSTEM_LIBEXTTEXTCAT),NO) +$(eval $(call gb_Module_add_targets,libexttextcat,\ + UnpackedTarball_libexttextcat \ + ExternalPackage_libexttextcat \ + Zip_fingerprint \ +)) +ifeq ($(COM),MSC) +$(eval $(call gb_Module_add_targets,libexttextcat,\ + StaticLibrary_exttextcat \ +)) +else +$(eval $(call gb_Module_add_targets,libexttextcat,\ + ExternalProject_libexttextcat \ +)) +endif +endif + +# vim: set noet sw=4 ts=4: diff --git a/libexttextcat/StaticLibrary_exttextcat.mk b/libexttextcat/StaticLibrary_exttextcat.mk new file mode 100644 index 000000000000..194aa6b3b195 --- /dev/null +++ b/libexttextcat/StaticLibrary_exttextcat.mk @@ -0,0 +1,25 @@ +# -*- 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,exttextcat)) + +$(eval $(call gb_StaticLibrary_use_unpacked,exttextcat,libexttextcat)) + +$(eval $(call gb_StaticLibrary_set_warnings_not_errors,exttextcat)) + +$(eval $(call gb_StaticLibrary_add_generated_cobjects,exttextcat,\ + UnpackedTarball/libexttextcat/src/common \ + UnpackedTarball/libexttextcat/src/fingerprint \ + UnpackedTarball/libexttextcat/src/textcat \ + UnpackedTarball/libexttextcat/src/wg_mempool \ + UnpackedTarball/libexttextcat/src/utf8misc \ +)) + + +# vim: set noet sw=4 ts=4: diff --git a/libexttextcat/UnpackedTarball_libexttextcat.mk b/libexttextcat/UnpackedTarball_libexttextcat.mk new file mode 100644 index 000000000000..bd8fae6a642f --- /dev/null +++ b/libexttextcat/UnpackedTarball_libexttextcat.mk @@ -0,0 +1,18 @@ +# -*- 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,libexttextcat)) + +$(eval $(call gb_UnpackedTarball_set_tarball,libexttextcat,$(LIBEXTTEXTCAT_TARBALL))) + +$(eval $(call gb_UnpackedTarball_add_patches,libexttextcat,\ + libexttextcat/android.patch \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/libexttextcat/Zip_fingerprint.mk b/libexttextcat/Zip_fingerprint.mk new file mode 100644 index 000000000000..d8b449418c8b --- /dev/null +++ b/libexttextcat/Zip_fingerprint.mk @@ -0,0 +1,37 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2012 Red Hat, Inc., David Tardon <dtardon@redhat.com> +# (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Zip_Zip,fingerprint,$(call gb_UnpackedTarball_get_dir,libexttextcat)/langclass)) + +$(eval $(call gb_Zip_use_unpacked,fingerprint,libexttextcat)) + +$(eval $(call gb_Zip_add_files,fingerprint,\ + langclass/fpdb.conf \ + LM/*.lm \ +)) + +# vim: set shiftwidth=4 tabstop=4 noexpandtab: diff --git a/libexttextcat/makefile.mk b/libexttextcat/makefile.mk deleted file mode 100644 index a0733fdfd00b..000000000000 --- a/libexttextcat/makefile.mk +++ /dev/null @@ -1,94 +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=libexttextcat -TARGET=libexttextcat - -.IF "$(SYSTEM_LIBEXTTEXTCAT)" == "YES" -all: - @echo "An already available installation of libexttextcat should exist on your system." - @echo "Therefore the version provided here does not need to be built in addition." -.ENDIF - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -# See http://cgit.freedesktop.org/libreoffice/libexttextcat/ for upstream -# sources, far better to commit your changes in there -TARFILE_NAME=libexttextcat-3.3.1 -TARFILE_MD5=6097739c841f671cb21332b9cc593ae7 -TARFILE_ROOTDIR=libexttextcat-3.3.1 -PATCH_FILES=android.patch - -.IF "$(GUI)"=="UNX" -.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" -EXTRA_CFLAGS+=-fvisibility=hidden -.ENDIF -#relative to CONFIGURE_DIR -CONFIGURE_ACTION=configure --disable-shared --with-pic CFLAGS="$(ARCH_FLAGS) $(EXTRA_CFLAGS)" -CONFIGURE_FLAGS=$(eq,$(OS),MACOSX CPPFLAGS="$(EXTRA_CDEFS)" $(NULL)) -.IF "$(OS)"=="AIX" -CONFIGURE_FLAGS+= CFLAGS=-D_LINUX_SOURCE_COMPAT -.ELIF "$(OS)" == "MACOSX" -CONFIGURE_FLAGS += \ - --prefix=/@.__________________________________________________$(EXTRPATH) -.END -.IF "$(CROSS_COMPILING)"=="YES" -CONFIGURE_FLAGS+= --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) -.ENDIF - -BUILD_ACTION=make $(eq,$(VERBOSE),TRUE V=1) - -OUT2LIB=$(BUILD_DIR)$/src$/.libs$/libexttextcat-1.0.a - -.ENDIF # "$(GUI)"=="UNX" - - -.IF "$(GUI)"=="WNT" -BUILD_ACTION=cd src && dmake $(MAKEMACROS) -.ENDIF # "$(GUI)"=="WNT" - -ALLTAR: $(BIN)/fingerprint.zip - -# --- Targets ------------------------------------------------------ - -.INCLUDE : set_ext.mk -.INCLUDE : tg_ext.mk -.INCLUDE : target.mk - -$(BIN)/fingerprint.zip: $(PACKAGE_DIR)/$(PREDELIVER_FLAG_FILE) - @-rm -f $@ - @echo creating ../../../../../$@ - $(COMMAND_ECHO)zip -j $(ZIP_VERBOSITY) $@ $(MISC)/build$/$(TARFILE_ROOTDIR)$/langclass$/fpdb.conf - $(COMMAND_ECHO)find $(MISC)/build$/$(TARFILE_ROOTDIR)$/langclass$/LM \ - -name "*.lm" -print0 | \ - xargs -0 zip -j $(ZIP_VERBOSITY) $@ diff --git a/libexttextcat/prj/d.lst b/libexttextcat/prj/d.lst index f96c7249d226..e69de29bb2d1 100644 --- a/libexttextcat/prj/d.lst +++ b/libexttextcat/prj/d.lst @@ -1,10 +0,0 @@ - -..\%__SRC%\lib\lib*.* %_DEST%\lib\lib*.* -..\%__SRC%\lib\ilib*.* %_DEST%\lib\ilib*.* -..\%__SRC%\bin\l*.dll %_DEST%\bin\*.dll - -mkdir: %_DEST%\inc\external\libexttextcat -..\%__SRC%\misc\build\libexttextcat-3.3.1\src\*.h %_DEST%\inc\external\libexttextcat\*.h - -# data for language guessing -..\%COMMON_OUTDIR%\bin\*.zip %COMMON_DEST%\pck\*.zip diff --git a/libexttextcat/prj/dmake b/libexttextcat/prj/dmake deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/libexttextcat/prj/dmake +++ /dev/null |