From 50471a81b77885921008b226db74a789dd5bd34f Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Sat, 19 Mar 2016 15:44:03 +0100
Subject: new package: qtofficeopenxml

---
 index.html                  |  4 ++++
 src/qtofficeopenxml-1.patch | 22 ++++++++++++++++++++++
 src/qtofficeopenxml.mk      | 20 ++++++++++++++++++++
 3 files changed, 46 insertions(+)
 create mode 100644 src/qtofficeopenxml-1.patch
 create mode 100644 src/qtofficeopenxml.mk

diff --git a/index.html b/index.html
index 3406678..5f363f7 100644
--- a/index.html
+++ b/index.html
@@ -2314,6 +2314,10 @@ local-pkg-list: $(LOCAL_PKG_LIST)</pre>
         <td class="website"><a href="http://qt-project.org/">Qt</a></td>
     </tr>
     <tr>
+        <td class="package">qtofficeopenxml</td>
+        <td class="website"><a href="https://github.com/dbzhang800/QtOfficeOpenXml/">QtOfficeOpenXml</a></td>
+    </tr>
+    <tr>
         <td class="package">qtquickcontrols</td>
         <td class="website"><a href="http://qt-project.org/">Qt</a></td>
     </tr>
diff --git a/src/qtofficeopenxml-1.patch b/src/qtofficeopenxml-1.patch
new file mode 100644
index 0000000..2312c98
--- /dev/null
+++ b/src/qtofficeopenxml-1.patch
@@ -0,0 +1,22 @@
+From 57c93e64b512b24c1ca983a91c18c1e4bb158d2a Mon Sep 17 00:00:00 2001
+From: Mark Brand <mabrand@mabrand.nl>
+Date: Sat, 19 Mar 2016 15:37:43 +0100
+Subject: [PATCH] fix typo/build failure
+
+
+diff --git a/src/officeopenxml/sml/smlworkbook.cpp b/src/officeopenxml/sml/smlworkbook.cpp
+index dfa8e13..74432db 100644
+--- a/src/officeopenxml/sml/smlworkbook.cpp
++++ b/src/officeopenxml/sml/smlworkbook.cpp
+@@ -37,7 +37,7 @@ QString Workbook::bookView(const QString &attribute) const
+         return QString();
+     if (!bookViews_raw[0].contains(attribute))
+         return QString();
+-    return bookViews_raw[0][attribute].toInt();
++    return bookViews_raw[0][attribute];
+ }
+ 
+ void Workbook::setBookView(const QString &attribute, const QString &val)
+-- 
+2.5.0
+
diff --git a/src/qtofficeopenxml.mk b/src/qtofficeopenxml.mk
new file mode 100644
index 0000000..efc2b4e
--- /dev/null
+++ b/src/qtofficeopenxml.mk
@@ -0,0 +1,20 @@
+# This file is part of MXE.
+# See index.html for further information.
+PKG             := qtofficeopenxml
+$(PKG)_IGNORE   :=
+$(PKG)_VERSION  := 02dda4a46f92a843eaba5f5a021952860eadfe01
+$(PKG)_CHECKSUM := 50f989b2af404e8a9a20b46b3ca4955093ad295cb61f0cfb42fa06480d1fbad2
+$(PKG)_SUBDIR   := QtOfficeOpenXml-$($(PKG)_VERSION)
+$(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.gz
+$(PKG)_URL      := https://github.com/dbzhang800/QtOfficeOpenXml/archive/$($(PKG)_VERSION).tar.gz
+$(PKG)_DEPS     := gcc qtbase
+
+$(PKG)_UPDATE    = $(call MXE_GET_GITHUB_SHA, dbzhang800/QtOfficeOpenXml, master)
+
+define $(PKG)_BUILD
+    # invoke qmake with removed debug options as a workaround for
+    # https://bugreports.qt-project.org/browse/QTBUG-30898
+    cd '$(1)' && '$(PREFIX)/$(TARGET)/qt5/bin/qmake' CONFIG-='debug debug_and_release'
+    $(MAKE) -C '$(1)' -j '$(JOBS)'
+    $(MAKE) -C '$(1)' -j 1 install
+endef
-- 
cgit v0.12