summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Nagaev <bnagaev@gmail.com>2017-10-10 08:35:07 (GMT)
committerTony Theodore <tonyt@logyst.com>2017-10-10 08:35:07 (GMT)
commite766e791708896b7f64f2a9fcd7ac4dbb3908393 (patch)
treec49f0201120b8f08792b08483e7438e4150cdcd0
parentede8628ec0885675adf10c265d4bac172bd300e3 (diff)
downloadmxe-e766e791708896b7f64f2a9fcd7ac4dbb3908393.zip
mxe-e766e791708896b7f64f2a9fcd7ac4dbb3908393.tar.gz
mxe-e766e791708896b7f64f2a9fcd7ac4dbb3908393.tar.bz2
add package sqlcipher
-rw-r--r--src/sqlcipher-1-fixes.patch25
-rw-r--r--src/sqlcipher.mk39
2 files changed, 64 insertions, 0 deletions
diff --git a/src/sqlcipher-1-fixes.patch b/src/sqlcipher-1-fixes.patch
new file mode 100644
index 0000000..b9d38e2
--- /dev/null
+++ b/src/sqlcipher-1-fixes.patch
@@ -0,0 +1,25 @@
+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: Your Name <you@example.com>
+Date: Wed, 27 Sep 2017 15:26:44 +0000
+Subject: [PATCH] fix dependency
+
+Source:
+https://github.com/Alexpux/MINGW-packages/blob/f083f27fb163b68673d5ac649fae353f44b49c7d/mingw-w64-sqlcipher/01-fix_dep.diff
+
+diff --git a/Makefile.in b/Makefile.in
+index 1111111..2222222 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -1074,7 +1074,7 @@ FTS5_SRC = \
+ $(TOP)/ext/fts5/fts5_varint.c \
+ $(TOP)/ext/fts5/fts5_vocab.c \
+
+-fts5parse.c: $(TOP)/ext/fts5/fts5parse.y lemon
++fts5parse.c: $(TOP)/ext/fts5/fts5parse.y lemon$(BEXE)
+ cp $(TOP)/ext/fts5/fts5parse.y .
+ rm -f fts5parse.h
+ ./lemon$(BEXE) $(OPTS) fts5parse.y
diff --git a/src/sqlcipher.mk b/src/sqlcipher.mk
new file mode 100644
index 0000000..ce8caf5
--- /dev/null
+++ b/src/sqlcipher.mk
@@ -0,0 +1,39 @@
+# This file is part of MXE. See LICENSE.md for licensing information.
+
+PKG := sqlcipher
+$(PKG)_WEBSITE := https://www.zetetic.net/sqlcipher/
+$(PKG)_DESCR := SQLite extension that provides 256 bit AES encryption of database files
+$(PKG)_IGNORE :=
+$(PKG)_VERSION := 3.4.1
+$(PKG)_CHECKSUM := 4172cc6e5a79d36e178d36bd5cc467a938e08368952659bcd95eccbaf0fa4ad4
+$(PKG)_GH_CONF := sqlcipher/sqlcipher, v
+$(PKG)_DEPS := gcc openssl readline
+
+define $(PKG)_BUILD
+ # build and install the library
+ cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \
+ "LIBS=$$($(TARGET)-pkg-config --libs libcrypto)" \
+ "CFLAGS=-DSQLITE_HAS_CODEC" \
+ --enable-tempstore=yes \
+ --disable-tcl \
+ --disable-editline \
+ --enable-readline \
+ --with-readline \
+ $(MXE_CONFIGURE_OPTS)
+ $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
+ $(MAKE) -C '$(BUILD_DIR)' -j 1 install $(MXE_DISABLE_CRUFT)
+
+# # create pkg-config files
+# $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig'
+# (echo 'Name: $(PKG)'; \
+# echo 'Version: $($(PKG)_VERSION)'; \
+# echo 'Description: SQLite extension that provides 256 bit AES encryption of database files'; \
+# echo 'Libs: -lsqlcipher';) \
+# > '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc'
+#
+# # compile test
+# '$(TARGET)-gcc' \
+# -W -Wall -Werror -ansi -pedantic \
+# '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
+# `'$(TARGET)-pkg-config' $(PKG) --cflags --libs`
+endef