From c3a9545bdfb8f20ecf9fa7b96ad43e0d17fd68d3 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Wed, 27 Sep 2017 14:17:42 +0200 Subject: [PATCH] megatools: fix patch. thanks @ebfe --- srcpkgs/megatools/patches/fix-libressl.patch | 33 ++++++++++++++++++-- srcpkgs/megatools/template | 2 +- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/srcpkgs/megatools/patches/fix-libressl.patch b/srcpkgs/megatools/patches/fix-libressl.patch index 2d6ae11a98..60049c09cd 100644 --- a/srcpkgs/megatools/patches/fix-libressl.patch +++ b/srcpkgs/megatools/patches/fix-libressl.patch @@ -1,5 +1,5 @@ ---- lib/mega.c.orig 2017-09-27 13:56:24.880875673 +0200 -+++ lib/mega.c 2017-09-27 13:56:28.285869611 +0200 +--- lib/mega.c.orig 2017-09-27 14:15:26.356842896 +0200 ++++ lib/mega.c 2017-09-27 14:15:45.495808811 +0200 @@ -803,7 +803,7 @@ static gboolean rsa_key_gen(rsa_key* k) return FALSE; } @@ -9,3 +9,32 @@ RSA_get0_key(key, &k->m, &k->e, &k->d); RSA_get0_factors(key, &k->q, &k->p); RSA_get0_crt_params(key, NULL, NULL, &k->u); +@@ -2988,7 +2988,7 @@ struct _put_data + GByteArray* buffer; + }; + +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) + void AES_ctr128_encrypt( + const unsigned char *in, + unsigned char *out, +--- lib/tools.c.orig 2017-09-27 14:15:36.322825147 +0200 ++++ lib/tools.c 2017-09-27 14:15:58.974784808 +0200 +@@ -107,7 +107,7 @@ static GOptionEntry network_options[] = + { NULL } + }; + +-#if OPENSSL_VERSION_NUMBER >= 0x10100004L ++#if OPENSSL_VERSION_NUMBER >= 0x10100004L && !defined(LIBRESSL_VERSION_NUMBER) + static void init_openssl_locking() + { + // OpenSSL >= 1.1.0-pre4 doesn't require specific callback setup +@@ -567,7 +567,7 @@ void tool_fini(mega_session* s) + CRYPTO_cleanup_all_ex_data(); + ERR_free_strings(); + +-#if OPENSSL_VERSION_NUMBER < 0x10100004L ++#if OPENSSL_VERSION_NUMBER < 0x10100004L || defined(LIBRESSL_VERSION_NUMBER) + CRYPTO_set_id_callback(NULL); + CRYPTO_set_locking_callback(NULL); + #endif diff --git a/srcpkgs/megatools/template b/srcpkgs/megatools/template index 392b625450..b0871e75ac 100644 --- a/srcpkgs/megatools/template +++ b/srcpkgs/megatools/template @@ -1,7 +1,7 @@ # Template file for 'megatools' pkgname=megatools version=1.9.98 -revision=1 +revision=2 build_style=gnu-configure hostmakedepends="pkg-config asciidoc" makedepends="glib-networking gobject-introspection libressl-devel libcurl-devel fuse-devel libsodium-devel glib-devel"