From: Aaron Bauman Date: Mon, 23 Apr 2018 17:29:24 +0000 (-0400) Subject: app-crypt/efitools: add compatibility patch for LibreSSL X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=b34e70a62caf31299d173736f3297bb7e505dd5e;p=gentoo.git 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 --- 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);