From 9a1b2970ed83b7666957ca6d0394a75b5d0717fa Mon Sep 17 00:00:00 2001 From: Andrzej Hunt Date: Mon, 9 Jun 2014 11:33:25 +0100 Subject: [PATCH] Move liblibreoffice into LibreOfficeKit. Change-Id: Ib2754a77be470faaa6f9b27644a1d8dd082ed2b8 --- RepositoryModule_host.mk | 1 + desktop/Library_libreoffice.mk | 32 ------------------- desktop/Module_desktop.mk | 6 ---- desktop/source/lib/init.cxx | 2 +- .../LibreOfficeKit/LibreOfficeKit.h | 4 +-- .../LibreOfficeKit/LibreOfficeKit.hxx | 6 ++-- libreofficekit/Library_libreofficekit.mk | 31 ++++++++++++++++++ libreofficekit/Makefile | 14 ++++++++ libreofficekit/Module_libreofficekit.mk | 18 +++++++++++ .../lib => libreofficekit/source}/shim.c | 2 +- smoketest/Executable_libtest.mk | 3 +- smoketest/libtest.cxx | 2 +- 12 files changed, 73 insertions(+), 48 deletions(-) delete mode 100644 desktop/Library_libreoffice.mk rename desktop/inc/liblibreoffice.h => include/LibreOfficeKit/LibreOfficeKit.h (93%) rename desktop/inc/liblibreoffice.hxx => include/LibreOfficeKit/LibreOfficeKit.hxx (94%) create mode 100644 libreofficekit/Library_libreofficekit.mk create mode 100644 libreofficekit/Makefile create mode 100644 libreofficekit/Module_libreofficekit.mk rename {desktop/source/lib => libreofficekit/source}/shim.c (97%) diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk index bc456b929f49..86ddf1fbd370 100644 --- a/RepositoryModule_host.mk +++ b/RepositoryModule_host.mk @@ -69,6 +69,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\ jvmaccess \ jvmfwk \ librelogo \ + libreofficekit \ lingucomponent \ linguistic \ lotuswordpro \ diff --git a/desktop/Library_libreoffice.mk b/desktop/Library_libreoffice.mk deleted file mode 100644 index dbdf6acc3e7e..000000000000 --- a/desktop/Library_libreoffice.mk +++ /dev/null @@ -1,32 +0,0 @@ -# -*- 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,libreoffice)) - -$(eval $(call gb_StaticLibrary_set_include,libreoffice,\ - $$(INCLUDE) \ - -I$(SRCDIR)/desktop/inc \ -)) - -$(eval $(call gb_StaticLibrary_add_libs,libreoffice,\ - $(if $(filter $(OS),LINUX), \ - -ldl \ - -lpthread \ - ) \ -)) - -$(eval $(call gb_StaticLibrary_use_libraries,libreoffice,\ - $(gb_UWINAPI) \ -)) - -$(eval $(call gb_StaticLibrary_add_cobjects,libreoffice,\ - desktop/source/lib/shim \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk index 584b70d76fe7..cfaf0d93ecd9 100644 --- a/desktop/Module_desktop.mk +++ b/desktop/Module_desktop.mk @@ -29,12 +29,6 @@ $(eval $(call gb_Module_add_l10n_targets,desktop,\ UIConfig_deployment \ )) -ifeq ($(OS),LINUX) -$(eval $(call gb_Module_add_targets,desktop,\ - Library_libreoffice \ -)) -endif - ifneq (,$(filter DESKTOP,$(BUILD_TYPE))) $(eval $(call gb_Module_add_targets,desktop,\ Executable_soffice_bin \ diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 0fcbc5f464b9..bbcac7fef613 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -13,7 +13,7 @@ #include #include -#include "liblibreoffice.h" +#include #include #include diff --git a/desktop/inc/liblibreoffice.h b/include/LibreOfficeKit/LibreOfficeKit.h similarity index 93% rename from desktop/inc/liblibreoffice.h rename to include/LibreOfficeKit/LibreOfficeKit.h index 87111c43bc67..9176eba0ae38 100644 --- a/desktop/inc/liblibreoffice.h +++ b/include/LibreOfficeKit/LibreOfficeKit.h @@ -7,8 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_DESKTOP_INC_LIBLIBREOFFICE_H -#define INCLUDED_DESKTOP_INC_LIBLIBREOFFICE_H +#ifndef INCLUDED_DESKTOP_INC_LIBREOFFICEKIT_H +#define INCLUDED_DESKTOP_INC_LIBREOFFICEKIT_H #ifdef __cplusplus extern "C" diff --git a/desktop/inc/liblibreoffice.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx similarity index 94% rename from desktop/inc/liblibreoffice.hxx rename to include/LibreOfficeKit/LibreOfficeKit.hxx index 182e88f1c3c2..d689e4b9bc97 100644 --- a/desktop/inc/liblibreoffice.hxx +++ b/include/LibreOfficeKit/LibreOfficeKit.hxx @@ -7,10 +7,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef INCLUDED_DESKTOP_INC_LIBLIBREOFFICE_HXX -#define INCLUDED_DESKTOP_INC_LIBLIBREOFFICE_HXX +#ifndef INCLUDED_DESKTOP_INC_LIBREOFFICEKIT_HXX +#define INCLUDED_DESKTOP_INC_LIBREOFFICEKIT_HXX -#include "liblibreoffice.h" +#include "LibreOfficeKit.h" /* * The reasons this C++ code is not as pretty as it could be are: diff --git a/libreofficekit/Library_libreofficekit.mk b/libreofficekit/Library_libreofficekit.mk new file mode 100644 index 000000000000..b0699ff8cba2 --- /dev/null +++ b/libreofficekit/Library_libreofficekit.mk @@ -0,0 +1,31 @@ +# -*- 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,libreofficekit)) + +$(eval $(call gb_StaticLibrary_set_include,libreofficekit,\ + $$(INCLUDE) \ +)) + +$(eval $(call gb_StaticLibrary_add_libs,libreofficekit,\ + $(if $(filter $(OS),LINUX), \ + -ldl \ + -lpthread \ + ) \ +)) + +$(eval $(call gb_StaticLibrary_use_libraries,libreofficekit,\ + $(gb_UWINAPI) \ +)) + +$(eval $(call gb_StaticLibrary_add_cobjects,libreofficekit,\ + libreofficekit/source/shim \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/libreofficekit/Makefile b/libreofficekit/Makefile new file mode 100644 index 000000000000..0997e628485b --- /dev/null +++ b/libreofficekit/Makefile @@ -0,0 +1,14 @@ +# -*- 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/. +# + +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/libreofficekit/Module_libreofficekit.mk b/libreofficekit/Module_libreofficekit.mk new file mode 100644 index 000000000000..d78a9c35c401 --- /dev/null +++ b/libreofficekit/Module_libreofficekit.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_Module_Module,libreofficekit)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Module_add_targets,libreofficekit,\ + Library_libreofficekit \ +)) +endif + +# vim: set ts=4 sw=4 et: diff --git a/desktop/source/lib/shim.c b/libreofficekit/source/shim.c similarity index 97% rename from desktop/source/lib/shim.c rename to libreofficekit/source/shim.c index 7115c6e57299..e863dd516b85 100644 --- a/desktop/source/lib/shim.c +++ b/libreofficekit/source/shim.c @@ -14,7 +14,7 @@ #include #include -#include +#include #include #ifdef AIX diff --git a/smoketest/Executable_libtest.mk b/smoketest/Executable_libtest.mk index 9f965b6c0f3d..881e604e07dc 100644 --- a/smoketest/Executable_libtest.mk +++ b/smoketest/Executable_libtest.mk @@ -11,7 +11,6 @@ $(eval $(call gb_Executable_Executable,libtest)) $(eval $(call gb_Executable_set_include,libtest,\ $$(INCLUDE) \ - -I$(SRCDIR)/desktop/inc \ )) $(eval $(call gb_Executable_use_libraries,libtest,\ @@ -19,7 +18,7 @@ $(eval $(call gb_Executable_use_libraries,libtest,\ )) $(eval $(call gb_Executable_use_static_libraries,libtest,\ - libreoffice \ + libreofficekit \ )) $(eval $(call gb_Executable_add_libs,libtest,\ diff --git a/smoketest/libtest.cxx b/smoketest/libtest.cxx index e1e7970fe27d..ca1f89cc25b0 100644 --- a/smoketest/libtest.cxx +++ b/smoketest/libtest.cxx @@ -13,7 +13,7 @@ #include #include #include -#include +#include long getTimeMS() {