]> git.pld-linux.org Git - packages/libreoffice.git/blame - liborcus-0.11.patch
- python 3.6
[packages/libreoffice.git] / liborcus-0.11.patch
CommitLineData
ff5c6517
JR
1From b325b4c286b56a63316063a3ac4648bf7b7efcbe Mon Sep 17 00:00:00 2001
2From: Kohei Yoshida <kohei.yoshida@gmail.com>
3Date: Sat, 5 Mar 2016 20:09:34 -0500
f9d565f0 4Subject: [PATCH] Update liborcus to 0.11.0.
ff5c6517
JR
5
6Markus did half of this, and I simply carried the torch.
7
8Change-Id: Icd3ee1e4b5bd562faee06dfd9dce52a4bed49a71
9Reviewed-on: https://gerrit.libreoffice.org/22943
10Tested-by: Jenkins <ci@libreoffice.org>
11Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
f9d565f0
JR
12---
13 RepositoryExternal.mk | 19 +-
14 configure.ac | 2 +-
15 download.lst | 4 +-
16 external/boost/Module_boost.mk | 1 +
17 external/boost/StaticLibrary_boost_filesystem.mk | 36 +
18 ...0001-Fix-for-OSX-build-inside-LibreOffice.patch | 1175 ++++++++++++++++++++
19 .../liborcus/0001-Get-it-to-build-on-Windows.patch | 212 ++++
20 external/liborcus/ExternalPackage_liborcus.mk | 8 +-
21 external/liborcus/ExternalProject_liborcus.mk | 22 +-
22 external/liborcus/Library_orcus-parser.mk | 3 +
23 external/liborcus/Library_orcus.mk | 18 +-
24 external/liborcus/UnpackedTarball_liborcus.mk | 11 +-
25 external/liborcus/fix-crash-ooo55043-1.patch.0 | 17 -
26 external/liborcus/unusedheader.patch.0 | 11 -
27 external/liborcus/windows-constants-hack.patch | 15 +
28 sc/Library_scfilt.mk | 1 +
29 sc/source/filter/inc/orcusinterface.hxx | 2 +
30 sc/source/filter/orcus/filterdetect.cxx | 2 +-
31 sc/source/filter/orcus/interface.cxx | 63 +-
32 19 files changed, 1544 insertions(+), 78 deletions(-)
33 create mode 100644 external/boost/StaticLibrary_boost_filesystem.mk
34 create mode 100644 external/liborcus/0001-Fix-for-OSX-build-inside-LibreOffice.patch
35 create mode 100755 external/liborcus/0001-Get-it-to-build-on-Windows.patch
36 delete mode 100644 external/liborcus/fix-crash-ooo55043-1.patch.0
37 delete mode 100644 external/liborcus/unusedheader.patch.0
38 create mode 100755 external/liborcus/windows-constants-hack.patch
ff5c6517 39
f9d565f0
JR
40diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
41index 5b497ee..c6fe371 100644
42--- a/RepositoryExternal.mk
43+++ b/RepositoryExternal.mk
44@@ -743,6 +743,21 @@ $(call gb_LinkTarget_set_include,$(1),\
ff5c6517
JR
45
46 endef
47
48+define gb_LinkTarget__use_boost_filesystem
49+$(call gb_LinkTarget_add_defs,$(1),\
50+ -DBOOST_ALL_NO_LIB \
51+)
52+
53+$(call gb_LinkTarget_use_static_libraries,$(1),\
54+ boost_filesystem \
55+)
56+
57+endef
58+
59+define gb_ExternalProject__use_boost_filesystem
60+$(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
61+endef
62+
63 define gb_ExternalProject__use_boost_headers
64 $(call gb_ExternalProject_use_unpacked,$(1),boost)
65
f9d565f0 66@@ -3129,7 +3144,7 @@ $(call gb_LinkTarget_set_include,$(1),\
ff5c6517
JR
67 )
68
69 $(call gb_LinkTarget_add_libs,$(1),\
70- -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.10 \
71+ -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.11 \
72 )
73
74 $(if $(SYSTEM_BOOST), \
f9d565f0 75@@ -3148,7 +3163,7 @@ $(call gb_LinkTarget_set_include,$(1),\
ff5c6517
JR
76 )
77
78 $(call gb_LinkTarget_add_libs,$(1),\
79- -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.10 \
80+ -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.11 \
81 )
82
83 endef
f9d565f0
JR
84diff --git a/configure.ac b/configure.ac
85index 934d43a..dab1919 100644
86--- a/configure.ac
87+++ b/configure.ac
88@@ -9196,7 +9196,7 @@ if test -z "$enable_orcus" -o "$enable_orcus" != no; then
ff5c6517
JR
89 ENABLE_ORCUS="TRUE"
90 AC_DEFINE(ENABLE_ORCUS)
91
92- libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.10 >= 0.9.0])
93+ libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.11 >= 0.11.0])
94 if test "$with_system_orcus" != "yes"; then
95 if test "$SYSTEM_BOOST" = "TRUE"; then
96 # ===========================================================
f9d565f0
JR
97diff --git a/download.lst b/download.lst
98index 906a579..475112b 100644
99--- a/download.lst
100+++ b/download.lst
101@@ -112,8 +112,8 @@
ff5c6517 102 export OPENLDAP_TARBALL := 804c6cb5698db30b75ad0ff1c25baefd-openldap-2.4.31.tgz
f9d565f0
JR
103 export OPENSSL_MD5SUM := 9392e65072ce4b614c1392eefc1f23d0
104 export OPENSSL_TARBALL := openssl-1.0.2h.tar.gz
ff5c6517
JR
105-export ORCUS_MD5SUM := e6efcbe50a5fd4d50d513c9a7a4139b0
106-export ORCUS_TARBALL := liborcus-0.9.2.tar.gz
107+export ORCUS_MD5SUM := ca1e5d486b29cd519bb1d9845a6a768e
108+export ORCUS_TARBALL := liborcus-0.11.0.tar.gz
109 export OWNCLOUD_ANDROID_LIB_MD5SUM := 593f0aa47bf2efc0efda2d28fae063b2
110 export OWNCLOUD_ANDROID_LIB_TARBALL := owncloud-android-library-0.9.4-no-binary-deps.tar.gz
111 export PAGEMAKER_MD5SUM := 795cc7a59ace4db2b12586971d668671
f9d565f0
JR
112diff --git a/external/boost/Module_boost.mk b/external/boost/Module_boost.mk
113index 5bac25e..ae407f5 100644
114--- a/external/boost/Module_boost.mk
115+++ b/external/boost/Module_boost.mk
ff5c6517
JR
116@@ -11,6 +11,7 @@ $(eval $(call gb_Module_Module,boost))
117
118 $(eval $(call gb_Module_add_targets,boost,\
119 StaticLibrary_boostdatetime \
120+ StaticLibrary_boost_filesystem \
121 StaticLibrary_boost_system \
122 StaticLibrary_boost_iostreams \
123 UnpackedTarball_boost \
f9d565f0
JR
124diff --git a/external/boost/StaticLibrary_boost_filesystem.mk b/external/boost/StaticLibrary_boost_filesystem.mk
125new file mode 100644
126index 0000000..024308a
ff5c6517 127--- /dev/null
f9d565f0 128+++ b/external/boost/StaticLibrary_boost_filesystem.mk
ff5c6517
JR
129@@ -0,0 +1,36 @@
130+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
131+#
132+# This file is part of the LibreOffice project.
133+#
134+# This Source Code Form is subject to the terms of the Mozilla Public
135+# License, v. 2.0. If a copy of the MPL was not distributed with this
136+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
137+#
138+
139+$(eval $(call gb_StaticLibrary_StaticLibrary,boost_filesystem))
140+
141+$(eval $(call gb_StaticLibrary_use_unpacked,boost_filesystem,boost))
142+
143+$(eval $(call gb_StaticLibrary_set_warnings_not_errors,boost_filesystem))
144+
145+# disable "auto link" "feature" on MSVC
146+$(eval $(call gb_StaticLibrary_add_defs,boost_filesystem,\
147+ -DBOOST_ALL_NO_LIB \
148+))
149+
150+$(eval $(call gb_StaticLibrary_use_external,boost_filesystem,boost_headers))
151+
152+$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,boost_filesystem,cpp))
153+
154+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,boost_filesystem,\
155+ UnpackedTarball/boost/libs/filesystem/src/codecvt_error_category \
156+ UnpackedTarball/boost/libs/filesystem/src/operations \
157+ UnpackedTarball/boost/libs/filesystem/src/path \
158+ UnpackedTarball/boost/libs/filesystem/src/path_traits \
159+ UnpackedTarball/boost/libs/filesystem/src/portability \
160+ UnpackedTarball/boost/libs/filesystem/src/unique_path \
161+ UnpackedTarball/boost/libs/filesystem/src/utf8_codecvt_facet \
162+ UnpackedTarball/boost/libs/filesystem/src/windows_file_codecvt \
163+))
164+
165+# vim: set noet sw=4 ts=4:
f9d565f0
JR
166diff --git a/external/liborcus/ExternalPackage_liborcus.mk b/external/liborcus/ExternalPackage_liborcus.mk
167index 4411592..56debe9 100644
168--- a/external/liborcus/ExternalPackage_liborcus.mk
169+++ b/external/liborcus/ExternalPackage_liborcus.mk
170@@ -12,11 +12,11 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,liborcus,liborcus))
ff5c6517
JR
171 $(eval $(call gb_ExternalPackage_use_external_project,liborcus,liborcus))
172
173 ifeq ($(OS),MACOSX)
174-$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.10.0.dylib,src/liborcus/.libs/liborcus-0.10.0.dylib))
175-$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.10.0.dylib,src/parser/.libs/liborcus-parser-0.10.0.dylib))
176+$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.11.0.dylib,src/liborcus/.libs/liborcus-0.11.0.dylib))
177+$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.11.0.dylib,src/parser/.libs/liborcus-parser-0.11.0.dylib))
178 else ifeq ($(DISABLE_DYNLOADING),)
179-$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.10.so.0,src/liborcus/.libs/liborcus-0.10.so.0.0.0))
180-$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.10.so.0,src/parser/.libs/liborcus-parser-0.10.so.0.0.0))
181+$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.11.so.0,src/liborcus/.libs/liborcus-0.11.so.0.0.0))
182+$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.11.so.0,src/parser/.libs/liborcus-parser-0.11.so.0.0.0))
183 endif
184
185 # vim: set noet sw=4 ts=4:
f9d565f0
JR
186diff --git a/external/liborcus/ExternalProject_liborcus.mk b/external/liborcus/ExternalProject_liborcus.mk
187index 7eb8fdb..580ef847 100644
188--- a/external/liborcus/ExternalProject_liborcus.mk
189+++ b/external/liborcus/ExternalProject_liborcus.mk
190@@ -13,6 +13,7 @@ $(eval $(call gb_ExternalProject_use_autoconf,liborcus,build))
ff5c6517
JR
191
192 $(eval $(call gb_ExternalProject_use_externals,liborcus, \
193 boost_headers \
194+ boost_filesystem \
195 boost_iostreams \
196 boost_system \
197 mdds_headers \
198@@ -38,9 +39,9 @@ ifneq ($(SYSTEM_ZLIB),)
199 liborcus_LIBS+=-lz
200 endif
201 ifneq ($(SYSTEM_BOOST),)
202-liborcus_LIBS+=$(BOOST_SYSTEM_LIB) $(BOOST_IOSTREAMS_LIB)
203+liborcus_LIBS+=$(BOOST_SYSTEM_LIB) $(BOOST_IOSTREAMS_LIB) $(BOOST_FILESYSTEM_LIB)
204 else
205-liborcus_LIBS+=-L$(gb_StaticLibrary_WORKDIR) -lboost_system -lboost_iostreams
206+liborcus_LIBS+=-L$(gb_StaticLibrary_WORKDIR) -lboost_system -lboost_iostreams -lboost_filesystem
207 endif
208 ifeq ($(OS),ANDROID)
209 liborcus_LIBS+=-lgnustl_shared -lm
f9d565f0 210@@ -96,12 +97,13 @@ $(call gb_ExternalProject_get_state_target,liborcus,build) :
ff5c6517
JR
211 , \
212 --enable-shared --disable-static \
213 ) \
214- $(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \
215- --disable-spreadsheet-model \
216- --without-tools \
217- --disable-werror \
218- $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
219- $(if $(SYSTEM_BOOST),,\
220+ $(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \
221+ --disable-spreadsheet-model \
222+ --without-tools \
223+ --disable-python \
224+ --disable-werror \
225+ $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
226+ $(if $(SYSTEM_BOOST),,\
227 --with-boost=$(WORKDIR)/UnpackedTarball/boost \
228 boost_cv_lib_iostreams=yes \
229 boost_cv_lib_system=yes \
f9d565f0 230@@ -111,8 +113,8 @@ $(call gb_ExternalProject_get_state_target,liborcus,build) :
ff5c6517
JR
231 $(MAKE) \
232 $(if $(filter MACOSX,$(OS)),\
233 && $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \
234- $(gb_Package_SOURCEDIR_liborcus)/src/liborcus/.libs/liborcus-0.10.0.dylib \
235- $(gb_Package_SOURCEDIR_liborcus)/src/parser/.libs/liborcus-parser-0.10.0.dylib \
236+ $(gb_Package_SOURCEDIR_liborcus)/src/liborcus/.libs/liborcus-0.11.0.dylib \
237+ $(gb_Package_SOURCEDIR_liborcus)/src/parser/.libs/liborcus-parser-0.11.0.dylib \
238 ) \
239 )
240
f9d565f0
JR
241diff --git a/external/liborcus/Library_orcus-parser.mk b/external/liborcus/Library_orcus-parser.mk
242index c3b4eec..28af14e 100644
243--- a/external/liborcus/Library_orcus-parser.mk
244+++ b/external/liborcus/Library_orcus-parser.mk
245@@ -39,6 +39,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus-parser,\
ff5c6517
JR
246 UnpackedTarball/liborcus/src/parser/css_types \
247 UnpackedTarball/liborcus/src/parser/csv_parser_base \
248 UnpackedTarball/liborcus/src/parser/exception \
249+ UnpackedTarball/liborcus/src/parser/json_parser_base \
250+ UnpackedTarball/liborcus/src/parser/parser_base \
251 UnpackedTarball/liborcus/src/parser/parser_global \
252 UnpackedTarball/liborcus/src/parser/pstring \
253 UnpackedTarball/liborcus/src/parser/sax_parser_base \
f9d565f0 254@@ -48,6 +50,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus-parser,\
ff5c6517
JR
255 UnpackedTarball/liborcus/src/parser/tokens \
256 UnpackedTarball/liborcus/src/parser/types \
257 UnpackedTarball/liborcus/src/parser/xml_namespace \
258+ UnpackedTarball/liborcus/src/parser/yaml_parser_base \
259 UnpackedTarball/liborcus/src/parser/zip_archive \
260 UnpackedTarball/liborcus/src/parser/zip_archive_stream \
261 ))
f9d565f0
JR
262diff --git a/external/liborcus/Library_orcus.mk b/external/liborcus/Library_orcus.mk
263index ae98d5e..96169f1 100644
264--- a/external/liborcus/Library_orcus.mk
265+++ b/external/liborcus/Library_orcus.mk
266@@ -13,6 +13,7 @@ $(eval $(call gb_Library_use_unpacked,orcus,liborcus))
ff5c6517
JR
267
268 $(eval $(call gb_Library_use_externals,orcus,\
269 boost_headers \
270+ boost_filesystem \
271 boost_iostreams \
272 boost_system \
273 mdds_headers \
f9d565f0 274@@ -53,12 +54,16 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\
ff5c6517
JR
275 UnpackedTarball/liborcus/src/liborcus/gnumeric_namespace_types \
276 UnpackedTarball/liborcus/src/liborcus/gnumeric_sheet_context \
277 UnpackedTarball/liborcus/src/liborcus/gnumeric_tokens \
278+ UnpackedTarball/liborcus/src/liborcus/info \
279 UnpackedTarball/liborcus/src/liborcus/interface \
280+ UnpackedTarball/liborcus/src/liborcus/json_document_tree \
281+ UnpackedTarball/liborcus/src/liborcus/json_util \
282 UnpackedTarball/liborcus/src/liborcus/measurement \
283+ UnpackedTarball/liborcus/src/liborcus/odf_helper \
284 UnpackedTarball/liborcus/src/liborcus/odf_namespace_types \
285 UnpackedTarball/liborcus/src/liborcus/odf_para_context \
286- UnpackedTarball/liborcus/src/liborcus/odf_styles \
287 UnpackedTarball/liborcus/src/liborcus/odf_styles_context \
288+ UnpackedTarball/liborcus/src/liborcus/odf_styles \
289 UnpackedTarball/liborcus/src/liborcus/odf_tokens \
290 UnpackedTarball/liborcus/src/liborcus/ods_content_xml_context \
291 UnpackedTarball/liborcus/src/liborcus/ods_content_xml_handler \
f9d565f0 292@@ -73,18 +78,26 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\
ff5c6517
JR
293 UnpackedTarball/liborcus/src/liborcus/opc_reader \
294 UnpackedTarball/liborcus/src/liborcus/orcus_csv \
295 UnpackedTarball/liborcus/src/liborcus/orcus_gnumeric \
296+ UnpackedTarball/liborcus/src/liborcus/orcus_import_ods \
297+ UnpackedTarball/liborcus/src/liborcus/orcus_import_xlsx \
298 UnpackedTarball/liborcus/src/liborcus/orcus_ods \
299 UnpackedTarball/liborcus/src/liborcus/orcus_xlsx \
300+ UnpackedTarball/liborcus/src/liborcus/orcus_xls_xml \
301 UnpackedTarball/liborcus/src/liborcus/orcus_xml \
302 UnpackedTarball/liborcus/src/liborcus/session_context \
303 UnpackedTarball/liborcus/src/liborcus/spreadsheet_interface \
304 UnpackedTarball/liborcus/src/liborcus/spreadsheet_types \
305- UnpackedTarball/liborcus/src/liborcus/xls_xml_namespace_types \
306+ UnpackedTarball/liborcus/src/liborcus/string_helper \
307 UnpackedTarball/liborcus/src/liborcus/xlsx_autofilter_context \
308 UnpackedTarball/liborcus/src/liborcus/xlsx_conditional_format_context \
309 UnpackedTarball/liborcus/src/liborcus/xlsx_context \
310 UnpackedTarball/liborcus/src/liborcus/xlsx_handler \
311 UnpackedTarball/liborcus/src/liborcus/xlsx_helper \
312+ UnpackedTarball/liborcus/src/liborcus/xls_xml_context \
313+ UnpackedTarball/liborcus/src/liborcus/xls_xml_detection_handler \
314+ UnpackedTarball/liborcus/src/liborcus/xls_xml_handler \
315+ UnpackedTarball/liborcus/src/liborcus/xls_xml_namespace_types \
316+ UnpackedTarball/liborcus/src/liborcus/xls_xml_tokens \
317 UnpackedTarball/liborcus/src/liborcus/xlsx_pivot_context \
318 UnpackedTarball/liborcus/src/liborcus/xlsx_revision_context \
319 UnpackedTarball/liborcus/src/liborcus/xlsx_session_data \
f9d565f0 320@@ -99,6 +112,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\
ff5c6517
JR
321 UnpackedTarball/liborcus/src/liborcus/xml_stream_handler \
322 UnpackedTarball/liborcus/src/liborcus/xml_stream_parser \
323 UnpackedTarball/liborcus/src/liborcus/xml_structure_tree \
324+ UnpackedTarball/liborcus/src/liborcus/yaml_document_tree \
325 ))
326
327 # vim: set noet sw=4 ts=4:
f9d565f0
JR
328diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk
329index 825fa49..0e337ef 100644
330--- a/external/liborcus/UnpackedTarball_liborcus.mk
331+++ b/external/liborcus/UnpackedTarball_liborcus.mk
332@@ -16,8 +16,13 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,liborcus,1))
ff5c6517
JR
333 $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
334 external/liborcus/0001-workaround-a-linking-problem-on-windows.patch \
335 external/liborcus/rpath.patch.0 \
336- external/liborcus/fix-crash-ooo55043-1.patch.0 \
337- external/liborcus/unusedheader.patch.0 \
ff5c6517
JR
338 ))
339
340+ifeq ($(OS),WNT)
341+$(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
342+ external/liborcus/windows-constants-hack.patch \
343+))
344+endif
345+
346+
347 # vim: set noet sw=4 ts=4:
f9d565f0
JR
348diff --git a/external/liborcus/fix-crash-ooo55043-1.patch.0 b/external/liborcus/fix-crash-ooo55043-1.patch.0
349deleted file mode 100644
350index 58a97c0..0000000
351--- a/external/liborcus/fix-crash-ooo55043-1.patch.0
ff5c6517
JR
352+++ /dev/null
353@@ -1,17 +0,0 @@
354---- src/parser/zip_archive_stream.cpp
355-+++ src/parser/zip_archive_stream.cpp
356-@@ -91,8 +91,13 @@
357-
358- void zip_archive_stream_blob::read(unsigned char* buffer, size_t length) const
359- {
360-+ if (!length)
361-+ return;
362- // First, make sure we have enough blob to satisfy the requested stream length.
363-- size_t length_available = m_size - tell();
364-+ const size_t pos = tell();
365-+ if (pos > m_size)
366-+ throw zip_error("Stream is seeked past end. No data available");
367-+ const size_t length_available = m_size - pos;
368- if (length_available < length)
369- throw zip_error("There is not enough stream left to fill requested length.");
370-
f9d565f0
JR
371diff --git a/external/liborcus/unusedheader.patch.0 b/external/liborcus/unusedheader.patch.0
372deleted file mode 100644
373index 4f7a77b..0000000
374--- a/external/liborcus/unusedheader.patch.0
ff5c6517
JR
375+++ /dev/null
376@@ -1,11 +0,0 @@
377---- ./src/parser/pstring.cpp.orig 2015-12-02 14:38:44.658744408 +0000
378-+++ ./src/parser/pstring.cpp 2015-12-02 14:38:50.449658497 +0000
379-@@ -13,8 +13,6 @@
380- #include <iostream>
381- #include <vector>
382-
383--#include <boost/thread/mutex.hpp>
384--
385- using namespace std;
386-
387- namespace orcus {
f9d565f0
JR
388diff --git a/external/liborcus/windows-constants-hack.patch b/external/liborcus/windows-constants-hack.patch
389new file mode 100755
390index 0000000..876bc16
ff5c6517 391--- /dev/null
f9d565f0 392+++ b/external/liborcus/windows-constants-hack.patch
ff5c6517
JR
393@@ -0,0 +1,15 @@
394+diff --git a/src/liborcus/info.cpp b/src/liborcus/info.cpp
395+index ae571f5..539ce18 100644
396+--- a/src/liborcus/info.cpp
397++++ b/src/liborcus/info.cpp
398+@@ -7,7 +7,9 @@
399+
400+ #include "orcus/info.hpp"
401+
402+-#include "constants.inl"
403++#define ORCUS_MAJOR_VERSION 0
404++#define ORCUS_MINOR_VERSION 11
405++#define ORCUS_MICRO_VERSION 0
406+
407+ namespace orcus {
408+
f9d565f0
JR
409diff --git a/sc/Library_scfilt.mk b/sc/Library_scfilt.mk
410index 74f2ce5..b764290 100644
411--- a/sc/Library_scfilt.mk
412+++ b/sc/Library_scfilt.mk
ff5c6517
JR
413@@ -227,6 +227,7 @@ ifeq ($(ENABLE_ORCUS),TRUE)
414 $(eval $(call gb_Library_use_externals,scfilt,\
415 orcus \
416 orcus-parser \
417+ boost_filesystem \
418 boost_system \
419 boost_iostreams \
420 zlib \
f9d565f0
JR
421diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx
422index 63b36ef..05fe4cb 100644
423--- a/sc/source/filter/inc/orcusinterface.hxx
424+++ b/sc/source/filter/inc/orcusinterface.hxx
425@@ -375,6 +375,7 @@ public:
ff5c6517
JR
426
427 virtual void set_border_count(size_t n) override;
428 virtual void set_border_style(orcus::spreadsheet::border_direction_t dir, const char* s, size_t n) override;
429+ virtual void set_border_style(orcus::spreadsheet::border_direction_t dir, orcus::spreadsheet::border_style_t style) override;
430 virtual void set_border_color(orcus::spreadsheet::border_direction_t dir,
431 orcus::spreadsheet::color_elem_t alpha,
432 orcus::spreadsheet::color_elem_t red,
f9d565f0 433@@ -425,6 +426,7 @@ public:
ff5c6517
JR
434 virtual void set_cell_style_name(const char* s, size_t n) override;
435 virtual void set_cell_style_xf(size_t index) override;
436 virtual void set_cell_style_builtin(size_t index) override;
437+ virtual void set_cell_style_parent_name(const char* s, size_t n) override;
438 virtual size_t commit_cell_style() override;
439 };
440
f9d565f0
JR
441diff --git a/sc/source/filter/orcus/filterdetect.cxx b/sc/source/filter/orcus/filterdetect.cxx
442index 7dfccb9..9ae30ad 100644
443--- a/sc/source/filter/orcus/filterdetect.cxx
444+++ b/sc/source/filter/orcus/filterdetect.cxx
445@@ -93,7 +93,7 @@ OUString OrcusFormatDetect::detect(css::uno::Sequence<css::beans::PropertyValue>
ff5c6517
JR
446 }
447
448 orcus::format_t eFormat = orcus::detect(reinterpret_cast<const unsigned char*>(aContent.getStr()), aContent.getLength());
449- if (eFormat == orcus::format_gnumeric)
450+ if (eFormat == orcus::format_t::gnumeric)
451 return OUString("Gnumeric XML");
452
453 return OUString();
f9d565f0
JR
454diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
455index e50b8bf..496faea 100644
456--- a/sc/source/filter/orcus/interface.cxx
457+++ b/sc/source/filter/orcus/interface.cxx
458@@ -55,7 +55,7 @@ void ScOrcusGlobalSettings::set_default_formula_grammar(orcus::spreadsheet::form
ff5c6517
JR
459
460 orcus::spreadsheet::formula_grammar_t ScOrcusGlobalSettings::get_default_formula_grammar() const
461 {
462- return orcus::spreadsheet::formula_grammar_unknown;
463+ return orcus::spreadsheet::formula_grammar_t::unknown;
464 }
465
466 ScOrcusFactory::StringCellCache::StringCellCache(const ScAddress& rPos, size_t nIndex) :
f9d565f0 467@@ -231,19 +231,19 @@ double translateToInternal(double nVal, orcus::length_unit_t unit)
ff5c6517
JR
468 {
469 switch(unit)
470 {
471- case orcus::length_unit_inch:
472+ case orcus::length_unit_t::inch:
473 return nVal * 72.0 * 20.0;
474 break;
475- case orcus::length_unit_twip:
476+ case orcus::length_unit_t::twip:
477 return nVal;
478 break;
479- case orcus::length_unit_point:
480+ case orcus::length_unit_t::point:
481 return nVal * 20.0;
482 break;
483- case orcus::length_unit_centimeter:
484+ case orcus::length_unit_t::centimeter:
485 return nVal * 20.0 * 72.0 / 2.54;
486 break;
487- case orcus::length_unit_unknown:
488+ case orcus::length_unit_t::unknown:
489 SAL_WARN("sc.orcus", "unknown unit");
490 break;
491 default:
f9d565f0 492@@ -393,18 +393,18 @@ void ScOrcusConditionalFormat::set_type(os::conditional_format_t type)
ff5c6517
JR
493 {
494 switch (type)
495 {
496- case os::conditional_format_condition:
497- case os::conditional_format_formula:
498+ case os::conditional_format_t::condition:
499+ case os::conditional_format_t::formula:
500 meEntryType = condformat::CONDITION;
501 // mpCurrentEntry.reset(new ScCondFormatEntry());
502 break;
503- case os::conditional_format_date:
504+ case os::conditional_format_t::date:
505 break;
506- case os::conditional_format_colorscale:
507+ case os::conditional_format_t::colorscale:
508 break;
509- case os::conditional_format_databar:
510+ case os::conditional_format_t::databar:
511 break;
512- case os::conditional_format_iconset:
513+ case os::conditional_format_t::iconset:
514 break;
515 default:
516 SAL_INFO("sc.orcus.condformat", "unknown conditional_format_t value");
f9d565f0 517@@ -549,17 +549,17 @@ formula::FormulaGrammar::Grammar getCalcGrammarFromOrcus( os::formula_grammar_t
ff5c6517
JR
518 formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_ODFF;
519 switch(grammar)
520 {
521- case orcus::spreadsheet::formula_grammar_ods:
522+ case orcus::spreadsheet::formula_grammar_t::ods:
523 eGrammar = formula::FormulaGrammar::GRAM_ODFF;
524 break;
525- case orcus::spreadsheet::formula_grammar_xlsx_2007:
526- case orcus::spreadsheet::formula_grammar_xlsx_2010:
527+ case orcus::spreadsheet::formula_grammar_t::xlsx_2007:
528+ case orcus::spreadsheet::formula_grammar_t::xlsx_2010:
529 eGrammar = formula::FormulaGrammar::GRAM_OOXML;
530 break;
531- case orcus::spreadsheet::formula_grammar_gnumeric:
532+ case orcus::spreadsheet::formula_grammar_t::gnumeric:
533 eGrammar = formula::FormulaGrammar::GRAM_ENGLISH_XL_A1;
534 break;
535- case orcus::spreadsheet::formula_grammar_unknown:
536+ case orcus::spreadsheet::formula_grammar_t::unknown:
537 break;
538 }
539
f9d565f0 540@@ -799,16 +799,16 @@ SvxBoxItemLine getDirection(os::border_direction_t dir)
ff5c6517
JR
541 {
542 switch (dir)
543 {
544- case os::border_right:
545+ case os::border_direction_t::right:
546 return SvxBoxItemLine::RIGHT;
547 break;
548- case os::border_left:
549+ case os::border_direction_t::left:
550 return SvxBoxItemLine::RIGHT;
551 break;
552- case os::border_top:
553+ case os::border_direction_t::top:
554 return SvxBoxItemLine::RIGHT;
555 break;
556- case os::border_bottom:
557+ case os::border_direction_t::bottom:
558 return SvxBoxItemLine::RIGHT;
559 break;
560 default:
f9d565f0 561@@ -947,15 +947,15 @@ void ScOrcusStyles::set_font_underline(orcus::spreadsheet::underline_t e)
ff5c6517
JR
562 {
563 switch(e)
564 {
565- case orcus::spreadsheet::underline_single:
566- case orcus::spreadsheet::underline_single_accounting:
567+ case orcus::spreadsheet::underline_t::single_line:
568+ case orcus::spreadsheet::underline_t::single_accounting:
569 maCurrentFont.meUnderline = UNDERLINE_SINGLE;
570 break;
571- case orcus::spreadsheet::underline_double:
572- case orcus::spreadsheet::underline_double_accounting:
573+ case orcus::spreadsheet::underline_t::double_line:
574+ case orcus::spreadsheet::underline_t::double_accounting:
575 maCurrentFont.meUnderline = UNDERLINE_DOUBLE;
576 break;
577- case orcus::spreadsheet::underline_none:
578+ case orcus::spreadsheet::underline_t::none:
579 maCurrentFont.meUnderline = UNDERLINE_NONE;
580 break;
581 }
f9d565f0 582@@ -1019,6 +1019,12 @@ void ScOrcusStyles::set_border_style(orcus::spreadsheet::border_direction_t /*di
ff5c6517
JR
583 // implement later
584 }
585
586+void ScOrcusStyles::set_border_style(
587+ orcus::spreadsheet::border_direction_t /*dir*/, orcus::spreadsheet::border_style_t /*style*/)
588+{
589+ // implement later
590+}
591+
592 void ScOrcusStyles::set_border_color(orcus::spreadsheet::border_direction_t dir,
593 orcus::spreadsheet::color_elem_t alpha,
594 orcus::spreadsheet::color_elem_t red,
f9d565f0 595@@ -1186,6 +1192,11 @@ void ScOrcusStyles::set_cell_style_builtin(size_t index)
ff5c6517
JR
596 maCurrentCellStyle.mnBuiltInId = index;
597 }
598
599+void ScOrcusStyles::set_cell_style_parent_name(const char* /*s*/, size_t /*n*/)
600+{
601+ // place holder
602+}
603+
604 size_t ScOrcusStyles::commit_cell_style()
605 {
606 SAL_INFO("sc.orcus.style", "commit cell style: " << maCurrentCellStyle.maName);
f9d565f0
JR
607--
6082.5.0
609
610From d72a33c6aed0ca8f9fe0b90bc6d72e7313985524 Mon Sep 17 00:00:00 2001
611From: David Tardon <dtardon@redhat.com>
612Date: Tue, 8 Mar 2016 05:57:40 +0100
613Subject: [PATCH 1/4] reorder
614
615Change-Id: I8ff9f61475fddb475fe08e867c5446c825abb7dc
616---
617 RepositoryExternal.mk | 31 ++++++++++++++++---------------
618 1 file changed, 16 insertions(+), 15 deletions(-)
619
620diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
621index c6fe371..c8aab64 100644
622--- a/RepositoryExternal.mk
623+++ b/RepositoryExternal.mk
624@@ -704,6 +704,21 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\
625
626 endef
627
628+define gb_LinkTarget__use_boost_filesystem
629+$(call gb_LinkTarget_add_defs,$(1),\
630+ -DBOOST_ALL_NO_LIB \
631+)
632+
633+$(call gb_LinkTarget_use_static_libraries,$(1),\
634+ boost_filesystem \
635+)
636+
637+endef
638+
639+define gb_ExternalProject__use_boost_filesystem
640+$(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
641+endef
642+
643 define gb_LinkTarget__use_boost_iostreams
644 $(call gb_LinkTarget_add_defs,$(1),\
645 -DBOOST_ALL_NO_LIB \
646@@ -743,25 +758,11 @@ $(call gb_LinkTarget_set_include,$(1),\
647
648 endef
649
650-define gb_LinkTarget__use_boost_filesystem
651-$(call gb_LinkTarget_add_defs,$(1),\
652- -DBOOST_ALL_NO_LIB \
653-)
654-
655-$(call gb_LinkTarget_use_static_libraries,$(1),\
656- boost_filesystem \
657-)
658-
659-endef
660-
661-define gb_ExternalProject__use_boost_filesystem
662-$(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
663-endef
664-
665 define gb_ExternalProject__use_boost_headers
666 $(call gb_ExternalProject_use_unpacked,$(1),boost)
667
668 endef
669+
670 endif # SYSTEM_BOOST
671
672
673--
6742.5.0
675
676From 57c439a15e151fa9f7c298ceb15165749958c53c Mon Sep 17 00:00:00 2001
677From: David Tardon <dtardon@redhat.com>
678Date: Tue, 8 Mar 2016 06:06:36 +0100
679Subject: [PATCH 2/4] reduce copypasta
680
681Change-Id: I5303caf69128a0a6d28fccfcf2ab63ed466e3853
682---
683 RepositoryExternal.mk | 81 +++++++++++++--------------------------------------
684 1 file changed, 21 insertions(+), 60 deletions(-)
685
686diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
687index c8aab64..58f924d 100644
688--- a/RepositoryExternal.mk
689+++ b/RepositoryExternal.mk
690@@ -617,7 +617,7 @@ endif # SYSTEM_HUNSPELL
691
692 ifneq ($(SYSTEM_BOOST),)
693
694-define gb_LinkTarget__use_boostdatetime
695+define gb_LinkTarget__use_boost_lib
696 $(call gb_LinkTarget_set_include,$(1),\
697 $$(INCLUDE) \
698 $(BOOST_CPPFLAGS) \
699@@ -627,43 +627,24 @@ $(call gb_LinkTarget_add_ldflags,$(1),\
700 $(BOOST_LDFLAGS) \
701 )
702
703-$(call gb_LinkTarget_add_libs,$(1),\
704- $(BOOST_DATE_TIME_LIB) \
705-)
706+$(call gb_LinkTarget_add_libs,$(1),$(2))
707
708 endef
709
710-define gb_LinkTarget__use_boost_iostreams
711-$(call gb_LinkTarget_set_include,$(1),\
712- $$(INCLUDE) \
713- $(BOOST_CPPFLAGS) \
714-)
715+define gb_LinkTarget__use_boostdatetime
716+$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
717
718-$(call gb_LinkTarget_add_ldflags,$(1),\
719- $(BOOST_LDFLAGS) \
720-)
721+endef
722
723-$(call gb_LinkTarget_add_libs,$(1),\
724- $(BOOST_IOSTREAMS_LIB) \
725-)
726+define gb_LinkTarget__use_boost_iostreams
727+$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
728
729 endef
730
731 gb_ExternalProject__use_boost_iostreams :=
732
733 define gb_LinkTarget__use_boost_system
734-$(call gb_LinkTarget_set_include,$(1),\
735- $$(INCLUDE) \
736- $(BOOST_CPPFLAGS) \
737-)
738-
739-$(call gb_LinkTarget_add_ldflags,$(1),\
740- $(BOOST_LDFLAGS) \
741-)
742-
743-$(call gb_LinkTarget_add_libs,$(1),\
744- $(BOOST_SYSTEM_LIB) \
745-)
746+$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB))
747
748 endef
749
750@@ -681,37 +662,29 @@ gb_ExternalProject__use_boost_headers:=
751
752 else # !SYSTEM_BOOST
753
754-ifeq ($(OS),WNT)
755-define gb_LinkTarget__use_boostthread
756+define gb_LinkTarget__use_boost_lib
757 $(call gb_LinkTarget_add_defs,$(1),\
758 -DBOOST_ALL_NO_LIB \
759 )
760
761-$(call gb_LinkTarget_use_static_libraries,$(1),\
762- boostthread \
763-)
764+$(call gb_LinkTarget_use_static_libraries,$(1),$(2))
765+
766+endef
767+
768+ifeq ($(OS),WNT)
769+define gb_LinkTarget__use_boostthread
770+$(call gb_LinkTarget__use_boost_lib,$(1),boostthread)
771+
772 endef
773 endif
774
775 define gb_LinkTarget__use_boostdatetime
776-$(call gb_LinkTarget_add_defs,$(1),\
777- -DBOOST_ALL_NO_LIB \
778-)
779-
780-$(call gb_LinkTarget_use_static_libraries,$(1),\
781- boostdatetime \
782-)
783+$(call gb_LinkTarget__use_boost_lib,$(1),boostdatetime)
784
785 endef
786
787 define gb_LinkTarget__use_boost_filesystem
788-$(call gb_LinkTarget_add_defs,$(1),\
789- -DBOOST_ALL_NO_LIB \
790-)
791-
792-$(call gb_LinkTarget_use_static_libraries,$(1),\
793- boost_filesystem \
794-)
795+$(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem)
796
797 endef
798
799@@ -720,13 +693,7 @@ $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem)
800 endef
801
802 define gb_LinkTarget__use_boost_iostreams
803-$(call gb_LinkTarget_add_defs,$(1),\
804- -DBOOST_ALL_NO_LIB \
805-)
806-
807-$(call gb_LinkTarget_use_static_libraries,$(1),\
808- boost_iostreams \
809-)
810+$(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams)
811
812 endef
813
814@@ -735,13 +702,7 @@ $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams)
815 endef
816
817 define gb_LinkTarget__use_boost_system
818-$(call gb_LinkTarget_add_defs,$(1),\
819- -DBOOST_ALL_NO_LIB \
820-)
821-
822-$(call gb_LinkTarget_use_static_libraries,$(1),\
823- boost_system \
824-)
825+$(call gb_LinkTarget__use_boost_lib,$(1),boost_system)
826
827 endef
828
829--
8302.5.0
831
832From ed41a33ca22f46b123df4132d376247682af07af Mon Sep 17 00:00:00 2001
833From: David Tardon <dtardon@redhat.com>
834Date: Tue, 8 Mar 2016 06:23:24 +0100
835Subject: [PATCH 3/4] detect Boost.Filesystem
836
837Change-Id: I86c268f49f44bd1e208a9de781a16bf19450c64c
838---
839 config_host.mk.in | 1 +
840 configure.ac | 1 +
841 m4/ax_boost_filesystem.m4 | 118 ++++++++++++++++++++++++++++++++++++++++++++++
842 3 files changed, 120 insertions(+)
843 create mode 100644 m4/ax_boost_filesystem.m4
844
845diff --git a/config_host.mk.in b/config_host.mk.in
846index 89081ca..0a2ec0b 100644
847--- a/config_host.mk.in
848+++ b/config_host.mk.in
849@@ -37,6 +37,7 @@ export BARCODE_EXTENSION_PACK=@BARCODE_EXTENSION_PACK@
850 export BOOST_CPPFLAGS=@BOOST_CPPFLAGS@
851 export BOOST_CXXFLAGS=@BOOST_CXXFLAGS@
852 export BOOST_DATE_TIME_LIB=@BOOST_DATE_TIME_LIB@
853+export BOOST_FILESYSTEM_LIB=@BOOST_FILESYSTEM_LIB@
854 export BOOST_IOSTREAMS_LIB=@BOOST_IOSTREAMS_LIB@
855 export BOOST_LDFLAGS=@BOOST_LDFLAGS@
856 export BOOST_SYSTEM_LIB=@BOOST_SYSTEM_LIB@
857diff --git a/configure.ac b/configure.ac
858index dab1919..7b5cedd 100644
859--- a/configure.ac
860+++ b/configure.ac
861@@ -8836,6 +8836,7 @@ if test "$with_system_boost" = "yes"; then
862 SYSTEM_BOOST=TRUE
863 AX_BOOST_BASE(1.47)
864 AX_BOOST_DATE_TIME
865+ AX_BOOST_FILESYSTEM
866 AX_BOOST_IOSTREAMS
867 mingw_boost_date_time_dll=`echo $BOOST_DATE_TIME_LIB | sed -e 's/^-l//' -e 's/\.dll$//'`
868 libo_MINGW_TRY_DLL([$mingw_boost_date_time_dll])
869diff --git a/m4/ax_boost_filesystem.m4 b/m4/ax_boost_filesystem.m4
870new file mode 100644
871index 0000000..f162163
872--- /dev/null
873+++ b/m4/ax_boost_filesystem.m4
874@@ -0,0 +1,118 @@
875+# ===========================================================================
876+# http://www.gnu.org/software/autoconf-archive/ax_boost_filesystem.html
877+# ===========================================================================
878+#
879+# SYNOPSIS
880+#
881+# AX_BOOST_FILESYSTEM
882+#
883+# DESCRIPTION
884+#
885+# Test for Filesystem library from the Boost C++ libraries. The macro
886+# requires a preceding call to AX_BOOST_BASE. Further documentation is
887+# available at <http://randspringer.de/boost/index.html>.
888+#
889+# This macro calls:
890+#
891+# AC_SUBST(BOOST_FILESYSTEM_LIB)
892+#
893+# And sets:
894+#
895+# HAVE_BOOST_FILESYSTEM
896+#
897+# LICENSE
898+#
899+# Copyright (c) 2009 Thomas Porschberg <thomas@randspringer.de>
900+# Copyright (c) 2009 Michael Tindal
901+# Copyright (c) 2009 Roman Rybalko <libtorrent@romanr.info>
902+#
903+# Copying and distribution of this file, with or without modification, are
904+# permitted in any medium without royalty provided the copyright notice
905+# and this notice are preserved. This file is offered as-is, without any
906+# warranty.
907+
908+#serial 26
909+
910+AC_DEFUN([AX_BOOST_FILESYSTEM],
911+[
912+ AC_ARG_WITH([boost-filesystem],
913+ AS_HELP_STRING([--with-boost-filesystem@<:@=special-lib@:>@],
914+ [use the Filesystem library from boost - it is possible to specify a certain library for the linker
915+ e.g. --with-boost-filesystem=boost_filesystem-gcc-mt ]),
916+ [
917+ if test "$withval" = "no"; then
918+ want_boost="no"
919+ elif test "$withval" = "yes"; then
920+ want_boost="yes"
921+ ax_boost_user_filesystem_lib=""
922+ else
923+ want_boost="yes"
924+ ax_boost_user_filesystem_lib="$withval"
925+ fi
926+ ],
927+ [want_boost="yes"]
928+ )
929+
930+ if test "x$want_boost" = "xyes"; then
931+ AC_REQUIRE([AC_PROG_CC])
932+ CPPFLAGS_SAVED="$CPPFLAGS"
933+ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
934+ export CPPFLAGS
935+
936+ LDFLAGS_SAVED="$LDFLAGS"
937+ LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"
938+ export LDFLAGS
939+
940+ LIBS_SAVED=$LIBS
941+ LIBS="$LIBS $BOOST_SYSTEM_LIB"
942+ export LIBS
943+
944+ AC_CACHE_CHECK(whether the Boost::Filesystem library is available,
945+ ax_cv_boost_filesystem,
946+ [AC_LANG_PUSH([C++])
947+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/filesystem/path.hpp>]],
948+ [[using namespace boost::filesystem;
949+ path my_path( "foo/bar/data.txt" );
950+ return 0;]])],
951+ ax_cv_boost_filesystem=yes, ax_cv_boost_filesystem=no)
952+ AC_LANG_POP([C++])
953+ ])
954+ if test "x$ax_cv_boost_filesystem" = "xyes"; then
955+ AC_DEFINE(HAVE_BOOST_FILESYSTEM,,[define if the Boost::Filesystem library is available])
956+ BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
957+ if test "x$ax_boost_user_filesystem_lib" = "x"; then
958+ for libextension in `ls -r $BOOSTLIBDIR/libboost_filesystem* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do
959+ ax_lib=${libextension}
960+ AC_CHECK_LIB($ax_lib, exit,
961+ [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
962+ [link_filesystem="no"])
963+ done
964+ if test "x$link_filesystem" != "xyes"; then
965+ for libextension in `ls -r $BOOSTLIBDIR/boost_filesystem* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do
966+ ax_lib=${libextension}
967+ AC_CHECK_LIB($ax_lib, exit,
968+ [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
969+ [link_filesystem="no"])
970+ done
971+ fi
972+ else
973+ for ax_lib in $ax_boost_user_filesystem_lib boost_filesystem-$ax_boost_user_filesystem_lib; do
974+ AC_CHECK_LIB($ax_lib, exit,
975+ [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break],
976+ [link_filesystem="no"])
977+ done
978+
979+ fi
980+ if test "x$ax_lib" = "x"; then
981+ AC_MSG_ERROR(Could not find a version of the library!)
982+ fi
983+ if test "x$link_filesystem" != "xyes"; then
984+ AC_MSG_ERROR(Could not link against $ax_lib !)
985+ fi
986+ fi
987+
988+ CPPFLAGS="$CPPFLAGS_SAVED"
989+ LDFLAGS="$LDFLAGS_SAVED"
990+ LIBS="$LIBS_SAVED"
991+ fi
992+])
993--
9942.5.0
995
996From b4339fa7eee12f173b2273aed5dc6b8abae528f4 Mon Sep 17 00:00:00 2001
997From: David Tardon <dtardon@redhat.com>
998Date: Tue, 8 Mar 2016 06:08:36 +0100
999Subject: [PATCH 4/4] define boost_filestystem external for system boost too
1000
1001Change-Id: Ie9bfc6a5f3e1862acbd1bb08c6f2bb0b63f2587e
1002---
1003 RepositoryExternal.mk | 7 +++++++
1004 1 file changed, 7 insertions(+)
1005
1006diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
1007index 58f924d..ca7cdf8 100644
1008--- a/RepositoryExternal.mk
1009+++ b/RepositoryExternal.mk
1010@@ -636,6 +636,13 @@ $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB))
1011
1012 endef
1013
1014+define gb_LinkTarget__use_boost_filesystem
1015+$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB))
1016+
1017+endef
1018+
1019+gb_ExternalProject__use_boost_filesystem :=
1020+
1021 define gb_LinkTarget__use_boost_iostreams
1022 $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB))
1023
1024--
10252.5.0
1026
This page took 0.163902 seconds and 4 git commands to generate.