From 64552f315d5e53addc77c9e730d7d325d6394070 Mon Sep 17 00:00:00 2001 From: Bosco Date: Fri, 22 Sep 2017 02:46:11 +0200 Subject: [PATCH] New package: megacmd-3.2.0 --- .../patches/megacmd-00-support-libressl.patch | 41 +++++++++++++++++++ .../patches/megacmd-01-support-musl.patch | 26 ++++++++++++ srcpkgs/megacmd/template | 30 ++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 srcpkgs/megacmd/patches/megacmd-00-support-libressl.patch create mode 100644 srcpkgs/megacmd/patches/megacmd-01-support-musl.patch create mode 100644 srcpkgs/megacmd/template diff --git a/srcpkgs/megacmd/patches/megacmd-00-support-libressl.patch b/srcpkgs/megacmd/patches/megacmd-00-support-libressl.patch new file mode 100644 index 0000000000..28527d6b8b --- /dev/null +++ b/srcpkgs/megacmd/patches/megacmd-00-support-libressl.patch @@ -0,0 +1,41 @@ +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; + } + +-#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 < 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) + + 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; + #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; + #else + const BIGNUM *result; + diff --git a/srcpkgs/megacmd/patches/megacmd-01-support-musl.patch b/srcpkgs/megacmd/patches/megacmd-01-support-musl.patch new file mode 100644 index 0000000000..158ee7ceff --- /dev/null +++ b/srcpkgs/megacmd/patches/megacmd-01-support-musl.patch @@ -0,0 +1,26 @@ +diff --git examples/megacmd/megacmdshell/megacmdshell.cpp examples/megacmd/megacmdshell/megacmdshell.cpp +index be281cb7..979ab793 100644 +--- examples/megacmd/megacmdshell/megacmdshell.cpp ++++ examples/megacmd/megacmdshell/megacmdshell.cpp +@@ -33,6 +33,8 @@ + #include + #include + ++#include ++ + enum + { + MCMD_OK = 0, ///< Everything OK +diff --git examples/megacmd/megacmdshell/megacmdshellcommunications.cpp examples/megacmd/megacmdshell/megacmdshellcommunications.cpp +index 8046a8b5..a01d07ab 100644 +--- examples/megacmd/megacmdshell/megacmdshellcommunications.cpp ++++ examples/megacmd/megacmdshell/megacmdshellcommunications.cpp +@@ -27,6 +27,8 @@ + #include + #include + ++#include ++ + #ifdef _WIN32 + #include //SHGetFolderPath + #include //PathAppend diff --git a/srcpkgs/megacmd/template b/srcpkgs/megacmd/template new file mode 100644 index 0000000000..2c6b3eb580 --- /dev/null +++ b/srcpkgs/megacmd/template @@ -0,0 +1,30 @@ +# Template file for 'megacmd' +pkgname=megacmd +version=3.2.0 +revision=1 +wrksrc=sdk-${version} +build_style=gnu-configure +make_build_args='LIBTOOLFLAGS="--tag=CXX"' +hostmakedepends="base-devel autogen doxygen" +makedepends="libcurl-devel c-ares-devel libressl-devel crypto++-devel + zlib-devel sqlite-devel freeimage-devel readline-devel libsodium-devel + pcre-devel pcre2-devel libuv-devel fuse-devel" +depends="pcre libpcrecpp c-ares libcurl libsodium sqlite freeimage libressl crypto++" +short_desc="The official client for cloud service mega.nz" +maintainer="jbgg " +license="2-clause-BSD" +homepage="https://mega.nz" +distfiles="https://github.com/meganz/sdk/archive/v${version}.tar.gz" +checksum=4f4b607caa80fc7a91ba1cbb882b1c9b903d9b67b59db47fb7ec821e33de29f3 + +case "$XBPS_TARGET_MACHINE" in + aarch64*) broken="https://travis-ci.org/voidlinux/void-packages/jobs/281616641";; +esac + +pre_configure() { + ./autogen.sh +} + +post_install() { + vlicense LICENSE +}