summaryrefslogtreecommitdiffstats
path: root/external/libwpd
diff options
context:
space:
mode:
Diffstat (limited to 'external/libwpd')
-rw-r--r--external/libwpd/ExternalPackage_libwpd.mk22
-rw-r--r--external/libwpd/ExternalProject_libwpd.mk53
-rw-r--r--external/libwpd/Library_wpd.mk211
-rw-r--r--external/libwpd/Makefile7
-rw-r--r--external/libwpd/Module_libwpd.mk31
-rw-r--r--external/libwpd/README1
-rw-r--r--external/libwpd/UnpackedTarball_libwpd.mk33
-rw-r--r--external/libwpd/inc/pch/precompiled_wpd.cxx12
-rw-r--r--external/libwpd/inc/pch/precompiled_wpd.hxx52
-rw-r--r--external/libwpd/libwpd-bundled-soname.patch.010
-rw-r--r--external/libwpd/libwpd-vs2013.patch.125
-rw-r--r--external/libwpd/rpath.patch10
12 files changed, 467 insertions, 0 deletions
diff --git a/external/libwpd/ExternalPackage_libwpd.mk b/external/libwpd/ExternalPackage_libwpd.mk
new file mode 100644
index 000000000..cc1ebb4da
--- /dev/null
+++ b/external/libwpd/ExternalPackage_libwpd.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,libwpd,libwpd))
+
+$(eval $(call gb_ExternalPackage_use_external_project,libwpd,libwpd))
+
+ifeq ($(OS),MACOSX)
+$(eval $(call gb_ExternalPackage_add_file,libwpd,$(LIBO_LIB_FOLDER)/libwpd-0.10.10.dylib,src/lib/.libs/libwpd-0.10.10.dylib))
+else ifeq ($(OS),WNT)
+$(eval $(call gb_ExternalPackage_add_file,libwpd,$(LIBO_LIB_FOLDER)/libwpd-0.10.dll,src/lib/.libs/libwpd-0.10.dll))
+else ifeq ($(DISABLE_DYNLOADING),)
+$(eval $(call gb_ExternalPackage_add_file,libwpd,$(LIBO_LIB_FOLDER)/libwpd-0.10-lo.so.10,src/lib/.libs/libwpd-0.10-lo.so.10.0.$(WPD_VERSION_MICRO)))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libwpd/ExternalProject_libwpd.mk b/external/libwpd/ExternalProject_libwpd.mk
new file mode 100644
index 000000000..c3b810c6a
--- /dev/null
+++ b/external/libwpd/ExternalProject_libwpd.mk
@@ -0,0 +1,53 @@
+# -*- 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,libwpd))
+
+$(eval $(call gb_ExternalProject_use_autoconf,libwpd,build))
+
+$(eval $(call gb_ExternalProject_register_targets,libwpd,\
+ build \
+))
+
+$(eval $(call gb_ExternalProject_use_externals,libwpd,\
+ boost_headers \
+ revenge \
+))
+
+$(call gb_ExternalProject_get_state_target,libwpd,build) :
+ $(call gb_Trace_StartRange,libwpd,EXTERNAL)
+ $(call gb_ExternalProject_run,build,\
+ export PKG_CONFIG="" \
+ && MAKE=$(MAKE) ./configure \
+ --with-pic \
+ $(if $(DISABLE_DYNLOADING), \
+ --disable-shared --enable-static, \
+ --enable-shared --disable-static) \
+ --without-docs \
+ --disable-tools \
+ --disable-debug \
+ --disable-werror \
+ $(if $(filter MACOSX,$(OS)), \
+ --prefix=/@.__________________________________________________OOO) \
+ $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
+ CXXFLAGS="$(gb_CXXFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS))" \
+ CPPFLAGS="$(CPPFLAGS) $(BOOST_CPPFLAGS)" \
+ $(if $(filter LINUX,$(OS)),$(if $(SYSTEM_REVENGE),, \
+ 'LDFLAGS=-Wl$(COMMA)-z$(COMMA)origin \
+ -Wl$(COMMA)-rpath$(COMMA)\$$$$ORIGIN')) \
+ $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
+ && $(MAKE) \
+ $(if $(filter MACOSX,$(OS)),\
+ && $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \
+ $(EXTERNAL_WORKDIR)/src/lib/.libs/libwpd-0.10.10.dylib \
+ ) \
+ )
+ $(call gb_Trace_EndRange,libwpd,EXTERNAL)
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libwpd/Library_wpd.mk b/external/libwpd/Library_wpd.mk
new file mode 100644
index 000000000..6b14f424d
--- /dev/null
+++ b/external/libwpd/Library_wpd.mk
@@ -0,0 +1,211 @@
+# -*- 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,wpd))
+
+$(eval $(call gb_Library_use_unpacked,wpd,libwpd))
+
+$(eval $(call gb_Library_use_externals,wpd,\
+ boost_headers \
+ revenge \
+))
+
+$(eval $(call gb_Library_set_warnings_disabled,wpd))
+
+$(eval $(call gb_Library_set_include,wpd,\
+ -I$(call gb_UnpackedTarball_get_dir,libwpd)/inc \
+ -I$(call gb_UnpackedTarball_get_dir,libwpd)/src/lib \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_Library_set_precompiled_header,wpd,external/libwpd/inc/pch/precompiled_wpd))
+
+$(eval $(call gb_Library_add_defs,wpd,\
+ -DBOOST_ALL_NO_LIB \
+ -DDLL_EXPORT \
+ -DLIBWPD_BUILD \
+ -DNDEBUG \
+))
+
+$(eval $(call gb_Library_set_generated_cxx_suffix,wpd,cpp))
+
+$(eval $(call gb_Library_add_generated_exception_objects,wpd,\
+ UnpackedTarball/libwpd/src/lib/WP1BottomMarginGroup \
+ UnpackedTarball/libwpd/src/lib/WP1CenterTextGroup \
+ UnpackedTarball/libwpd/src/lib/WP1ContentListener \
+ UnpackedTarball/libwpd/src/lib/WP1ExtendedCharacterGroup \
+ UnpackedTarball/libwpd/src/lib/WP1FileStructure \
+ UnpackedTarball/libwpd/src/lib/WP1FixedLengthGroup \
+ UnpackedTarball/libwpd/src/lib/WP1FlushRightGroup \
+ UnpackedTarball/libwpd/src/lib/WP1FontIdGroup \
+ UnpackedTarball/libwpd/src/lib/WP1FootnoteEndnoteGroup \
+ UnpackedTarball/libwpd/src/lib/WP1HeaderFooterGroup \
+ UnpackedTarball/libwpd/src/lib/WP1Heuristics \
+ UnpackedTarball/libwpd/src/lib/WP1JustificationGroup \
+ UnpackedTarball/libwpd/src/lib/WP1LeftIndentGroup \
+ UnpackedTarball/libwpd/src/lib/WP1LeftRightIndentGroup \
+ UnpackedTarball/libwpd/src/lib/WP1Listener \
+ UnpackedTarball/libwpd/src/lib/WP1MarginReleaseGroup \
+ UnpackedTarball/libwpd/src/lib/WP1MarginResetGroup \
+ UnpackedTarball/libwpd/src/lib/WP1Parser \
+ UnpackedTarball/libwpd/src/lib/WP1Part \
+ UnpackedTarball/libwpd/src/lib/WP1PictureGroup \
+ UnpackedTarball/libwpd/src/lib/WP1PointSizeGroup \
+ UnpackedTarball/libwpd/src/lib/WP1SetTabsGroup \
+ UnpackedTarball/libwpd/src/lib/WP1SpacingResetGroup \
+ UnpackedTarball/libwpd/src/lib/WP1StylesListener \
+ UnpackedTarball/libwpd/src/lib/WP1SubDocument \
+ UnpackedTarball/libwpd/src/lib/WP1SuppressPageCharacteristicsGroup \
+ UnpackedTarball/libwpd/src/lib/WP1TopMarginGroup \
+ UnpackedTarball/libwpd/src/lib/WP1UnsupportedFixedLengthGroup \
+ UnpackedTarball/libwpd/src/lib/WP1UnsupportedVariableLengthGroup \
+ UnpackedTarball/libwpd/src/lib/WP1VariableLengthGroup \
+ UnpackedTarball/libwpd/src/lib/WP3AttributeGroup \
+ UnpackedTarball/libwpd/src/lib/WP3ContentListener \
+ UnpackedTarball/libwpd/src/lib/WP3DefinitionGroup \
+ UnpackedTarball/libwpd/src/lib/WP3DisplayGroup \
+ UnpackedTarball/libwpd/src/lib/WP3DoubleByteScriptCharacterGroup \
+ UnpackedTarball/libwpd/src/lib/WP3EndOfLinePageGroup \
+ UnpackedTarball/libwpd/src/lib/WP3ExtendedCharacterGroup \
+ UnpackedTarball/libwpd/src/lib/WP3FileStructure \
+ UnpackedTarball/libwpd/src/lib/WP3FixedLengthGroup \
+ UnpackedTarball/libwpd/src/lib/WP3FontGroup \
+ UnpackedTarball/libwpd/src/lib/WP3FootnoteEndnoteGroup \
+ UnpackedTarball/libwpd/src/lib/WP3Header \
+ UnpackedTarball/libwpd/src/lib/WP3HeaderFooterGroup \
+ UnpackedTarball/libwpd/src/lib/WP3IndentGroup \
+ UnpackedTarball/libwpd/src/lib/WP3Listener \
+ UnpackedTarball/libwpd/src/lib/WP3MiscellaneousGroup \
+ UnpackedTarball/libwpd/src/lib/WP3PageFormatGroup \
+ UnpackedTarball/libwpd/src/lib/WP3Parser \
+ UnpackedTarball/libwpd/src/lib/WP3Part \
+ UnpackedTarball/libwpd/src/lib/WP3Resource \
+ UnpackedTarball/libwpd/src/lib/WP3ResourceFork \
+ UnpackedTarball/libwpd/src/lib/WP3SingleByteFunction \
+ UnpackedTarball/libwpd/src/lib/WP3StylesListener \
+ UnpackedTarball/libwpd/src/lib/WP3SubDocument \
+ UnpackedTarball/libwpd/src/lib/WP3TabGroup \
+ UnpackedTarball/libwpd/src/lib/WP3TablesGroup \
+ UnpackedTarball/libwpd/src/lib/WP3UndoGroup \
+ UnpackedTarball/libwpd/src/lib/WP3UnsupportedFixedLengthGroup \
+ UnpackedTarball/libwpd/src/lib/WP3UnsupportedVariableLengthGroup \
+ UnpackedTarball/libwpd/src/lib/WP3VariableLengthGroup \
+ UnpackedTarball/libwpd/src/lib/WP3WindowGroup \
+ UnpackedTarball/libwpd/src/lib/WP42ContentListener \
+ UnpackedTarball/libwpd/src/lib/WP42DefineColumnsGroup \
+ UnpackedTarball/libwpd/src/lib/WP42ExtendedCharacterGroup \
+ UnpackedTarball/libwpd/src/lib/WP42FileStructure \
+ UnpackedTarball/libwpd/src/lib/WP42HeaderFooterGroup \
+ UnpackedTarball/libwpd/src/lib/WP42Heuristics \
+ UnpackedTarball/libwpd/src/lib/WP42Listener \
+ UnpackedTarball/libwpd/src/lib/WP42MarginResetGroup \
+ UnpackedTarball/libwpd/src/lib/WP42MultiByteFunctionGroup \
+ UnpackedTarball/libwpd/src/lib/WP42Parser \
+ UnpackedTarball/libwpd/src/lib/WP42Part \
+ UnpackedTarball/libwpd/src/lib/WP42StylesListener \
+ UnpackedTarball/libwpd/src/lib/WP42SubDocument \
+ UnpackedTarball/libwpd/src/lib/WP42SuppressPageCharacteristicsGroup \
+ UnpackedTarball/libwpd/src/lib/WP42UnsupportedMultiByteFunctionGroup \
+ UnpackedTarball/libwpd/src/lib/WP5AttributeGroup \
+ UnpackedTarball/libwpd/src/lib/WP5BoxGroup \
+ UnpackedTarball/libwpd/src/lib/WP5ContentListener \
+ UnpackedTarball/libwpd/src/lib/WP5DefinitionGroup \
+ UnpackedTarball/libwpd/src/lib/WP5ExtendedCharacterGroup \
+ UnpackedTarball/libwpd/src/lib/WP5FileStructure \
+ UnpackedTarball/libwpd/src/lib/WP5FixedLengthGroup \
+ UnpackedTarball/libwpd/src/lib/WP5FontGroup \
+ UnpackedTarball/libwpd/src/lib/WP5FontNameStringPoolPacket \
+ UnpackedTarball/libwpd/src/lib/WP5FootnoteEndnoteGroup \
+ UnpackedTarball/libwpd/src/lib/WP5GeneralPacketData \
+ UnpackedTarball/libwpd/src/lib/WP5GeneralPacketIndex \
+ UnpackedTarball/libwpd/src/lib/WP5GraphicsInformationPacket \
+ UnpackedTarball/libwpd/src/lib/WP5Header \
+ UnpackedTarball/libwpd/src/lib/WP5HeaderFooterGroup \
+ UnpackedTarball/libwpd/src/lib/WP5IndentGroup \
+ UnpackedTarball/libwpd/src/lib/WP5ListFontsUsedPacket \
+ UnpackedTarball/libwpd/src/lib/WP5Listener \
+ UnpackedTarball/libwpd/src/lib/WP5PageFormatGroup \
+ UnpackedTarball/libwpd/src/lib/WP5Parser \
+ UnpackedTarball/libwpd/src/lib/WP5Part \
+ UnpackedTarball/libwpd/src/lib/WP5PrefixData \
+ UnpackedTarball/libwpd/src/lib/WP5SingleByteFunction \
+ UnpackedTarball/libwpd/src/lib/WP5SpecialHeaderIndex \
+ UnpackedTarball/libwpd/src/lib/WP5StylesListener \
+ UnpackedTarball/libwpd/src/lib/WP5SubDocument \
+ UnpackedTarball/libwpd/src/lib/WP5TabGroup \
+ UnpackedTarball/libwpd/src/lib/WP5TableEOLGroup \
+ UnpackedTarball/libwpd/src/lib/WP5TableEOPGroup \
+ UnpackedTarball/libwpd/src/lib/WP5UnsupportedFixedLengthGroup \
+ UnpackedTarball/libwpd/src/lib/WP5UnsupportedVariableLengthGroup \
+ UnpackedTarball/libwpd/src/lib/WP5VariableLengthGroup \
+ UnpackedTarball/libwpd/src/lib/WP60Header \
+ UnpackedTarball/libwpd/src/lib/WP61Header \
+ UnpackedTarball/libwpd/src/lib/WP6AttributeGroup \
+ UnpackedTarball/libwpd/src/lib/WP6BoxGroup \
+ UnpackedTarball/libwpd/src/lib/WP6CharacterGroup \
+ UnpackedTarball/libwpd/src/lib/WP6ColumnGroup \
+ UnpackedTarball/libwpd/src/lib/WP6CommentAnnotationPacket \
+ UnpackedTarball/libwpd/src/lib/WP6ContentListener \
+ UnpackedTarball/libwpd/src/lib/WP6DefaultInitialFontPacket \
+ UnpackedTarball/libwpd/src/lib/WP6DisplayNumberReferenceGroup \
+ UnpackedTarball/libwpd/src/lib/WP6EOLGroup \
+ UnpackedTarball/libwpd/src/lib/WP6ExtendedCharacterGroup \
+ UnpackedTarball/libwpd/src/lib/WP6ExtendedDocumentSummaryPacket \
+ UnpackedTarball/libwpd/src/lib/WP6FileStructure \
+ UnpackedTarball/libwpd/src/lib/WP6FillStylePacket \
+ UnpackedTarball/libwpd/src/lib/WP6FixedLengthGroup \
+ UnpackedTarball/libwpd/src/lib/WP6FontDescriptorPacket \
+ UnpackedTarball/libwpd/src/lib/WP6FootnoteEndnoteGroup \
+ UnpackedTarball/libwpd/src/lib/WP6GeneralTextPacket \
+ UnpackedTarball/libwpd/src/lib/WP6GraphicsBoxStylePacket \
+ UnpackedTarball/libwpd/src/lib/WP6GraphicsCachedFileDataPacket \
+ UnpackedTarball/libwpd/src/lib/WP6GraphicsFilenamePacket \
+ UnpackedTarball/libwpd/src/lib/WP6Header \
+ UnpackedTarball/libwpd/src/lib/WP6HeaderFooterGroup \
+ UnpackedTarball/libwpd/src/lib/WP6HighlightGroup \
+ UnpackedTarball/libwpd/src/lib/WP6HyperlinkPacket \
+ UnpackedTarball/libwpd/src/lib/WP6Listener \
+ UnpackedTarball/libwpd/src/lib/WP6NumberingMethodGroup \
+ UnpackedTarball/libwpd/src/lib/WP6OutlineStylePacket \
+ UnpackedTarball/libwpd/src/lib/WP6PageGroup \
+ UnpackedTarball/libwpd/src/lib/WP6ParagraphGroup \
+ UnpackedTarball/libwpd/src/lib/WP6Parser \
+ UnpackedTarball/libwpd/src/lib/WP6Part \
+ UnpackedTarball/libwpd/src/lib/WP6PrefixData \
+ UnpackedTarball/libwpd/src/lib/WP6PrefixDataPacket \
+ UnpackedTarball/libwpd/src/lib/WP6PrefixIndice \
+ UnpackedTarball/libwpd/src/lib/WP6SetNumberGroup \
+ UnpackedTarball/libwpd/src/lib/WP6SingleByteFunction \
+ UnpackedTarball/libwpd/src/lib/WP6StyleGroup \
+ UnpackedTarball/libwpd/src/lib/WP6StylesListener \
+ UnpackedTarball/libwpd/src/lib/WP6SubDocument \
+ UnpackedTarball/libwpd/src/lib/WP6TabGroup \
+ UnpackedTarball/libwpd/src/lib/WP6TableStylePacket \
+ UnpackedTarball/libwpd/src/lib/WP6UndoGroup \
+ UnpackedTarball/libwpd/src/lib/WP6UnsupportedFixedLengthGroup \
+ UnpackedTarball/libwpd/src/lib/WP6UnsupportedVariableLengthGroup \
+ UnpackedTarball/libwpd/src/lib/WP6VariableLengthGroup \
+ UnpackedTarball/libwpd/src/lib/WPDocument \
+ UnpackedTarball/libwpd/src/lib/WPXContentListener \
+ UnpackedTarball/libwpd/src/lib/WPXEncryption \
+ UnpackedTarball/libwpd/src/lib/WPXHeader \
+ UnpackedTarball/libwpd/src/lib/WPXHeaderFooter \
+ UnpackedTarball/libwpd/src/lib/WPXListener \
+ UnpackedTarball/libwpd/src/lib/WPXMemoryStream \
+ UnpackedTarball/libwpd/src/lib/WPXPageSpan \
+ UnpackedTarball/libwpd/src/lib/WPXParser \
+ UnpackedTarball/libwpd/src/lib/WPXStylesListener \
+ UnpackedTarball/libwpd/src/lib/WPXSubDocument \
+ UnpackedTarball/libwpd/src/lib/WPXTable \
+ UnpackedTarball/libwpd/src/lib/WPXTableList \
+ UnpackedTarball/libwpd/src/lib/libwpd_internal \
+ UnpackedTarball/libwpd/src/lib/libwpd_math \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libwpd/Makefile b/external/libwpd/Makefile
new file mode 100644
index 000000000..e4968cf85
--- /dev/null
+++ b/external/libwpd/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/libwpd/Module_libwpd.mk b/external/libwpd/Module_libwpd.mk
new file mode 100644
index 000000000..db916a582
--- /dev/null
+++ b/external/libwpd/Module_libwpd.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,libwpd))
+
+$(eval $(call gb_Module_add_targets,libwpd,\
+ UnpackedTarball_libwpd \
+))
+
+ifeq ($(COM),MSC)
+
+$(eval $(call gb_Module_add_targets,libwpd,\
+ Library_wpd \
+))
+
+else
+
+$(eval $(call gb_Module_add_targets,libwpd,\
+ ExternalPackage_libwpd \
+ ExternalProject_libwpd \
+))
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libwpd/README b/external/libwpd/README
new file mode 100644
index 000000000..2cc9c8a18
--- /dev/null
+++ b/external/libwpd/README
@@ -0,0 +1 @@
+From [http://libwpd.sourceforge.net/]. Not modified. WordPerfect filter - SAX api - emits callbacks when things happen.
diff --git a/external/libwpd/UnpackedTarball_libwpd.mk b/external/libwpd/UnpackedTarball_libwpd.mk
new file mode 100644
index 000000000..8d0227b93
--- /dev/null
+++ b/external/libwpd/UnpackedTarball_libwpd.mk
@@ -0,0 +1,33 @@
+# -*- 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,libwpd))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,libwpd,$(WPD_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_set_patchlevel,libwpd,0))
+
+$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libwpd))
+
+$(eval $(call gb_UnpackedTarball_add_patches,libwpd,\
+ external/libwpd/libwpd-vs2013.patch.1 \
+ $(if $(SYSTEM_REVENGE),,external/libwpd/rpath.patch) \
+))
+
+ifneq ($(OS),MACOSX)
+ifneq ($(OS),WNT)
+ifneq ($(OS),iOS)
+$(eval $(call gb_UnpackedTarball_add_patches,libwpd,\
+ external/libwpd/libwpd-bundled-soname.patch.0 \
+))
+endif
+endif
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libwpd/inc/pch/precompiled_wpd.cxx b/external/libwpd/inc/pch/precompiled_wpd.cxx
new file mode 100644
index 000000000..32c492c12
--- /dev/null
+++ b/external/libwpd/inc/pch/precompiled_wpd.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_wpd.hxx"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/external/libwpd/inc/pch/precompiled_wpd.hxx b/external/libwpd/inc/pch/precompiled_wpd.hxx
new file mode 100644
index 000000000..8c62c61ec
--- /dev/null
+++ b/external/libwpd/inc/pch/precompiled_wpd.hxx
@@ -0,0 +1,52 @@
+/* -*- 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 09:48:15 using:
+ ./bin/update_pch external/libwpd wpd --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/libwpd/inc/pch/precompiled_wpd.hxx "make external/libwpd.build" --find-conflicts
+*/
+
+#if PCH_LEVEL >= 1
+#include <algorithm>
+#include <assert.h>
+#include <cstdarg>
+#include <cstdio>
+#include <ctype.h>
+#include <libwpd_internal.h>
+#include <libwpd_math.h>
+#include <limits>
+#include <locale.h>
+#include <math.h>
+#include <memory>
+#include <set>
+#include <sstream>
+#include <string.h>
+#include <string>
+#include <time.h>
+#include <vector>
+#include <boost/spirit/include/qi.hpp>
+#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>
+#endif // PCH_LEVEL >= 3
+#if PCH_LEVEL >= 4
+#endif // PCH_LEVEL >= 4
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/external/libwpd/libwpd-bundled-soname.patch.0 b/external/libwpd/libwpd-bundled-soname.patch.0
new file mode 100644
index 000000000..2a669748f
--- /dev/null
+++ b/external/libwpd/libwpd-bundled-soname.patch.0
@@ -0,0 +1,10 @@
+--- src/lib/Makefile.in.orig 2015-08-06 21:41:41.073622494 +0200
++++ src/lib/Makefile.in 2015-08-06 21:42:09.377622009 +0200
+@@ -429,6 +429,6 @@
+ libwpd_@WPD_MAJOR_VERSION@_@WPD_MINOR_VERSION@_la_LIBADD = $(REVENGE_LIBS) @LIBWPD_WIN32_RESOURCE@
+ libwpd_@WPD_MAJOR_VERSION@_@WPD_MINOR_VERSION@_la_DEPENDENCIES = @LIBWPD_WIN32_RESOURCE@
+-libwpd_@WPD_MAJOR_VERSION@_@WPD_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic $(no_undefined)
++libwpd_@WPD_MAJOR_VERSION@_@WPD_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic $(no_undefined) -release lo
+ libwpd_@WPD_MAJOR_VERSION@_@WPD_MINOR_VERSION@_la_SOURCES = \
+ libwpd_internal.cpp \
+ libwpd_math.cpp \
diff --git a/external/libwpd/libwpd-vs2013.patch.1 b/external/libwpd/libwpd-vs2013.patch.1
new file mode 100644
index 000000000..224af4732
--- /dev/null
+++ b/external/libwpd/libwpd-vs2013.patch.1
@@ -0,0 +1,25 @@
+--- libwpd/src/lib/libwpd_math.h
++++ libwpd/src/lib/libwpd_math.h
+@@ -31,9 +31,9 @@
+
+ #include <math.h>
+
+-#if defined(_WIN32) && !defined(__MINGW32__)
++#if defined(_MSC_VER) && _MSC_VER < 1800
+ double rint(double x);
+-#endif /* _WIN32 */
++#endif /* _MSC_VER < 1800 */
+
+ #endif /* LIBWPD_MATH_H */
+ /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
+--- libwpd/src/lib/libwpd_math.cpp
++++ libwpd/src/lib/libwpd_math.cpp
+@@ -26,7 +26,7 @@
+
+ #include "libwpd_math.h"
+
+-#if defined(_WIN32) && !defined(__MINGW32__)
++#if defined(_MSC_VER) && _MSC_VER < 1800
+
+ double rint(double x)
+ {
diff --git a/external/libwpd/rpath.patch b/external/libwpd/rpath.patch
new file mode 100644
index 000000000..fb3deaa81
--- /dev/null
+++ b/external/libwpd/rpath.patch
@@ -0,0 +1,10 @@
+--- configure
++++ configure
+@@ -13850,6 +13850,7 @@
+ esac
+ ;;
+ esac
++hardcode_libdir_flag_spec_CXX=
+ ;;
+
+ lynxos*)