Gentoo Archives: gentoo-commits

From: Sergey Popov <pinkbyte@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlcipher/files/, dev-db/sqlcipher/
Date: Tue, 26 Feb 2019 09:55:55
Message-Id: 1551174877.1f3fafce7f1c7c2a2c06a2ac8bd43347de4d929f.pinkbyte@gentoo
1 commit: 1f3fafce7f1c7c2a2c06a2ac8bd43347de4d929f
2 Author: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 26 09:54:37 2019 +0000
4 Commit: Sergey Popov <pinkbyte <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 26 09:54:37 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f3fafce
7
8 dev-db/sqlcipher: fix building with LibreSSL 2.8
9
10 Signed-off-by: Sergey Popov <pinkbyte <AT> gentoo.org>
11 Reported-by: Dmitry Grigoriev <dimgel <AT> mail.ru>
12 Closes: https://bugs.gentoo.org/678502
13 Package-Manager: Portage-2.3.51, Repoman-2.3.10
14
15 dev-db/sqlcipher/files/sqlcipher-3.4.2-libressl-2.8.patch | 11 +++++++++++
16 dev-db/sqlcipher/sqlcipher-3.4.2.ebuild | 5 ++++-
17 2 files changed, 15 insertions(+), 1 deletion(-)
18
19 diff --git a/dev-db/sqlcipher/files/sqlcipher-3.4.2-libressl-2.8.patch b/dev-db/sqlcipher/files/sqlcipher-3.4.2-libressl-2.8.patch
20 new file mode 100644
21 index 00000000000..da4c55eddfa
22 --- /dev/null
23 +++ b/dev-db/sqlcipher/files/sqlcipher-3.4.2-libressl-2.8.patch
24 @@ -0,0 +1,11 @@
25 +--- a/src/crypto_openssl.c 2017-12-21 14:31:28.000000000 -0500
26 ++++ b/src/crypto_openssl.c 2019-02-22 12:33:54.110516410 -0500
27 +@@ -47,7 +47,7 @@
28 + static unsigned int openssl_init_count = 0;
29 + static sqlite3_mutex* openssl_rand_mutex = NULL;
30 +
31 +-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
32 ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || LIBRESSL_VERSION_NUMBER < 0x2080000L
33 + static HMAC_CTX *HMAC_CTX_new(void)
34 + {
35 + HMAC_CTX *ctx = OPENSSL_malloc(sizeof(*ctx));
36
37 diff --git a/dev-db/sqlcipher/sqlcipher-3.4.2.ebuild b/dev-db/sqlcipher/sqlcipher-3.4.2.ebuild
38 index fd967068f3c..e660467e442 100644
39 --- a/dev-db/sqlcipher/sqlcipher-3.4.2.ebuild
40 +++ b/dev-db/sqlcipher/sqlcipher-3.4.2.ebuild
41 @@ -1,4 +1,4 @@
42 -# Copyright 1999-2018 Gentoo Foundation
43 +# Copyright 1999-2019 Gentoo Foundation
44 # Distributed under the terms of the GNU General Public License v2
45
46 EAPI=6
47 @@ -36,6 +36,9 @@ REQUIRED_USE="
48 DOCS=( README.md )
49
50 src_prepare() {
51 + # bug #678502
52 + eapply "${FILESDIR}/${P}-libressl-2.8.patch"
53 +
54 append-cflags -DSQLITE_HAS_CODEC
55 eapply_user
56 eautoreconf