summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-03-19 15:16:59 +0100
committerRemi Collet <remi@remirepo.net>2020-03-19 15:16:59 +0100
commit4b695bf4256a99bfc75650b95b832ca66ae11055 (patch)
tree96762b96dc985677b2ec300a1b460e2cb1ae6d34
parent41df13a785e3304261ecde0a4b73b6af3508d59d (diff)
add patch for pec/xlswriter from
https://github.com/viest/xlsxio
-rw-r--r--libxlsxio-feat.patch59
-rw-r--r--libxlsxio.spec14
2 files changed, 71 insertions, 2 deletions
diff --git a/libxlsxio-feat.patch b/libxlsxio-feat.patch
new file mode 100644
index 0000000..c22712c
--- /dev/null
+++ b/libxlsxio-feat.patch
@@ -0,0 +1,59 @@
+Adapted for 0.2.24 from changes in https://github.com/viest/xlsxio
+
+
+From 2ca1dd9967982dc3f4b5b4d49e019b95250893bf Mon Sep 17 00:00:00 2001
+From: viest <dev@service.viest.me>
+Date: Sat, 29 Feb 2020 22:15:15 +0800
+Subject: [PATCH] Feat: get read sheet information
+
+---
+ .gitignore | 2 ++
+ include/xlsxio_read.h | 12 +++++++++
+ lib/xlsxio_read.c | 63 +++++++++++++++++++++++++------------------
+ 3 files changed, 51 insertions(+), 26 deletions(-)
+
+diff --git a/include/xlsxio_read.h b/include/xlsxio_read.h
+index b3d05a0..9ae382d 100644
+--- a/include/xlsxio_read.h
++++ b/include/xlsxio_read.h
+@@ -224,6 +224,18 @@ DLL_EXPORT_XLSXIO const XLSXIOCHAR* xlsxioread_sheetlist_next (xlsxioreadersheet
+ /*! \brief read handle for worksheet object */
+ typedef struct xlsxio_read_sheet_struct* xlsxioreadersheet;
+
++/*! \brief get the index of the last column of the current worksheet row
++ * \param sheethandle read handle for worksheet object
++ * \sa xlsxioread_sheet_open()
++ */
++DLL_EXPORT_XLSXIO int xlsxioread_sheet_last_column_index(xlsxioreadersheet sheethandle);
++
++/*! \brief get worksheet open flags
++ * \param sheethandle read handle for worksheet object
++ * \sa xlsxioread_sheet_open()
++ */
++DLL_EXPORT_XLSXIO unsigned int xlsxioread_sheet_flags(xlsxioreadersheet sheethandle);
++
+ /*! \brief open worksheet
+ * \param handle read handle for .xlsx object
+ * \param sheetname worksheet name (NULL for first sheet)
+diff --git a/lib/xlsxio_read.c b/lib/xlsxio_read.c
+index 5d33705..2c63237 100644
+--- a/lib/xlsxio_read.c
++++ b/lib/xlsxio_read.c
+@@ -1262,6 +1262,17 @@ struct xlsxio_read_sheet_struct {
+ size_t paddingcol;
+ };
+
++DLL_EXPORT_XLSXIO int xlsxioread_sheet_last_column_index(xlsxioreadersheet sheethandle)
++{
++ return (int)sheethandle->lastcolnr;
++}
++
++
++DLL_EXPORT_XLSXIO unsigned int xlsxioread_sheet_flags(xlsxioreadersheet sheethandle)
++{
++ return (int)sheethandle->processcallbackdata.flags;
++}
++
+ DLL_EXPORT_XLSXIO int xlsxioread_process (xlsxioreader handle, const XLSXIOCHAR* sheetname, unsigned int flags, xlsxioread_process_cell_callback_fn cell_callback, xlsxioread_process_row_callback_fn row_callback, void* callbackdata)
+ {
+ int result = 0;
diff --git a/libxlsxio.spec b/libxlsxio.spec
index b278ef6..9a45578 100644
--- a/libxlsxio.spec
+++ b/libxlsxio.spec
@@ -1,6 +1,6 @@
# remirepo/fedora spec file for xlsxio
#
-# Copyright (c) 2019 Remi Collet
+# Copyright (c) 2019-2020 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -16,12 +16,15 @@
Name: %{gh_project}
Summary: XLSX tools from %{libname}
Version: 0.2.24
-Release: 1%{?dist}
+Release: 2%{?dist}
License: MIT
URL: https://github.com/%{gh_owner}/%{gh_project}/
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
+# New feature needed for pecl/xlswriter
+Patch0: libxlsxio-feat.patch
+
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: cmake >= 2.6
@@ -64,6 +67,9 @@ for %{libname}.
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+sed -e 's/\r//' -i include/xlsxio_read.h lib/xlsxio_read.c
+%patch0 -p1 -b .feat
+
# Fix installation layout
sed -e '/LIBRARY DESTINATION/s/lib/%{_lib}/' \
-e 's/DESTINATION \./DESTINATION share/' \
@@ -114,6 +120,10 @@ rm -rf %{buildroot}%{_mandir}/man3/_builddir_*
%changelog
+* Thu Mar 19 2020 Remi Collet <remi@remirepo.net> - 0.2.24-2
+- add patch for pec/xlswriter from
+ https://github.com/viest/xlsxio
+
* Thu Mar 19 2020 Remi Collet <remi@remirepo.net> - 0.2.24-1
- update to 0.2.24
- drop patch merged upstream