commit:     4d26198ef2dd685c8b3c4e066e70a1645227d6d1
Author:     Stefan Strogin <stefan.strogin <AT> gmail <DOT> com>
AuthorDate: Mon Mar 25 16:39:32 2019 +0000
Commit:     Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Fri Mar 29 05:11:07 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4d26198e

dev-db/sqlitestudio: add patch to fix build with LibreSSL

Closes: https://bugs.gentoo.org/681638
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Stefan Strogin <stefan.strogin <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/11495
Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>

 .../files/sqlitestudio-3.2.1-libressl.patch        | 32 ++++++++++++++++++++++
 ...o-3.2.1.ebuild => sqlitestudio-3.2.1-r1.ebuild} |  1 +
 2 files changed, 33 insertions(+)

diff --git a/dev-db/sqlitestudio/files/sqlitestudio-3.2.1-libressl.patch 
b/dev-db/sqlitestudio/files/sqlitestudio-3.2.1-libressl.patch
new file mode 100644
index 00000000000..06552942e94
--- /dev/null
+++ b/dev-db/sqlitestudio/files/sqlitestudio-3.2.1-libressl.patch
@@ -0,0 +1,32 @@
+From 64542c8c5cb3ad9249fa353ff4472c405057d743 Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <[email protected]>
+Date: Mon, 25 Mar 2019 18:07:13 +0200
+Subject: [PATCH] #3505 Fix compilation with LibreSSL >=2.7.0
+
+HMAC_CTX_{new,free} were provided by LibreSSL 2.7.0.
+Do not redefine them, otherwise it breaks compilation.
+
+Upstream-Status: Accepted
+[https://github.com/pawelsalawa/sqlitestudio/pull/3507]
+Signed-off-by: Stefan Strogin <[email protected]>
+---
+ Plugins/DbSqliteCipher/sqlcipher.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/Plugins/DbSqliteCipher/sqlcipher.c 
b/Plugins/DbSqliteCipher/sqlcipher.c
+index 4918cb6f..10c4e5a3 100644
+--- a/Plugins/DbSqliteCipher/sqlcipher.c
++++ b/Plugins/DbSqliteCipher/sqlcipher.c
+@@ -21638,7 +21638,8 @@ static unsigned int openssl_external_init = 0;
+ static unsigned int openssl_init_count = 0;
+ static sqlcipher_sqlite3_mutex* openssl_rand_mutex = NULL;
+ 
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
++    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 
0x2070000fL)
+ static HMAC_CTX *HMAC_CTX_new(void)
+ {
+   HMAC_CTX *ctx = OPENSSL_malloc(sizeof(*ctx));
+-- 
+2.21.0
+

diff --git a/dev-db/sqlitestudio/sqlitestudio-3.2.1.ebuild 
b/dev-db/sqlitestudio/sqlitestudio-3.2.1-r1.ebuild
similarity index 98%
rename from dev-db/sqlitestudio/sqlitestudio-3.2.1.ebuild
rename to dev-db/sqlitestudio/sqlitestudio-3.2.1-r1.ebuild
index bd8f78a3763..f1b05ce7abe 100644
--- a/dev-db/sqlitestudio/sqlitestudio-3.2.1.ebuild
+++ b/dev-db/sqlitestudio/sqlitestudio-3.2.1-r1.ebuild
@@ -36,6 +36,7 @@ DEPEND="${RDEPEND}
        dev-qt/qtconcurrent:5
        test? ( dev-qt/qttest:5 )
 "
+PATCHES=( "${FILESDIR}"/${P}-libressl.patch )
 
 S="${WORKDIR}"
 core_build_dir="${S}/output/build"

Reply via email to