summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Heiko Becker <heirecka@exherbo.org> 2018-05-12 12:54:11 +0200
committerAvatar Heiko Becker <heirecka@exherbo.org> 2018-05-12 13:11:10 +0200
commitc64a99b74b269b2f2afc8bf541ff5dbff47ebe86 (patch)
treedc17b70fc2011173712018acd189433f4bea1624
parentbbfb0a0819f7c0c54fcfc80a53e2a362a9fca333 (diff)
downloadnet-c64a99b74b269b2f2afc8bf541ff5dbff47ebe86.tar.gz
net-c64a99b74b269b2f2afc8bf541ff5dbff47ebe86.tar.xz
libgit2: Fix build with libressl[>=2.7]
There has been an MR on gitlab[1] which gives me a 500 error now, but the contained patch didn't have a patch header and the original author seems unreponsive for the moment, so I added an upstream patch myself. [1] https://gitlab.exherbo.org/exherbo/net/merge_requests/7
-rw-r--r--packages/dev-scm/libgit2/files/libgit2-Fix-build-with-LibreSSL-2.7.patch46
-rw-r--r--packages/dev-scm/libgit2/libgit2-0.27.0.exheres-04
2 files changed, 50 insertions, 0 deletions
diff --git a/packages/dev-scm/libgit2/files/libgit2-Fix-build-with-LibreSSL-2.7.patch b/packages/dev-scm/libgit2/files/libgit2-Fix-build-with-LibreSSL-2.7.patch
new file mode 100644
index 0000000..7d362ee
--- /dev/null
+++ b/packages/dev-scm/libgit2/files/libgit2-Fix-build-with-LibreSSL-2.7.patch
@@ -0,0 +1,46 @@
+Upstream: yes
+
+From 7490d449b518115a1ae86b01397e95c38e39cff1 Mon Sep 17 00:00:00 2001
+From: Bernard Spil <brnrd@FreeBSD.org>
+Date: Mon, 2 Apr 2018 20:00:07 +0200
+Subject: [PATCH] Fix build with LibreSSL 2.7
+
+LibreSSL 2.7 adds OpenSSL 1.1 API
+
+Signed-off-by: Bernard Spil <brnrd@FreeBSD.org>
+---
+ src/streams/openssl.c | 3 ++-
+ src/streams/openssl.h | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/streams/openssl.c b/src/streams/openssl.c
+index 9cbb2746f..adcb7f14e 100644
+--- a/src/streams/openssl.c
++++ b/src/streams/openssl.c
+@@ -104,7 +104,8 @@ int git_openssl_stream_global_init(void)
+ ssl_opts |= SSL_OP_NO_COMPRESSION;
+ #endif
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+ SSL_load_error_strings();
+ OpenSSL_add_ssl_algorithms();
+ #else
+diff --git a/src/streams/openssl.h b/src/streams/openssl.h
+index 2bbad7c68..44329ec90 100644
+--- a/src/streams/openssl.h
++++ b/src/streams/openssl.h
+@@ -31,7 +31,8 @@ extern int git_openssl__set_cert_location(const char *file, const char *path);
+
+
+
+-# if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
++# if OPENSSL_VERSION_NUMBER < 0x10100000L || \
++ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L)
+
+ GIT_INLINE(BIO_METHOD*) BIO_meth_new(int type, const char *name)
+ {
+--
+2.17.0
+
diff --git a/packages/dev-scm/libgit2/libgit2-0.27.0.exheres-0 b/packages/dev-scm/libgit2/libgit2-0.27.0.exheres-0
index 73ab514..2355b25 100644
--- a/packages/dev-scm/libgit2/libgit2-0.27.0.exheres-0
+++ b/packages/dev-scm/libgit2/libgit2-0.27.0.exheres-0
@@ -5,3 +5,7 @@ require libgit2
PLATFORMS="~amd64"
+DEFAULT_SRC_PREPARE_PATCHES+=(
+ "${FILES}"/${PN}-Fix-build-with-LibreSSL-2.7.patch
+)
+