diff options
author | Steve Wills <swills@FreeBSD.org> | 2018-07-25 12:52:24 +0000 |
---|---|---|
committer | Steve Wills <swills@FreeBSD.org> | 2018-07-25 12:52:24 +0000 |
commit | bb98a543f936d40896b62f4abb5ff9c3129a23b1 (patch) | |
tree | 14d3b2a7bf30de7058a251033991c71309c9a589 /net/megatools | |
parent | 3974735340a567952a6a9205b2962f595b962436 (diff) | |
download | ports-bb98a543f936d40896b62f4abb5ff9c3129a23b1.tar.gz ports-bb98a543f936d40896b62f4abb5ff9c3129a23b1.zip |
Notes
Diffstat (limited to 'net/megatools')
-rw-r--r-- | net/megatools/Makefile | 3 | ||||
-rw-r--r-- | net/megatools/distinfo | 6 | ||||
-rw-r--r-- | net/megatools/files/patch-lib_mega.c | 73 | ||||
-rw-r--r-- | net/megatools/files/patch-lib_mega.h | 19 |
4 files changed, 66 insertions, 35 deletions
diff --git a/net/megatools/Makefile b/net/megatools/Makefile index 2acd754b59f9..13b8c69cb466 100644 --- a/net/megatools/Makefile +++ b/net/megatools/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= megatools -PORTVERSION= 1.9.98 -PORTREVISION= 1 +PORTVERSION= 1.10.0 CATEGORIES= net MASTER_SITES= https://megatools.megous.com/builds/ diff --git a/net/megatools/distinfo b/net/megatools/distinfo index 1811787fcbdd..fb031445056c 100644 --- a/net/megatools/distinfo +++ b/net/megatools/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1478256777 -SHA256 (megatools-1.9.98.tar.gz) = 9b0521a4d27dbc417fc8e12610ac1e1da729bf6d6eb5bef927ef3670b372a16f -SIZE (megatools-1.9.98.tar.gz) = 285805 +TIMESTAMP = 1532507562 +SHA256 (megatools-1.10.0.tar.gz) = 788a51d0977db95c371c97917aee3d39e145044b6bb70d671bc76c2ea6c4171b +SIZE (megatools-1.10.0.tar.gz) = 297369 diff --git a/net/megatools/files/patch-lib_mega.c b/net/megatools/files/patch-lib_mega.c index f22426ff18ae..f45b366c10bf 100644 --- a/net/megatools/files/patch-lib_mega.c +++ b/net/megatools/files/patch-lib_mega.c @@ -1,33 +1,46 @@ -Fix build for FreeBSD 9.x base OpenSSL and LibreSSL. Fix for LibreSSL is -already in upstream repository, so this file can be removed once FreeBSD 9.x -support is dropped AND the next version of megatools is released. ---- lib/mega.c.orig 2016-11-03 13:45:42 UTC +--- lib/mega.c.orig 2018-07-22 21:41:55 UTC +++ lib/mega.c -@@ -29,7 +29,9 @@ - #include <string.h> - #include <time.h> - #include <openssl/aes.h> -+#if OPENSSL_VERSION_NUMBER >= 0x101000000L && !defined(LIBRESSL_VERSION_NUMBER) - #include <openssl/modes.h> -+#endif - #include <openssl/bn.h> - #include <openssl/rsa.h> - #include <openssl/rand.h> -@@ -803,7 +805,7 @@ static gboolean rsa_key_gen(rsa_key* k) - return FALSE; - } +@@ -3172,6 +3172,7 @@ static void tman_worker_upload_chunk(struct transfer_c + GError *local_err = NULL; + gc_free gchar *url = NULL; + gc_string_free GString *response = NULL; ++ gc_free gchar* chksum = NULL; --#if OPENSSL_VERSION_NUMBER >= 0x10100000L -+#if OPENSSL_VERSION_NUMBER >= 0x101000000L && !defined(LIBRESSL_VERSION_NUMBER) - 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 +2990,7 @@ struct _put_data - GByteArray* buffer; - }; + tman_debug("W[%d]: started for chunk %d\n", worker->index, c->index); --#if OPENSSL_VERSION_NUMBER >= 0x10100000L -+#if OPENSSL_VERSION_NUMBER >= 0x101000000L && !defined(LIBRESSL_VERSION_NUMBER) - void AES_ctr128_encrypt( - const unsigned char *in, - unsigned char *out, +@@ -3217,7 +3218,7 @@ static void tman_worker_upload_chunk(struct transfer_c + } + + // prepare URL including chunk offset +- gc_free gchar* chksum = upload_checksum(buf, c->size); ++ chksum = upload_checksum(buf, c->size); + url = g_strdup_printf("%s/%" G_GOFFSET_FORMAT "?c=%s", t->upload_url, c->offset, chksum); + + // perform upload POST +@@ -4636,6 +4637,26 @@ gboolean mega_node_get_path(struct mega_node *n, gchar + gboolean mega_node_is_container(struct mega_node *n) + { + return n && n->type != MEGA_NODE_FILE; ++} ++ ++// }}} ++// {{{ mega_node_has_ancestor ++ ++gboolean mega_node_has_ancestor(struct mega_node *n, struct mega_node *ancestor) ++{ ++ g_return_val_if_fail(n != NULL, FALSE); ++ g_return_val_if_fail(ancestor != NULL, FALSE); ++ ++ struct mega_node* it = n->parent; ++ ++ while (it) { ++ if (it == ancestor) ++ return TRUE; ++ ++ it = it->parent; ++ } ++ ++ return FALSE; + } + + // }}} diff --git a/net/megatools/files/patch-lib_mega.h b/net/megatools/files/patch-lib_mega.h new file mode 100644 index 000000000000..14ba316b7cb0 --- /dev/null +++ b/net/megatools/files/patch-lib_mega.h @@ -0,0 +1,19 @@ +--- lib/mega.h.orig 2018-07-22 21:40:40 UTC ++++ lib/mega.h +@@ -118,7 +118,7 @@ struct mega_download_data_params { + + gchar *node_handle; + gchar *node_name; +- gsize node_size; ++ guint64 node_size; + }; + + #define MEGA_DEBUG_API 0x01 +@@ -181,6 +181,7 @@ void mega_download_data_free(struct mega_download_data + gboolean mega_node_is_writable(struct mega_session *s, struct mega_node *n); + + gboolean mega_node_is_container(struct mega_node *n); ++gboolean mega_node_has_ancestor(struct mega_node *n, struct mega_node *ancestor); + gchar *mega_node_get_link(struct mega_node *n, gboolean include_key); + gchar *mega_node_get_key(struct mega_node *n); + gboolean mega_node_get_path(struct mega_node *n, gchar *buf, gsize len); |