summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Popov <pinkbyte@gentoo.org>2017-07-06 08:20:04 +0300
committerSergey Popov <pinkbyte@gentoo.org>2017-07-06 08:20:04 +0300
commite26a572ff17f6d690145ea6dcfb40b8799eee656 (patch)
tree8cad17b6f3d9e688a260e43303808a9a1591e71d /dev-db/sqlcipher
parentdev-tex/xcolor: arm stable, bug #622000 (diff)
downloadgentoo-e26a572ff17f6d690145ea6dcfb40b8799eee656.tar.gz
gentoo-e26a572ff17f6d690145ea6dcfb40b8799eee656.tar.bz2
gentoo-e26a572ff17f6d690145ea6dcfb40b8799eee656.zip
dev-db/sqlcipher: fix building with libressl
Reported-by: Toralf Förster <toralf@gentoo.org> Gentoo-Bug: 622114 Package-Manager: Portage-2.3.5, Repoman-2.3.1
Diffstat (limited to 'dev-db/sqlcipher')
-rw-r--r--dev-db/sqlcipher/files/sqlcipher-3.4.1-libressl.patch11
-rw-r--r--dev-db/sqlcipher/sqlcipher-3.4.1.ebuild3
2 files changed, 14 insertions, 0 deletions
diff --git a/dev-db/sqlcipher/files/sqlcipher-3.4.1-libressl.patch b/dev-db/sqlcipher/files/sqlcipher-3.4.1-libressl.patch
new file mode 100644
index 000000000000..f12f1284514d
--- /dev/null
+++ b/dev-db/sqlcipher/files/sqlcipher-3.4.1-libressl.patch
@@ -0,0 +1,11 @@
+--- a/src/crypto_openssl.c 2017-07-06 08:11:21.560000000 +0300
++++ b/src/crypto_openssl.c 2017-07-06 08:11:32.180000000 +0300
+@@ -46,7 +46,7 @@
+ static unsigned int openssl_init_count = 0;
+ static sqlite3_mutex* openssl_rand_mutex = NULL;
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ static HMAC_CTX *HMAC_CTX_new(void)
+ {
+ HMAC_CTX *ctx = OPENSSL_malloc(sizeof(*ctx));
diff --git a/dev-db/sqlcipher/sqlcipher-3.4.1.ebuild b/dev-db/sqlcipher/sqlcipher-3.4.1.ebuild
index 605697d2a084..398c9b506354 100644
--- a/dev-db/sqlcipher/sqlcipher-3.4.1.ebuild
+++ b/dev-db/sqlcipher/sqlcipher-3.4.1.ebuild
@@ -33,6 +33,9 @@ DOCS=( README.md )
src_prepare() {
append-cflags -DSQLITE_HAS_CODEC
+ # bug #622114
+ epatch "${FILESDIR}/${P}-libressl.patch"
+
eapply_user
eautoreconf
}