1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

chore(windows): update SQLCipher to v4.4.0

(cherry picked from commit 2b0f3081ac)
This commit is contained in:
Maxim Biro 2020-05-24 02:09:47 -04:00 committed by Anthony Bilinski
parent d1da219e54
commit 80b2eebead
No known key found for this signature in database
GPG Key ID: 2AA8E0DA1B31FB3C

View File

@ -389,8 +389,8 @@ set -u
# SQLCipher
SQLCIPHER_PREFIX_DIR="$DEP_DIR/libsqlcipher"
SQLCIPHER_VERSION=v4.3.0
SQLCIPHER_HASH="fccb37e440ada898902b294d02cde7af9e8706b185d77ed9f6f4d5b18b4c305f"
SQLCIPHER_VERSION=v4.4.0
SQLCIPHER_HASH="0924b2ae1079717954498bda78a30de20ce2a6083076b16214a711567821d148"
SQLCIPHER_FILENAME="$SQLCIPHER_VERSION.tar.gz"
if [ ! -f "$SQLCIPHER_PREFIX_DIR/done" ]
then
@ -403,36 +403,16 @@ then
rm $SQLCIPHER_FILENAME
cd sqlcipher*
sed -i s/'LIBS="-lcrypto $LIBS"'/'LIBS="-lcrypto -lgdi32 -lws2_32 $LIBS"'/g configure
sed -i s/'LIBS="-lcrypto $LIBS"'/'LIBS="-lcrypto -lgdi32 -lws2_32 $LIBS"'/g configure
sed -i s/'if test "$TARGET_EXEEXT" = ".exe"'/'if test ".exe" = ".exe"'/g configure
sed -i 's|exec $PWD/mksourceid manifest|exec $PWD/mksourceid.exe manifest|g' tool/mksqlite3h.tcl
# Do not remove trailing whitespace and dont replace tabs with spaces in the patch below,
# otherwise the patch will fail to apply
> Makefile.in-patch cat << "EOF"
--- Makefile.in 2017-07-24 04:33:46.944080013 +0000
+++ Makefile.in-patch 2017-07-24 04:50:47.340596990 +0000
@@ -1074,7 +1074,7 @@
$(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
EOF
patch -l < Makefile.in-patch
./configure --host="$ARCH-w64-mingw32" \
--prefix="$SQLCIPHER_PREFIX_DIR" \
--disable-shared \
--enable-tempstore=yes \
CFLAGS="-O2 -g0 -DSQLITE_HAS_CODEC -I$OPENSSL_PREFIX_DIR/include/" \
LDFLAGS="$OPENSSL_PREFIX_DIR/lib/libcrypto.a -lcrypto -lgdi32 -L$OPENSSL_PREFIX_DIR/lib/"
LDFLAGS="$OPENSSL_PREFIX_DIR/lib/libcrypto.a -lcrypto -lgdi32 -L$OPENSSL_PREFIX_DIR/lib/" \
LIBS="-lgdi32 -lws2_32"
sed -i s/"TEXE = $"/"TEXE = .exe"/ Makefile