replace -DSIZEOF_VOID_P=4 with upstream solution

f41
Caolán McNamara 4 years ago
parent 4562415727
commit e7dcb3ee19

@ -0,0 +1,28 @@
From 2f3fa91679b449d3079152fb847c71350815df49 Mon Sep 17 00:00:00 2001
From: Kohei Yoshida <kohei.yoshida@gmail.com>
Date: Thu, 24 Sep 2020 20:06:53 -0400
Subject: [PATCH 1/2] Don't forget to initialize this struct member.
This ended up becoming "true" on a 32-bit debian platform, though
this is not strictly a 32-bit build issue...
Related to #129.
---
src/parser/parser_global.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/parser/parser_global.cpp b/src/parser/parser_global.cpp
index 4699a17b..a98d3dbc 100644
--- a/src/parser/parser_global.cpp
+++ b/src/parser/parser_global.cpp
@@ -155,6 +155,7 @@ parse_quoted_string_state parse_string_with_escaped_char(
ret.str = nullptr;
ret.length = 0;
ret.transient = true;
+ ret.has_control_character = false;
// Start the buffer with the string we've parsed so far.
buffer.reset();
--
2.25.1

@ -0,0 +1,27 @@
From 0eb2e3f7e81275a14958fa3cab900501c37c404c Mon Sep 17 00:00:00 2001
From: Kohei Yoshida <kohei.yoshida@gmail.com>
Date: Thu, 24 Sep 2020 19:28:48 -0400
Subject: [PATCH 2/2] Check the size of void* and pass it as a compiler define.
This is needed in order to link against libixion. Related to #129.
---
configure.ac | 3 +++
1 file changed, 3 insertions(+)
diff --git a/configure.ac b/configure.ac
index f69e7a12..caf82304 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,6 +55,9 @@ AC_C_INLINE
AC_TYPE_MODE_T
AC_TYPE_SIZE_T
+AC_CHECK_SIZEOF([void *])
+CXXFLAGS="$CXXFLAGS -DSIZEOF_VOID_P=$ac_cv_sizeof_void_p"
+
# ============================
# Checks for library functions
# ============================
--
2.25.1

@ -7,16 +7,20 @@
Name: liborcus
Version: 0.16.0
Release: 1%{?dist}
Release: 2%{?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
Patch0: 0001-Don-t-forget-to-initialize-this-struct-member.patch
Patch1: 0002-Check-the-size-of-void-and-pass-it-as-a-compiler-def.patch
BuildRequires: boost-devel
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: automake
%if %{with convtools}
BuildRequires: help2man
BuildRequires: pkgconfig(libixion-0.16)
@ -88,10 +92,7 @@ API documentation for %{name}.
%endif
%build
%ifarch %{arm} %{ix86}
# bodge for libixion 0.16.0
export CXXFLAGS="%{?optflags} -DSIZEOF_VOID_P=4"
%endif
autoreconf
%configure --disable-debug --disable-silent-rules --disable-static \
--disable-werror --with-pic %{?condopts}
sed -i \
@ -189,6 +190,9 @@ make doc-doxygen
%doc doc/_doxygen/html
%changelog
* Fri Sep 25 2020 Caolán McNamara <caolanm@redhat.com> - 0.16.0-2
- replace -DSIZEOF_VOID_P=4 with upstream solution
* Thu Sep 24 2020 Caolán McNamara <caolanm@redhat.com> - 0.16.0-1
- latest release

Loading…
Cancel
Save