From a39795497c86436fab1e1d10c9357685ac0c8dcc Mon Sep 17 00:00:00 2001 From: John Date: Sat, 18 Nov 2017 17:24:59 +0100 Subject: [PATCH] megacmd: update to 3.2.7. (#9305) --- common/shlibs | 1 + srcpkgs/libmega | 1 + srcpkgs/libmega-devel | 1 + .../patches/megacmd-00-support-libressl.patch | 58 ++++++++----------- srcpkgs/megacmd/template | 21 ++++++- 5 files changed, 45 insertions(+), 37 deletions(-) create mode 120000 srcpkgs/libmega create mode 120000 srcpkgs/libmega-devel diff --git a/common/shlibs b/common/shlibs index 10dceed8776..f0ea3304d0c 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2895,3 +2895,4 @@ libgnustep-base.so.1.25 gnustep-base-1.25.0_1 libtermbox.so.1 termbox-1.1.0_1 libmysofa.so.0 libmysofa-0.6_1 libzinnia.so.0 libzinnia-0.06_1 +libmega.so.30207 libmega-3.2.7_1 diff --git a/srcpkgs/libmega b/srcpkgs/libmega new file mode 120000 index 00000000000..7776e10121c --- /dev/null +++ b/srcpkgs/libmega @@ -0,0 +1 @@ +megacmd \ No newline at end of file diff --git a/srcpkgs/libmega-devel b/srcpkgs/libmega-devel new file mode 120000 index 00000000000..7776e10121c --- /dev/null +++ b/srcpkgs/libmega-devel @@ -0,0 +1 @@ +megacmd \ No newline at end of file diff --git a/srcpkgs/megacmd/patches/megacmd-00-support-libressl.patch b/srcpkgs/megacmd/patches/megacmd-00-support-libressl.patch index 28527d6b8b5..dfd964c4fab 100644 --- a/srcpkgs/megacmd/patches/megacmd-00-support-libressl.patch +++ b/srcpkgs/megacmd/patches/megacmd-00-support-libressl.patch @@ -1,41 +1,29 @@ -diff --git src/posix/net.cpp src/posix/net.cpp -index 2bb16de5..8eb7d1d6 100644 ---- src/posix/net.cpp -+++ src/posix/net.cpp -@@ -2396,7 +2396,7 @@ CURLcode CurlHttpIO::ssl_ctx_function(CURL*, void* sslctx, void*req) - return CURLE_OK; +--- net.cpp 2017-11-18 11:58:03.524955739 +0100 ++++ src/posix/net.cpp 2017-11-18 11:59:41.082959457 +0100 +@@ -53,7 +53,7 @@ + } } --#if (OPENSSL_VERSION_NUMBER < 0x10100000L) -+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER) - #define X509_STORE_CTX_get0_cert(ctx) (ctx->cert) - #define X509_STORE_CTX_get0_untrusted(ctx) (ctx->untrusted) - #define EVP_PKEY_get0_DSA(_pkey_) ((_pkey_)->pkey.dsa) -@@ -2405,7 +2405,7 @@ CURLcode CurlHttpIO::ssl_ctx_function(CURL*, void* sslctx, void*req) - - const BIGNUM *RSA_get0_n(const RSA *rsa) +-#if OPENSSL_VERSION_NUMBER >= 0x10000000 ++#if OPENSSL_VERSION_NUMBER >= 0x10000000 || defined (LIBRESSL_VERSION_NUMBER) + void CurlHttpIO::id_function(CRYPTO_THREADID* id) { --#if (OPENSSL_VERSION_NUMBER < 0x10100000L) -+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER) - return rsa->n; - #else - const BIGNUM *result; -@@ -2416,7 +2416,7 @@ const BIGNUM *RSA_get0_n(const RSA *rsa) + CRYPTO_THREADID_set_pointer(id, (void *)THREAD_CLASS::currentThreadId()); +@@ -137,7 +137,7 @@ + #if defined(USE_OPENSSL) && !defined(OPENSSL_IS_BORINGSSL) - const BIGNUM *RSA_get0_e(const RSA *rsa) - { --#if (OPENSSL_VERSION_NUMBER < 0x10100000L) -+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER) - return rsa->e; + if (!CRYPTO_get_locking_callback() +-#if OPENSSL_VERSION_NUMBER >= 0x10000000 ++#if OPENSSL_VERSION_NUMBER >= 0x10000000 || defined (LIBRESSL_VERSION_NUMBER) + && !CRYPTO_THREADID_get_callback()) #else - const BIGNUM *result; -@@ -2427,7 +2427,7 @@ const BIGNUM *RSA_get0_e(const RSA *rsa) - - const BIGNUM *RSA_get0_d(const RSA *rsa) - { --#if (OPENSSL_VERSION_NUMBER < 0x10100000L) -+#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER) - return rsa->d; + && !CRYPTO_get_id_callback()) +@@ -147,7 +147,7 @@ + int numLocks = CRYPTO_num_locks(); + sslMutexes = new MUTEX_CLASS*[numLocks]; + memset(sslMutexes, 0, numLocks * sizeof(MUTEX_CLASS*)); +-#if OPENSSL_VERSION_NUMBER >= 0x10000000 ++#if OPENSSL_VERSION_NUMBER >= 0x10000000 || defined (LIBRESSL_VERSION_NUMBER) + CRYPTO_THREADID_set_callback(CurlHttpIO::id_function); #else - const BIGNUM *result; - + CRYPTO_set_id_callback(CurlHttpIO::id_function); diff --git a/srcpkgs/megacmd/template b/srcpkgs/megacmd/template index 2c6b3eb580c..744ad41c760 100644 --- a/srcpkgs/megacmd/template +++ b/srcpkgs/megacmd/template @@ -1,6 +1,6 @@ # Template file for 'megacmd' pkgname=megacmd -version=3.2.0 +version=3.2.7 revision=1 wrksrc=sdk-${version} build_style=gnu-configure @@ -15,7 +15,7 @@ maintainer="jbgg " license="2-clause-BSD" homepage="https://mega.nz" distfiles="https://github.com/meganz/sdk/archive/v${version}.tar.gz" -checksum=4f4b607caa80fc7a91ba1cbb882b1c9b903d9b67b59db47fb7ec821e33de29f3 +checksum=fc0bab64a45f01988b5c9956047f4e5037608ec7c39d6c2e661dfa33020c8ac1 case "$XBPS_TARGET_MACHINE" in aarch64*) broken="https://travis-ci.org/voidlinux/void-packages/jobs/281616641";; @@ -28,3 +28,20 @@ pre_configure() { post_install() { vlicense LICENSE } + +libmega_package() { + short_desc="Library for the cloud service mega.nz" + pkg_install() { + vmove "usr/lib/*.so.*" + } +} + +libmega-devel_package() { + depends="libmega>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove "usr/lib/*.so" + vmove usr/lib/pkgconfig + } +}