summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke <fried.roadkill+ght@gmail.com>2017-09-01 09:01:34 (GMT)
committerTony Theodore <tonyt@logyst.com>2017-10-10 04:31:48 (GMT)
commit60f40b6fac596bb88e128d2896a3f797c7b6e598 (patch)
tree6510c151ea47cef015981b7d960fccec18d5c259
parent3f6b2cc041004cb0a15c5371ce3b6c015059e770 (diff)
downloadmxe-60f40b6fac596bb88e128d2896a3f797c7b6e598.zip
mxe-60f40b6fac596bb88e128d2896a3f797c7b6e598.tar.gz
mxe-60f40b6fac596bb88e128d2896a3f797c7b6e598.tar.bz2
Added FreeXL, an open-source Excel data extractor
-rw-r--r--src/freexl.mk39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/freexl.mk b/src/freexl.mk
new file mode 100644
index 0000000..c3d00a9
--- /dev/null
+++ b/src/freexl.mk
@@ -0,0 +1,39 @@
+# This file is part of MXE. See LICENSE.md for licensing information.
+
+PKG := freexl
+$(PKG)_WEBSITE := https://www.gaia-gis.it/fossil/freexl/index
+$(PKG)_DESCR := FreeXL
+$(PKG)_IGNORE :=
+$(PKG)_VERSION := 1.0.3
+$(PKG)_CHECKSUM := f8ed29e03a6155454e538fce621e53991a270fcee31120ded339cff2523650a8
+$(PKG)_SUBDIR := freexl-$($(PKG)_VERSION)
+$(PKG)_FILE := freexl-$($(PKG)_VERSION).tar.gz
+$(PKG)_URL := http://www.gaia-gis.it/gaia-sins/freexl-sources/$($(PKG)_FILE)
+$(PKG)_DEPS := gcc libiconv
+
+define $(PKG)_UPDATE
+ $(WGET) -q -O- 'http://www.gaia-gis.it/gaia-sins/freexl-sources/' | \
+ $(SED) -n 's,.*freexl-\([0-9][^>]*\)\.tar.*,\1,p' | \
+ tail -1
+endef
+
+define $(PKG)_BUILD
+ cd '$(1)' && ./configure \
+ $(MXE_CONFIGURE_OPTS)
+ $(MAKE) -C '$(1)' -j '$(JOBS)' $(MXE_DISABLE_PROGRAMS)
+ $(MAKE) -C '$(1)' -j 1 $(INSTALL_STRIP_LIB)
+
+ # the test program comes from the freexl sources itself (test_xl.c)
+ '$(TARGET)-g++' \
+ -W -Wall -Werror -ansi -pedantic \
+ '$(1)/examples/test_xl.c' -o '$(PREFIX)/$(TARGET)/bin/test-freexl.exe' \
+ `'$(TARGET)-pkg-config' $(PKG) --cflags --libs` -liconv
+
+ # 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'; \
+ printf 'test-freexl.exe test-freexl.xls\r\n';) \
+ > '$(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'
+endef