From c335c5f97b13adc8121bf2b55782bedc1a0b08e4 Mon Sep 17 00:00:00 2001
From: Luke <fried.roadkill+ght@gmail.com>
Date: Mon, 2 Oct 2017 21:16:52 +0200
Subject: Update freexl for style.

---
 src/freexl-1-fixes.patch | 21 +++++++++++++++++++++
 src/freexl.mk            | 14 +++++++-------
 2 files changed, 28 insertions(+), 7 deletions(-)
 create mode 100644 src/freexl-1-fixes.patch

diff --git a/src/freexl-1-fixes.patch b/src/freexl-1-fixes.patch
new file mode 100644
index 0000000..6987c58
--- /dev/null
+++ b/src/freexl-1-fixes.patch
@@ -0,0 +1,21 @@
+This file is part of MXE. See LICENSE.md for licensing information.
+
+Contains ad hoc patches for cross building.
+
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Luke Potgieter <fried.roadkill+ght@gmail.com>
+Date: Mon, 2 Oct 2017 15:32:20 +0200
+Subject: [PATCH] Add static dependency to .pc file
+
+
+diff --git a/freexl.pc.in b/freexl.pc.in
+index 1111111..2222222 100644
+--- a/freexl.pc.in
++++ b/freexl.pc.in
+@@ -8,5 +8,5 @@ includedir=@includedir@
+ Name: freexl
+ Description: a simple library extracting data from .xls (Excel BIFF) files
+ Version: @VERSION@
+-Libs: -L${libdir} -lfreexl -lm
++Libs: -L${libdir} -lfreexl -liconv -lm
+ Cflags: -I${includedir} 
diff --git a/src/freexl.mk b/src/freexl.mk
index c3d00a9..736aa10 100644
--- a/src/freexl.mk
+++ b/src/freexl.mk
@@ -18,16 +18,16 @@ define $(PKG)_UPDATE
 endef
 
 define $(PKG)_BUILD
-    cd '$(1)' && ./configure \
+    cd '$(SOURCE_DIR)' && ./configure \
         $(MXE_CONFIGURE_OPTS)
-    $(MAKE) -C '$(1)' -j '$(JOBS)' $(MXE_DISABLE_PROGRAMS)
-    $(MAKE) -C '$(1)' -j 1 $(INSTALL_STRIP_LIB)
+    $(MAKE) -C '$(SOURCE_DIR)' -j '$(JOBS)' $(MXE_DISABLE_PROGRAMS)
+    $(MAKE) -C '$(SOURCE_DIR)' -j 1 $(INSTALL_STRIP_LIB)
 
     # the test program comes from the freexl sources itself (test_xl.c)
-    '$(TARGET)-g++' \
+    '$(TARGET)-gcc' \
         -W -Wall -Werror -ansi -pedantic \
-        '$(1)/examples/test_xl.c' -o '$(PREFIX)/$(TARGET)/bin/test-freexl.exe' \
-        `'$(TARGET)-pkg-config' $(PKG) --cflags --libs` -liconv
+        '$(SOURCE_DIR)/examples/test_xl.c' -o '$(PREFIX)/$(TARGET)/bin/test-freexl.exe' \
+        `'$(TARGET)-pkg-config' $(PKG) --cflags --libs`
 
     # create a batch file to run the test program (as the test program requires arguments)
     (printf 'REM Run the test program against the provided .xls file.\r\n'; \
@@ -35,5 +35,5 @@ define $(PKG)_BUILD
      > '$(PREFIX)/$(TARGET)/bin/test-freexl.bat'
 
     # copy a test xls file to the target bin directory
-    cp -f '$(1)/tests/testdata/testcase1.xls' '$(PREFIX)/$(TARGET)/bin/test-freexl.xls'
+    cp -f '$(SOURCE_DIR)/tests/testdata/testcase1.xls' '$(PREFIX)/$(TARGET)/bin/test-freexl.xls'
 endef
-- 
cgit v0.12