summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorosnola <alonso@loria.fr>2016-08-10 12:43:56 +0200
committerDavid Tardon <dtardon@redhat.com>2016-08-11 08:13:27 +0200
commit1faae1f37521df7734462443936e1469820fd489 (patch)
tree8c3ab056cdd2e6a3fbc2642588563e4eeb65b022 /external
parent6a2cc612decea57b9c3ab31f2f32aa2126c06cf7 (diff)
integrate libstaroffice
Change-Id: I85913f1bd1af5d102573040588cca9d8ddeebb5d
Diffstat (limited to 'external')
-rw-r--r--external/Module_external.mk1
-rw-r--r--external/libstaroffice/0001-error-C2512-StarObject-no-appropriate-default-constr.patch.154
-rw-r--r--external/libstaroffice/ExternalPackage_libstaroffice.mk22
-rw-r--r--external/libstaroffice/ExternalProject_libstaroffice.mk53
-rw-r--r--external/libstaroffice/Library_staroffice.mk108
-rw-r--r--external/libstaroffice/Makefile7
-rw-r--r--external/libstaroffice/Module_libstaroffice.mk31
-rw-r--r--external/libstaroffice/README3
-rw-r--r--external/libstaroffice/UnpackedTarball_libstaroffice.mk42
-rw-r--r--external/libstaroffice/libstaroffice-bundled-soname.patch.011
-rw-r--r--external/libstaroffice/rpath.patch10
-rw-r--r--external/libstaroffice/ubsan-visibility.patch11
12 files changed, 353 insertions, 0 deletions
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 9c014a7e2092..1e3ce40ebce6 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -94,6 +94,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,REVENGE,librevenge) \
$(call gb_Helper_optional,RHINO,rhino) \
$(call gb_Helper_optional,SERF,serf) \
+ $(call gb_Helper_optional,STAROFFICE,libstaroffice) \
$(call gb_Helper_optional,UCPP,ucpp) \
$(call gb_Helper_optional,VISIO,libvisio) \
$(call gb_Helper_optional,WPD,libwpd) \
diff --git a/external/libstaroffice/0001-error-C2512-StarObject-no-appropriate-default-constr.patch.1 b/external/libstaroffice/0001-error-C2512-StarObject-no-appropriate-default-constr.patch.1
new file mode 100644
index 000000000000..1c579b30170e
--- /dev/null
+++ b/external/libstaroffice/0001-error-C2512-StarObject-no-appropriate-default-constr.patch.1
@@ -0,0 +1,54 @@
+From 1bbb89aff70e81d47af617bb1407e70545a2f99a Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon@redhat.com>
+Date: Wed, 10 Aug 2016 18:52:46 +0200
+Subject: [PATCH] error C2512: 'StarObject' : no appropriate default
+ constructor available
+
+---
+ src/lib/StarObjectChart.cxx | 2 +-
+ src/lib/StarObjectDraw.cxx | 2 +-
+ src/lib/StarObjectSpreadsheet.cxx | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/lib/StarObjectChart.cxx b/src/lib/StarObjectChart.cxx
+index 3438beb..d9b1604 100644
+--- a/src/lib/StarObjectChart.cxx
++++ b/src/lib/StarObjectChart.cxx
+@@ -71,7 +71,7 @@ struct State {
+ ////////////////////////////////////////////////////////////
+ // constructor/destructor, ...
+ ////////////////////////////////////////////////////////////
+-StarObjectChart::StarObjectChart(StarObject const &orig, bool duplicateState) : StarObject::StarObject(orig, duplicateState), m_chartState(new StarObjectChartInternal::State)
++StarObjectChart::StarObjectChart(StarObject const &orig, bool duplicateState) : StarObject(orig, duplicateState), m_chartState(new StarObjectChartInternal::State)
+ {
+ }
+
+diff --git a/src/lib/StarObjectDraw.cxx b/src/lib/StarObjectDraw.cxx
+index bb660a9..4e4fdc2 100644
+--- a/src/lib/StarObjectDraw.cxx
++++ b/src/lib/StarObjectDraw.cxx
+@@ -76,7 +76,7 @@ struct State {
+ ////////////////////////////////////////////////////////////
+ // constructor/destructor, ...
+ ////////////////////////////////////////////////////////////
+-StarObjectDraw::StarObjectDraw(StarObject const &orig, bool duplicateState) : StarObject::StarObject(orig, duplicateState), m_drawState(new StarObjectDrawInternal::State)
++StarObjectDraw::StarObjectDraw(StarObject const &orig, bool duplicateState) : StarObject(orig, duplicateState), m_drawState(new StarObjectDrawInternal::State)
+ {
+ }
+
+diff --git a/src/lib/StarObjectSpreadsheet.cxx b/src/lib/StarObjectSpreadsheet.cxx
+index 58409c8..c8bd71b 100644
+--- a/src/lib/StarObjectSpreadsheet.cxx
++++ b/src/lib/StarObjectSpreadsheet.cxx
+@@ -521,7 +521,7 @@ void SubDocument::parse(STOFFListenerPtr &listener, libstoff::SubDocumentType /*
+ ////////////////////////////////////////////////////////////
+ // constructor/destructor, ...
+ ////////////////////////////////////////////////////////////
+-StarObjectSpreadsheet::StarObjectSpreadsheet(StarObject const &orig, bool duplicateState) : StarObject::StarObject(orig, duplicateState), m_spreadsheetState(new StarObjectSpreadsheetInternal::State)
++StarObjectSpreadsheet::StarObjectSpreadsheet(StarObject const &orig, bool duplicateState) : StarObject(orig, duplicateState), m_spreadsheetState(new StarObjectSpreadsheetInternal::State)
+ {
+ }
+
+--
+2.7.4
+
diff --git a/external/libstaroffice/ExternalPackage_libstaroffice.mk b/external/libstaroffice/ExternalPackage_libstaroffice.mk
new file mode 100644
index 000000000000..939fbbc2cf18
--- /dev/null
+++ b/external/libstaroffice/ExternalPackage_libstaroffice.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,libstaroffice,libstaroffice))
+
+$(eval $(call gb_ExternalPackage_use_external_project,libstaroffice,libstaroffice))
+
+ifeq ($(OS),MACOSX)
+$(eval $(call gb_ExternalPackage_add_file,libstaroffice,$(LIBO_LIB_FOLDER)/libstaroffice-0.0.0.dylib,src/lib/.libs/libstaroffice-0.0.0.dylib))
+else ifeq ($(OS),WNT)
+$(eval $(call gb_ExternalPackage_add_file,libstaroffice,$(LIBO_LIB_FOLDER)/libstaroffice-0.0.dll,src/lib/.libs/libstaroffice-0.0.dll))
+else ifeq ($(DISABLE_DYNLOADING),)
+$(eval $(call gb_ExternalPackage_add_file,libstaroffice,$(LIBO_LIB_FOLDER)/libstaroffice-0.0-lo.so.0,src/lib/.libs/libstaroffice-0.0-lo.so.0.0.$(STAROFFICE_VERSION_MICRO)))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libstaroffice/ExternalProject_libstaroffice.mk b/external/libstaroffice/ExternalProject_libstaroffice.mk
new file mode 100644
index 000000000000..8d77cb807968
--- /dev/null
+++ b/external/libstaroffice/ExternalProject_libstaroffice.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,libstaroffice))
+
+$(eval $(call gb_ExternalProject_use_autoconf,libstaroffice,build))
+
+$(eval $(call gb_ExternalProject_register_targets,libstaroffice,\
+ build \
+))
+
+$(eval $(call gb_ExternalProject_use_externals,libstaroffice,\
+ revenge \
+))
+
+$(call gb_ExternalProject_get_state_target,libstaroffice,build) :
+ $(call gb_ExternalProject_run,build,\
+ export PKG_CONFIG="" \
+ && ./configure \
+ --with-pic \
+ $(if $(DISABLE_DYNLOADING), \
+ --enable-static --disable-shared \
+ , \
+ --enable-shared --disable-static \
+ ) \
+ --with-sharedptr=c++11 \
+ --without-docs \
+ --disable-tools \
+ --disable-zip \
+ $(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \
+ $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
+ --disable-werror \
+ CXXFLAGS="$(CXXFLAGS) $(CXXFLAGS_CXX11)" \
+ $(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)) \
+ $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
+ && (cd $(EXTERNAL_WORKDIR)/src/lib && \
+ $(MAKE)) \
+ $(if $(filter MACOSX,$(OS)),\
+ && $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \
+ $(EXTERNAL_WORKDIR)/src/lib/.libs/libstaroffice-0.0.0.dylib \
+ ) \
+ )
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libstaroffice/Library_staroffice.mk b/external/libstaroffice/Library_staroffice.mk
new file mode 100644
index 000000000000..0bd8ed73c06e
--- /dev/null
+++ b/external/libstaroffice/Library_staroffice.mk
@@ -0,0 +1,108 @@
+# -*- 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,staroffice))
+
+$(eval $(call gb_Library_use_unpacked,staroffice,libstaroffice))
+
+$(eval $(call gb_Library_use_externals,staroffice,\
+ revenge \
+))
+
+$(eval $(call gb_Library_set_warnings_not_errors,staroffice))
+
+$(eval $(call gb_Library_set_include,staroffice,\
+ -I$(call gb_UnpackedTarball_get_dir,libstaroffice)/inc \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_Library_add_defs,staroffice,\
+ -DBUILD_STOFF \
+ -DDLL_EXPORT \
+ -DNDEBUG \
+ -DSHAREDPTR_STD \
+))
+
+$(eval $(call gb_Library_add_generated_exception_objects,staroffice,\
+ UnpackedTarball/libstaroffice/src/lib/SDAParser \
+ UnpackedTarball/libstaroffice/src/lib/SDCParser \
+ UnpackedTarball/libstaroffice/src/lib/SDGParser \
+ UnpackedTarball/libstaroffice/src/lib/SDWParser \
+ UnpackedTarball/libstaroffice/src/lib/SDXParser \
+ UnpackedTarball/libstaroffice/src/lib/STOFFCell \
+ UnpackedTarball/libstaroffice/src/lib/STOFFCellStyle \
+ UnpackedTarball/libstaroffice/src/lib/STOFFChart \
+ UnpackedTarball/libstaroffice/src/lib/STOFFDebug \
+ UnpackedTarball/libstaroffice/src/lib/STOFFDocument \
+ UnpackedTarball/libstaroffice/src/lib/STOFFEntry \
+ UnpackedTarball/libstaroffice/src/lib/STOFFFont \
+ UnpackedTarball/libstaroffice/src/lib/STOFFGraphicDecoder \
+ UnpackedTarball/libstaroffice/src/lib/STOFFGraphicEncoder \
+ UnpackedTarball/libstaroffice/src/lib/STOFFGraphicListener \
+ UnpackedTarball/libstaroffice/src/lib/STOFFGraphicShape \
+ UnpackedTarball/libstaroffice/src/lib/STOFFGraphicStyle \
+ UnpackedTarball/libstaroffice/src/lib/STOFFHeader \
+ UnpackedTarball/libstaroffice/src/lib/STOFFInputStream \
+ UnpackedTarball/libstaroffice/src/lib/STOFFList \
+ UnpackedTarball/libstaroffice/src/lib/STOFFListener \
+ UnpackedTarball/libstaroffice/src/lib/STOFFOLEParser \
+ UnpackedTarball/libstaroffice/src/lib/STOFFPageSpan \
+ UnpackedTarball/libstaroffice/src/lib/STOFFParagraph \
+ UnpackedTarball/libstaroffice/src/lib/STOFFParser \
+ UnpackedTarball/libstaroffice/src/lib/STOFFPosition \
+ UnpackedTarball/libstaroffice/src/lib/STOFFPropertyHandler \
+ UnpackedTarball/libstaroffice/src/lib/STOFFSection \
+ UnpackedTarball/libstaroffice/src/lib/STOFFSpreadsheetDecoder \
+ UnpackedTarball/libstaroffice/src/lib/STOFFSpreadsheetEncoder \
+ UnpackedTarball/libstaroffice/src/lib/STOFFSpreadsheetListener \
+ UnpackedTarball/libstaroffice/src/lib/STOFFStringStream \
+ UnpackedTarball/libstaroffice/src/lib/STOFFSubDocument \
+ UnpackedTarball/libstaroffice/src/lib/STOFFTable \
+ UnpackedTarball/libstaroffice/src/lib/STOFFTextListener \
+ UnpackedTarball/libstaroffice/src/lib/SWFieldManager \
+ UnpackedTarball/libstaroffice/src/lib/StarAttribute \
+ UnpackedTarball/libstaroffice/src/lib/StarBitmap \
+ UnpackedTarball/libstaroffice/src/lib/StarCellAttribute \
+ UnpackedTarball/libstaroffice/src/lib/StarCellFormula \
+ UnpackedTarball/libstaroffice/src/lib/StarCharAttribute \
+ UnpackedTarball/libstaroffice/src/lib/StarEncoding \
+ UnpackedTarball/libstaroffice/src/lib/StarEncodingChinese \
+ UnpackedTarball/libstaroffice/src/lib/StarEncodingJapanese \
+ UnpackedTarball/libstaroffice/src/lib/StarEncodingKorean \
+ UnpackedTarball/libstaroffice/src/lib/StarEncodingOtherKorean \
+ UnpackedTarball/libstaroffice/src/lib/StarEncodingTradChinese \
+ UnpackedTarball/libstaroffice/src/lib/StarEncryption \
+ UnpackedTarball/libstaroffice/src/lib/StarFileManager \
+ UnpackedTarball/libstaroffice/src/lib/StarFormatManager \
+ UnpackedTarball/libstaroffice/src/lib/StarGraphicAttribute \
+ UnpackedTarball/libstaroffice/src/lib/StarGraphicStruct \
+ UnpackedTarball/libstaroffice/src/lib/StarItem \
+ UnpackedTarball/libstaroffice/src/lib/StarItemPool \
+ UnpackedTarball/libstaroffice/src/lib/StarLanguage \
+ UnpackedTarball/libstaroffice/src/lib/StarLayout \
+ UnpackedTarball/libstaroffice/src/lib/StarObject \
+ UnpackedTarball/libstaroffice/src/lib/StarObjectChart \
+ UnpackedTarball/libstaroffice/src/lib/StarObjectDraw \
+ UnpackedTarball/libstaroffice/src/lib/StarObjectModel \
+ UnpackedTarball/libstaroffice/src/lib/StarObjectNumericRuler \
+ UnpackedTarball/libstaroffice/src/lib/StarObjectPageStyle \
+ UnpackedTarball/libstaroffice/src/lib/StarObjectSmallGraphic \
+ UnpackedTarball/libstaroffice/src/lib/StarObjectSmallText \
+ UnpackedTarball/libstaroffice/src/lib/StarObjectSpreadsheet \
+ UnpackedTarball/libstaroffice/src/lib/StarObjectText \
+ UnpackedTarball/libstaroffice/src/lib/StarPageAttribute \
+ UnpackedTarball/libstaroffice/src/lib/StarParagraphAttribute \
+ UnpackedTarball/libstaroffice/src/lib/StarState \
+ UnpackedTarball/libstaroffice/src/lib/StarTable \
+ UnpackedTarball/libstaroffice/src/lib/StarWriterStruct \
+ UnpackedTarball/libstaroffice/src/lib/StarZone \
+ UnpackedTarball/libstaroffice/src/lib/libstaroffice_internal \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libstaroffice/Makefile b/external/libstaroffice/Makefile
new file mode 100644
index 000000000000..e4968cf85fb6
--- /dev/null
+++ b/external/libstaroffice/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/libstaroffice/Module_libstaroffice.mk b/external/libstaroffice/Module_libstaroffice.mk
new file mode 100644
index 000000000000..b96bde2b13d5
--- /dev/null
+++ b/external/libstaroffice/Module_libstaroffice.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,libstaroffice))
+
+$(eval $(call gb_Module_add_targets,libstaroffice,\
+ UnpackedTarball_libstaroffice \
+))
+
+ifeq ($(COM),MSC)
+
+$(eval $(call gb_Module_add_targets,libstaroffice,\
+ Library_staroffice \
+))
+
+else
+
+$(eval $(call gb_Module_add_targets,libstaroffice,\
+ ExternalPackage_libstaroffice \
+ ExternalProject_libstaroffice \
+))
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libstaroffice/README b/external/libstaroffice/README
new file mode 100644
index 000000000000..957fb4926669
--- /dev/null
+++ b/external/libstaroffice/README
@@ -0,0 +1,3 @@
+Library parsing different document file formats of StarOffice.
+
+https://github.com/fosnola/libstaroffice
diff --git a/external/libstaroffice/UnpackedTarball_libstaroffice.mk b/external/libstaroffice/UnpackedTarball_libstaroffice.mk
new file mode 100644
index 000000000000..957c11859ac5
--- /dev/null
+++ b/external/libstaroffice/UnpackedTarball_libstaroffice.mk
@@ -0,0 +1,42 @@
+# -*- 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,libstaroffice))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,libstaroffice,$(STAROFFICE_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_set_patchlevel,libstaroffice,0))
+
+ifeq ($(COM_IS_CLANG),TRUE)
+ifneq ($(filter -fsanitize=%,$(CC)),)
+$(eval $(call gb_UnpackedTarball_add_patches,libstaroffice, \
+ external/libstaroffice/ubsan-visibility.patch \
+))
+endif
+endif
+
+ifneq ($(OS),MACOSX)
+ifneq ($(OS),WNT)
+$(eval $(call gb_UnpackedTarball_add_patches,libstaroffice, \
+ external/libstaroffice/libstaroffice-bundled-soname.patch.0 \
+))
+endif
+endif
+
+ifeq ($(SYSTEM_REVENGE),)
+$(eval $(call gb_UnpackedTarball_add_patches,libstaroffice, \
+ external/libstaroffice/rpath.patch \
+))
+endif
+
+$(eval $(call gb_UnpackedTarball_add_patches,libstaroffice, \
+ external/libstaroffice/0001-error-C2512-StarObject-no-appropriate-default-constr.patch.1 \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libstaroffice/libstaroffice-bundled-soname.patch.0 b/external/libstaroffice/libstaroffice-bundled-soname.patch.0
new file mode 100644
index 000000000000..00b064d10e45
--- /dev/null
+++ b/external/libstaroffice/libstaroffice-bundled-soname.patch.0
@@ -0,0 +1,11 @@
+--- src/lib/Makefile.in.orig 2015-08-07 14:04:47.646611627 +0200
++++ src/lib/Makefile.in 2015-08-07 14:25:49.888589996 +0200
+@@ -418,7 +418,7 @@
+ AM_CXXFLAGS = -I$(top_srcdir)/inc $(REVENGE_CFLAGS) $(DEBUG_CXXFLAGS) $(ZLIB_CFLAGS) -DBUILD_STAROFFICE=1
+ libstaroffice_@STAROFFICE_MAJOR_VERSION@_@STAROFFICE_MINOR_VERSION@_la_LIBADD = $(REVENGE_LIBS) $(ZLIB_LIBS) @LIBSTAROFFICE_WIN32_RESOURCE@
+ libstaroffice_@STAROFFICE_MAJOR_VERSION@_@STAROFFICE_MINOR_VERSION@_la_DEPENDENCIES = @LIBSTAROFFICE_WIN32_RESOURCE@
+-libstaroffice_@STAROFFICE_MAJOR_VERSION@_@STAROFFICE_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic -no-undefined
++libstaroffice_@STAROFFICE_MAJOR_VERSION@_@STAROFFICE_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic -no-undefined -release lo
+ libstaroffice_@STAROFFICE_MAJOR_VERSION@_@STAROFFICE_MINOR_VERSION@_la_SOURCES = \
+ SDAParser.cxx \
+ SDAParser.hxx \
diff --git a/external/libstaroffice/rpath.patch b/external/libstaroffice/rpath.patch
new file mode 100644
index 000000000000..a73d8ae223f9
--- /dev/null
+++ b/external/libstaroffice/rpath.patch
@@ -0,0 +1,10 @@
+--- configure
++++ configure
+@@ -15353,6 +15353,7 @@
+ esac
+ ;;
+ esac
++hardcode_libdir_flag_spec_CXX=
+ ;;
+
+ lynxos*)
diff --git a/external/libstaroffice/ubsan-visibility.patch b/external/libstaroffice/ubsan-visibility.patch
new file mode 100644
index 000000000000..a14d201ea4c5
--- /dev/null
+++ b/external/libstaroffice/ubsan-visibility.patch
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -17225,7 +17225,7 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fvisibility=hidden compiler flag" >&5
+ $as_echo_n "checking for -fvisibility=hidden compiler flag... " >&6; }
+ saved_CXXFLAGS="$CXXFLAGS"
+- CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
++ CXXFLAGS="$CXXFLAGS -fvisibility-ms-compat"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+