diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
commit | 940b4d1848e8c70ab7642901a68594e8016caffc (patch) | |
tree | eb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /external/liborcus | |
parent | Initial commit. (diff) | |
download | libreoffice-940b4d1848e8c70ab7642901a68594e8016caffc.tar.xz libreoffice-940b4d1848e8c70ab7642901a68594e8016caffc.zip |
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
23 files changed, 1147 insertions, 0 deletions
diff --git a/external/liborcus/0001-Alpha-value-of-0-means-fully-transparent.-I-m-sure-2.patch b/external/liborcus/0001-Alpha-value-of-0-means-fully-transparent.-I-m-sure-2.patch new file mode 100644 index 000000000..6adae9ba2 --- /dev/null +++ b/external/liborcus/0001-Alpha-value-of-0-means-fully-transparent.-I-m-sure-2.patch @@ -0,0 +1,50 @@ +From 98d2b3377da71b713a37f9004acff3c02c22ce2b Mon Sep 17 00:00:00 2001 +From: Kohei Yoshida <kohei.yoshida@gmail.com> +Date: Wed, 31 Jan 2018 22:11:25 -0500 +Subject: [PATCH 1/2] Alpha value of 0 means fully transparent. I'm sure 255 + was intended. + +(cherry picked from commit f7953a814d6a43205791b6cc01c528ef5d4b1ce3) +--- + src/liborcus/gnumeric_sheet_context.cpp | 4 ++-- + src/liborcus/odf_styles_context.cpp | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/liborcus/gnumeric_sheet_context.cpp b/src/liborcus/gnumeric_sheet_context.cpp +index 8659cc3..6bd1471 100644 +--- a/src/liborcus/gnumeric_sheet_context.cpp ++++ b/src/liborcus/gnumeric_sheet_context.cpp +@@ -132,7 +132,7 @@ public: + { + spreadsheet::color_elem_t red, green, blue; + gnumeric_helper::parse_RGB_color_attribute(red, green, blue, attr.value); +- m_styles.set_fill_fg_color(0, red, green, blue); ++ m_styles.set_fill_fg_color(255, red, green, blue); + + m_fill = true; + +@@ -145,7 +145,7 @@ public: + { + spreadsheet::color_elem_t red, green, blue; + gnumeric_helper::parse_RGB_color_attribute(red, green, blue, attr.value); +- m_styles.set_fill_bg_color(0, red, green, blue); ++ m_styles.set_fill_bg_color(255, red, green, blue); + + m_fill = true; + } +diff --git a/src/liborcus/odf_styles_context.cpp b/src/liborcus/odf_styles_context.cpp +index d988f7d..f9c422a 100644 +--- a/src/liborcus/odf_styles_context.cpp ++++ b/src/liborcus/odf_styles_context.cpp +@@ -739,7 +739,7 @@ void styles_context::start_element(xmlns_id_t ns, xml_token_t name, const std::v + { + spreadsheet::color_elem_t red, green, blue; + func.get_background_color(red, green, blue); +- mp_styles->set_fill_bg_color(0, red, green, blue); ++ mp_styles->set_fill_bg_color(255, red, green, blue); + } + + size_t fill_id = mp_styles->commit_fill(); +-- +2.7.4 + diff --git a/external/liborcus/0001-add-xml-path.patch b/external/liborcus/0001-add-xml-path.patch new file mode 100644 index 000000000..3f9a16bb8 --- /dev/null +++ b/external/liborcus/0001-add-xml-path.patch @@ -0,0 +1,119 @@ +diff --git a/include/orcus/xml_structure_tree.hpp b/include/orcus/xml_structure_tree.hpp +index 58cabfd116fa24e35ff27cf8d7512b6e73df33f4..c88808d24bd74c175fa4017328d3e54b4c588c5e 100644 +--- a/include/orcus/xml_structure_tree.hpp ++++ b/include/orcus/xml_structure_tree.hpp +@@ -127,6 +127,20 @@ public: + size_t get_xmlns_index(xmlns_id_t ns) const; + + std::string get_xmlns_short_name(xmlns_id_t ns) const; ++ ++ /** ++ * Get a XPath like ID for the element inside of the XML tree. ++ * ++ */ ++ std::string get_path() const; ++ ++ /** ++ * Select an element by a path expression. The path expression may be ++ * generated by <code>xml_structure_tree::walker::get_path</code>. ++ * ++ * @param path a simple XPath like expression ++ */ ++ element select_by_path(const std::string& path); + }; + + xml_structure_tree(xmlns_context& xmlns_cxt); +diff --git a/src/liborcus/xml_structure_tree.cpp b/src/liborcus/xml_structure_tree.cpp +index 2778bc05f32841a9441bf471913872e119256895..6622bc57cd2595f12bba80d4bbdb5c24cd6e7bc6 100644 +--- a/src/liborcus/xml_structure_tree.cpp ++++ b/src/liborcus/xml_structure_tree.cpp +@@ -12,6 +12,7 @@ + #include "orcus/exception.hpp" + + #include "orcus/string_pool.hpp" ++#include "string_helper.hpp" + + #include <iostream> + #include <sstream> +@@ -275,6 +276,15 @@ struct xml_structure_tree_impl + { + delete mp_root; + } ++ ++ std::string get_element_str(const xml_structure_tree::entity_name& name) const ++ { ++ ostringstream ss; ++ if (m_xmlns_cxt.get_index(name.ns) != index_not_found) ++ ss << m_xmlns_cxt.get_short_name(name.ns) << ":"; ++ ss << name.name; ++ return ss.str(); ++ } + }; + + struct xml_structure_tree::walker_impl +@@ -423,6 +433,66 @@ string xml_structure_tree::walker::get_xmlns_short_name(xmlns_id_t ns) const + return mp_impl->m_parent_impl.m_xmlns_cxt.get_short_name(ns); + } + ++string xml_structure_tree::walker::get_path() const ++{ ++ ostringstream ss; ++ for (auto& element : mp_impl->m_scopes) ++ { ++ ss << "/" << mp_impl->m_parent_impl.get_element_str(element.name); ++ } ++ ++ return ss.str(); ++} ++ ++xml_structure_tree::element xml_structure_tree::walker::select_by_path(const std::string& path) ++{ ++ pstring p(path); ++ std::vector<pstring> parts = string_helper::split_string(p, '/'); ++ if (parts.empty()) ++ throw general_error("invalid format for path"); ++ ++ // string_helper::split_string will create an empty first element due to leading '/' ++ if (parts[0] != "") ++ { ++ throw general_error("invalid format for path"); ++ } ++ else ++ { ++ parts.erase(parts.begin()); ++ } ++ ++ if (parts.empty()) ++ throw general_error("invalid format for path"); ++ ++ element_ref root_ref(mp_impl->mp_root->name, &mp_impl->mp_root->prop); ++ if (pstring(mp_impl->m_parent_impl.get_element_str(root_ref.name)) != parts[0]) ++ throw general_error("path does not match any element"); ++ ++ std::vector<element_ref> scopes; ++ scopes.push_back(root_ref); ++ ++ for (size_t i = 1; i < parts.size(); ++i) ++ { ++ const elem_prop& prop = *scopes.back().prop; ++ bool found = false; ++ for (auto& child : prop.child_elements) ++ { ++ if (pstring(mp_impl->m_parent_impl.get_element_str(child.first)) == parts[i]) ++ { ++ scopes.emplace_back(child.first, child.second); ++ found = true; ++ break; ++ } ++ } ++ if (!found) ++ throw general_error("path does not match any element"); ++ } ++ ++ std::swap(mp_impl->m_scopes, scopes); ++ const element_ref& ref = mp_impl->m_scopes.back(); ++ return element(ref.name, ref.prop->repeat); ++} ++ + xml_structure_tree::xml_structure_tree(xmlns_context& xmlns_cxt) : + mp_impl(new xml_structure_tree_impl(xmlns_cxt)) {} diff --git a/external/liborcus/0001-workaround-a-linking-problem-on-windows.patch b/external/liborcus/0001-workaround-a-linking-problem-on-windows.patch new file mode 100644 index 000000000..308e51c9b --- /dev/null +++ b/external/liborcus/0001-workaround-a-linking-problem-on-windows.patch @@ -0,0 +1,45 @@ +From 71841b7aa7c5e75a793cfaafb31865524a74d9fc Mon Sep 17 00:00:00 2001 +From: David Tardon <dtardon@redhat.com> +Date: Thu, 4 Jun 2015 16:13:18 +0200 +Subject: [PATCH] workaround a linking problem on windows + +Linking scfiltlo.dll gives the following error: + +xmlcontext.o : error LNK2019: unresolved external symbol "char const * const orcus::XMLNS_UNKNOWN_ID" (?XMLNS_UNKNOWN_ID@orcus@@3QBDB) referenced in function "void __cdecl std::_For_each<unsigned int const *,class `anonymous namespace'::SetNamespaceAlias>(unsigned int const *,unsigned int const *,class `anonymous namespace'::SetNamespaceAlias &)" (??$_For_each@PBIVSetNamespaceAlias@?A0xafb5dd33@@@std@@YAXPBI0AAVSetNamespaceAlias@?A0xafb5dd33@@@Z) +C:/cygwin/home/tdf/lode/jenkins/workspace/lo_gerrit_master/Gerrit/Gerrit/Platform/Windows/instdir/program/scfiltlo.dll : fatal error LNK1120: 1 unresolved externals + +I have got no idea what is the cause of this: the constant--exported in +liborcus-parser.dll--is used in liborus.dll without any problem. +--- + include/orcus/types.hpp | 2 +- + src/parser/types.cpp | 1 - + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/include/orcus/types.hpp b/include/orcus/types.hpp +index b6e3f83..8027f25 100644 +--- a/include/orcus/types.hpp ++++ b/include/orcus/types.hpp +@@ -21,7 +21,7 @@ namespace orcus { + typedef size_t xml_token_t; + typedef const char* xmlns_id_t; + +-ORCUS_PSR_DLLPUBLIC extern const xmlns_id_t XMLNS_UNKNOWN_ID; ++const xmlns_id_t XMLNS_UNKNOWN_ID = nullptr; + ORCUS_PSR_DLLPUBLIC extern const xml_token_t XML_UNKNOWN_TOKEN; + ORCUS_PSR_DLLPUBLIC extern const size_t index_not_found; + ORCUS_PSR_DLLPUBLIC extern const size_t unspecified; +diff --git a/src/parser/types.cpp b/src/parser/types.cpp +index be4e304..0a1b4a7 100644 +--- a/src/parser/types.cpp ++++ b/src/parser/types.cpp +@@ -12,7 +12,6 @@ + + namespace orcus { + +-const xmlns_id_t XMLNS_UNKNOWN_ID = nullptr; + const xml_token_t XML_UNKNOWN_TOKEN = 0; + + const size_t index_not_found = std::numeric_limits<size_t>::max(); +-- +2.4.1 + diff --git a/external/liborcus/0001-xls-xml-Import-hidden-row-and-column-flags.patch b/external/liborcus/0001-xls-xml-Import-hidden-row-and-column-flags.patch new file mode 100644 index 000000000..15a554a79 --- /dev/null +++ b/external/liborcus/0001-xls-xml-Import-hidden-row-and-column-flags.patch @@ -0,0 +1,81 @@ +From 66bbbd42f5d135b7e7dd57eaa7fdf6fd69c664df Mon Sep 17 00:00:00 2001 +From: Kohei Yoshida <kohei.yoshida@gmail.com> +Date: Tue, 13 Feb 2018 22:15:49 -0500 +Subject: [PATCH] xls-xml: Import hidden row and column flags. + +(cherry picked from commit 95420c1a1e8c082bb5953b2a49f0d56eef0e5f7e) +--- + src/liborcus/xls_xml_context.cpp | 20 ++++++++++++++++++-- + 1 file changed, 18 insertions(+), 2 deletions(-) + +diff --git a/src/liborcus/xls_xml_context.cpp b/src/liborcus/xls_xml_context.cpp +index 917ff86..04b863a 100644 +--- a/src/liborcus/xls_xml_context.cpp ++++ b/src/liborcus/xls_xml_context.cpp +@@ -1222,6 +1222,7 @@ void xls_xml_context::start_element_column(const xml_token_pair_t& parent, const + spreadsheet::col_t col_index = m_cur_prop_col; + spreadsheet::col_t span = 0; + double width = 0.0; ++ bool hidden = false; + + std::for_each(attrs.begin(), attrs.end(), + [&](const xml_token_attr_t& attr) +@@ -1244,6 +1245,8 @@ void xls_xml_context::start_element_column(const xml_token_pair_t& parent, const + case XML_Span: + span = to_long(attr.value); + break; ++ case XML_Hidden: ++ hidden = to_long(attr.value) != 0; + default: + ; + } +@@ -1251,8 +1254,11 @@ void xls_xml_context::start_element_column(const xml_token_pair_t& parent, const + ); + + for (; span >= 0; --span, ++col_index) ++ { + // Column widths are stored as points. + mp_sheet_props->set_column_width(col_index, width, orcus::length_unit_t::point); ++ mp_sheet_props->set_column_hidden(col_index, hidden); ++ } + + m_cur_prop_col = col_index; + } +@@ -1263,6 +1269,7 @@ void xls_xml_context::start_element_row(const xml_token_pair_t& parent, const xm + m_cur_col = 0; + spreadsheet::row_t row_index = -1; + bool has_height = false; ++ bool hidden = false; + double height = 0.0; + + for (const xml_token_attr_t& attr : attrs) +@@ -1281,6 +1288,9 @@ void xls_xml_context::start_element_row(const xml_token_pair_t& parent, const xm + has_height = true; + height = to_double(attr.value); + break; ++ case XML_Hidden: ++ hidden = to_long(attr.value) != 0; ++ break; + default: + ; + } +@@ -1293,8 +1303,14 @@ void xls_xml_context::start_element_row(const xml_token_pair_t& parent, const xm + m_cur_row = row_index - 1; + } + +- if (mp_sheet_props && has_height) +- mp_sheet_props->set_row_height(m_cur_row, height, length_unit_t::point); ++ if (mp_sheet_props) ++ { ++ if (has_height) ++ mp_sheet_props->set_row_height(m_cur_row, height, length_unit_t::point); ++ ++ if (hidden) ++ mp_sheet_props->set_row_hidden(m_cur_row, true); ++ } + } + + void xls_xml_context::end_element_borders() +-- +2.7.4 + diff --git a/external/liborcus/0001-xls-xml-Pick-up-border-colors.patch b/external/liborcus/0001-xls-xml-Pick-up-border-colors.patch new file mode 100644 index 000000000..1dff6bf93 --- /dev/null +++ b/external/liborcus/0001-xls-xml-Pick-up-border-colors.patch @@ -0,0 +1,69 @@ +From 0a4e8c44fc8229818191c6b9b46e4de079d0ca3b Mon Sep 17 00:00:00 2001 +From: Kohei Yoshida <kohei.yoshida@gmail.com> +Date: Thu, 8 Feb 2018 17:59:11 -0500 +Subject: [PATCH] xls-xml: Pick up border colors. + +(cherry picked from commit e065d26dabafea465ec49e7d79775e62014ac0db) +--- + src/liborcus/xls_xml_context.cpp | 10 ++++++++++ + src/liborcus/xls_xml_context.hpp | 1 + + 2 files changed, 11 insertions(+) + +diff --git a/src/liborcus/xls_xml_context.cpp b/src/liborcus/xls_xml_context.cpp +index 790dfed..917ff86 100644 +--- a/src/liborcus/xls_xml_context.cpp ++++ b/src/liborcus/xls_xml_context.cpp +@@ -1069,6 +1069,7 @@ void xls_xml_context::start_element_border(const xml_token_pair_t& parent, const + + spreadsheet::border_direction_t dir = spreadsheet::border_direction_t::unknown; + spreadsheet::border_style_t style = spreadsheet::border_style_t::unknown; ++ spreadsheet::color_rgb_t color; + long weight = 0; + + for (const xml_token_attr_t& attr : attrs) +@@ -1093,6 +1094,11 @@ void xls_xml_context::start_element_border(const xml_token_pair_t& parent, const + weight = to_long(attr.value); + break; + } ++ case XML_Color: ++ { ++ color = spreadsheet::to_color_rgb(attr.value.data(), attr.value.size()); ++ break; ++ } + default: + ; + } +@@ -1105,6 +1111,7 @@ void xls_xml_context::start_element_border(const xml_token_pair_t& parent, const + border_style_type& bs = m_current_style->borders.back(); + bs.dir = dir; + bs.style = style; ++ bs.color = color; + + switch (bs.style) + { +@@ -1525,7 +1532,10 @@ void xls_xml_context::commit_styles() + styles->set_border_count(style->borders.size()); + + for (const border_style_type& b : style->borders) ++ { + styles->set_border_style(b.dir, b.style); ++ styles->set_border_color(b.dir, 255, b.color.red, b.color.green, b.color.blue); ++ } + + size_t border_id = styles->commit_border(); + styles->set_xf_border(border_id); +diff --git a/src/liborcus/xls_xml_context.hpp b/src/liborcus/xls_xml_context.hpp +index 47cd01c..93dceca 100644 +--- a/src/liborcus/xls_xml_context.hpp ++++ b/src/liborcus/xls_xml_context.hpp +@@ -107,6 +107,7 @@ class xls_xml_context : public xml_context_base + { + spreadsheet::border_direction_t dir = spreadsheet::border_direction_t::unknown; + spreadsheet::border_style_t style = spreadsheet::border_style_t::unknown; ++ spreadsheet::color_rgb_t color; + }; + + struct font_style_type +-- +2.7.4 + diff --git a/external/liborcus/0002-We-are-supposed-to-use-the-foreground-color-for-soli.patch b/external/liborcus/0002-We-are-supposed-to-use-the-foreground-color-for-soli.patch new file mode 100644 index 000000000..ebb233ac7 --- /dev/null +++ b/external/liborcus/0002-We-are-supposed-to-use-the-foreground-color-for-soli.patch @@ -0,0 +1,49 @@ +From 473526e1ca3a7117e2daf977e1b82a0a3977fc84 Mon Sep 17 00:00:00 2001 +From: Kohei Yoshida <kohei.yoshida@gmail.com> +Date: Wed, 31 Jan 2018 22:24:45 -0500 +Subject: [PATCH 2/2] We are supposed to use the foreground color for solid + fill. + +(cherry picked from commit f821995022df8dd1e580dd22cf131584b2b1ac4f) +--- + src/liborcus/odf_styles_context.cpp | 3 ++- + src/liborcus/odf_styles_context_test.cpp | 9 +++++---- + 2 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/src/liborcus/odf_styles_context.cpp b/src/liborcus/odf_styles_context.cpp +index f9c422a..e5f1cc6 100644 +--- a/src/liborcus/odf_styles_context.cpp ++++ b/src/liborcus/odf_styles_context.cpp +@@ -739,7 +739,8 @@ void styles_context::start_element(xmlns_id_t ns, xml_token_t name, const std::v + { + spreadsheet::color_elem_t red, green, blue; + func.get_background_color(red, green, blue); +- mp_styles->set_fill_bg_color(255, red, green, blue); ++ mp_styles->set_fill_pattern_type(ORCUS_ASCII("solid")); ++ mp_styles->set_fill_fg_color(255, red, green, blue); + } + + size_t fill_id = mp_styles->commit_fill(); +diff --git a/src/liborcus/odf_styles_context_test.cpp b/src/liborcus/odf_styles_context_test.cpp +index 4c7eab5..7255a54 100644 +--- a/src/liborcus/odf_styles_context_test.cpp ++++ b/src/liborcus/odf_styles_context_test.cpp +@@ -48,10 +48,11 @@ void test_odf_fill(orcus::spreadsheet::import_styles &styles) + std::cerr << std::hex << (int)fill; + const orcus::spreadsheet::fill_t* cell_fill = styles.get_fill(fill); + assert(cell_fill); +- std::cerr << std::hex << (int)cell_fill->bg_color.red; +- assert(cell_fill->bg_color.red == 0xfe); +- assert(cell_fill->bg_color.green == 0xff); +- assert(cell_fill->bg_color.blue == 0xcc); ++ std::cerr << std::hex << (int)cell_fill->fg_color.red; ++ assert(cell_fill->fg_color.red == 0xfe); ++ assert(cell_fill->fg_color.green == 0xff); ++ assert(cell_fill->fg_color.blue == 0xcc); ++ assert(cell_fill->pattern_type == "solid"); + } + + void test_odf_border(orcus::spreadsheet::import_styles &styles) +-- +2.7.4 + diff --git a/external/liborcus/ExternalPackage_liborcus.mk b/external/liborcus/ExternalPackage_liborcus.mk new file mode 100644 index 000000000..21dd1bfb1 --- /dev/null +++ b/external/liborcus/ExternalPackage_liborcus.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,liborcus,liborcus)) + +$(eval $(call gb_ExternalPackage_use_external_project,liborcus,liborcus)) + +ifeq ($(OS),MACOSX) +$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.15.0.dylib,src/liborcus/.libs/liborcus-0.15.0.dylib)) +$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.15.0.dylib,src/parser/.libs/liborcus-parser-0.15.0.dylib)) +else ifeq ($(DISABLE_DYNLOADING),) +$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.15.so.0,src/liborcus/.libs/liborcus-0.15.so.0.0.0)) +$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.15.so.0,src/parser/.libs/liborcus-parser-0.15.so.0.0.0)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/liborcus/ExternalProject_liborcus.mk b/external/liborcus/ExternalProject_liborcus.mk new file mode 100644 index 000000000..38658cc81 --- /dev/null +++ b/external/liborcus/ExternalProject_liborcus.mk @@ -0,0 +1,132 @@ +# -*- 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,liborcus)) + +$(eval $(call gb_ExternalProject_use_autoconf,liborcus,build)) + +$(eval $(call gb_ExternalProject_use_externals,liborcus, \ + boost_headers \ + boost_filesystem \ + boost_iostreams \ + boost_system \ + mdds_headers \ + zlib \ +)) + +$(eval $(call gb_ExternalProject_register_targets,liborcus,\ + build \ +)) + +# Must be built with debug GNU C++ library if --enable-dbgutil has +# caused the LO code to be built thus. + +# The LIBS setting for Android is needed to get the orcus-xml-dump +# executable to build successfully. We obviously don't actually need +# that executable on Android, but we don't want to bother with +# patching out building it for Android. + +#$(if $(filter MSC,$(COM)),CPPFLAGS+="-DBOOST_ALL_NO_LIB") CXXFLAGS+="$(BOOST_CXXFLAGS)) + +liborcus_LIBS= +ifneq ($(SYSTEM_ZLIB),) +liborcus_LIBS+=-lz +endif +ifneq ($(SYSTEM_BOOST),) +liborcus_LIBS+=$(BOOST_SYSTEM_LIB) $(BOOST_IOSTREAMS_LIB) $(BOOST_FILESYSTEM_LIB) +else +liborcus_LIBS+=-L$(gb_StaticLibrary_WORKDIR) -lboost_system -lboost_iostreams -lboost_filesystem +endif +ifeq ($(OS),ANDROID) +liborcus_LIBS+=$(gb_STDLIBS) +endif + +liborcus_CPPCLAGS=$(CPPFLAGS) +ifeq ($(SYSTEM_ZLIB),) +liborcus_CPPFLAGS+=$(ZLIB_CFLAGS) +endif +# +# OSes that use the GNU C++ library need to use -D_GLIBCXX_DEBUG in +# sync with the rest of LibreOffice, i.e. depending on +# --enable-dbgutil. Note that although Android doesn't use the GNU C +# library (glibc), the NDK does offer the GNU C++ library as one of +# the C++ libraries available, and we use it. +# +ifneq (,$(filter ANDROID DRAGONFLY FREEBSD iOS LINUX NETBSD OPENBSD,$(OS))) +ifneq (,$(gb_ENABLE_DBGUTIL)) +liborcus_CPPFLAGS+=-D_GLIBCXX_DEBUG +endif +endif + +liborcus_CXXFLAGS=$(CXXFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_VISIBILITY_FLAGS_CXX) $(CXXFLAGS_CXX11) -DBOOST_SYSTEM_NO_DEPRECATED +liborcus_LDFLAGS=$(LDFLAGS) $(gb_LTOFLAGS) +ifeq ($(COM),MSC) +liborcus_CXXFLAGS+=$(BOOST_CXXFLAGS) +endif +ifeq ($(SYSTEM_BOOST),) +liborcus_CXXFLAGS+=${BOOST_CPPFLAGS} +else +liborcus_LDFLAGS+=$(BOOST_LDFLAGS) +endif +ifneq (,$(PTHREAD_LIBS)) +liborcus_LDFLAGS+=$(PTHREAD_LIBS) +endif + +ifeq ($(OS),LINUX) +liborcus_LDFLAGS+=-Wl,-z,origin -Wl,-rpath,\$$$$ORIGIN +endif + +ifeq ($(ENABLE_GDB_INDEX),TRUE) +liborcus_LDFLAGS+=-Wl,--gdb-index +liborcus_CXXFLAGS+=-ggnu-pubnames +ifneq ($(USE_LD),) +liborcus_LDFLAGS += -fuse-ld=$(USE_LD) +endif +endif + +$(call gb_ExternalProject_get_state_target,liborcus,build) : + $(call gb_Trace_StartRange,liborcus,EXTERNAL) + $(call gb_ExternalProject_run,build,\ + $(if $(liborcus_LIBS),LIBS='$(liborcus_LIBS)') \ + $(if $(liborcus_CXXFLAGS),CXXFLAGS='$(liborcus_CXXFLAGS)') \ + $(if $(liborcus_CPPFLAGS),CPPFLAGS='$(liborcus_CPPFLAGS)') \ + $(if $(liborcus_LDFLAGS),LDFLAGS='$(liborcus_LDFLAGS)') \ + MDDS_CFLAGS='$(MDDS_CFLAGS)' \ + MDDS_LIBS=' ' \ + MAKE=$(MAKE) ./configure \ + --with-pic \ + $(if $(DISABLE_DYNLOADING), \ + --enable-static --disable-shared \ + , \ + --enable-shared --disable-static \ + ) \ + $(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \ + --disable-spreadsheet-model \ + --without-tools \ + --disable-python \ + --disable-werror \ + $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ + $(if $(SYSTEM_BOOST),,\ + --with-boost=$(WORKDIR)/UnpackedTarball/boost \ + boost_cv_lib_iostreams=yes \ + boost_cv_lib_system=yes \ + boost_cv_lib_filesystem=yes \ + ) \ + $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ + && $(if $(verbose),V=1) \ + $(MAKE) \ + $(if $(filter MACOSX,$(OS)),\ + && $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \ + $(EXTERNAL_WORKDIR)/src/liborcus/.libs/liborcus-0.15.0.dylib \ + $(EXTERNAL_WORKDIR)/src/parser/.libs/liborcus-parser-0.15.0.dylib \ + ) \ + ) + $(call gb_Trace_EndRange,liborcus,EXTERNAL) + +# vim: set noet sw=4 ts=4: diff --git a/external/liborcus/Library_orcus-parser.mk b/external/liborcus/Library_orcus-parser.mk new file mode 100644 index 000000000..d3cbddbb8 --- /dev/null +++ b/external/liborcus/Library_orcus-parser.mk @@ -0,0 +1,71 @@ +# -*- 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,orcus-parser)) + +$(eval $(call gb_Library_use_unpacked,orcus-parser,liborcus)) + +$(eval $(call gb_Library_use_externals,orcus-parser,\ + boost_headers \ + boost_filesystem \ + boost_system \ + mdds_headers \ + zlib \ +)) + +$(eval $(call gb_Library_set_warnings_disabled,orcus-parser)) + +$(eval $(call gb_Library_set_precompiled_header,orcus-parser,external/liborcus/inc/pch/precompiled_orcus-parser)) + +$(eval $(call gb_Library_set_include,orcus-parser,\ + -I$(call gb_UnpackedTarball_get_dir,liborcus)/include \ + -I$(call gb_UnpackedTarball_get_dir,liborcus)/src/include \ + $$(INCLUDE) \ +)) + +$(eval $(call gb_Library_add_defs,orcus-parser,\ + -DBOOST_ALL_NO_LIB \ + -D__ORCUS_PSR_BUILDING_DLL \ +)) + +# Needed when building against MSVC in C++17 mode, as +# workdir/UnpackedTarball/liborcus/include/orcus/global.hpp uses std::unary_function: +$(eval $(call gb_Library_add_defs,orcus-parser, \ + -D_HAS_AUTO_PTR_ETC=1 \ +)) + +$(eval $(call gb_Library_set_generated_cxx_suffix,orcus-parser,cpp)) + +$(eval $(call gb_Library_add_generated_exception_objects,orcus-parser,\ + UnpackedTarball/liborcus/src/parser/base64 \ + UnpackedTarball/liborcus/src/parser/cell_buffer \ + UnpackedTarball/liborcus/src/parser/css_parser_base \ + UnpackedTarball/liborcus/src/parser/css_types \ + UnpackedTarball/liborcus/src/parser/csv_parser_base \ + UnpackedTarball/liborcus/src/parser/exception \ + UnpackedTarball/liborcus/src/parser/json_global \ + UnpackedTarball/liborcus/src/parser/json_parser_base \ + UnpackedTarball/liborcus/src/parser/json_parser_thread \ + UnpackedTarball/liborcus/src/parser/parser_base \ + UnpackedTarball/liborcus/src/parser/parser_global \ + UnpackedTarball/liborcus/src/parser/pstring \ + UnpackedTarball/liborcus/src/parser/sax_parser_base \ + UnpackedTarball/liborcus/src/parser/sax_token_parser \ + UnpackedTarball/liborcus/src/parser/sax_token_parser_thread \ + UnpackedTarball/liborcus/src/parser/stream \ + UnpackedTarball/liborcus/src/parser/string_pool \ + UnpackedTarball/liborcus/src/parser/tokens \ + UnpackedTarball/liborcus/src/parser/types \ + UnpackedTarball/liborcus/src/parser/xml_namespace \ + UnpackedTarball/liborcus/src/parser/yaml_parser_base \ + UnpackedTarball/liborcus/src/parser/zip_archive \ + UnpackedTarball/liborcus/src/parser/zip_archive_stream \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/liborcus/Library_orcus.mk b/external/liborcus/Library_orcus.mk new file mode 100644 index 000000000..ea99e7509 --- /dev/null +++ b/external/liborcus/Library_orcus.mk @@ -0,0 +1,141 @@ +# -*- 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,orcus)) + +$(eval $(call gb_Library_use_unpacked,orcus,liborcus)) + +$(eval $(call gb_Library_use_externals,orcus,\ + boost_headers \ + boost_filesystem \ + boost_iostreams \ + boost_system \ + mdds_headers \ + zlib \ +)) + +$(eval $(call gb_Library_set_warnings_disabled,orcus)) + +$(eval $(call gb_Library_set_precompiled_header,orcus,external/liborcus/inc/pch/precompiled_orcus)) + +$(eval $(call gb_Library_set_include,orcus,\ + -I$(call gb_UnpackedTarball_get_dir,liborcus)/include \ + -I$(call gb_UnpackedTarball_get_dir,liborcus)/src/include \ + $$(INCLUDE) \ +)) + +$(eval $(call gb_Library_add_defs,orcus,\ + -DBOOST_ALL_NO_LIB \ + -D__ORCUS_BUILDING_DLL \ + -D__ORCUS_GNUMERIC \ + -D__ORCUS_ODS \ + -D__ORCUS_XLSX \ + -D__ORCUS_XLS_XML \ +)) + +# Needed when building against MSVC in C++17 mode, as +# workdir/UnpackedTarball/liborcus/src/liborcus/css_document_tree.cpp uses std::unary_function: +$(eval $(call gb_Library_add_defs,orcus, \ + -D_HAS_AUTO_PTR_ETC=1 \ +)) + +$(eval $(call gb_Library_use_libraries,orcus,\ + orcus-parser \ +)) + +$(eval $(call gb_Library_set_generated_cxx_suffix,orcus,cpp)) + +$(eval $(call gb_Library_add_generated_exception_objects,orcus,\ + UnpackedTarball/liborcus/src/liborcus/config \ + UnpackedTarball/liborcus/src/liborcus/css_document_tree \ + UnpackedTarball/liborcus/src/liborcus/css_selector \ + UnpackedTarball/liborcus/src/liborcus/detection_result \ + UnpackedTarball/liborcus/src/liborcus/dom_tree \ + UnpackedTarball/liborcus/src/liborcus/format_detection \ + UnpackedTarball/liborcus/src/liborcus/formula_result \ + UnpackedTarball/liborcus/src/liborcus/global \ + UnpackedTarball/liborcus/src/liborcus/gnumeric_cell_context \ + UnpackedTarball/liborcus/src/liborcus/gnumeric_context \ + UnpackedTarball/liborcus/src/liborcus/gnumeric_detection_handler \ + UnpackedTarball/liborcus/src/liborcus/gnumeric_handler \ + UnpackedTarball/liborcus/src/liborcus/gnumeric_helper \ + UnpackedTarball/liborcus/src/liborcus/gnumeric_namespace_types \ + UnpackedTarball/liborcus/src/liborcus/gnumeric_sheet_context \ + UnpackedTarball/liborcus/src/liborcus/gnumeric_tokens \ + UnpackedTarball/liborcus/src/liborcus/info \ + UnpackedTarball/liborcus/src/liborcus/interface \ + UnpackedTarball/liborcus/src/liborcus/json_document_tree \ + UnpackedTarball/liborcus/src/liborcus/json_map_tree \ + UnpackedTarball/liborcus/src/liborcus/json_structure_mapper \ + UnpackedTarball/liborcus/src/liborcus/json_structure_tree \ + UnpackedTarball/liborcus/src/liborcus/json_util \ + UnpackedTarball/liborcus/src/liborcus/measurement \ + UnpackedTarball/liborcus/src/liborcus/odf_helper \ + UnpackedTarball/liborcus/src/liborcus/odf_namespace_types \ + UnpackedTarball/liborcus/src/liborcus/odf_number_formatting_context \ + UnpackedTarball/liborcus/src/liborcus/odf_para_context \ + UnpackedTarball/liborcus/src/liborcus/odf_styles \ + UnpackedTarball/liborcus/src/liborcus/odf_styles_context \ + UnpackedTarball/liborcus/src/liborcus/odf_tokens \ + UnpackedTarball/liborcus/src/liborcus/ods_content_xml_context \ + UnpackedTarball/liborcus/src/liborcus/ods_content_xml_handler \ + UnpackedTarball/liborcus/src/liborcus/ods_session_data \ + UnpackedTarball/liborcus/src/liborcus/ooxml_content_types \ + UnpackedTarball/liborcus/src/liborcus/ooxml_global \ + UnpackedTarball/liborcus/src/liborcus/ooxml_namespace_types \ + UnpackedTarball/liborcus/src/liborcus/ooxml_schemas \ + UnpackedTarball/liborcus/src/liborcus/ooxml_tokens \ + UnpackedTarball/liborcus/src/liborcus/ooxml_types \ + UnpackedTarball/liborcus/src/liborcus/opc_context \ + UnpackedTarball/liborcus/src/liborcus/opc_reader \ + UnpackedTarball/liborcus/src/liborcus/orcus_csv \ + UnpackedTarball/liborcus/src/liborcus/orcus_gnumeric \ + UnpackedTarball/liborcus/src/liborcus/orcus_import_ods \ + UnpackedTarball/liborcus/src/liborcus/orcus_import_xlsx \ + UnpackedTarball/liborcus/src/liborcus/orcus_json \ + UnpackedTarball/liborcus/src/liborcus/orcus_ods \ + UnpackedTarball/liborcus/src/liborcus/orcus_xls_xml \ + UnpackedTarball/liborcus/src/liborcus/orcus_xlsx \ + UnpackedTarball/liborcus/src/liborcus/orcus_xml \ + UnpackedTarball/liborcus/src/liborcus/orcus_xml_map_def \ + UnpackedTarball/liborcus/src/liborcus/session_context \ + UnpackedTarball/liborcus/src/liborcus/spreadsheet_iface_util \ + UnpackedTarball/liborcus/src/liborcus/spreadsheet_impl_types \ + UnpackedTarball/liborcus/src/liborcus/spreadsheet_interface \ + UnpackedTarball/liborcus/src/liborcus/spreadsheet_types \ + UnpackedTarball/liborcus/src/liborcus/string_helper \ + UnpackedTarball/liborcus/src/liborcus/xls_xml_context \ + UnpackedTarball/liborcus/src/liborcus/xls_xml_detection_handler \ + UnpackedTarball/liborcus/src/liborcus/xls_xml_handler \ + UnpackedTarball/liborcus/src/liborcus/xls_xml_namespace_types \ + UnpackedTarball/liborcus/src/liborcus/xls_xml_tokens \ + UnpackedTarball/liborcus/src/liborcus/xlsx_autofilter_context \ + UnpackedTarball/liborcus/src/liborcus/xlsx_conditional_format_context \ + UnpackedTarball/liborcus/src/liborcus/xlsx_context \ + UnpackedTarball/liborcus/src/liborcus/xlsx_drawing_context \ + UnpackedTarball/liborcus/src/liborcus/xlsx_handler \ + UnpackedTarball/liborcus/src/liborcus/xlsx_helper \ + UnpackedTarball/liborcus/src/liborcus/xlsx_pivot_context \ + UnpackedTarball/liborcus/src/liborcus/xlsx_revision_context \ + UnpackedTarball/liborcus/src/liborcus/xlsx_session_data \ + UnpackedTarball/liborcus/src/liborcus/xlsx_sheet_context \ + UnpackedTarball/liborcus/src/liborcus/xlsx_table_context \ + UnpackedTarball/liborcus/src/liborcus/xlsx_types \ + UnpackedTarball/liborcus/src/liborcus/xlsx_workbook_context \ + UnpackedTarball/liborcus/src/liborcus/xml_context_base \ + UnpackedTarball/liborcus/src/liborcus/xml_context_global \ + UnpackedTarball/liborcus/src/liborcus/xml_map_tree \ + UnpackedTarball/liborcus/src/liborcus/xml_simple_stream_handler \ + UnpackedTarball/liborcus/src/liborcus/xml_stream_handler \ + UnpackedTarball/liborcus/src/liborcus/xml_stream_parser \ + UnpackedTarball/liborcus/src/liborcus/xml_structure_tree \ + UnpackedTarball/liborcus/src/liborcus/yaml_document_tree \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/liborcus/Makefile b/external/liborcus/Makefile new file mode 100644 index 000000000..e4968cf85 --- /dev/null +++ b/external/liborcus/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/liborcus/Module_liborcus.mk b/external/liborcus/Module_liborcus.mk new file mode 100644 index 000000000..e75b983ba --- /dev/null +++ b/external/liborcus/Module_liborcus.mk @@ -0,0 +1,32 @@ +# -*- 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,liborcus)) + +$(eval $(call gb_Module_add_targets,liborcus,\ + UnpackedTarball_liborcus \ +)) + +ifeq ($(COM),MSC) + +$(eval $(call gb_Module_add_targets,liborcus,\ + Library_orcus \ + Library_orcus-parser \ +)) + +else # !MSC + +$(eval $(call gb_Module_add_targets,liborcus,\ + ExternalPackage_liborcus \ + ExternalProject_liborcus \ +)) + +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/liborcus/README b/external/liborcus/README new file mode 100644 index 000000000..54e882663 --- /dev/null +++ b/external/liborcus/README @@ -0,0 +1,2 @@ +[https://gitlab.com/orcus/orcus] +"Collection of parsers and import filters for spreadsheet documents." diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk new file mode 100644 index 000000000..e5e33b0b1 --- /dev/null +++ b/external/liborcus/UnpackedTarball_liborcus.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,liborcus)) + +$(eval $(call gb_UnpackedTarball_set_tarball,liborcus,$(ORCUS_TARBALL))) + +$(eval $(call gb_UnpackedTarball_set_patchlevel,liborcus,1)) + +$(eval $(call gb_UnpackedTarball_update_autoconf_configs,liborcus)) + +$(eval $(call gb_UnpackedTarball_add_patches,liborcus,\ + external/liborcus/rpath.patch.0 \ + external/liborcus/gcc9.patch.0 \ + external/liborcus/libtool.patch.0 \ + external/liborcus/fix-pch.patch.0 \ +)) + +ifeq ($(OS),WNT) +$(eval $(call gb_UnpackedTarball_add_patches,liborcus,\ + external/liborcus/windows-constants-hack.patch \ +)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/external/liborcus/fix-pch.patch.0 b/external/liborcus/fix-pch.patch.0 new file mode 100644 index 000000000..42a9d52d9 --- /dev/null +++ b/external/liborcus/fix-pch.patch.0 @@ -0,0 +1,11 @@ +--- src/liborcus/gnumeric_cell_context.cpp.sav 2018-05-27 18:18:56.000000000 +0200 ++++ src/liborcus/gnumeric_cell_context.cpp 2019-10-13 10:43:24.587258400 +0200 +@@ -248,7 +248,7 @@ + range.last.column = col + mp_cell_data->array_cols - 1; + range.last.row = row + mp_cell_data->array_rows - 1; + +- iface::import_array_formula* af = mp_sheet->get_array_formula(); ++ spreadsheet::iface::import_array_formula* af = mp_sheet->get_array_formula(); + if (af) + { + af->set_range(range); diff --git a/external/liborcus/gcc9.patch.0 b/external/liborcus/gcc9.patch.0 new file mode 100644 index 000000000..f89b1dddc --- /dev/null +++ b/external/liborcus/gcc9.patch.0 @@ -0,0 +1,28 @@ +--- include/orcus/types.hpp ++++ include/orcus/types.hpp +@@ -7,6 +7,14 @@ + + #ifndef INCLUDED_ORCUS_TYPES_HPP + #define INCLUDED_ORCUS_TYPES_HPP ++ ++#ifdef __GNUC__ ++#pragma GCC diagnostic push ++#pragma GCC diagnostic ignored "-Wpragmas" // for old GCC ++#pragma GCC diagnostic ignored "-Wunknown-warning-option" // for Clang ++#pragma GCC diagnostic ignored "-Wdeprecated-copy" ++#pragma GCC diagnostic ignored "-Wshadow" ++#endif + + #include <cstdlib> + #include <vector> +@@ -145,6 +152,10 @@ + typedef ::std::vector<xml_token_attr_t> xml_attrs_t; + + } ++ ++#ifdef __GNUC__ ++#pragma GCC diagnostic pop ++#endif + + #endif + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/external/liborcus/inc/pch/precompiled_orcus-parser.cxx b/external/liborcus/inc/pch/precompiled_orcus-parser.cxx new file mode 100644 index 000000000..b93db182c --- /dev/null +++ b/external/liborcus/inc/pch/precompiled_orcus-parser.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_orcus-parser.hxx" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/external/liborcus/inc/pch/precompiled_orcus-parser.hxx b/external/liborcus/inc/pch/precompiled_orcus-parser.hxx new file mode 100644 index 000000000..9c16a9735 --- /dev/null +++ b/external/liborcus/inc/pch/precompiled_orcus-parser.hxx @@ -0,0 +1,88 @@ +/* -*- 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:38:02 using: + ./bin/update_pch external/liborcus orcus-parser --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/liborcus/inc/pch/precompiled_orcus-parser.hxx "make external/liborcus.build" --find-conflicts +*/ + +#if PCH_LEVEL >= 1 +#include <algorithm> +#include <cassert> +#include <cctype> +#include <cmath> +#include <codecvt> +#include <cstdio> +#include <cstdlib> +#include <cstring> +#include <deque> +#include <fstream> +#include <iostream> +#include <limits> +#include <locale> +#include <memory> +#include <sstream> +#include <tuple> +#include <unordered_map> +#include <unordered_set> +#include <vector> +#include <zconf.h> +#include <zlib.h> +#include <boost/archive/iterators/base64_from_binary.hpp> +#include <boost/archive/iterators/binary_from_base64.hpp> +#include <boost/archive/iterators/transform_width.hpp> +#include <boost/filesystem.hpp> +#include <boost/interprocess/file_mapping.hpp> +#include <boost/interprocess/mapped_region.hpp> +#include <boost/pool/object_pool.hpp> +#endif // PCH_LEVEL >= 1 +#if PCH_LEVEL >= 2 +#endif // PCH_LEVEL >= 2 +#if PCH_LEVEL >= 3 +#include <mdds/global.hpp> +#include <mdds/sorted_string_map.hpp> +#include <orcus/base64.hpp> +#include <orcus/cell_buffer.hpp> +#include <orcus/css_parser_base.hpp> +#include <orcus/css_types.hpp> +#include <orcus/csv_parser_base.hpp> +#include <orcus/detail/parser_token_buffer.hpp> +#include <orcus/exception.hpp> +#include <orcus/global.hpp> +#include <orcus/json_global.hpp> +#include <orcus/json_parser.hpp> +#include <orcus/json_parser_base.hpp> +#include <orcus/json_parser_thread.hpp> +#include <orcus/parser_base.hpp> +#include <orcus/parser_global.hpp> +#include <orcus/pstring.hpp> +#include <orcus/sax_parser_base.hpp> +#include <orcus/sax_token_parser.hpp> +#include <orcus/sax_token_parser_thread.hpp> +#include <orcus/stream.hpp> +#include <orcus/string_pool.hpp> +#include <orcus/tokens.hpp> +#include <orcus/types.hpp> +#include <orcus/xml_namespace.hpp> +#include <orcus/yaml_parser_base.hpp> +#include <orcus/zip_archive.hpp> +#include <orcus/zip_archive_stream.hpp> +#endif // PCH_LEVEL >= 3 +#if PCH_LEVEL >= 4 +#endif // PCH_LEVEL >= 4 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/external/liborcus/inc/pch/precompiled_orcus.cxx b/external/liborcus/inc/pch/precompiled_orcus.cxx new file mode 100644 index 000000000..03b0cdf02 --- /dev/null +++ b/external/liborcus/inc/pch/precompiled_orcus.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_orcus.hxx" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/external/liborcus/inc/pch/precompiled_orcus.hxx b/external/liborcus/inc/pch/precompiled_orcus.hxx new file mode 100644 index 000000000..28e1bc811 --- /dev/null +++ b/external/liborcus/inc/pch/precompiled_orcus.hxx @@ -0,0 +1,109 @@ +/* -*- 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 2020-02-01 12:22:35 using: + ./bin/update_pch external/liborcus orcus --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/liborcus/inc/pch/precompiled_orcus.hxx "make external/liborcus.build" --find-conflicts +*/ + +#if PCH_LEVEL >= 1 +#include <algorithm> +#include <cassert> +#include <codecvt> +#include <cstdio> +#include <cstdlib> +#include <cstring> +#include <deque> +#include <fstream> +#include <functional> +#include <iostream> +#include <iterator> +#include <limits> +#include <locale> +#include <map> +#include <memory> +#include <ostream> +#include <sstream> +#include <string> +#include <unordered_map> +#include <unordered_set> +#include <vector> +#include <boost/current_function.hpp> +#include <boost/filesystem.hpp> +#include <boost/iostreams/filter/gzip.hpp> +#include <boost/iostreams/filtering_stream.hpp> +#include <boost/optional.hpp> +#include <boost/pool/object_pool.hpp> +#endif // PCH_LEVEL >= 1 +#if PCH_LEVEL >= 2 +#endif // PCH_LEVEL >= 2 +#if PCH_LEVEL >= 3 +#include <mdds/global.hpp> +#include <mdds/sorted_string_map.hpp> +#include <orcus/config.hpp> +#include <orcus/css_document_tree.hpp> +#include <orcus/css_parser.hpp> +#include <orcus/css_selector.hpp> +#include <orcus/csv_parser.hpp> +#include <orcus/dom_tree.hpp> +#include <orcus/exception.hpp> +#include <orcus/format_detection.hpp> +#include <orcus/global.hpp> +#include <orcus/info.hpp> +#include <orcus/interface.hpp> +#include <orcus/json_document_tree.hpp> +#include <orcus/json_global.hpp> +#include <orcus/json_parser.hpp> +#include <orcus/json_structure_tree.hpp> +#include <orcus/measurement.hpp> +#include <orcus/orcus_csv.hpp> +#include <orcus/orcus_gnumeric.hpp> +#include <orcus/orcus_import_ods.hpp> +#include <orcus/orcus_import_xlsx.hpp> +#include <orcus/orcus_json.hpp> +#include <orcus/orcus_ods.hpp> +#include <orcus/orcus_xls_xml.hpp> +#include <orcus/orcus_xlsx.hpp> +#include <orcus/orcus_xml.hpp> +#include <orcus/parser_base.hpp> +#include <orcus/parser_global.hpp> +#include <orcus/pstring.hpp> +#include <orcus/sax_ns_parser.hpp> +#include <orcus/sax_parser.hpp> +#include <orcus/sax_parser_base.hpp> +#include <orcus/sax_token_parser.hpp> +#include <orcus/spreadsheet/export_interface.hpp> +#include <orcus/spreadsheet/import_interface.hpp> +#include <orcus/spreadsheet/import_interface_pivot.hpp> +#include <orcus/spreadsheet/import_interface_view.hpp> +#include <orcus/spreadsheet/styles.hpp> +#include <orcus/spreadsheet/types.hpp> +#include <orcus/stream.hpp> +#include <orcus/string_pool.hpp> +#include <orcus/threaded_sax_token_parser.hpp> +#include <orcus/tokens.hpp> +#include <orcus/xml_namespace.hpp> +#include <orcus/xml_structure_tree.hpp> +#include <orcus/yaml_document_tree.hpp> +#include <orcus/yaml_parser.hpp> +#include <orcus/zip_archive.hpp> +#include <orcus/zip_archive_stream.hpp> +#endif // PCH_LEVEL >= 3 +#if PCH_LEVEL >= 4 +#endif // PCH_LEVEL >= 4 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/external/liborcus/libtool.patch.0 b/external/liborcus/libtool.patch.0 new file mode 100644 index 000000000..93b677303 --- /dev/null +++ b/external/liborcus/libtool.patch.0 @@ -0,0 +1,11 @@ +--- ltmain.sh.sav 2018-09-14 23:47:13.000000000 +0200 ++++ ltmain.sh 2019-05-05 23:11:30.406904472 +0200 +@@ -7278,7 +7278,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=*| \ +- -specs=*|-fsanitize=*) ++ -specs=*|-fsanitize=*|-fuse-ld=*) + func_quote_for_eval "$arg" + arg=$func_quote_for_eval_result + func_append compile_command " $arg" diff --git a/external/liborcus/rpath.patch.0 b/external/liborcus/rpath.patch.0 new file mode 100644 index 000000000..e7a33e693 --- /dev/null +++ b/external/liborcus/rpath.patch.0 @@ -0,0 +1,10 @@ +--- configure ++++ configure +@@ -14007,6 +14007,7 @@ + esac + ;; + esac ++hardcode_libdir_flag_spec_CXX= + ;; + + lynxos*) diff --git a/external/liborcus/windows-constants-hack.patch b/external/liborcus/windows-constants-hack.patch new file mode 100644 index 000000000..876bc1688 --- /dev/null +++ b/external/liborcus/windows-constants-hack.patch @@ -0,0 +1,15 @@ +diff --git a/src/liborcus/info.cpp b/src/liborcus/info.cpp +index ae571f5..539ce18 100644 +--- a/src/liborcus/info.cpp ++++ b/src/liborcus/info.cpp +@@ -7,7 +7,9 @@ + + #include "orcus/info.hpp" + +-#include "constants.inl" ++#define ORCUS_MAJOR_VERSION 0 ++#define ORCUS_MINOR_VERSION 11 ++#define ORCUS_MICRO_VERSION 0 + + namespace orcus { + |