new upstream release 0.12.1

f41
David Tardon 9 years ago
parent 4e3b20f16e
commit 6c426a1e2e

1
.gitignore vendored

@ -7,3 +7,4 @@
/liborcus-0.11.0.tar.xz
/liborcus-0.11.1.tar.xz
/liborcus-0.11.2.tar.xz
/liborcus-0.12.1.tar.xz

@ -1,110 +0,0 @@
From 6da3d8f4922e501f9685761e91e6014ab565835a Mon Sep 17 00:00:00 2001
From: Kohei Yoshida <kohei.yoshida@gmail.com>
Date: Fri, 15 Jul 2016 22:30:58 -0400
Subject: [PATCH] We now require ixion 0.12.0 (API version 0.12).
---
configure.ac | 4 ++--
src/python/sheet_rows.cpp | 16 ++++++++--------
src/spreadsheet/formula_global.cpp | 6 +++---
src/spreadsheet/json_dumper.cpp | 19 +++++++------------
src/spreadsheet/sheet.cpp | 19 ++++++++-----------
5 files changed, 28 insertions(+), 36 deletions(-)
diff --git a/configure.ac b/configure.ac
index 118f4e0..05f28a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -66,7 +66,7 @@ AC_DEFINE([BOOST_ALL_NO_LIB], [], [Disable boost's evil autolink.])
# ======================
# Set required ixion api
# ======================
-IXION_REQUIRED_API_VERSION=0.11
+IXION_REQUIRED_API_VERSION=0.12
AC_SUBST(IXION_REQUIRED_API_VERSION)
# =============
@@ -215,3 +215,4 @@ AC_ARG_ENABLE(spreadsheet-model,
AS_IF([test "x$enable_spreadsheet_model" != "xno"], [
- PKG_CHECK_MODULES([LIBIXION],[libixion-$IXION_REQUIRED_API_VERSION])
+ PKG_CHECK_MODULES([LIBIXION],[libixion-$IXION_REQUIRED_API_VERSION >= 0.12.0])
+ CXXFLAGS="$CXXFLAGS -D__ORCUS_SPREADSHEET_MODEL"
])
diff --git a/src/spreadsheet/sheet.cpp b/src/spreadsheet/sheet.cpp
index f9eaa5b..734d0e0 100644
--- a/src/spreadsheet/sheet.cpp
+++ b/src/spreadsheet/sheet.cpp
@@ -582,8 +582,8 @@ void sheet::set_merge_cell_range(const char* p_ref, size_t p_ref_len)
if (!resolver)
return;
- ixion::formula_name_type res = resolver->resolve(p_ref, p_ref_len, ixion::abs_address_t());
- if (res.type != ixion::formula_name_type::range_reference)
+ ixion::formula_name_t res = resolver->resolve(p_ref, p_ref_len, ixion::abs_address_t());
+ if (res.type != ixion::formula_name_t::range_reference)
return;
col_merge_size_type::iterator it_col = mp_impl->m_merge_ranges.find(res.range.first.col);
@@ -737,9 +737,8 @@ void sheet::dump_flat(std::ostream& os) const
os2 << formula;
- const ixion::formula_result* res = cell->get_result_cache();
- if (res)
- os2 << " (" << res->str(mp_impl->m_doc.get_model_context()) << ")";
+ const ixion::formula_result& res = cell->get_result_cache();
+ os2 << " (" << res.str(mp_impl->m_doc.get_model_context()) << ")";
mx.set(row, col, os2.str());
}
@@ -900,9 +899,8 @@ void sheet::dump_check(ostream& os, const pstring& sheet_name) const
os << ':' << formula;
- const ixion::formula_result* res = cell->get_result_cache();
- if (res)
- os << ':' << res->str(mp_impl->m_doc.get_model_context());
+ const ixion::formula_result& res = cell->get_result_cache();
+ os << ':' << res.str(mp_impl->m_doc.get_model_context());
}
os << endl;
}
@@ -1458,9 +1456,8 @@ void sheet::dump_html(const string& filepath) const
os << formula;
- const ixion::formula_result* res = cell->get_result_cache();
- if (res)
- os << " (" << res->str(mp_impl->m_doc.get_model_context()) << ")";
+ const ixion::formula_result& res = cell->get_result_cache();
+ os << " (" << res.str(mp_impl->m_doc.get_model_context()) << ")";
}
}
break;
diff --git a/src/spreadsheet/formula_global.cpp b/src/spreadsheet/formula_global.cpp
index 7755f8e..9e7c7d4 100644
--- a/src/spreadsheet/formula_global.cpp
+++ b/src/spreadsheet/formula_global.cpp
@@ -18,15 +18,15 @@ ixion::abs_range_t to_abs_range(
ixion::abs_range_t range(ixion::abs_range_t::invalid);
ixion::abs_address_t pos(0,0,0);
- ixion::formula_name_type res = resolver.resolve(p_ref, n_ref, pos);
+ ixion::formula_name_t res = resolver.resolve(p_ref, n_ref, pos);
switch (res.type)
{
- case ixion::formula_name_type::cell_reference:
+ case ixion::formula_name_t::cell_reference:
// Single cell reference.
range.first = ixion::to_address(res.address).to_abs(pos);
range.last = range.first;
break;
- case ixion::formula_name_type::range_reference:
+ case ixion::formula_name_t::range_reference:
// Range reference.
range = ixion::to_range(res.range).to_abs(pos);
break;
--
2.7.4

@ -1,330 +0,0 @@
From 875639f08a3294699dbdb1f57410598b273a2a5a Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Thu, 16 Jun 2016 15:03:37 +0200
Subject: [PATCH] update boost.m4 to fix version detection with gcc 6.1
---
m4/boost.m4 | 182 ++++++++++++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 152 insertions(+), 30 deletions(-)
diff --git a/m4/boost.m4 b/m4/boost.m4
index 73c6c1c..2c1df68 100644
--- a/m4/boost.m4
+++ b/m4/boost.m4
@@ -22,7 +22,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
m4_define([_BOOST_SERIAL], [m4_translit([
-# serial 24
+# serial 26
], [#
], [])])
@@ -86,9 +86,10 @@ dnl boost-lib-version =
dnl # 2 "conftest.cc" 3
dnl "1_56"
dnl
-dnl So get rid of the # lines, and glue the remaining ones together.
+dnl So get rid of the # and empty lines, and glue the remaining ones together.
(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
grep -v '#' |
+ grep -v '^[[[:space:]]]*$' |
tr -d '\r' |
tr -s '\n' ' ' |
$SED -n -e "$1" >conftest.i 2>&1],
@@ -110,7 +111,7 @@ AC_LANG_POP([C++])dnl
# On # success, defines HAVE_BOOST. On failure, calls the optional
# ACTION-IF-NOT-FOUND action if one was supplied.
# Otherwise aborts with an error message.
-AC_DEFUN([BOOST_REQUIRE],
+AC_DEFUN_ONCE([BOOST_REQUIRE],
[AC_REQUIRE([AC_PROG_CXX])dnl
AC_REQUIRE([AC_PROG_GREP])dnl
echo "$as_me: this is boost.m4[]_BOOST_SERIAL" >&AS_MESSAGE_LOG_FD
@@ -309,10 +310,7 @@ fi
# ... If you want to make sure you have a specific version of Boost
# (eg, >= 1.33) you *must* invoke BOOST_REQUIRE before this macro.
AC_DEFUN([BOOST_FIND_LIBS],
-[dnl Skip test if the variables are set from outside. We assume the caller knows
-dnl what he does.
-if test x"[$]AS_TR_CPP([BOOST_$1_LIBS])" == "x" -o x"[$]AS_TR_CPP([BOOST_$1_LDFLAGS])" == "x"; then
-AC_REQUIRE([BOOST_REQUIRE])dnl
+[AC_REQUIRE([BOOST_REQUIRE])dnl
AC_REQUIRE([_BOOST_FIND_COMPILER_TAG])dnl
AC_REQUIRE([BOOST_STATIC])dnl
AC_REQUIRE([_BOOST_GUESS_WHETHER_TO_USE_MT])dnl
@@ -346,7 +344,6 @@ AS_VAR_POPDEF([Boost_lib_LDPATH])dnl
AS_VAR_POPDEF([Boost_lib_LIBS])dnl
AC_LANG_POP([C++])dnl
fi
-fi
])
@@ -552,6 +549,13 @@ BOOST_DEFUN([Asio],
BOOST_FIND_HEADER([boost/asio.hpp])])
+# BOOST_ASSIGN()
+# -------------
+# Look for Boost.Assign
+BOOST_DEFUN([Assign],
+[BOOST_FIND_HEADER([boost/assign.hpp])])
+
+
# BOOST_BIND()
# ------------
# Look for Boost.Bind.
@@ -578,7 +582,7 @@ BOOST_FIND_LIB([chrono], [$1],
[boost/chrono.hpp],
[boost::chrono::thread_clock d;])
if test $enable_static_boost = yes && test $boost_major_version -ge 135; then
- BOOST_FILESYSTEM_LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
+ BOOST_CHRONO_LIBS="$BOOST_CHRONO_LIBS $BOOST_SYSTEM_LIBS"
fi
LIBS=$boost_filesystem_save_LIBS
LDFLAGS=$boost_filesystem_save_LDFLAGS
@@ -588,27 +592,79 @@ LDFLAGS=$boost_filesystem_save_LDFLAGS
# BOOST_CONTEXT([PREFERRED-RT-OPT])
# -----------------------------------
# Look for Boost.Context. For the documentation of PREFERRED-RT-OPT, see the
-# documentation of BOOST_FIND_LIB above. This library was introduced in Boost
-# 1.51.0
+# documentation of BOOST_FIND_LIB above.
+#
+# * This library was introduced in Boost 1.51.0
+# * The signatures of make_fcontext() and jump_fcontext were changed in 1.56.0
+# * A dependency on boost_thread appears in 1.57.0
BOOST_DEFUN([Context],
-[BOOST_FIND_LIB([context], [$1],
+[boost_context_save_LIBS=$LIBS
+ boost_context_save_LDFLAGS=$LDFLAGS
+if test $boost_major_version -ge 157; then
+ BOOST_THREAD([$1])
+ m4_pattern_allow([^BOOST_THREAD_(LIBS|LDFLAGS)$])dnl
+ LIBS="$LIBS $BOOST_THREAD_LIBS"
+ LDFLAGS="$LDFLAGS $BOOST_THREAD_LDFLAGS"
+fi
+BOOST_FIND_LIB([context], [$1],
[boost/context/all.hpp],[[
+
// creates a stack
void * stack_pointer = new void*[4096];
std::size_t const size = sizeof(void*[4096]);
-// context fc uses f() as context function
-// fcontext_t is placed on top of context stack
-// a pointer to fcontext_t is returned
+#if BOOST_VERSION <= 105100
+ctx::make_fcontext(&fc, f);
+return ctx::jump_fcontext(&fcm, &fc, 3) == 6;
+
+#else
+
fc = ctx::make_fcontext(stack_pointer, size, f);
-return ctx::jump_fcontext(&fcm, fc, 3) == 6;]],[dnl
+return ctx::jump_fcontext(&fcm, fc, 3) == 6;
+
+#endif
+
+
+]],[dnl
+
+#include <boost/version.hpp>
+#if BOOST_VERSION <= 105100
+
+namespace ctx = boost::ctx;
+
+static ctx::fcontext_t fcm, fc;
+
+static void f(intptr_t i) {
+ ctx::jump_fcontext(&fc, &fcm, i * 2);
+}
+
+#elif BOOST_VERSION <= 105500
+
namespace ctx = boost::context;
+
// context
static ctx::fcontext_t fcm, *fc;
+
// context-function
static void f(intptr_t i) {
ctx::jump_fcontext(fc, &fcm, i * 2);
-}])
+}
+
+#else
+
+namespace ctx = boost::context;
+
+// context
+static ctx::fcontext_t fcm, fc;
+
+// context-function
+static void f(intptr_t i) {
+ ctx::jump_fcontext(&fc, fcm, i * 2);
+}
+#endif
+])
+LIBS=$boost_context_save_LIBS
+LDFLAGS=$boost_context_save_LDFLAGS
])# BOOST_CONTEXT
@@ -640,10 +696,21 @@ m4_pattern_allow([^BOOST_(CONTEXT|SYSTEM)_(LIBS|LDFLAGS)])
LIBS="$LIBS $BOOST_CONTEXT_LIBS $BOOST_SYSTEM_LIBS"
LDFLAGS="$LDFLAGS $BOOST_CONTEXT_LDFLAGS"
-BOOST_FIND_LIB([coroutine], [$1],
- [boost/coroutine/coroutine.hpp],
- [boost::coroutines::coroutine< int(int) > coro; coro.empty();])
-
+# in 1.53 coroutine was a header only library
+if test $boost_major_version -eq 153; then
+ BOOST_FIND_HEADER([boost/coroutine/coroutine.hpp])
+else
+ BOOST_FIND_LIB([coroutine], [$1],
+ [boost/coroutine/coroutine.hpp],
+ [
+ #include <boost/version.hpp>
+ #if BOOST_VERSION <= 105500
+ boost::coroutines::coroutine<int(int)> coro; coro.get();
+ #else
+ boost::coroutines::asymmetric_coroutine<int>::pull_type coro; coro.get();
+ #endif
+ ])
+fi
# Link-time dependency from coroutine to context, existed only in 1.53, in 1.54
# coroutine doesn't use context from its headers but from its library.
if test $boost_major_version -eq 153 || test $enable_static_boost = yes && test $boost_major_version -ge 154; then
@@ -755,8 +822,19 @@ BOOST_DEFUN([Geometry],
# Look for Boost.Graphs. For the documentation of PREFERRED-RT-OPT, see the
# documentation of BOOST_FIND_LIB above.
BOOST_DEFUN([Graph],
-[BOOST_FIND_LIB([graph], [$1],
+[boost_graph_save_LIBS=$LIBS
+boost_graph_save_LDFLAGS=$LDFLAGS
+# Link-time dependency from graph to regex was added as of 1.40.0.
+if test $boost_major_version -ge 140; then
+ BOOST_REGEX([$1])
+ m4_pattern_allow([^BOOST_REGEX_(LIBS|LDFLAGS)$])dnl
+ LIBS="$LIBS $BOOST_REGEX_LIBS"
+ LDFLAGS="$LDFLAGS $BOOST_REGEX_LDFLAGS"
+fi
+BOOST_FIND_LIB([graph], [$1],
[boost/graph/adjacency_list.hpp], [boost::adjacency_list<> g;])
+LIBS=$boost_graph_save_LIBS
+LDFLAGS=$boost_graph_save_LDFLAGS
])# BOOST_GRAPH
@@ -789,9 +867,21 @@ BOOST_DEFUN([Lambda],
# --------------
# Look for Boost.Locale
BOOST_DEFUN([Locale],
-[BOOST_FIND_LIB([locale], [$1],
+[
+boost_locale_save_LIBS=$LIBS
+boost_locale_save_LDFLAGS=$LDFLAGS
+# require SYSTEM for boost-1.50.0 and up
+if test $boost_major_version -ge 150; then
+ BOOST_SYSTEM([$1])
+ m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl
+ LIBS="$LIBS $BOOST_SYSTEM_LIBS"
+ LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS"
+fi # end of the Boost.System check.
+BOOST_FIND_LIB([locale], [$1],
[boost/locale.hpp],
[[boost::locale::generator gen; std::locale::global(gen(""));]])
+LIBS=$boost_locale_save_LIBS
+LDFLAGS=$boost_locale_save_LDFLAGS
])# BOOST_LOCALE
# BOOST_LOG([PREFERRED-RT-OPT])
@@ -799,9 +889,19 @@ BOOST_DEFUN([Locale],
# Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the
# documentation of BOOST_FIND_LIB above.
BOOST_DEFUN([Log],
-[BOOST_FIND_LIB([log], [$1],
+[boost_log_save_LIBS=$LIBS
+boost_log_save_LDFLAGS=$LDFLAGS
+BOOST_SYSTEM([$1])
+BOOST_FILESYSTEM([$1])
+BOOST_DATE_TIME([$1])
+m4_pattern_allow([^BOOST_(SYSTEM|FILESYSTEM|DATE_TIME)_(LIBS|LDFLAGS)$])dnl
+LIBS="$LIBS $BOOST_DATE_TIME_LIBS $BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"
+LDFLAGS="$LDFLAGS $BOOST_DATE_TIME_LDFLAGS $BOOST_FILESYSTEM_LDFLAGS $BOOST_SYSTEM_LDFLAGS"
+BOOST_FIND_LIB([log], [$1],
[boost/log/core/core.hpp],
[boost::log::attribute a; a.get_value();])
+LIBS=$boost_log_save_LIBS
+LDFLAGS=$boost_log_save_LDFLAGS
])# BOOST_LOG
@@ -810,10 +910,17 @@ BOOST_DEFUN([Log],
# Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the
# documentation of BOOST_FIND_LIB above.
BOOST_DEFUN([Log_Setup],
-[AC_REQUIRE([BOOST_LOG])dnl
+[boost_log_setup_save_LIBS=$LIBS
+boost_log_setup_save_LDFLAGS=$LDFLAGS
+BOOST_LOG([$1])
+m4_pattern_allow([^BOOST_LOG_(LIBS|LDFLAGS)$])dnl
+LIBS="$LIBS $BOOST_LOG_LIBS"
+LDFLAGS="$LDFLAGS $BOOST_LOG_LDFLAGS"
BOOST_FIND_LIB([log_setup], [$1],
[boost/log/utility/setup/from_settings.hpp],
[boost::log::basic_settings<char> bs; bs.empty();])
+LIBS=$boost_log_setup_save_LIBS
+LDFLAGS=$boost_log_setup_save_LDFLAGS
])# BOOST_LOG_SETUP
@@ -1071,15 +1178,24 @@ LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS"
CPPFLAGS="$CPPFLAGS $boost_cv_pthread_flag"
# When compiling for the Windows platform, the threads library is named
-# differently.
-case $host_os in
- (*mingw*) boost_thread_lib_ext=_win32;;
-esac
+# differently. This suffix doesn't exist in new versions of Boost, or
+# possibly new versions of GCC on mingw I am assuming it's Boost's change for
+# now and I am setting version to 1.48, for lack of knowledge as to when this
+# change occurred.
+if test $boost_major_version -lt 148; then
+ case $host_os in
+ (*mingw*) boost_thread_lib_ext=_win32;;
+ esac
+fi
BOOST_FIND_LIBS([thread], [thread$boost_thread_lib_ext],
[$1],
[boost/thread.hpp], [boost::thread t; boost::mutex m;])
-BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag"
+case $host_os in
+ (*mingw*) boost_thread_w32_socket_link=-lws2_32;;
+esac
+
+BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag $boost_thread_w32_socket_link"
BOOST_THREAD_LDFLAGS="$BOOST_SYSTEM_LDFLAGS"
BOOST_CPPFLAGS="$BOOST_CPPFLAGS $boost_cv_pthread_flag"
LIBS=$boost_thread_save_LIBS
@@ -1300,6 +1416,12 @@ if test x$boost_cv_inc_path != xno; then
# I'm not sure about my test for `il' (be careful: Intel's ICC pre-defines
# the same defines as GCC's).
for i in \
+ _BOOST_mingw_test(5, 3) \
+ _BOOST_gcc_test(5, 3) \
+ _BOOST_mingw_test(5, 2) \
+ _BOOST_gcc_test(5, 2) \
+ _BOOST_mingw_test(5, 1) \
+ _BOOST_gcc_test(5, 1) \
_BOOST_mingw_test(5, 0) \
_BOOST_gcc_test(5, 0) \
_BOOST_mingw_test(4, 10) \
--
2.7.4

@ -1,4 +1,4 @@
%global apiversion 0.11
%global apiversion 0.12
# build conversion tools
%bcond_without convtools
@ -6,16 +6,14 @@
%bcond_without python
Name: liborcus
Version: 0.11.2
Release: 2%{?dist}
Version: 0.12.1
Release: 1%{?dist}
Summary: Standalone file import filter library for spreadsheet documents
License: MPLv2.0
URL: https://gitlab.com/orcus/orcus
Source0: http://kohei.us/files/orcus/src/%{name}-%{version}.tar.xz
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: boost-devel
BuildRequires: doxygen
%if %{with convtools}
@ -28,9 +26,6 @@ BuildRequires: pkgconfig(python3)
%endif
BuildRequires: pkgconfig(zlib)
Patch0: 0001-update-boost.m4-to-fix-version-detection-with-gcc-6..patch
Patch1: 0001-We-now-require-ixion-0.12.0-API-version-0.12.patch
%description
%{name} is a standalone file import filter library for spreadsheet
documents. Currently under development are ODS, XLSX and CSV import
@ -89,8 +84,6 @@ API documentation for %{name}.
%endif
%build
aclocal -I m4
autoconf
%configure --disable-debug --disable-silent-rules --disable-static \
--disable-werror --with-pic %{?condopts}
sed -i \
@ -117,7 +110,7 @@ install -p -m 0644 orcus-*.1 %{buildroot}/%{_mandir}/man1
%endif
# build documentation
make build-doc-doxygen
make doc-doxygen
%check
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
@ -184,13 +177,17 @@ make check %{?_smp_mflags}
%{python3_sitelib}/orcus/__pycache__/
%{python3_sitelib}/orcus/__init__.py
%{python3_sitelib}/orcus/json.py
%{python3_sitelib}/orcus/xlsx.py
%endif
%files doc
%license LICENSE
%doc doc/html
%doc doc/_doxygen/html
%changelog
* Thu Sep 29 2016 David Tardon <dtardon@redhat.com> - 0.12.1-1
- new upstream release
* Wed Jul 20 2016 David Tardon <dtardon@redhat.com> - 0.11.2-2
- rebuild for libixion 0.12

@ -1 +1 @@
9f5a0b03853cfd4f3748b176c0ef5d0f liborcus-0.11.2.tar.xz
14d39b4ba7e44123d63b7a1d1358026a liborcus-0.12.1.tar.xz

Loading…
Cancel
Save