summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Bauman <bman@gentoo.org>2018-04-23 13:29:24 -0400
committerAaron Bauman <bman@gentoo.org>2018-04-23 13:29:37 -0400
commitb34e70a62caf31299d173736f3297bb7e505dd5e (patch)
treece0afcd0a8e18578b18f9760ad97ad048d497dbf
parentdev-php/PEAR-VersionControl_SVN: New snapshot from VCS (diff)
downloadgentoo-b34e70a62caf31299d173736f3297bb7e505dd5e.tar.gz
gentoo-b34e70a62caf31299d173736f3297bb7e505dd5e.tar.bz2
gentoo-b34e70a62caf31299d173736f3297bb7e505dd5e.zip
app-crypt/efitools: add compatibility patch for LibreSSL
This patch fixes building with LibreSSL due to a conditional function for API. Closes: https://bugs.gentoo.org/653716 Package-Manager: Portage-2.3.31, Repoman-2.3.9
-rw-r--r--app-crypt/efitools/efitools-1.8.1.ebuild2
-rw-r--r--app-crypt/efitools/files/efitools-1.8.1-libressl-compatibility.patch11
2 files changed, 13 insertions, 0 deletions
diff --git a/app-crypt/efitools/efitools-1.8.1.ebuild b/app-crypt/efitools/efitools-1.8.1.ebuild
index 073dcca2de89..f18e8b8ea271 100644
--- a/app-crypt/efitools/efitools-1.8.1.ebuild
+++ b/app-crypt/efitools/efitools-1.8.1.ebuild
@@ -25,6 +25,8 @@ DEPEND="${RDEPEND}
sys-boot/gnu-efi
virtual/pkgconfig"
+PATCHES=( "${FILESDIR}/${P}-libressl-compatibility.patch" )
+
src_prepare() {
# Respect users CFLAGS
sed -i -e 's/CFLAGS.*= -O2 -g/CFLAGS += /' Make.rules || die
diff --git a/app-crypt/efitools/files/efitools-1.8.1-libressl-compatibility.patch b/app-crypt/efitools/files/efitools-1.8.1-libressl-compatibility.patch
new file mode 100644
index 000000000000..876baae16f81
--- /dev/null
+++ b/app-crypt/efitools/files/efitools-1.8.1-libressl-compatibility.patch
@@ -0,0 +1,11 @@
+--- a/cert-to-efi-hash-list.c 2018-04-21 20:59:24.814748503 +0200
++++ b/cert-to-efi-hash-list.c 2018-04-21 20:59:51.868581307 +0200
+@@ -135,7 +135,7 @@
+ X509 *cert = PEM_read_bio_X509(cert_bio, NULL, NULL, NULL);
+ unsigned char *cert_buf = NULL;
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ int cert_len = i2d_X509_CINF(cert->cert_info, &cert_buf);
+ #else
+ int cert_len = i2d_re_X509_tbs(cert, &cert_buf);