From 267c6f2ac71f92999e969232431ba04678e7437e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 07:54:39 +0200 Subject: Adding upstream version 4:24.2.0. Signed-off-by: Daniel Baumann --- external/libwps/ExternalPackage_libwps.mk | 22 ++++++ external/libwps/ExternalProject_libwps.mk | 63 ++++++++++++++++ external/libwps/Library_wps.mk | 102 ++++++++++++++++++++++++++ external/libwps/Makefile | 7 ++ external/libwps/Module_libwps.mk | 31 ++++++++ external/libwps/README | 1 + external/libwps/UnpackedTarball_libwps.mk | 31 ++++++++ external/libwps/inc/pch/precompiled_wps.cxx | 12 +++ external/libwps/inc/pch/precompiled_wps.hxx | 65 ++++++++++++++++ external/libwps/libtool.patch.0 | 11 +++ external/libwps/libwps-bundled-soname.patch.0 | 11 +++ external/libwps/rpath.patch.0 | 10 +++ 12 files changed, 366 insertions(+) create mode 100644 external/libwps/ExternalPackage_libwps.mk create mode 100644 external/libwps/ExternalProject_libwps.mk create mode 100644 external/libwps/Library_wps.mk create mode 100644 external/libwps/Makefile create mode 100644 external/libwps/Module_libwps.mk create mode 100644 external/libwps/README create mode 100644 external/libwps/UnpackedTarball_libwps.mk create mode 100644 external/libwps/inc/pch/precompiled_wps.cxx create mode 100644 external/libwps/inc/pch/precompiled_wps.hxx create mode 100644 external/libwps/libtool.patch.0 create mode 100644 external/libwps/libwps-bundled-soname.patch.0 create mode 100644 external/libwps/rpath.patch.0 (limited to 'external/libwps') diff --git a/external/libwps/ExternalPackage_libwps.mk b/external/libwps/ExternalPackage_libwps.mk new file mode 100644 index 0000000000..daa17c117d --- /dev/null +++ b/external/libwps/ExternalPackage_libwps.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,libwps,libwps)) + +$(eval $(call gb_ExternalPackage_use_external_project,libwps,libwps)) + +ifeq ($(OS),MACOSX) +$(eval $(call gb_ExternalPackage_add_file,libwps,$(LIBO_LIB_FOLDER)/libwps-0.4.4.dylib,src/lib/.libs/libwps-0.4.4.dylib)) +else ifeq ($(OS),WNT) +$(eval $(call gb_ExternalPackage_add_file,libwps,$(LIBO_LIB_FOLDER)/libwps-0.4.dll,src/lib/.libs/libwps-0.4.dll)) +else ifeq ($(DISABLE_DYNLOADING),) +$(eval $(call gb_ExternalPackage_add_file,libwps,$(LIBO_LIB_FOLDER)/libwps-0.4-lo.so.4,src/lib/.libs/libwps-0.4-lo.so.4.0.$(WPS_VERSION_MICRO))) +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/libwps/ExternalProject_libwps.mk b/external/libwps/ExternalProject_libwps.mk new file mode 100644 index 0000000000..5ff5997f60 --- /dev/null +++ b/external/libwps/ExternalProject_libwps.mk @@ -0,0 +1,63 @@ +# -*- 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,libwps)) + +$(eval $(call gb_ExternalProject_use_autoconf,libwps,build)) + +$(eval $(call gb_ExternalProject_register_targets,libwps,\ + build \ +)) + +$(eval $(call gb_ExternalProject_use_externals,libwps,\ + revenge \ +)) + +libwps_CPPFLAGS+=$(gb_COMPILERDEFS_STDLIB_DEBUG) + +libwps_CXXFLAGS=$(gb_CXXFLAGS) $(call gb_ExternalProject_get_build_flags,libwps) + +libwps_LDFLAGS=$(call gb_ExternalProject_get_link_flags,libwps) +ifeq ($(OS),LINUX) +ifeq ($(SYSTEM_REVENGE),) +libwps_LDFLAGS+=-Wl,-z,origin -Wl,-rpath,\$$$$ORIGIN +endif +endif + +$(call gb_ExternalProject_get_state_target,libwps,build) : + $(call gb_Trace_StartRange,libwps,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + export PKG_CONFIG="" \ + && $(gb_RUN_CONFIGURE) ./configure \ + --with-pic \ + $(if $(DISABLE_DYNLOADING), \ + --enable-static --disable-shared \ + , \ + --enable-shared --disable-static \ + ) \ + --with-sharedptr=c++11 \ + --without-docs \ + --disable-tools \ + $(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \ + --disable-werror \ + $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \ + $(if $(libwps_CXXFLAGS),CXXFLAGS='$(libwps_CXXFLAGS)') \ + $(if $(libwps_CPPFLAGS),CPPFLAGS='$(libwps_CPPFLAGS)') \ + $(if $(libwps_LDFLAGS),LDFLAGS='$(libwps_LDFLAGS)') \ + $(gb_CONFIGURE_PLATFORMS) \ + $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ + && $(MAKE) \ + $(if $(filter MACOSX,$(OS)),\ + && $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \ + $(EXTERNAL_WORKDIR)/src/lib/.libs/libwps-0.4.4.dylib \ + ) \ + ) + $(call gb_Trace_EndRange,libwps,EXTERNAL) + +# vim: set noet sw=4 ts=4: diff --git a/external/libwps/Library_wps.mk b/external/libwps/Library_wps.mk new file mode 100644 index 0000000000..8986ae6e62 --- /dev/null +++ b/external/libwps/Library_wps.mk @@ -0,0 +1,102 @@ +# -*- 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_Library_Library,wps)) + +$(eval $(call gb_Library_use_unpacked,wps,libwps)) + +$(eval $(call gb_Library_use_externals,wps,\ + revenge \ +)) + +$(eval $(call gb_Library_set_warnings_disabled,wps)) + +$(eval $(call gb_Library_set_include,wps,\ + -I$(call gb_UnpackedTarball_get_dir,libwps)/inc \ + -I$(call gb_UnpackedTarball_get_dir,libwps)/src/lib \ + $$(INCLUDE) \ +)) + +$(eval $(call gb_Library_set_precompiled_header,wps,external/libwps/inc/pch/precompiled_wps)) + +$(eval $(call gb_Library_add_defs,wps,\ + -DBUILD_WPS\ + -DDLL_EXPORT \ + -DNDEBUG \ +)) + +$(eval $(call gb_Library_set_generated_cxx_suffix,wps,cpp)) + +$(eval $(call gb_Library_add_generated_exception_objects,wps,\ + UnpackedTarball/libwps/src/lib/DosWord \ + UnpackedTarball/libwps/src/lib/Lotus \ + UnpackedTarball/libwps/src/lib/LotusChart \ + UnpackedTarball/libwps/src/lib/LotusGraph \ + UnpackedTarball/libwps/src/lib/LotusSpreadsheet \ + UnpackedTarball/libwps/src/lib/LotusStyleManager \ + UnpackedTarball/libwps/src/lib/MSWrite \ + UnpackedTarball/libwps/src/lib/Multiplan \ + UnpackedTarball/libwps/src/lib/PocketWord \ + UnpackedTarball/libwps/src/lib/Quattro \ + UnpackedTarball/libwps/src/lib/Quattro9 \ + UnpackedTarball/libwps/src/lib/Quattro9Graph \ + UnpackedTarball/libwps/src/lib/Quattro9Spreadsheet \ + UnpackedTarball/libwps/src/lib/QuattroDos \ + UnpackedTarball/libwps/src/lib/QuattroDosChart \ + UnpackedTarball/libwps/src/lib/QuattroDosSpreadsheet \ + UnpackedTarball/libwps/src/lib/QuattroFormula \ + UnpackedTarball/libwps/src/lib/QuattroGraph \ + UnpackedTarball/libwps/src/lib/QuattroSpreadsheet \ + UnpackedTarball/libwps/src/lib/WKS4 \ + UnpackedTarball/libwps/src/lib/WKS4Chart \ + UnpackedTarball/libwps/src/lib/WKS4Format \ + UnpackedTarball/libwps/src/lib/WKS4Spreadsheet \ + UnpackedTarball/libwps/src/lib/WKSChart \ + UnpackedTarball/libwps/src/lib/WKSContentListener \ + UnpackedTarball/libwps/src/lib/WKSParser \ + UnpackedTarball/libwps/src/lib/WKSSubDocument \ + UnpackedTarball/libwps/src/lib/WPS4 \ + UnpackedTarball/libwps/src/lib/WPS4Graph \ + UnpackedTarball/libwps/src/lib/WPS4Text \ + UnpackedTarball/libwps/src/lib/WPS8 \ + UnpackedTarball/libwps/src/lib/WPS8Graph \ + UnpackedTarball/libwps/src/lib/WPS8Struct \ + UnpackedTarball/libwps/src/lib/WPS8Table \ + UnpackedTarball/libwps/src/lib/WPS8Text \ + UnpackedTarball/libwps/src/lib/WPS8TextStyle \ + UnpackedTarball/libwps/src/lib/WPSCell \ + UnpackedTarball/libwps/src/lib/WPSContentListener \ + UnpackedTarball/libwps/src/lib/WPSDebug \ + UnpackedTarball/libwps/src/lib/WPSDocument \ + UnpackedTarball/libwps/src/lib/WPSEntry \ + UnpackedTarball/libwps/src/lib/WPSFont \ + UnpackedTarball/libwps/src/lib/WPSGraphicShape \ + UnpackedTarball/libwps/src/lib/WPSGraphicStyle \ + UnpackedTarball/libwps/src/lib/WPSHeader \ + UnpackedTarball/libwps/src/lib/WPSList \ + UnpackedTarball/libwps/src/lib/WPSListener \ + UnpackedTarball/libwps/src/lib/WPSOLE1Parser \ + UnpackedTarball/libwps/src/lib/WPSOLEObject \ + UnpackedTarball/libwps/src/lib/WPSOLEParser \ + UnpackedTarball/libwps/src/lib/WPSOLEStream \ + UnpackedTarball/libwps/src/lib/WPSPageSpan \ + UnpackedTarball/libwps/src/lib/WPSParagraph \ + UnpackedTarball/libwps/src/lib/WPSParser \ + UnpackedTarball/libwps/src/lib/WPSStream \ + UnpackedTarball/libwps/src/lib/WPSStringStream \ + UnpackedTarball/libwps/src/lib/WPSSubDocument \ + UnpackedTarball/libwps/src/lib/WPSTable \ + UnpackedTarball/libwps/src/lib/WPSTextParser \ + UnpackedTarball/libwps/src/lib/WPSTextSubDocument \ + UnpackedTarball/libwps/src/lib/XYWrite \ + UnpackedTarball/libwps/src/lib/libwps_internal \ + UnpackedTarball/libwps/src/lib/libwps_tools_win \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/libwps/Makefile b/external/libwps/Makefile new file mode 100644 index 0000000000..e4968cf85f --- /dev/null +++ b/external/libwps/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/external/libwps/Module_libwps.mk b/external/libwps/Module_libwps.mk new file mode 100644 index 0000000000..2b52c4acb4 --- /dev/null +++ b/external/libwps/Module_libwps.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_Module_Module,libwps)) + +$(eval $(call gb_Module_add_targets,libwps,\ + UnpackedTarball_libwps \ +)) + +ifeq ($(COM),MSC) + +$(eval $(call gb_Module_add_targets,libwps,\ + Library_wps \ +)) + +else + +$(eval $(call gb_Module_add_targets,libwps,\ + ExternalPackage_libwps \ + ExternalProject_libwps \ +)) + +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/libwps/README b/external/libwps/README new file mode 100644 index 0000000000..1354aaa24d --- /dev/null +++ b/external/libwps/README @@ -0,0 +1 @@ +Microsoft Works file word processor format import library from [https://sourceforge.net/projects/libwps/]. diff --git a/external/libwps/UnpackedTarball_libwps.mk b/external/libwps/UnpackedTarball_libwps.mk new file mode 100644 index 0000000000..f53a8fffc4 --- /dev/null +++ b/external/libwps/UnpackedTarball_libwps.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_UnpackedTarball_UnpackedTarball,libwps)) + +$(eval $(call gb_UnpackedTarball_set_tarball,libwps,$(WPS_TARBALL))) + +$(eval $(call gb_UnpackedTarball_set_patchlevel,libwps,1)) + +$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libwps)) + +$(eval $(call gb_UnpackedTarball_add_patches,libwps,\ + $(if $(SYSTEM_REVENGE),,external/libwps/rpath.patch.0) \ + external/libwps/libtool.patch.0 \ +)) + +ifneq ($(OS),MACOSX) +ifneq ($(OS),WNT) +$(eval $(call gb_UnpackedTarball_add_patches,libwps,\ + external/libwps/libwps-bundled-soname.patch.0 \ +)) +endif +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/libwps/inc/pch/precompiled_wps.cxx b/external/libwps/inc/pch/precompiled_wps.cxx new file mode 100644 index 0000000000..9cbc329adb --- /dev/null +++ b/external/libwps/inc/pch/precompiled_wps.cxx @@ -0,0 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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/. + */ + +#include "precompiled_wps.hxx" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/external/libwps/inc/pch/precompiled_wps.hxx b/external/libwps/inc/pch/precompiled_wps.hxx new file mode 100644 index 0000000000..e25d81e9c6 --- /dev/null +++ b/external/libwps/inc/pch/precompiled_wps.hxx @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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/. + */ + +/* + This file has been autogenerated by update_pch.sh. It is possible to edit it + manually (such as when an include file has been moved/renamed/removed). All such + manual changes will be rewritten by the next run of update_pch.sh (which presumably + also fixes all possible problems, so it's usually better to use it). + + Generated on 2023-09-21 20:32:22 using: + ./bin/update_pch external/libwps wps --cutoff=1 --exclude:system --include:module --include:local + + If after updating build fails, use the following command to locate conflicting headers: + ./bin/update_pch_bisect ./external/libwps/inc/pch/precompiled_wps.hxx "make external/libwps.build" --find-conflicts +*/ + +#include +#if PCH_LEVEL >= 1 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif // PCH_LEVEL >= 1 +#if PCH_LEVEL >= 2 +#endif // PCH_LEVEL >= 2 +#if PCH_LEVEL >= 3 +#include +#include +#include +#endif // PCH_LEVEL >= 3 +#if PCH_LEVEL >= 4 +#endif // PCH_LEVEL >= 4 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/external/libwps/libtool.patch.0 b/external/libwps/libtool.patch.0 new file mode 100644 index 0000000000..bccd0ebdbc --- /dev/null +++ b/external/libwps/libtool.patch.0 @@ -0,0 +1,11 @@ +--- ltmain.sh.sav 2023-05-03 21:29:15.000000000 +0900 ++++ ltmain.sh 2023-09-21 20:13:31.766938069 +0900 +@@ -7277,7 +7277,7 @@ func_mode_link () + -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ +- -fsanitize=*) ++ -fsanitize=*|-fuse-ld=*|--ld-path=*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + func_append compile_command " $arg" diff --git a/external/libwps/libwps-bundled-soname.patch.0 b/external/libwps/libwps-bundled-soname.patch.0 new file mode 100644 index 0000000000..013ba7a88b --- /dev/null +++ b/external/libwps/libwps-bundled-soname.patch.0 @@ -0,0 +1,11 @@ +--- src/lib/Makefile.in.orig 2015-08-06 11:41:55.081239194 +0200 ++++ src/lib/Makefile.in 2015-08-06 11:42:16.903238820 +0200 +@@ -369,7 +369,7 @@ + AM_CXXFLAGS = -I$(top_srcdir)/inc $(REVENGE_CFLAGS) $(DEBUG_CXXFLAGS) -DBUILD_WPS=1 + libwps_@WPS_MAJOR_VERSION@_@WPS_MINOR_VERSION@_la_LIBADD = $(REVENGE_LIBS) @LIBWPS_WIN32_RESOURCE@ + libwps_@WPS_MAJOR_VERSION@_@WPS_MINOR_VERSION@_la_DEPENDENCIES = @LIBWPS_WIN32_RESOURCE@ +-libwps_@WPS_MAJOR_VERSION@_@WPS_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic -no-undefined ++libwps_@WPS_MAJOR_VERSION@_@WPS_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic -no-undefined -release lo + libwps_@WPS_MAJOR_VERSION@_@WPS_MINOR_VERSION@_la_SOURCES = \ + libwps_internal.cpp \ + libwps_tools_win.h \ diff --git a/external/libwps/rpath.patch.0 b/external/libwps/rpath.patch.0 new file mode 100644 index 0000000000..600cc3d34c --- /dev/null +++ b/external/libwps/rpath.patch.0 @@ -0,0 +1,10 @@ +--- configure ++++ configure +@@ -14306,6 +14306,7 @@ + esac + ;; + esac ++hardcode_libdir_flag_spec_CXX= + ;; + + lynxos*) -- cgit v1.2.3