summaryrefslogtreecommitdiffstats
path: root/external/libwps
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /external/libwps
parentInitial commit. (diff)
downloadlibreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz
libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--external/libwps/ExternalPackage_libwps.mk22
-rw-r--r--external/libwps/ExternalProject_libwps.mk63
-rw-r--r--external/libwps/Library_wps.mk102
-rw-r--r--external/libwps/Makefile7
-rw-r--r--external/libwps/Module_libwps.mk31
-rw-r--r--external/libwps/README1
-rw-r--r--external/libwps/UnpackedTarball_libwps.mk31
-rw-r--r--external/libwps/inc/pch/precompiled_wps.cxx12
-rw-r--r--external/libwps/inc/pch/precompiled_wps.hxx64
-rw-r--r--external/libwps/libtool.patch.012
-rw-r--r--external/libwps/libwps-bundled-soname.patch.011
-rw-r--r--external/libwps/rpath.patch.010
12 files changed, 366 insertions, 0 deletions
diff --git a/external/libwps/ExternalPackage_libwps.mk b/external/libwps/ExternalPackage_libwps.mk
new file mode 100644
index 000000000..daa17c117
--- /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 000000000..5ff5997f6
--- /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 000000000..8986ae6e6
--- /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 000000000..e4968cf85
--- /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 000000000..2b52c4acb
--- /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 000000000..3ce52187d
--- /dev/null
+++ b/external/libwps/README
@@ -0,0 +1 @@
+Microsoft Works file word processor format import library from [http://libwps.sourceforge.net/].
diff --git a/external/libwps/UnpackedTarball_libwps.mk b/external/libwps/UnpackedTarball_libwps.mk
new file mode 100644
index 000000000..f53a8fffc
--- /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 000000000..9cbc329ad
--- /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 000000000..77d92f761
--- /dev/null
+++ b/external/libwps/inc/pch/precompiled_wps.hxx
@@ -0,0 +1,64 @@
+/* -*- 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 2019-10-13 10:00:18 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
+*/
+
+#if PCH_LEVEL >= 1
+#include <algorithm>
+#include <cassert>
+#include <cctype>
+#include <cmath>
+#include <cstdarg>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <ctype.h>
+#include <iomanip>
+#include <iostream>
+#include <iterator>
+#include <libwps_internal.h>
+#include <libwps_tools_win.h>
+#include <limits>
+#include <list>
+#include <locale>
+#include <map>
+#include <regex>
+#include <set>
+#include <sstream>
+#include <stack>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <string>
+#include <time.h>
+#include <utility>
+#include <vector>
+#endif // PCH_LEVEL >= 1
+#if PCH_LEVEL >= 2
+#endif // PCH_LEVEL >= 2
+#if PCH_LEVEL >= 3
+#include <librevenge-stream/librevenge-stream.h>
+#include <librevenge/librevenge.h>
+#include <libwps/libwps.h>
+#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 000000000..cc4b08ba2
--- /dev/null
+++ b/external/libwps/libtool.patch.0
@@ -0,0 +1,12 @@
+--- ltmain.sh.sav 2018-08-02 14:21:34.000000000 +0200
++++ ltmain.sh 2019-05-05 22:04:15.433588776 +0200
+@@ -7277,7 +7277,8 @@ func_mode_link ()
+ # -stdlib=* select c++ std lib with clang
+ -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=*)
++ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
++ -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 000000000..013ba7a88
--- /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 000000000..600cc3d34
--- /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*)