* Re: [PR PATCH] [Updated] Update MEGA*
2019-09-13 19:36 [PR PATCH] Update MEGA* voidlinux-github
@ 2019-09-13 19:55 ` voidlinux-github
2019-09-13 19:55 ` voidlinux-github
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-09-13 19:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 307 bytes --]
There is an updated pull request by Johnnynator against master on the void-packages repository
https://github.com/Johnnynator/void-packages MEGA
https://github.com/void-linux/void-packages/pull/14439
Update MEGA*
A patch file from https://github.com/void-linux/void-packages/pull/14439.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-MEGA-14439.patch --]
[-- Type: text/x-diff, Size: 8462 bytes --]
From 4f6a19250d8b1d6bc2b5529b19071ca71a92352e Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 21:50:34 +0300
Subject: [PATCH 1/3] MEGAsdk: update to 3.6.2a.
---
common/shlibs | 2 +-
srcpkgs/MEGAsdk/template | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/shlibs b/common/shlibs
index 09df4f3ceca..dccdfc5ecf4 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2952,7 +2952,7 @@ libvted-3.so.0 libvted-3.7.0_2
libpeasd-3.so.0 libpeasd-3.7.0_2
libgstreamerd-3.so.0 libgstreamerd-3.7.0_2
libgtkdgl-3.so.0 libgtkdgl-3.7.0_2
-libmega.so.30504 MEGAsdk-3.5.4_1
+libmega.so.30602 MEGAsdk-3.6.2a_1
libopenglrecorder.so.0 libopenglrecorder-0.1.0_1
libgpod.so.4 libgpod-0.8.3_1
libi2c.so.0 i2c-tools-4.0_1
diff --git a/srcpkgs/MEGAsdk/template b/srcpkgs/MEGAsdk/template
index a7a9977393e..864b70a7adc 100644
--- a/srcpkgs/MEGAsdk/template
+++ b/srcpkgs/MEGAsdk/template
@@ -1,6 +1,6 @@
# Template file for 'MEGAsdk'
pkgname=MEGAsdk
-version=3.5.4
+version=3.6.2a
revision=1
wrksrc="sdk-${version}"
build_style=gnu-configure
@@ -16,7 +16,7 @@ maintainer="John <johnz@posteo.net>"
license="BSD-2-Clause"
homepage="https://mega.nz"
distfiles="https://github.com/meganz/sdk/archive/v${version}.tar.gz"
-checksum=7fc81a64a77829bbc8dd316aac2159890a556dfdeade527a1386482e6dee26ee
+checksum=22d910bcd799f30a499fe748cc2b3917e9e213558b1d5fba07b3f3908a833897
replaces="libmega>=0"
build_options="libuv mediainfo"
From 1ee8f69e451e460a3162c100d33c1681a0867ed9 Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 22:34:24 +0300
Subject: [PATCH 2/3] MEGAsync: update to 4.2.4.0.
---
srcpkgs/MEGAsync/patches/breakpad.patch | 16 ++++++++++++++++
srcpkgs/MEGAsync/template | 10 +++++-----
2 files changed, 21 insertions(+), 5 deletions(-)
create mode 100644 srcpkgs/MEGAsync/patches/breakpad.patch
diff --git a/srcpkgs/MEGAsync/patches/breakpad.patch b/srcpkgs/MEGAsync/patches/breakpad.patch
new file mode 100644
index 00000000000..36495af4460
--- /dev/null
+++ b/srcpkgs/MEGAsync/patches/breakpad.patch
@@ -0,0 +1,16 @@
+--- src/MEGASync/google_breakpad/client/linux/handler/exception_handler.cc 2019-09-13 22:27:23.351723073 +0300
++++ - 2019-09-13 22:33:08.244312688 +0300
+@@ -104,11 +104,13 @@
+ #define PR_SET_PTRACER 0x59616d61
+ #endif
+
++#if defined(__GLIBC__) && __GLIBC__ < 2 && __GLIBC_MINOR__ < 30
+ // A wrapper for the tgkill syscall: send a signal to a specific thread.
+ static int tgkill(pid_t tgid, pid_t tid, int sig) {
+ return syscall(__NR_tgkill, tgid, tid, sig);
+ return 0;
+ }
++#endif
+
+ namespace google_breakpad {
+
diff --git a/srcpkgs/MEGAsync/template b/srcpkgs/MEGAsync/template
index 913e8fe7dee..4a70a48ad8e 100644
--- a/srcpkgs/MEGAsync/template
+++ b/srcpkgs/MEGAsync/template
@@ -1,11 +1,11 @@
# Template file for 'MEGAsync'
pkgname=MEGAsync
-version=4.1.1.0
+version=4.2.4.0
revision=1
-wrksrc="${pkgname}-${version}_Linux"
+wrksrc="${pkgname}-${version}_Win"
build_wrksrc=src
build_style=qmake
-configure_args='"CONFIG-=with_tools"'
+configure_args='"CONFIG+=FULLREQUIREMENTS"'
hostmakedepends="libtool qt5-qmake qt5-host-tools"
makedepends="qt5-tools-devel qt5-devel qt5-svg-devel MEGAsdk-devel MEGAsdk-qt
libraw-devel libgomp-devel"
@@ -13,8 +13,8 @@ short_desc="Automated syncing with MEGA Cloud Drive"
maintainer="John <johnz@posteo.net>"
license="custom"
homepage="https://mega.co.nz"
-distfiles="https://github.com/meganz/MEGAsync/archive/v${version}_Linux.tar.gz"
-checksum=5f43a3f402c10519e2f59c8c2a70c55affd3eb1a323767127929fb5f4baa429c
+distfiles="https://github.com/meganz/MEGAsync/archive/v${version}_Win.tar.gz"
+checksum=5fd90c93677085a2f73faa6a5a3548fcd29fc9f3203f6ddbcac7f170b580f239
restricted=yes
nocross=yes
From 4fb390d06e64a53cf61b461f35f38e65044891c9 Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 22:53:35 +0300
Subject: [PATCH 3/3] MEGAcmd: update to 1.1.0.
---
srcpkgs/MEGAcmd/patches/include.am.patch | 22 -----------------
srcpkgs/MEGAcmd/patches/musl.patch | 13 ----------
srcpkgs/MEGAcmd/template | 31 +++++++++++-------------
3 files changed, 14 insertions(+), 52 deletions(-)
delete mode 100644 srcpkgs/MEGAcmd/patches/include.am.patch
delete mode 100644 srcpkgs/MEGAcmd/patches/musl.patch
diff --git a/srcpkgs/MEGAcmd/patches/include.am.patch b/srcpkgs/MEGAcmd/patches/include.am.patch
deleted file mode 100644
index 45e1a9fcdd5..00000000000
--- a/srcpkgs/MEGAcmd/patches/include.am.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- src/include.am.orig 2017-12-01 23:56:36.199044786 +0100
-+++ src/include.am 2017-12-01 23:56:54.073045467 +0100
-@@ -7,7 +7,7 @@
-
- MEGACMD = mega-cmd mega-exec mega-cmd-server
- bin_PROGRAMS += $(MEGACMD)
--$(MEGACMD): $(MEGA_LIBS)
-+$(MEGACMD):
- noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
- megacmdcompletiondir = $(sysconfdir)/bash_completion.d/
- megacmdcompletion_DATA = src/client/megacmd_completion.sh
---- src/include.am 2018-12-06 14:42:18.308589868 +0100
-+++ - 2018-12-06 14:45:15.075785487 +0100
-@@ -9,7 +9,7 @@
- bin_PROGRAMS += $(MEGACMD)
- $(MEGACMD):
- noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
--megacmdcompletiondir = $(sysconfdir)/bash_completion.d/
-+megacmdcompletiondir = $(datarootdir)/bash-completion/completions
- megacmdcompletion_DATA = src/client/megacmd_completion.sh
- megacmdscripts_bindir = $(bindir)
-
diff --git a/srcpkgs/MEGAcmd/patches/musl.patch b/srcpkgs/MEGAcmd/patches/musl.patch
deleted file mode 100644
index 3e0a395fb19..00000000000
--- a/srcpkgs/MEGAcmd/patches/musl.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/configurationmanager.h 2018-10-03 16:27:51.311763612 +0200
-+++ - 2018-10-03 16:29:44.035272722 +0200
-@@ -23,6 +23,10 @@
- #include <map>
- #include <set>
-
-+#ifndef _WIN32
-+#include <sys/file.h> // LOCK_EX and LOCK_NB
-+#endif
-+
- #define CONFIGURATIONSTOREDBYVERSION -2
- class ConfigurationManager
- {
diff --git a/srcpkgs/MEGAcmd/template b/srcpkgs/MEGAcmd/template
index 2345b3972b8..d79a1d1e688 100644
--- a/srcpkgs/MEGAcmd/template
+++ b/srcpkgs/MEGAcmd/template
@@ -1,17 +1,24 @@
# Template file for 'MEGAcmd'
pkgname=MEGAcmd
-version=1.0.0
-revision=11
+version=1.1.0
+revision=1
+_sdk_rev=2c7713d2cdd75c0b9e143d93e43f03d0fa3ba9e5
+wrksrc="${pkgname}-${version}_Linux"
build_style=gnu-configure
make_build_args='LIBTOOLFLAGS="--tag=CXX"'
hostmakedepends="autoconf-archive autogen gettext automake libtool pkg-config"
-makedepends="MEGAsdk-devel readline-devel pcre-devel"
+makedepends="readline-devel pcre-devel
+ libcurl-devel c-ares-devel libressl-devel crypto++-devel
+ zlib-devel sqlite-devel freeimage-devel libsodium-devel fuse-devel
+ libuv-devel"
short_desc="Command Line Interactive and Scriptable Application to access MEGA"
maintainer="John <johnz@posteo.net>"
license="BSD-2-Clause, GPL-3.0-or-later"
homepage="https://github.com/meganz/MEGAcmd"
-distfiles="https://github.com/meganz/MEGAcmd/archive/${version}.tar.gz"
-checksum=1200363bee2f387a2287e286b38d15b1a01079967e20b8c489815cc7c8d9ff63
+distfiles="https://github.com/meganz/MEGAcmd/archive/${version}_Linux.tar.gz
+ https://github.com/meganz/sdk/archive/${_sdk_rev}.tar.gz"
+checksum="8064a21b1d1436537ab9ccc98f1f411f9496aace000584bea87d95f8e7b3a550
+ 8bcf3437f187c4ede543e12f92abcaa3a2390eada680022d80758e1e3fd7b753"
replaces="megacmd>=0"
if [ "$CROSS_BUILD" ]; then
@@ -19,18 +26,8 @@ if [ "$CROSS_BUILD" ]; then
fi
post_extract() {
- sed \
- -e '/SUBDIRS.*sdk/d' \
- -e '/sdk\/m4/d' \
- -e 's:LMEGAINC=.*:PKG_CHECK_MODULES([MEGA],[libmega])\nLMEGAINC=${MEGA_CFLAGS}:' \
- -i Makefile.am configure.ac
- sed \
- -e 's:\$(top_builddir)/sdk/src/libmega\.la:$(MEGA_LIBS):' \
- -e 's:mega_cmd_LDADD = .*:&$(MEGA_LIBS):' \
- -e 's:^mega_exec_CXXFLAGS.*:&\nmega_exec_LDADD=$(MEGA_LIBS):' \
- -e 's:sdk/include/mega/[^ ]\+\.h::g' \
- -e '/sdk\/src\/[^ ]\+\.cpp/d' \
- -i src/include.am
+ rmdir sdk
+ mv ../sdk-${_sdk_rev} sdk
}
pre_configure() {
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] Update MEGA*
2019-09-13 19:36 [PR PATCH] Update MEGA* voidlinux-github
2019-09-13 19:55 ` [PR PATCH] [Updated] " voidlinux-github
@ 2019-09-13 19:55 ` voidlinux-github
2019-09-13 20:02 ` voidlinux-github
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-09-13 19:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 307 bytes --]
There is an updated pull request by Johnnynator against master on the void-packages repository
https://github.com/Johnnynator/void-packages MEGA
https://github.com/void-linux/void-packages/pull/14439
Update MEGA*
A patch file from https://github.com/void-linux/void-packages/pull/14439.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-MEGA-14439.patch --]
[-- Type: text/x-diff, Size: 8462 bytes --]
From 4f6a19250d8b1d6bc2b5529b19071ca71a92352e Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 21:50:34 +0300
Subject: [PATCH 1/3] MEGAsdk: update to 3.6.2a.
---
common/shlibs | 2 +-
srcpkgs/MEGAsdk/template | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/shlibs b/common/shlibs
index 09df4f3ceca..dccdfc5ecf4 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2952,7 +2952,7 @@ libvted-3.so.0 libvted-3.7.0_2
libpeasd-3.so.0 libpeasd-3.7.0_2
libgstreamerd-3.so.0 libgstreamerd-3.7.0_2
libgtkdgl-3.so.0 libgtkdgl-3.7.0_2
-libmega.so.30504 MEGAsdk-3.5.4_1
+libmega.so.30602 MEGAsdk-3.6.2a_1
libopenglrecorder.so.0 libopenglrecorder-0.1.0_1
libgpod.so.4 libgpod-0.8.3_1
libi2c.so.0 i2c-tools-4.0_1
diff --git a/srcpkgs/MEGAsdk/template b/srcpkgs/MEGAsdk/template
index a7a9977393e..864b70a7adc 100644
--- a/srcpkgs/MEGAsdk/template
+++ b/srcpkgs/MEGAsdk/template
@@ -1,6 +1,6 @@
# Template file for 'MEGAsdk'
pkgname=MEGAsdk
-version=3.5.4
+version=3.6.2a
revision=1
wrksrc="sdk-${version}"
build_style=gnu-configure
@@ -16,7 +16,7 @@ maintainer="John <johnz@posteo.net>"
license="BSD-2-Clause"
homepage="https://mega.nz"
distfiles="https://github.com/meganz/sdk/archive/v${version}.tar.gz"
-checksum=7fc81a64a77829bbc8dd316aac2159890a556dfdeade527a1386482e6dee26ee
+checksum=22d910bcd799f30a499fe748cc2b3917e9e213558b1d5fba07b3f3908a833897
replaces="libmega>=0"
build_options="libuv mediainfo"
From 1ee8f69e451e460a3162c100d33c1681a0867ed9 Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 22:34:24 +0300
Subject: [PATCH 2/3] MEGAsync: update to 4.2.4.0.
---
srcpkgs/MEGAsync/patches/breakpad.patch | 16 ++++++++++++++++
srcpkgs/MEGAsync/template | 10 +++++-----
2 files changed, 21 insertions(+), 5 deletions(-)
create mode 100644 srcpkgs/MEGAsync/patches/breakpad.patch
diff --git a/srcpkgs/MEGAsync/patches/breakpad.patch b/srcpkgs/MEGAsync/patches/breakpad.patch
new file mode 100644
index 00000000000..36495af4460
--- /dev/null
+++ b/srcpkgs/MEGAsync/patches/breakpad.patch
@@ -0,0 +1,16 @@
+--- src/MEGASync/google_breakpad/client/linux/handler/exception_handler.cc 2019-09-13 22:27:23.351723073 +0300
++++ - 2019-09-13 22:33:08.244312688 +0300
+@@ -104,11 +104,13 @@
+ #define PR_SET_PTRACER 0x59616d61
+ #endif
+
++#if defined(__GLIBC__) && __GLIBC__ < 2 && __GLIBC_MINOR__ < 30
+ // A wrapper for the tgkill syscall: send a signal to a specific thread.
+ static int tgkill(pid_t tgid, pid_t tid, int sig) {
+ return syscall(__NR_tgkill, tgid, tid, sig);
+ return 0;
+ }
++#endif
+
+ namespace google_breakpad {
+
diff --git a/srcpkgs/MEGAsync/template b/srcpkgs/MEGAsync/template
index 913e8fe7dee..4a70a48ad8e 100644
--- a/srcpkgs/MEGAsync/template
+++ b/srcpkgs/MEGAsync/template
@@ -1,11 +1,11 @@
# Template file for 'MEGAsync'
pkgname=MEGAsync
-version=4.1.1.0
+version=4.2.4.0
revision=1
-wrksrc="${pkgname}-${version}_Linux"
+wrksrc="${pkgname}-${version}_Win"
build_wrksrc=src
build_style=qmake
-configure_args='"CONFIG-=with_tools"'
+configure_args='"CONFIG+=FULLREQUIREMENTS"'
hostmakedepends="libtool qt5-qmake qt5-host-tools"
makedepends="qt5-tools-devel qt5-devel qt5-svg-devel MEGAsdk-devel MEGAsdk-qt
libraw-devel libgomp-devel"
@@ -13,8 +13,8 @@ short_desc="Automated syncing with MEGA Cloud Drive"
maintainer="John <johnz@posteo.net>"
license="custom"
homepage="https://mega.co.nz"
-distfiles="https://github.com/meganz/MEGAsync/archive/v${version}_Linux.tar.gz"
-checksum=5f43a3f402c10519e2f59c8c2a70c55affd3eb1a323767127929fb5f4baa429c
+distfiles="https://github.com/meganz/MEGAsync/archive/v${version}_Win.tar.gz"
+checksum=5fd90c93677085a2f73faa6a5a3548fcd29fc9f3203f6ddbcac7f170b580f239
restricted=yes
nocross=yes
From 4fb390d06e64a53cf61b461f35f38e65044891c9 Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 22:53:35 +0300
Subject: [PATCH 3/3] MEGAcmd: update to 1.1.0.
---
srcpkgs/MEGAcmd/patches/include.am.patch | 22 -----------------
srcpkgs/MEGAcmd/patches/musl.patch | 13 ----------
srcpkgs/MEGAcmd/template | 31 +++++++++++-------------
3 files changed, 14 insertions(+), 52 deletions(-)
delete mode 100644 srcpkgs/MEGAcmd/patches/include.am.patch
delete mode 100644 srcpkgs/MEGAcmd/patches/musl.patch
diff --git a/srcpkgs/MEGAcmd/patches/include.am.patch b/srcpkgs/MEGAcmd/patches/include.am.patch
deleted file mode 100644
index 45e1a9fcdd5..00000000000
--- a/srcpkgs/MEGAcmd/patches/include.am.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- src/include.am.orig 2017-12-01 23:56:36.199044786 +0100
-+++ src/include.am 2017-12-01 23:56:54.073045467 +0100
-@@ -7,7 +7,7 @@
-
- MEGACMD = mega-cmd mega-exec mega-cmd-server
- bin_PROGRAMS += $(MEGACMD)
--$(MEGACMD): $(MEGA_LIBS)
-+$(MEGACMD):
- noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
- megacmdcompletiondir = $(sysconfdir)/bash_completion.d/
- megacmdcompletion_DATA = src/client/megacmd_completion.sh
---- src/include.am 2018-12-06 14:42:18.308589868 +0100
-+++ - 2018-12-06 14:45:15.075785487 +0100
-@@ -9,7 +9,7 @@
- bin_PROGRAMS += $(MEGACMD)
- $(MEGACMD):
- noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
--megacmdcompletiondir = $(sysconfdir)/bash_completion.d/
-+megacmdcompletiondir = $(datarootdir)/bash-completion/completions
- megacmdcompletion_DATA = src/client/megacmd_completion.sh
- megacmdscripts_bindir = $(bindir)
-
diff --git a/srcpkgs/MEGAcmd/patches/musl.patch b/srcpkgs/MEGAcmd/patches/musl.patch
deleted file mode 100644
index 3e0a395fb19..00000000000
--- a/srcpkgs/MEGAcmd/patches/musl.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/configurationmanager.h 2018-10-03 16:27:51.311763612 +0200
-+++ - 2018-10-03 16:29:44.035272722 +0200
-@@ -23,6 +23,10 @@
- #include <map>
- #include <set>
-
-+#ifndef _WIN32
-+#include <sys/file.h> // LOCK_EX and LOCK_NB
-+#endif
-+
- #define CONFIGURATIONSTOREDBYVERSION -2
- class ConfigurationManager
- {
diff --git a/srcpkgs/MEGAcmd/template b/srcpkgs/MEGAcmd/template
index 2345b3972b8..d79a1d1e688 100644
--- a/srcpkgs/MEGAcmd/template
+++ b/srcpkgs/MEGAcmd/template
@@ -1,17 +1,24 @@
# Template file for 'MEGAcmd'
pkgname=MEGAcmd
-version=1.0.0
-revision=11
+version=1.1.0
+revision=1
+_sdk_rev=2c7713d2cdd75c0b9e143d93e43f03d0fa3ba9e5
+wrksrc="${pkgname}-${version}_Linux"
build_style=gnu-configure
make_build_args='LIBTOOLFLAGS="--tag=CXX"'
hostmakedepends="autoconf-archive autogen gettext automake libtool pkg-config"
-makedepends="MEGAsdk-devel readline-devel pcre-devel"
+makedepends="readline-devel pcre-devel
+ libcurl-devel c-ares-devel libressl-devel crypto++-devel
+ zlib-devel sqlite-devel freeimage-devel libsodium-devel fuse-devel
+ libuv-devel"
short_desc="Command Line Interactive and Scriptable Application to access MEGA"
maintainer="John <johnz@posteo.net>"
license="BSD-2-Clause, GPL-3.0-or-later"
homepage="https://github.com/meganz/MEGAcmd"
-distfiles="https://github.com/meganz/MEGAcmd/archive/${version}.tar.gz"
-checksum=1200363bee2f387a2287e286b38d15b1a01079967e20b8c489815cc7c8d9ff63
+distfiles="https://github.com/meganz/MEGAcmd/archive/${version}_Linux.tar.gz
+ https://github.com/meganz/sdk/archive/${_sdk_rev}.tar.gz"
+checksum="8064a21b1d1436537ab9ccc98f1f411f9496aace000584bea87d95f8e7b3a550
+ 8bcf3437f187c4ede543e12f92abcaa3a2390eada680022d80758e1e3fd7b753"
replaces="megacmd>=0"
if [ "$CROSS_BUILD" ]; then
@@ -19,18 +26,8 @@ if [ "$CROSS_BUILD" ]; then
fi
post_extract() {
- sed \
- -e '/SUBDIRS.*sdk/d' \
- -e '/sdk\/m4/d' \
- -e 's:LMEGAINC=.*:PKG_CHECK_MODULES([MEGA],[libmega])\nLMEGAINC=${MEGA_CFLAGS}:' \
- -i Makefile.am configure.ac
- sed \
- -e 's:\$(top_builddir)/sdk/src/libmega\.la:$(MEGA_LIBS):' \
- -e 's:mega_cmd_LDADD = .*:&$(MEGA_LIBS):' \
- -e 's:^mega_exec_CXXFLAGS.*:&\nmega_exec_LDADD=$(MEGA_LIBS):' \
- -e 's:sdk/include/mega/[^ ]\+\.h::g' \
- -e '/sdk\/src\/[^ ]\+\.cpp/d' \
- -i src/include.am
+ rmdir sdk
+ mv ../sdk-${_sdk_rev} sdk
}
pre_configure() {
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] Update MEGA*
2019-09-13 19:36 [PR PATCH] Update MEGA* voidlinux-github
2019-09-13 19:55 ` [PR PATCH] [Updated] " voidlinux-github
2019-09-13 19:55 ` voidlinux-github
@ 2019-09-13 20:02 ` voidlinux-github
2019-09-13 20:02 ` voidlinux-github
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-09-13 20:02 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 307 bytes --]
There is an updated pull request by Johnnynator against master on the void-packages repository
https://github.com/Johnnynator/void-packages MEGA
https://github.com/void-linux/void-packages/pull/14439
Update MEGA*
A patch file from https://github.com/void-linux/void-packages/pull/14439.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-MEGA-14439.patch --]
[-- Type: text/x-diff, Size: 8684 bytes --]
From 4f6a19250d8b1d6bc2b5529b19071ca71a92352e Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 21:50:34 +0300
Subject: [PATCH 1/3] MEGAsdk: update to 3.6.2a.
---
common/shlibs | 2 +-
srcpkgs/MEGAsdk/template | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/shlibs b/common/shlibs
index 09df4f3ceca..dccdfc5ecf4 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2952,7 +2952,7 @@ libvted-3.so.0 libvted-3.7.0_2
libpeasd-3.so.0 libpeasd-3.7.0_2
libgstreamerd-3.so.0 libgstreamerd-3.7.0_2
libgtkdgl-3.so.0 libgtkdgl-3.7.0_2
-libmega.so.30504 MEGAsdk-3.5.4_1
+libmega.so.30602 MEGAsdk-3.6.2a_1
libopenglrecorder.so.0 libopenglrecorder-0.1.0_1
libgpod.so.4 libgpod-0.8.3_1
libi2c.so.0 i2c-tools-4.0_1
diff --git a/srcpkgs/MEGAsdk/template b/srcpkgs/MEGAsdk/template
index a7a9977393e..864b70a7adc 100644
--- a/srcpkgs/MEGAsdk/template
+++ b/srcpkgs/MEGAsdk/template
@@ -1,6 +1,6 @@
# Template file for 'MEGAsdk'
pkgname=MEGAsdk
-version=3.5.4
+version=3.6.2a
revision=1
wrksrc="sdk-${version}"
build_style=gnu-configure
@@ -16,7 +16,7 @@ maintainer="John <johnz@posteo.net>"
license="BSD-2-Clause"
homepage="https://mega.nz"
distfiles="https://github.com/meganz/sdk/archive/v${version}.tar.gz"
-checksum=7fc81a64a77829bbc8dd316aac2159890a556dfdeade527a1386482e6dee26ee
+checksum=22d910bcd799f30a499fe748cc2b3917e9e213558b1d5fba07b3f3908a833897
replaces="libmega>=0"
build_options="libuv mediainfo"
From 1ee8f69e451e460a3162c100d33c1681a0867ed9 Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 22:34:24 +0300
Subject: [PATCH 2/3] MEGAsync: update to 4.2.4.0.
---
srcpkgs/MEGAsync/patches/breakpad.patch | 16 ++++++++++++++++
srcpkgs/MEGAsync/template | 10 +++++-----
2 files changed, 21 insertions(+), 5 deletions(-)
create mode 100644 srcpkgs/MEGAsync/patches/breakpad.patch
diff --git a/srcpkgs/MEGAsync/patches/breakpad.patch b/srcpkgs/MEGAsync/patches/breakpad.patch
new file mode 100644
index 00000000000..36495af4460
--- /dev/null
+++ b/srcpkgs/MEGAsync/patches/breakpad.patch
@@ -0,0 +1,16 @@
+--- src/MEGASync/google_breakpad/client/linux/handler/exception_handler.cc 2019-09-13 22:27:23.351723073 +0300
++++ - 2019-09-13 22:33:08.244312688 +0300
+@@ -104,11 +104,13 @@
+ #define PR_SET_PTRACER 0x59616d61
+ #endif
+
++#if defined(__GLIBC__) && __GLIBC__ < 2 && __GLIBC_MINOR__ < 30
+ // A wrapper for the tgkill syscall: send a signal to a specific thread.
+ static int tgkill(pid_t tgid, pid_t tid, int sig) {
+ return syscall(__NR_tgkill, tgid, tid, sig);
+ return 0;
+ }
++#endif
+
+ namespace google_breakpad {
+
diff --git a/srcpkgs/MEGAsync/template b/srcpkgs/MEGAsync/template
index 913e8fe7dee..4a70a48ad8e 100644
--- a/srcpkgs/MEGAsync/template
+++ b/srcpkgs/MEGAsync/template
@@ -1,11 +1,11 @@
# Template file for 'MEGAsync'
pkgname=MEGAsync
-version=4.1.1.0
+version=4.2.4.0
revision=1
-wrksrc="${pkgname}-${version}_Linux"
+wrksrc="${pkgname}-${version}_Win"
build_wrksrc=src
build_style=qmake
-configure_args='"CONFIG-=with_tools"'
+configure_args='"CONFIG+=FULLREQUIREMENTS"'
hostmakedepends="libtool qt5-qmake qt5-host-tools"
makedepends="qt5-tools-devel qt5-devel qt5-svg-devel MEGAsdk-devel MEGAsdk-qt
libraw-devel libgomp-devel"
@@ -13,8 +13,8 @@ short_desc="Automated syncing with MEGA Cloud Drive"
maintainer="John <johnz@posteo.net>"
license="custom"
homepage="https://mega.co.nz"
-distfiles="https://github.com/meganz/MEGAsync/archive/v${version}_Linux.tar.gz"
-checksum=5f43a3f402c10519e2f59c8c2a70c55affd3eb1a323767127929fb5f4baa429c
+distfiles="https://github.com/meganz/MEGAsync/archive/v${version}_Win.tar.gz"
+checksum=5fd90c93677085a2f73faa6a5a3548fcd29fc9f3203f6ddbcac7f170b580f239
restricted=yes
nocross=yes
From 91a27da0b2a4fa6294c0bb87e6e69e056b007056 Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 22:53:35 +0300
Subject: [PATCH 3/3] MEGAcmd: update to 1.1.0.
---
srcpkgs/MEGAcmd/patches/include.am.patch | 22 ----------------
srcpkgs/MEGAcmd/patches/musl.patch | 13 ----------
srcpkgs/MEGAcmd/template | 33 ++++++++++++------------
3 files changed, 17 insertions(+), 51 deletions(-)
delete mode 100644 srcpkgs/MEGAcmd/patches/include.am.patch
delete mode 100644 srcpkgs/MEGAcmd/patches/musl.patch
diff --git a/srcpkgs/MEGAcmd/patches/include.am.patch b/srcpkgs/MEGAcmd/patches/include.am.patch
deleted file mode 100644
index 45e1a9fcdd5..00000000000
--- a/srcpkgs/MEGAcmd/patches/include.am.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- src/include.am.orig 2017-12-01 23:56:36.199044786 +0100
-+++ src/include.am 2017-12-01 23:56:54.073045467 +0100
-@@ -7,7 +7,7 @@
-
- MEGACMD = mega-cmd mega-exec mega-cmd-server
- bin_PROGRAMS += $(MEGACMD)
--$(MEGACMD): $(MEGA_LIBS)
-+$(MEGACMD):
- noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
- megacmdcompletiondir = $(sysconfdir)/bash_completion.d/
- megacmdcompletion_DATA = src/client/megacmd_completion.sh
---- src/include.am 2018-12-06 14:42:18.308589868 +0100
-+++ - 2018-12-06 14:45:15.075785487 +0100
-@@ -9,7 +9,7 @@
- bin_PROGRAMS += $(MEGACMD)
- $(MEGACMD):
- noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
--megacmdcompletiondir = $(sysconfdir)/bash_completion.d/
-+megacmdcompletiondir = $(datarootdir)/bash-completion/completions
- megacmdcompletion_DATA = src/client/megacmd_completion.sh
- megacmdscripts_bindir = $(bindir)
-
diff --git a/srcpkgs/MEGAcmd/patches/musl.patch b/srcpkgs/MEGAcmd/patches/musl.patch
deleted file mode 100644
index 3e0a395fb19..00000000000
--- a/srcpkgs/MEGAcmd/patches/musl.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/configurationmanager.h 2018-10-03 16:27:51.311763612 +0200
-+++ - 2018-10-03 16:29:44.035272722 +0200
-@@ -23,6 +23,10 @@
- #include <map>
- #include <set>
-
-+#ifndef _WIN32
-+#include <sys/file.h> // LOCK_EX and LOCK_NB
-+#endif
-+
- #define CONFIGURATIONSTOREDBYVERSION -2
- class ConfigurationManager
- {
diff --git a/srcpkgs/MEGAcmd/template b/srcpkgs/MEGAcmd/template
index 2345b3972b8..1517b24f3c2 100644
--- a/srcpkgs/MEGAcmd/template
+++ b/srcpkgs/MEGAcmd/template
@@ -1,17 +1,24 @@
# Template file for 'MEGAcmd'
pkgname=MEGAcmd
-version=1.0.0
-revision=11
+version=1.1.0
+revision=1
+_sdk_rev=2c7713d2cdd75c0b9e143d93e43f03d0fa3ba9e5
+wrksrc="${pkgname}-${version}_Linux"
build_style=gnu-configure
make_build_args='LIBTOOLFLAGS="--tag=CXX"'
hostmakedepends="autoconf-archive autogen gettext automake libtool pkg-config"
-makedepends="MEGAsdk-devel readline-devel pcre-devel"
+makedepends="readline-devel pcre-devel
+ libcurl-devel c-ares-devel libressl-devel crypto++-devel
+ zlib-devel sqlite-devel freeimage-devel libsodium-devel fuse-devel
+ libuv-devel"
short_desc="Command Line Interactive and Scriptable Application to access MEGA"
maintainer="John <johnz@posteo.net>"
license="BSD-2-Clause, GPL-3.0-or-later"
homepage="https://github.com/meganz/MEGAcmd"
-distfiles="https://github.com/meganz/MEGAcmd/archive/${version}.tar.gz"
-checksum=1200363bee2f387a2287e286b38d15b1a01079967e20b8c489815cc7c8d9ff63
+distfiles="https://github.com/meganz/MEGAcmd/archive/${version}_Linux.tar.gz
+ https://github.com/meganz/sdk/archive/${_sdk_rev}.tar.gz"
+checksum="8064a21b1d1436537ab9ccc98f1f411f9496aace000584bea87d95f8e7b3a550
+ 8bcf3437f187c4ede543e12f92abcaa3a2390eada680022d80758e1e3fd7b753"
replaces="megacmd>=0"
if [ "$CROSS_BUILD" ]; then
@@ -19,17 +26,9 @@ if [ "$CROSS_BUILD" ]; then
fi
post_extract() {
- sed \
- -e '/SUBDIRS.*sdk/d' \
- -e '/sdk\/m4/d' \
- -e 's:LMEGAINC=.*:PKG_CHECK_MODULES([MEGA],[libmega])\nLMEGAINC=${MEGA_CFLAGS}:' \
- -i Makefile.am configure.ac
- sed \
- -e 's:\$(top_builddir)/sdk/src/libmega\.la:$(MEGA_LIBS):' \
- -e 's:mega_cmd_LDADD = .*:&$(MEGA_LIBS):' \
- -e 's:^mega_exec_CXXFLAGS.*:&\nmega_exec_LDADD=$(MEGA_LIBS):' \
- -e 's:sdk/include/mega/[^ ]\+\.h::g' \
- -e '/sdk\/src\/[^ ]\+\.cpp/d' \
+ rmdir sdk
+ mv ../sdk-${_sdk_rev} sdk
+ vsed -e 's%$(sysconfdir)/bash_completion.d/%$(datarootdir)/bash-completion/completions%g' \
-i src/include.am
}
@@ -39,4 +38,6 @@ pre_configure() {
post_install() {
vlicense LICENSE
+ rm -rf ${DESTDIR}/usr/include
+ rm -rf ${DESTDIR}/usr/lib/pkgconfig
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] Update MEGA*
2019-09-13 19:36 [PR PATCH] Update MEGA* voidlinux-github
` (2 preceding siblings ...)
2019-09-13 20:02 ` voidlinux-github
@ 2019-09-13 20:02 ` voidlinux-github
2019-09-15 8:31 ` voidlinux-github
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-09-13 20:02 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 307 bytes --]
There is an updated pull request by Johnnynator against master on the void-packages repository
https://github.com/Johnnynator/void-packages MEGA
https://github.com/void-linux/void-packages/pull/14439
Update MEGA*
A patch file from https://github.com/void-linux/void-packages/pull/14439.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-MEGA-14439.patch --]
[-- Type: text/x-diff, Size: 8684 bytes --]
From 4f6a19250d8b1d6bc2b5529b19071ca71a92352e Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 21:50:34 +0300
Subject: [PATCH 1/3] MEGAsdk: update to 3.6.2a.
---
common/shlibs | 2 +-
srcpkgs/MEGAsdk/template | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/shlibs b/common/shlibs
index 09df4f3ceca..dccdfc5ecf4 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2952,7 +2952,7 @@ libvted-3.so.0 libvted-3.7.0_2
libpeasd-3.so.0 libpeasd-3.7.0_2
libgstreamerd-3.so.0 libgstreamerd-3.7.0_2
libgtkdgl-3.so.0 libgtkdgl-3.7.0_2
-libmega.so.30504 MEGAsdk-3.5.4_1
+libmega.so.30602 MEGAsdk-3.6.2a_1
libopenglrecorder.so.0 libopenglrecorder-0.1.0_1
libgpod.so.4 libgpod-0.8.3_1
libi2c.so.0 i2c-tools-4.0_1
diff --git a/srcpkgs/MEGAsdk/template b/srcpkgs/MEGAsdk/template
index a7a9977393e..864b70a7adc 100644
--- a/srcpkgs/MEGAsdk/template
+++ b/srcpkgs/MEGAsdk/template
@@ -1,6 +1,6 @@
# Template file for 'MEGAsdk'
pkgname=MEGAsdk
-version=3.5.4
+version=3.6.2a
revision=1
wrksrc="sdk-${version}"
build_style=gnu-configure
@@ -16,7 +16,7 @@ maintainer="John <johnz@posteo.net>"
license="BSD-2-Clause"
homepage="https://mega.nz"
distfiles="https://github.com/meganz/sdk/archive/v${version}.tar.gz"
-checksum=7fc81a64a77829bbc8dd316aac2159890a556dfdeade527a1386482e6dee26ee
+checksum=22d910bcd799f30a499fe748cc2b3917e9e213558b1d5fba07b3f3908a833897
replaces="libmega>=0"
build_options="libuv mediainfo"
From 1ee8f69e451e460a3162c100d33c1681a0867ed9 Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 22:34:24 +0300
Subject: [PATCH 2/3] MEGAsync: update to 4.2.4.0.
---
srcpkgs/MEGAsync/patches/breakpad.patch | 16 ++++++++++++++++
srcpkgs/MEGAsync/template | 10 +++++-----
2 files changed, 21 insertions(+), 5 deletions(-)
create mode 100644 srcpkgs/MEGAsync/patches/breakpad.patch
diff --git a/srcpkgs/MEGAsync/patches/breakpad.patch b/srcpkgs/MEGAsync/patches/breakpad.patch
new file mode 100644
index 00000000000..36495af4460
--- /dev/null
+++ b/srcpkgs/MEGAsync/patches/breakpad.patch
@@ -0,0 +1,16 @@
+--- src/MEGASync/google_breakpad/client/linux/handler/exception_handler.cc 2019-09-13 22:27:23.351723073 +0300
++++ - 2019-09-13 22:33:08.244312688 +0300
+@@ -104,11 +104,13 @@
+ #define PR_SET_PTRACER 0x59616d61
+ #endif
+
++#if defined(__GLIBC__) && __GLIBC__ < 2 && __GLIBC_MINOR__ < 30
+ // A wrapper for the tgkill syscall: send a signal to a specific thread.
+ static int tgkill(pid_t tgid, pid_t tid, int sig) {
+ return syscall(__NR_tgkill, tgid, tid, sig);
+ return 0;
+ }
++#endif
+
+ namespace google_breakpad {
+
diff --git a/srcpkgs/MEGAsync/template b/srcpkgs/MEGAsync/template
index 913e8fe7dee..4a70a48ad8e 100644
--- a/srcpkgs/MEGAsync/template
+++ b/srcpkgs/MEGAsync/template
@@ -1,11 +1,11 @@
# Template file for 'MEGAsync'
pkgname=MEGAsync
-version=4.1.1.0
+version=4.2.4.0
revision=1
-wrksrc="${pkgname}-${version}_Linux"
+wrksrc="${pkgname}-${version}_Win"
build_wrksrc=src
build_style=qmake
-configure_args='"CONFIG-=with_tools"'
+configure_args='"CONFIG+=FULLREQUIREMENTS"'
hostmakedepends="libtool qt5-qmake qt5-host-tools"
makedepends="qt5-tools-devel qt5-devel qt5-svg-devel MEGAsdk-devel MEGAsdk-qt
libraw-devel libgomp-devel"
@@ -13,8 +13,8 @@ short_desc="Automated syncing with MEGA Cloud Drive"
maintainer="John <johnz@posteo.net>"
license="custom"
homepage="https://mega.co.nz"
-distfiles="https://github.com/meganz/MEGAsync/archive/v${version}_Linux.tar.gz"
-checksum=5f43a3f402c10519e2f59c8c2a70c55affd3eb1a323767127929fb5f4baa429c
+distfiles="https://github.com/meganz/MEGAsync/archive/v${version}_Win.tar.gz"
+checksum=5fd90c93677085a2f73faa6a5a3548fcd29fc9f3203f6ddbcac7f170b580f239
restricted=yes
nocross=yes
From 91a27da0b2a4fa6294c0bb87e6e69e056b007056 Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 22:53:35 +0300
Subject: [PATCH 3/3] MEGAcmd: update to 1.1.0.
---
srcpkgs/MEGAcmd/patches/include.am.patch | 22 ----------------
srcpkgs/MEGAcmd/patches/musl.patch | 13 ----------
srcpkgs/MEGAcmd/template | 33 ++++++++++++------------
3 files changed, 17 insertions(+), 51 deletions(-)
delete mode 100644 srcpkgs/MEGAcmd/patches/include.am.patch
delete mode 100644 srcpkgs/MEGAcmd/patches/musl.patch
diff --git a/srcpkgs/MEGAcmd/patches/include.am.patch b/srcpkgs/MEGAcmd/patches/include.am.patch
deleted file mode 100644
index 45e1a9fcdd5..00000000000
--- a/srcpkgs/MEGAcmd/patches/include.am.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- src/include.am.orig 2017-12-01 23:56:36.199044786 +0100
-+++ src/include.am 2017-12-01 23:56:54.073045467 +0100
-@@ -7,7 +7,7 @@
-
- MEGACMD = mega-cmd mega-exec mega-cmd-server
- bin_PROGRAMS += $(MEGACMD)
--$(MEGACMD): $(MEGA_LIBS)
-+$(MEGACMD):
- noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
- megacmdcompletiondir = $(sysconfdir)/bash_completion.d/
- megacmdcompletion_DATA = src/client/megacmd_completion.sh
---- src/include.am 2018-12-06 14:42:18.308589868 +0100
-+++ - 2018-12-06 14:45:15.075785487 +0100
-@@ -9,7 +9,7 @@
- bin_PROGRAMS += $(MEGACMD)
- $(MEGACMD):
- noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
--megacmdcompletiondir = $(sysconfdir)/bash_completion.d/
-+megacmdcompletiondir = $(datarootdir)/bash-completion/completions
- megacmdcompletion_DATA = src/client/megacmd_completion.sh
- megacmdscripts_bindir = $(bindir)
-
diff --git a/srcpkgs/MEGAcmd/patches/musl.patch b/srcpkgs/MEGAcmd/patches/musl.patch
deleted file mode 100644
index 3e0a395fb19..00000000000
--- a/srcpkgs/MEGAcmd/patches/musl.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/configurationmanager.h 2018-10-03 16:27:51.311763612 +0200
-+++ - 2018-10-03 16:29:44.035272722 +0200
-@@ -23,6 +23,10 @@
- #include <map>
- #include <set>
-
-+#ifndef _WIN32
-+#include <sys/file.h> // LOCK_EX and LOCK_NB
-+#endif
-+
- #define CONFIGURATIONSTOREDBYVERSION -2
- class ConfigurationManager
- {
diff --git a/srcpkgs/MEGAcmd/template b/srcpkgs/MEGAcmd/template
index 2345b3972b8..1517b24f3c2 100644
--- a/srcpkgs/MEGAcmd/template
+++ b/srcpkgs/MEGAcmd/template
@@ -1,17 +1,24 @@
# Template file for 'MEGAcmd'
pkgname=MEGAcmd
-version=1.0.0
-revision=11
+version=1.1.0
+revision=1
+_sdk_rev=2c7713d2cdd75c0b9e143d93e43f03d0fa3ba9e5
+wrksrc="${pkgname}-${version}_Linux"
build_style=gnu-configure
make_build_args='LIBTOOLFLAGS="--tag=CXX"'
hostmakedepends="autoconf-archive autogen gettext automake libtool pkg-config"
-makedepends="MEGAsdk-devel readline-devel pcre-devel"
+makedepends="readline-devel pcre-devel
+ libcurl-devel c-ares-devel libressl-devel crypto++-devel
+ zlib-devel sqlite-devel freeimage-devel libsodium-devel fuse-devel
+ libuv-devel"
short_desc="Command Line Interactive and Scriptable Application to access MEGA"
maintainer="John <johnz@posteo.net>"
license="BSD-2-Clause, GPL-3.0-or-later"
homepage="https://github.com/meganz/MEGAcmd"
-distfiles="https://github.com/meganz/MEGAcmd/archive/${version}.tar.gz"
-checksum=1200363bee2f387a2287e286b38d15b1a01079967e20b8c489815cc7c8d9ff63
+distfiles="https://github.com/meganz/MEGAcmd/archive/${version}_Linux.tar.gz
+ https://github.com/meganz/sdk/archive/${_sdk_rev}.tar.gz"
+checksum="8064a21b1d1436537ab9ccc98f1f411f9496aace000584bea87d95f8e7b3a550
+ 8bcf3437f187c4ede543e12f92abcaa3a2390eada680022d80758e1e3fd7b753"
replaces="megacmd>=0"
if [ "$CROSS_BUILD" ]; then
@@ -19,17 +26,9 @@ if [ "$CROSS_BUILD" ]; then
fi
post_extract() {
- sed \
- -e '/SUBDIRS.*sdk/d' \
- -e '/sdk\/m4/d' \
- -e 's:LMEGAINC=.*:PKG_CHECK_MODULES([MEGA],[libmega])\nLMEGAINC=${MEGA_CFLAGS}:' \
- -i Makefile.am configure.ac
- sed \
- -e 's:\$(top_builddir)/sdk/src/libmega\.la:$(MEGA_LIBS):' \
- -e 's:mega_cmd_LDADD = .*:&$(MEGA_LIBS):' \
- -e 's:^mega_exec_CXXFLAGS.*:&\nmega_exec_LDADD=$(MEGA_LIBS):' \
- -e 's:sdk/include/mega/[^ ]\+\.h::g' \
- -e '/sdk\/src\/[^ ]\+\.cpp/d' \
+ rmdir sdk
+ mv ../sdk-${_sdk_rev} sdk
+ vsed -e 's%$(sysconfdir)/bash_completion.d/%$(datarootdir)/bash-completion/completions%g' \
-i src/include.am
}
@@ -39,4 +38,6 @@ pre_configure() {
post_install() {
vlicense LICENSE
+ rm -rf ${DESTDIR}/usr/include
+ rm -rf ${DESTDIR}/usr/lib/pkgconfig
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] Update MEGA*
2019-09-13 19:36 [PR PATCH] Update MEGA* voidlinux-github
` (3 preceding siblings ...)
2019-09-13 20:02 ` voidlinux-github
@ 2019-09-15 8:31 ` voidlinux-github
2019-09-15 8:31 ` voidlinux-github
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-09-15 8:31 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 307 bytes --]
There is an updated pull request by Johnnynator against master on the void-packages repository
https://github.com/Johnnynator/void-packages MEGA
https://github.com/void-linux/void-packages/pull/14439
Update MEGA*
A patch file from https://github.com/void-linux/void-packages/pull/14439.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-MEGA-14439.patch --]
[-- Type: text/x-diff, Size: 21284 bytes --]
From 58e179d53b27caae208fde7b0d548ce86b2728de Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 21:50:34 +0300
Subject: [PATCH 1/3] MEGAsdk: update to 3.6.2a.
---
common/shlibs | 2 +-
srcpkgs/MEGAsdk/template | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/shlibs b/common/shlibs
index 30b3b4653d5..de88e754ae7 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2953,7 +2953,7 @@ libvted-3.so.0 libvted-3.7.0_2
libpeasd-3.so.0 libpeasd-3.7.0_2
libgstreamerd-3.so.0 libgstreamerd-3.7.0_2
libgtkdgl-3.so.0 libgtkdgl-3.7.0_2
-libmega.so.30504 MEGAsdk-3.5.4_1
+libmega.so.30602 MEGAsdk-3.6.2a_1
libopenglrecorder.so.0 libopenglrecorder-0.1.0_1
libgpod.so.4 libgpod-0.8.3_1
libi2c.so.0 i2c-tools-4.0_1
diff --git a/srcpkgs/MEGAsdk/template b/srcpkgs/MEGAsdk/template
index a7a9977393e..864b70a7adc 100644
--- a/srcpkgs/MEGAsdk/template
+++ b/srcpkgs/MEGAsdk/template
@@ -1,6 +1,6 @@
# Template file for 'MEGAsdk'
pkgname=MEGAsdk
-version=3.5.4
+version=3.6.2a
revision=1
wrksrc="sdk-${version}"
build_style=gnu-configure
@@ -16,7 +16,7 @@ maintainer="John <johnz@posteo.net>"
license="BSD-2-Clause"
homepage="https://mega.nz"
distfiles="https://github.com/meganz/sdk/archive/v${version}.tar.gz"
-checksum=7fc81a64a77829bbc8dd316aac2159890a556dfdeade527a1386482e6dee26ee
+checksum=22d910bcd799f30a499fe748cc2b3917e9e213558b1d5fba07b3f3908a833897
replaces="libmega>=0"
build_options="libuv mediainfo"
From a870bca6beed051bace9f145b89e6da7aa180140 Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 22:34:24 +0300
Subject: [PATCH 2/3] MEGAsync: update to 4.2.4.0.
---
srcpkgs/MEGAsync/patches/breakpad.patch | 16 ++++++++++++++++
srcpkgs/MEGAsync/template | 10 +++++-----
2 files changed, 21 insertions(+), 5 deletions(-)
create mode 100644 srcpkgs/MEGAsync/patches/breakpad.patch
diff --git a/srcpkgs/MEGAsync/patches/breakpad.patch b/srcpkgs/MEGAsync/patches/breakpad.patch
new file mode 100644
index 00000000000..36495af4460
--- /dev/null
+++ b/srcpkgs/MEGAsync/patches/breakpad.patch
@@ -0,0 +1,16 @@
+--- src/MEGASync/google_breakpad/client/linux/handler/exception_handler.cc 2019-09-13 22:27:23.351723073 +0300
++++ - 2019-09-13 22:33:08.244312688 +0300
+@@ -104,11 +104,13 @@
+ #define PR_SET_PTRACER 0x59616d61
+ #endif
+
++#if defined(__GLIBC__) && __GLIBC__ < 2 && __GLIBC_MINOR__ < 30
+ // A wrapper for the tgkill syscall: send a signal to a specific thread.
+ static int tgkill(pid_t tgid, pid_t tid, int sig) {
+ return syscall(__NR_tgkill, tgid, tid, sig);
+ return 0;
+ }
++#endif
+
+ namespace google_breakpad {
+
diff --git a/srcpkgs/MEGAsync/template b/srcpkgs/MEGAsync/template
index 913e8fe7dee..4a70a48ad8e 100644
--- a/srcpkgs/MEGAsync/template
+++ b/srcpkgs/MEGAsync/template
@@ -1,11 +1,11 @@
# Template file for 'MEGAsync'
pkgname=MEGAsync
-version=4.1.1.0
+version=4.2.4.0
revision=1
-wrksrc="${pkgname}-${version}_Linux"
+wrksrc="${pkgname}-${version}_Win"
build_wrksrc=src
build_style=qmake
-configure_args='"CONFIG-=with_tools"'
+configure_args='"CONFIG+=FULLREQUIREMENTS"'
hostmakedepends="libtool qt5-qmake qt5-host-tools"
makedepends="qt5-tools-devel qt5-devel qt5-svg-devel MEGAsdk-devel MEGAsdk-qt
libraw-devel libgomp-devel"
@@ -13,8 +13,8 @@ short_desc="Automated syncing with MEGA Cloud Drive"
maintainer="John <johnz@posteo.net>"
license="custom"
homepage="https://mega.co.nz"
-distfiles="https://github.com/meganz/MEGAsync/archive/v${version}_Linux.tar.gz"
-checksum=5f43a3f402c10519e2f59c8c2a70c55affd3eb1a323767127929fb5f4baa429c
+distfiles="https://github.com/meganz/MEGAsync/archive/v${version}_Win.tar.gz"
+checksum=5fd90c93677085a2f73faa6a5a3548fcd29fc9f3203f6ddbcac7f170b580f239
restricted=yes
nocross=yes
From 4ad2000bd123aa1020daa43a40ec70a3d0da8955 Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Sun, 15 Sep 2019 11:27:39 +0300
Subject: [PATCH 3/3] MEGAcmd: update to 1.1.0.
---
srcpkgs/MEGAcmd/patches/include.am.patch | 16 +-
srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff | 381 +++++++++++++++++++++
srcpkgs/MEGAcmd/patches/musl.patch | 13 -
srcpkgs/MEGAcmd/template | 9 +-
4 files changed, 390 insertions(+), 29 deletions(-)
create mode 100644 srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff
delete mode 100644 srcpkgs/MEGAcmd/patches/musl.patch
diff --git a/srcpkgs/MEGAcmd/patches/include.am.patch b/srcpkgs/MEGAcmd/patches/include.am.patch
index 45e1a9fcdd5..66a0d7287d4 100644
--- a/srcpkgs/MEGAcmd/patches/include.am.patch
+++ b/srcpkgs/MEGAcmd/patches/include.am.patch
@@ -1,20 +1,12 @@
---- src/include.am.orig 2017-12-01 23:56:36.199044786 +0100
-+++ src/include.am 2017-12-01 23:56:54.073045467 +0100
-@@ -7,7 +7,7 @@
+--- src/include.am 2019-09-15 11:19:21.139430520 +0300
++++ - 2019-09-15 11:20:24.234994345 +0300
+@@ -7,9 +7,9 @@
MEGACMD = mega-cmd mega-exec mega-cmd-server
bin_PROGRAMS += $(MEGACMD)
-$(MEGACMD): $(MEGA_LIBS)
+$(MEGACMD):
- noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
- megacmdcompletiondir = $(sysconfdir)/bash_completion.d/
- megacmdcompletion_DATA = src/client/megacmd_completion.sh
---- src/include.am 2018-12-06 14:42:18.308589868 +0100
-+++ - 2018-12-06 14:45:15.075785487 +0100
-@@ -9,7 +9,7 @@
- bin_PROGRAMS += $(MEGACMD)
- $(MEGACMD):
- noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
+ noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/megacmdcommonutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
-megacmdcompletiondir = $(sysconfdir)/bash_completion.d/
+megacmdcompletiondir = $(datarootdir)/bash-completion/completions
megacmdcompletion_DATA = src/client/megacmd_completion.sh
diff --git a/srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff b/srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff
new file mode 100644
index 00000000000..a30a142156e
--- /dev/null
+++ b/srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff
@@ -0,0 +1,381 @@
+--- src/comunicationsmanagerfilesockets.cpp
++++ src/comunicationsmanagerfilesockets.cpp
+@@ -134,14 +134,13 @@ int ComunicationsManagerFileSockets::create_new_socket(int *sockId)
+ ComunicationsManagerFileSockets::ComunicationsManagerFileSockets()
+ {
+ count = 0;
+- mtx = new MegaMutex();
+- informerMutex = new MegaMutex(false);
++ mtx = new std::recursive_mutex();
++ informerMutex = new std::recursive_mutex();
+ initialize();
+ }
+
+ int ComunicationsManagerFileSockets::initialize()
+ {
+- mtx->init(false);
+
+ MegaFileSystemAccess *fsAccess = new MegaFileSystemAccess();
+ char csocketsFolder[34]; // enough to hold all numbers up to 64-bits
+@@ -394,7 +393,7 @@ void ComunicationsManagerFileSockets::sendPartialOutput(CmdPetition *inf, OUTSTR
+
+ int ComunicationsManagerFileSockets::informStateListener(CmdPetition *inf, string &s)
+ {
+- MutexGuard g(*informerMutex);
++ std::lock_guard<std::recursive_mutex> g(*informerMutex);
+ LOG_verbose << "Inform State Listener: Output to write in socket " << ((CmdPetitionPosixSockets *)inf)->outSocket << ": <<" << s << ">>";
+
+ sockaddr_in cliAddr;
+--- src/comunicationsmanagerfilesockets.h
++++ src/comunicationsmanagerfilesockets.h
+@@ -58,8 +58,8 @@ private:
+
+ // to get next socket id
+ int count;
+- mega::MegaMutex *mtx;
+- mega::MegaMutex *informerMutex;
++ std::recursive_mutex *mtx;
++ std::recursive_mutex *informerMutex;
+
+ /**
+ * @brief create_new_socket
+--- src/comunicationsmanagerportsockets.cpp
++++ src/comunicationsmanagerportsockets.cpp
+@@ -161,13 +161,12 @@ SOCKET ComunicationsManagerPortSockets::create_new_socket(int *sockId)
+ ComunicationsManagerPortSockets::ComunicationsManagerPortSockets()
+ {
+ count = 0;
+- mtx = new MegaMutex();
++ mtx = new std::recursive_mutex();
+ initialize();
+ }
+
+ int ComunicationsManagerPortSockets::initialize()
+ {
+- mtx->init(false);
+ #if _WIN32
+ WORD wVersionRequested;
+ WSADATA wsaData;
+--- src/comunicationsmanagerportsockets.h
++++ src/comunicationsmanagerportsockets.h
+@@ -69,7 +69,7 @@ private:
+
+ // to get next socket id
+ int count;
+- mega::MegaMutex *mtx;
++ std::recursive_mutex *mtx;
+
+ /**
+ * @brief create_new_socket
+--- src/listeners.cpp
++++ src/listeners.cpp
+@@ -902,7 +902,6 @@ MegaCmdGlobalTransferListener::MegaCmdGlobalTransferListener(MegaApi *megaApi, M
+ this->megaApi = megaApi;
+ this->sandboxCMD = sandboxCMD;
+ this->listener = parent;
+- completedTransfersMutex.init(false);
+ };
+
+ void MegaCmdGlobalTransferListener::onTransferFinish(MegaApi* api, MegaTransfer *transfer, MegaError* error)
+--- src/listeners.h
++++ src/listeners.h
+@@ -178,7 +178,7 @@ private:
+ static const int MAXCOMPLETEDTRANSFERSBUFFER;
+
+ public:
+- mega::MegaMutex completedTransfersMutex;
++ std::recursive_mutex completedTransfersMutex;
+ std::deque<mega::MegaTransfer *> completedTransfers;
+ std::map<mega::MegaHandle,std::string> completedPathsByHandle;
+ public:
+--- src/megacmd.cpp
++++ src/megacmd.cpp
+@@ -103,11 +103,11 @@ MegaApi *api;
+ std::queue<MegaApi *> apiFolders;
+ std::vector<MegaApi *> occupiedapiFolders;
+ MegaSemaphore semaphoreapiFolders;
+-MegaMutex mutexapiFolders;
++std::recursive_mutex mutexapiFolders;
+
+ MegaCMDLogger *loggerCMD;
+
+-MegaMutex mutexEndedPetitionThreads;
++std::recursive_mutex mutexEndedPetitionThreads;
+ std::vector<MegaThread *> petitionThreads;
+ std::vector<MegaThread *> endedPetitionThreads;
+ MegaThread *threadRetryConnections;
+@@ -194,7 +194,7 @@ static prompttype prompt = COMMAND;
+ // local console
+ Console* console;
+
+-MegaMutex mutexHistory;
++std::recursive_mutex mutexHistory;
+
+ map<unsigned long long, string> threadline;
+
+@@ -4411,9 +4411,7 @@ int main(int argc, char* argv[])
+ loggerCMD->setCmdLoggerLevel(MegaApi::LOG_LEVEL_MAX);
+ }
+
+- mutexHistory.init(false);
+
+- mutexEndedPetitionThreads.init(false);
+
+ ConfigurationManager::loadConfiguration(( argc > 1 ) && debug);
+ if (!ConfigurationManager::lockExecution() && !skiplockcheck)
+@@ -4476,7 +4474,6 @@ int main(int argc, char* argv[])
+ semaphoreClients.release();
+ }
+
+- mutexapiFolders.init(false);
+
+ LOG_debug << "Language set to: " << localecode;
+
+--- src/megacmdexecuter.cpp
++++ src/megacmdexecuter.cpp
+@@ -124,12 +124,6 @@ MegaCmdExecuter::MegaCmdExecuter(MegaApi *api, MegaCMDLogger *loggerCMD, MegaCmd
+ api->addTransferListener(globalTransferListener);
+ cwd = UNDEF;
+ fsAccessCMD = new MegaFileSystemAccess();
+- mtxSyncMap.init(false);
+- mtxWebDavLocations.init(false);
+- mtxFtpLocations.init(false);
+-#ifdef ENABLE_BACKUPS
+- mtxBackupsMap.init(true);
+-#endif
+ session = NULL;
+ }
+
+--- src/megacmdexecuter.h
++++ src/megacmdexecuter.h
+@@ -33,12 +33,12 @@ private:
+ MegaCMDLogger *loggerCMD;
+ MegaCmdSandbox *sandboxCMD;
+ MegaCmdGlobalTransferListener *globalTransferListener;
+- mega::MegaMutex mtxSyncMap;
+- mega::MegaMutex mtxWebDavLocations; //TODO: destroy these two
+- mega::MegaMutex mtxFtpLocations;
++ std::recursive_mutex mtxSyncMap;
++ std::recursive_mutex mtxWebDavLocations; //TODO: destroy these two
++ std::recursive_mutex mtxFtpLocations;
+
+ #ifdef ENABLE_BACKUPS
+- mega::MegaMutex mtxBackupsMap;
++ std::recursive_mutex mtxBackupsMap;
+ #endif
+
+ // login/signup e-mail address
+--- src/megacmdlogger.cpp
++++ src/megacmdlogger.cpp
+@@ -38,7 +38,7 @@ using namespace std;
+ using namespace mega;
+
+ // different outstreams for every thread. to gather all the output data
+-MUTEX_CLASS threadLookups(false);
++std::mutex threadLookups;
+ map<uint64_t, LoggedStream *> outstreams;
+ map<uint64_t, int> threadLogLevel;
+ map<uint64_t, int> threadoutCode;
+@@ -50,7 +50,7 @@ LoggedStream LCOUT(&COUT);
+
+ LoggedStream &getCurrentOut()
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ uint64_t currentThread = MegaThread::currentThreadId();
+ if (outstreams.find(currentThread) == outstreams.end())
+ {
+@@ -71,7 +71,7 @@ bool interactiveThread()
+
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (outstreams.find(currentThread) == outstreams.end())
+ {
+ return true;
+@@ -86,7 +86,7 @@ int getCurrentOutCode()
+ {
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (threadoutCode.find(currentThread) == threadoutCode.end())
+ {
+ return 0; //default OK
+@@ -102,7 +102,7 @@ CmdPetition * getCurrentPetition()
+ {
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (threadpetition.find(currentThread) == threadpetition.end())
+ {
+ return NULL;
+@@ -117,7 +117,7 @@ int getCurrentThreadLogLevel()
+ {
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (threadLogLevel.find(currentThread) == threadLogLevel.end())
+ {
+ return -1;
+@@ -132,7 +132,7 @@ bool getCurrentThreadIsCmdShell()
+ {
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (threadIsCmdShell.find(currentThread) == threadIsCmdShell.end())
+ {
+ return false; //default not
+@@ -146,31 +146,31 @@ bool getCurrentThreadIsCmdShell()
+
+ void setCurrentThreadLogLevel(int level)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ threadLogLevel[MegaThread::currentThreadId()] = level;
+ }
+
+ void setCurrentThreadOutStream(LoggedStream *s)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ outstreams[MegaThread::currentThreadId()] = s;
+ }
+
+ void setCurrentThreadIsCmdShell(bool isit)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ threadIsCmdShell[MegaThread::currentThreadId()] = isit;
+ }
+
+ void setCurrentOutCode(int outCode)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ threadoutCode[MegaThread::currentThreadId()] = outCode;
+ }
+
+ void setCurrentPetition(CmdPetition *petition)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ threadpetition[MegaThread::currentThreadId()] = petition;
+ }
+
+@@ -179,7 +179,7 @@ MegaCMDLogger::MegaCMDLogger()
+ {
+ this->output = &LCOUT;
+ this->apiLoggerLevel = MegaApi::LOG_LEVEL_ERROR;
+- this->outputmutex = new MegaMutex(false);
++ this->outputmutex = new std::recursive_mutex;
+ }
+
+ MegaCMDLogger::~MegaCMDLogger()
+@@ -199,7 +199,7 @@ void MegaCMDLogger::log(const char *time, int loglevel, const char *source, cons
+ if (loglevel <= cmdLoggerLevel)
+ {
+ #ifdef _WIN32
+- MutexGuard g(*outputmutex);
++ std::lock_guard<std::mutex> g(*outputmutex);
+ int oldmode;
+ oldmode = _setmode(_fileno(stdout), _O_U8TEXT);
+ *output << "[" << SimpleLogger::toStr(LogLevel(loglevel)) << ": " << time << "] " << message << endl;
+@@ -233,7 +233,7 @@ void MegaCMDLogger::log(const char *time, int loglevel, const char *source, cons
+ return;
+ }
+ #ifdef _WIN32
+- MutexGuard g(*outputmutex);
++ std::lock_guard<std::mutex> g(*outputmutex);
+ int oldmode;
+ oldmode = _setmode(_fileno(stdout), _O_U8TEXT);
+ *output << "[API:" << SimpleLogger::toStr(LogLevel(loglevel)) << ": " << time << "] " << message << endl;
+--- src/megacmdlogger.h
++++ src/megacmdlogger.h
+@@ -112,7 +112,7 @@ private:
+ int apiLoggerLevel;
+ int cmdLoggerLevel;
+ LoggedStream * output;
+- mega::MegaMutex *outputmutex;
++ std::recursive_mutex *outputmutex;
+
+ public:
+ MegaCMDLogger();
+--- src/megacmdshell/megacmdshell.cpp
++++ src/megacmdshell/megacmdshell.cpp
+@@ -199,7 +199,7 @@ bool confirmingcancellink = false;
+ // communications with megacmdserver:
+ MegaCmdShellCommunications *comms;
+
+-MUTEX_CLASS mutexPrompt(false);
++std::mutex mutexPrompt;
+
+ void printWelcomeMsg(unsigned int width = 0);
+
+@@ -627,7 +627,7 @@ void install_rl_handler(const char *theprompt)
+
+ void changeprompt(const char *newprompt, bool redisplay)
+ {
+- MutexGuard g(mutexPrompt);
++ std::lock_guard<std::mutex> g(mutexPrompt);
+
+ if (*dynamicprompt)
+ {
+--- src/megacmdshell/megacmdshellcommunications.cpp
++++ src/megacmdshell/megacmdshellcommunications.cpp
+@@ -80,7 +80,7 @@ bool MegaCmdShellCommunications::stopListener;
+ bool MegaCmdShellCommunications::updating;
+ ::mega::Thread *MegaCmdShellCommunications::listenerThread;
+ SOCKET MegaCmdShellCommunications::newsockfd = INVALID_SOCKET;
+-MegaMutex MegaCmdShellCommunications::megaCmdStdoutputing;
++std::recursive_mutex MegaCmdShellCommunications::megaCmdStdoutputing;
+
+ bool MegaCmdShellCommunications::socketValid(SOCKET socket)
+ {
+@@ -483,7 +483,6 @@ MegaCmdShellCommunications::MegaCmdShellCommunications()
+ stopListener = false;
+ updating = false;
+ listenerThread = NULL;
+- MegaCmdShellCommunications::megaCmdStdoutputing.init(false);
+ }
+
+
+--- src/megacmdshell/megacmdshellcommunications.h
++++ src/megacmdshell/megacmdshellcommunications.h
+@@ -26,6 +26,7 @@
+
+ #include <string>
+ #include <iostream>
++#include <mutex>
+
+ #ifdef _WIN32
+ #include <WinSock2.h>
+@@ -40,15 +41,12 @@
+
+ #if defined(_WIN32) && !defined(WINDOWS_PHONE) && !defined(USE_CPPTHREAD)
+ #include "mega/thread/win32thread.h"
+-class MegaMutex : public ::mega::Win32Mutex {};
+ class MegaThread : public ::mega::Win32Thread {};
+ #elif defined(USE_CPPTHREAD)
+ #include "mega/thread/cppthread.h"
+-class MegaMutex : public ::mega::CppMutex {};
+ class MegaThread : public ::mega::CppThread {};
+ #else
+ #include "mega/thread/posixthread.h"
+-class MegaMutex : public ::mega::PosixMutex {};
+ class MegaThread : public ::mega::PosixThread {};
+ #endif
+
+@@ -118,7 +116,7 @@ public:
+ MegaCmdShellCommunications();
+ virtual ~MegaCmdShellCommunications();
+
+- static MegaMutex megaCmdStdoutputing;
++ static std::recursive_mutex megaCmdStdoutputing;
+ virtual int executeCommand(std::string command, std::string (*readresponse)(const char *) = NULL, OUTSTREAMTYPE &output = COUT, bool interactiveshell = true, std::wstring = L"");
+ virtual int executeCommandW(std::wstring command, std::string (*readresponse)(const char *) = NULL, OUTSTREAMTYPE &output = COUT, bool interactiveshell = true);
+
diff --git a/srcpkgs/MEGAcmd/patches/musl.patch b/srcpkgs/MEGAcmd/patches/musl.patch
deleted file mode 100644
index 3e0a395fb19..00000000000
--- a/srcpkgs/MEGAcmd/patches/musl.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/configurationmanager.h 2018-10-03 16:27:51.311763612 +0200
-+++ - 2018-10-03 16:29:44.035272722 +0200
-@@ -23,6 +23,10 @@
- #include <map>
- #include <set>
-
-+#ifndef _WIN32
-+#include <sys/file.h> // LOCK_EX and LOCK_NB
-+#endif
-+
- #define CONFIGURATIONSTOREDBYVERSION -2
- class ConfigurationManager
- {
diff --git a/srcpkgs/MEGAcmd/template b/srcpkgs/MEGAcmd/template
index 2345b3972b8..9b5d931596d 100644
--- a/srcpkgs/MEGAcmd/template
+++ b/srcpkgs/MEGAcmd/template
@@ -1,8 +1,9 @@
# Template file for 'MEGAcmd'
pkgname=MEGAcmd
-version=1.0.0
-revision=11
+version=1.1.0
+revision=1
build_style=gnu-configure
+wrksrc="${pkgname}-${version}_Linux"
make_build_args='LIBTOOLFLAGS="--tag=CXX"'
hostmakedepends="autoconf-archive autogen gettext automake libtool pkg-config"
makedepends="MEGAsdk-devel readline-devel pcre-devel"
@@ -10,8 +11,8 @@ short_desc="Command Line Interactive and Scriptable Application to access MEGA"
maintainer="John <johnz@posteo.net>"
license="BSD-2-Clause, GPL-3.0-or-later"
homepage="https://github.com/meganz/MEGAcmd"
-distfiles="https://github.com/meganz/MEGAcmd/archive/${version}.tar.gz"
-checksum=1200363bee2f387a2287e286b38d15b1a01079967e20b8c489815cc7c8d9ff63
+distfiles="https://github.com/meganz/MEGAcmd/archive/${version}_Linux.tar.gz"
+checksum=8064a21b1d1436537ab9ccc98f1f411f9496aace000584bea87d95f8e7b3a550
replaces="megacmd>=0"
if [ "$CROSS_BUILD" ]; then
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] Update MEGA*
2019-09-13 19:36 [PR PATCH] Update MEGA* voidlinux-github
` (4 preceding siblings ...)
2019-09-15 8:31 ` voidlinux-github
@ 2019-09-15 8:31 ` voidlinux-github
2019-09-15 9:51 ` voidlinux-github
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-09-15 8:31 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 307 bytes --]
There is an updated pull request by Johnnynator against master on the void-packages repository
https://github.com/Johnnynator/void-packages MEGA
https://github.com/void-linux/void-packages/pull/14439
Update MEGA*
A patch file from https://github.com/void-linux/void-packages/pull/14439.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-MEGA-14439.patch --]
[-- Type: text/x-diff, Size: 21284 bytes --]
From 58e179d53b27caae208fde7b0d548ce86b2728de Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 21:50:34 +0300
Subject: [PATCH 1/3] MEGAsdk: update to 3.6.2a.
---
common/shlibs | 2 +-
srcpkgs/MEGAsdk/template | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/shlibs b/common/shlibs
index 30b3b4653d5..de88e754ae7 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2953,7 +2953,7 @@ libvted-3.so.0 libvted-3.7.0_2
libpeasd-3.so.0 libpeasd-3.7.0_2
libgstreamerd-3.so.0 libgstreamerd-3.7.0_2
libgtkdgl-3.so.0 libgtkdgl-3.7.0_2
-libmega.so.30504 MEGAsdk-3.5.4_1
+libmega.so.30602 MEGAsdk-3.6.2a_1
libopenglrecorder.so.0 libopenglrecorder-0.1.0_1
libgpod.so.4 libgpod-0.8.3_1
libi2c.so.0 i2c-tools-4.0_1
diff --git a/srcpkgs/MEGAsdk/template b/srcpkgs/MEGAsdk/template
index a7a9977393e..864b70a7adc 100644
--- a/srcpkgs/MEGAsdk/template
+++ b/srcpkgs/MEGAsdk/template
@@ -1,6 +1,6 @@
# Template file for 'MEGAsdk'
pkgname=MEGAsdk
-version=3.5.4
+version=3.6.2a
revision=1
wrksrc="sdk-${version}"
build_style=gnu-configure
@@ -16,7 +16,7 @@ maintainer="John <johnz@posteo.net>"
license="BSD-2-Clause"
homepage="https://mega.nz"
distfiles="https://github.com/meganz/sdk/archive/v${version}.tar.gz"
-checksum=7fc81a64a77829bbc8dd316aac2159890a556dfdeade527a1386482e6dee26ee
+checksum=22d910bcd799f30a499fe748cc2b3917e9e213558b1d5fba07b3f3908a833897
replaces="libmega>=0"
build_options="libuv mediainfo"
From a870bca6beed051bace9f145b89e6da7aa180140 Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 22:34:24 +0300
Subject: [PATCH 2/3] MEGAsync: update to 4.2.4.0.
---
srcpkgs/MEGAsync/patches/breakpad.patch | 16 ++++++++++++++++
srcpkgs/MEGAsync/template | 10 +++++-----
2 files changed, 21 insertions(+), 5 deletions(-)
create mode 100644 srcpkgs/MEGAsync/patches/breakpad.patch
diff --git a/srcpkgs/MEGAsync/patches/breakpad.patch b/srcpkgs/MEGAsync/patches/breakpad.patch
new file mode 100644
index 00000000000..36495af4460
--- /dev/null
+++ b/srcpkgs/MEGAsync/patches/breakpad.patch
@@ -0,0 +1,16 @@
+--- src/MEGASync/google_breakpad/client/linux/handler/exception_handler.cc 2019-09-13 22:27:23.351723073 +0300
++++ - 2019-09-13 22:33:08.244312688 +0300
+@@ -104,11 +104,13 @@
+ #define PR_SET_PTRACER 0x59616d61
+ #endif
+
++#if defined(__GLIBC__) && __GLIBC__ < 2 && __GLIBC_MINOR__ < 30
+ // A wrapper for the tgkill syscall: send a signal to a specific thread.
+ static int tgkill(pid_t tgid, pid_t tid, int sig) {
+ return syscall(__NR_tgkill, tgid, tid, sig);
+ return 0;
+ }
++#endif
+
+ namespace google_breakpad {
+
diff --git a/srcpkgs/MEGAsync/template b/srcpkgs/MEGAsync/template
index 913e8fe7dee..4a70a48ad8e 100644
--- a/srcpkgs/MEGAsync/template
+++ b/srcpkgs/MEGAsync/template
@@ -1,11 +1,11 @@
# Template file for 'MEGAsync'
pkgname=MEGAsync
-version=4.1.1.0
+version=4.2.4.0
revision=1
-wrksrc="${pkgname}-${version}_Linux"
+wrksrc="${pkgname}-${version}_Win"
build_wrksrc=src
build_style=qmake
-configure_args='"CONFIG-=with_tools"'
+configure_args='"CONFIG+=FULLREQUIREMENTS"'
hostmakedepends="libtool qt5-qmake qt5-host-tools"
makedepends="qt5-tools-devel qt5-devel qt5-svg-devel MEGAsdk-devel MEGAsdk-qt
libraw-devel libgomp-devel"
@@ -13,8 +13,8 @@ short_desc="Automated syncing with MEGA Cloud Drive"
maintainer="John <johnz@posteo.net>"
license="custom"
homepage="https://mega.co.nz"
-distfiles="https://github.com/meganz/MEGAsync/archive/v${version}_Linux.tar.gz"
-checksum=5f43a3f402c10519e2f59c8c2a70c55affd3eb1a323767127929fb5f4baa429c
+distfiles="https://github.com/meganz/MEGAsync/archive/v${version}_Win.tar.gz"
+checksum=5fd90c93677085a2f73faa6a5a3548fcd29fc9f3203f6ddbcac7f170b580f239
restricted=yes
nocross=yes
From 4ad2000bd123aa1020daa43a40ec70a3d0da8955 Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Sun, 15 Sep 2019 11:27:39 +0300
Subject: [PATCH 3/3] MEGAcmd: update to 1.1.0.
---
srcpkgs/MEGAcmd/patches/include.am.patch | 16 +-
srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff | 381 +++++++++++++++++++++
srcpkgs/MEGAcmd/patches/musl.patch | 13 -
srcpkgs/MEGAcmd/template | 9 +-
4 files changed, 390 insertions(+), 29 deletions(-)
create mode 100644 srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff
delete mode 100644 srcpkgs/MEGAcmd/patches/musl.patch
diff --git a/srcpkgs/MEGAcmd/patches/include.am.patch b/srcpkgs/MEGAcmd/patches/include.am.patch
index 45e1a9fcdd5..66a0d7287d4 100644
--- a/srcpkgs/MEGAcmd/patches/include.am.patch
+++ b/srcpkgs/MEGAcmd/patches/include.am.patch
@@ -1,20 +1,12 @@
---- src/include.am.orig 2017-12-01 23:56:36.199044786 +0100
-+++ src/include.am 2017-12-01 23:56:54.073045467 +0100
-@@ -7,7 +7,7 @@
+--- src/include.am 2019-09-15 11:19:21.139430520 +0300
++++ - 2019-09-15 11:20:24.234994345 +0300
+@@ -7,9 +7,9 @@
MEGACMD = mega-cmd mega-exec mega-cmd-server
bin_PROGRAMS += $(MEGACMD)
-$(MEGACMD): $(MEGA_LIBS)
+$(MEGACMD):
- noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
- megacmdcompletiondir = $(sysconfdir)/bash_completion.d/
- megacmdcompletion_DATA = src/client/megacmd_completion.sh
---- src/include.am 2018-12-06 14:42:18.308589868 +0100
-+++ - 2018-12-06 14:45:15.075785487 +0100
-@@ -9,7 +9,7 @@
- bin_PROGRAMS += $(MEGACMD)
- $(MEGACMD):
- noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
+ noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/megacmdcommonutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
-megacmdcompletiondir = $(sysconfdir)/bash_completion.d/
+megacmdcompletiondir = $(datarootdir)/bash-completion/completions
megacmdcompletion_DATA = src/client/megacmd_completion.sh
diff --git a/srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff b/srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff
new file mode 100644
index 00000000000..a30a142156e
--- /dev/null
+++ b/srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff
@@ -0,0 +1,381 @@
+--- src/comunicationsmanagerfilesockets.cpp
++++ src/comunicationsmanagerfilesockets.cpp
+@@ -134,14 +134,13 @@ int ComunicationsManagerFileSockets::create_new_socket(int *sockId)
+ ComunicationsManagerFileSockets::ComunicationsManagerFileSockets()
+ {
+ count = 0;
+- mtx = new MegaMutex();
+- informerMutex = new MegaMutex(false);
++ mtx = new std::recursive_mutex();
++ informerMutex = new std::recursive_mutex();
+ initialize();
+ }
+
+ int ComunicationsManagerFileSockets::initialize()
+ {
+- mtx->init(false);
+
+ MegaFileSystemAccess *fsAccess = new MegaFileSystemAccess();
+ char csocketsFolder[34]; // enough to hold all numbers up to 64-bits
+@@ -394,7 +393,7 @@ void ComunicationsManagerFileSockets::sendPartialOutput(CmdPetition *inf, OUTSTR
+
+ int ComunicationsManagerFileSockets::informStateListener(CmdPetition *inf, string &s)
+ {
+- MutexGuard g(*informerMutex);
++ std::lock_guard<std::recursive_mutex> g(*informerMutex);
+ LOG_verbose << "Inform State Listener: Output to write in socket " << ((CmdPetitionPosixSockets *)inf)->outSocket << ": <<" << s << ">>";
+
+ sockaddr_in cliAddr;
+--- src/comunicationsmanagerfilesockets.h
++++ src/comunicationsmanagerfilesockets.h
+@@ -58,8 +58,8 @@ private:
+
+ // to get next socket id
+ int count;
+- mega::MegaMutex *mtx;
+- mega::MegaMutex *informerMutex;
++ std::recursive_mutex *mtx;
++ std::recursive_mutex *informerMutex;
+
+ /**
+ * @brief create_new_socket
+--- src/comunicationsmanagerportsockets.cpp
++++ src/comunicationsmanagerportsockets.cpp
+@@ -161,13 +161,12 @@ SOCKET ComunicationsManagerPortSockets::create_new_socket(int *sockId)
+ ComunicationsManagerPortSockets::ComunicationsManagerPortSockets()
+ {
+ count = 0;
+- mtx = new MegaMutex();
++ mtx = new std::recursive_mutex();
+ initialize();
+ }
+
+ int ComunicationsManagerPortSockets::initialize()
+ {
+- mtx->init(false);
+ #if _WIN32
+ WORD wVersionRequested;
+ WSADATA wsaData;
+--- src/comunicationsmanagerportsockets.h
++++ src/comunicationsmanagerportsockets.h
+@@ -69,7 +69,7 @@ private:
+
+ // to get next socket id
+ int count;
+- mega::MegaMutex *mtx;
++ std::recursive_mutex *mtx;
+
+ /**
+ * @brief create_new_socket
+--- src/listeners.cpp
++++ src/listeners.cpp
+@@ -902,7 +902,6 @@ MegaCmdGlobalTransferListener::MegaCmdGlobalTransferListener(MegaApi *megaApi, M
+ this->megaApi = megaApi;
+ this->sandboxCMD = sandboxCMD;
+ this->listener = parent;
+- completedTransfersMutex.init(false);
+ };
+
+ void MegaCmdGlobalTransferListener::onTransferFinish(MegaApi* api, MegaTransfer *transfer, MegaError* error)
+--- src/listeners.h
++++ src/listeners.h
+@@ -178,7 +178,7 @@ private:
+ static const int MAXCOMPLETEDTRANSFERSBUFFER;
+
+ public:
+- mega::MegaMutex completedTransfersMutex;
++ std::recursive_mutex completedTransfersMutex;
+ std::deque<mega::MegaTransfer *> completedTransfers;
+ std::map<mega::MegaHandle,std::string> completedPathsByHandle;
+ public:
+--- src/megacmd.cpp
++++ src/megacmd.cpp
+@@ -103,11 +103,11 @@ MegaApi *api;
+ std::queue<MegaApi *> apiFolders;
+ std::vector<MegaApi *> occupiedapiFolders;
+ MegaSemaphore semaphoreapiFolders;
+-MegaMutex mutexapiFolders;
++std::recursive_mutex mutexapiFolders;
+
+ MegaCMDLogger *loggerCMD;
+
+-MegaMutex mutexEndedPetitionThreads;
++std::recursive_mutex mutexEndedPetitionThreads;
+ std::vector<MegaThread *> petitionThreads;
+ std::vector<MegaThread *> endedPetitionThreads;
+ MegaThread *threadRetryConnections;
+@@ -194,7 +194,7 @@ static prompttype prompt = COMMAND;
+ // local console
+ Console* console;
+
+-MegaMutex mutexHistory;
++std::recursive_mutex mutexHistory;
+
+ map<unsigned long long, string> threadline;
+
+@@ -4411,9 +4411,7 @@ int main(int argc, char* argv[])
+ loggerCMD->setCmdLoggerLevel(MegaApi::LOG_LEVEL_MAX);
+ }
+
+- mutexHistory.init(false);
+
+- mutexEndedPetitionThreads.init(false);
+
+ ConfigurationManager::loadConfiguration(( argc > 1 ) && debug);
+ if (!ConfigurationManager::lockExecution() && !skiplockcheck)
+@@ -4476,7 +4474,6 @@ int main(int argc, char* argv[])
+ semaphoreClients.release();
+ }
+
+- mutexapiFolders.init(false);
+
+ LOG_debug << "Language set to: " << localecode;
+
+--- src/megacmdexecuter.cpp
++++ src/megacmdexecuter.cpp
+@@ -124,12 +124,6 @@ MegaCmdExecuter::MegaCmdExecuter(MegaApi *api, MegaCMDLogger *loggerCMD, MegaCmd
+ api->addTransferListener(globalTransferListener);
+ cwd = UNDEF;
+ fsAccessCMD = new MegaFileSystemAccess();
+- mtxSyncMap.init(false);
+- mtxWebDavLocations.init(false);
+- mtxFtpLocations.init(false);
+-#ifdef ENABLE_BACKUPS
+- mtxBackupsMap.init(true);
+-#endif
+ session = NULL;
+ }
+
+--- src/megacmdexecuter.h
++++ src/megacmdexecuter.h
+@@ -33,12 +33,12 @@ private:
+ MegaCMDLogger *loggerCMD;
+ MegaCmdSandbox *sandboxCMD;
+ MegaCmdGlobalTransferListener *globalTransferListener;
+- mega::MegaMutex mtxSyncMap;
+- mega::MegaMutex mtxWebDavLocations; //TODO: destroy these two
+- mega::MegaMutex mtxFtpLocations;
++ std::recursive_mutex mtxSyncMap;
++ std::recursive_mutex mtxWebDavLocations; //TODO: destroy these two
++ std::recursive_mutex mtxFtpLocations;
+
+ #ifdef ENABLE_BACKUPS
+- mega::MegaMutex mtxBackupsMap;
++ std::recursive_mutex mtxBackupsMap;
+ #endif
+
+ // login/signup e-mail address
+--- src/megacmdlogger.cpp
++++ src/megacmdlogger.cpp
+@@ -38,7 +38,7 @@ using namespace std;
+ using namespace mega;
+
+ // different outstreams for every thread. to gather all the output data
+-MUTEX_CLASS threadLookups(false);
++std::mutex threadLookups;
+ map<uint64_t, LoggedStream *> outstreams;
+ map<uint64_t, int> threadLogLevel;
+ map<uint64_t, int> threadoutCode;
+@@ -50,7 +50,7 @@ LoggedStream LCOUT(&COUT);
+
+ LoggedStream &getCurrentOut()
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ uint64_t currentThread = MegaThread::currentThreadId();
+ if (outstreams.find(currentThread) == outstreams.end())
+ {
+@@ -71,7 +71,7 @@ bool interactiveThread()
+
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (outstreams.find(currentThread) == outstreams.end())
+ {
+ return true;
+@@ -86,7 +86,7 @@ int getCurrentOutCode()
+ {
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (threadoutCode.find(currentThread) == threadoutCode.end())
+ {
+ return 0; //default OK
+@@ -102,7 +102,7 @@ CmdPetition * getCurrentPetition()
+ {
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (threadpetition.find(currentThread) == threadpetition.end())
+ {
+ return NULL;
+@@ -117,7 +117,7 @@ int getCurrentThreadLogLevel()
+ {
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (threadLogLevel.find(currentThread) == threadLogLevel.end())
+ {
+ return -1;
+@@ -132,7 +132,7 @@ bool getCurrentThreadIsCmdShell()
+ {
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (threadIsCmdShell.find(currentThread) == threadIsCmdShell.end())
+ {
+ return false; //default not
+@@ -146,31 +146,31 @@ bool getCurrentThreadIsCmdShell()
+
+ void setCurrentThreadLogLevel(int level)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ threadLogLevel[MegaThread::currentThreadId()] = level;
+ }
+
+ void setCurrentThreadOutStream(LoggedStream *s)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ outstreams[MegaThread::currentThreadId()] = s;
+ }
+
+ void setCurrentThreadIsCmdShell(bool isit)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ threadIsCmdShell[MegaThread::currentThreadId()] = isit;
+ }
+
+ void setCurrentOutCode(int outCode)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ threadoutCode[MegaThread::currentThreadId()] = outCode;
+ }
+
+ void setCurrentPetition(CmdPetition *petition)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ threadpetition[MegaThread::currentThreadId()] = petition;
+ }
+
+@@ -179,7 +179,7 @@ MegaCMDLogger::MegaCMDLogger()
+ {
+ this->output = &LCOUT;
+ this->apiLoggerLevel = MegaApi::LOG_LEVEL_ERROR;
+- this->outputmutex = new MegaMutex(false);
++ this->outputmutex = new std::recursive_mutex;
+ }
+
+ MegaCMDLogger::~MegaCMDLogger()
+@@ -199,7 +199,7 @@ void MegaCMDLogger::log(const char *time, int loglevel, const char *source, cons
+ if (loglevel <= cmdLoggerLevel)
+ {
+ #ifdef _WIN32
+- MutexGuard g(*outputmutex);
++ std::lock_guard<std::mutex> g(*outputmutex);
+ int oldmode;
+ oldmode = _setmode(_fileno(stdout), _O_U8TEXT);
+ *output << "[" << SimpleLogger::toStr(LogLevel(loglevel)) << ": " << time << "] " << message << endl;
+@@ -233,7 +233,7 @@ void MegaCMDLogger::log(const char *time, int loglevel, const char *source, cons
+ return;
+ }
+ #ifdef _WIN32
+- MutexGuard g(*outputmutex);
++ std::lock_guard<std::mutex> g(*outputmutex);
+ int oldmode;
+ oldmode = _setmode(_fileno(stdout), _O_U8TEXT);
+ *output << "[API:" << SimpleLogger::toStr(LogLevel(loglevel)) << ": " << time << "] " << message << endl;
+--- src/megacmdlogger.h
++++ src/megacmdlogger.h
+@@ -112,7 +112,7 @@ private:
+ int apiLoggerLevel;
+ int cmdLoggerLevel;
+ LoggedStream * output;
+- mega::MegaMutex *outputmutex;
++ std::recursive_mutex *outputmutex;
+
+ public:
+ MegaCMDLogger();
+--- src/megacmdshell/megacmdshell.cpp
++++ src/megacmdshell/megacmdshell.cpp
+@@ -199,7 +199,7 @@ bool confirmingcancellink = false;
+ // communications with megacmdserver:
+ MegaCmdShellCommunications *comms;
+
+-MUTEX_CLASS mutexPrompt(false);
++std::mutex mutexPrompt;
+
+ void printWelcomeMsg(unsigned int width = 0);
+
+@@ -627,7 +627,7 @@ void install_rl_handler(const char *theprompt)
+
+ void changeprompt(const char *newprompt, bool redisplay)
+ {
+- MutexGuard g(mutexPrompt);
++ std::lock_guard<std::mutex> g(mutexPrompt);
+
+ if (*dynamicprompt)
+ {
+--- src/megacmdshell/megacmdshellcommunications.cpp
++++ src/megacmdshell/megacmdshellcommunications.cpp
+@@ -80,7 +80,7 @@ bool MegaCmdShellCommunications::stopListener;
+ bool MegaCmdShellCommunications::updating;
+ ::mega::Thread *MegaCmdShellCommunications::listenerThread;
+ SOCKET MegaCmdShellCommunications::newsockfd = INVALID_SOCKET;
+-MegaMutex MegaCmdShellCommunications::megaCmdStdoutputing;
++std::recursive_mutex MegaCmdShellCommunications::megaCmdStdoutputing;
+
+ bool MegaCmdShellCommunications::socketValid(SOCKET socket)
+ {
+@@ -483,7 +483,6 @@ MegaCmdShellCommunications::MegaCmdShellCommunications()
+ stopListener = false;
+ updating = false;
+ listenerThread = NULL;
+- MegaCmdShellCommunications::megaCmdStdoutputing.init(false);
+ }
+
+
+--- src/megacmdshell/megacmdshellcommunications.h
++++ src/megacmdshell/megacmdshellcommunications.h
+@@ -26,6 +26,7 @@
+
+ #include <string>
+ #include <iostream>
++#include <mutex>
+
+ #ifdef _WIN32
+ #include <WinSock2.h>
+@@ -40,15 +41,12 @@
+
+ #if defined(_WIN32) && !defined(WINDOWS_PHONE) && !defined(USE_CPPTHREAD)
+ #include "mega/thread/win32thread.h"
+-class MegaMutex : public ::mega::Win32Mutex {};
+ class MegaThread : public ::mega::Win32Thread {};
+ #elif defined(USE_CPPTHREAD)
+ #include "mega/thread/cppthread.h"
+-class MegaMutex : public ::mega::CppMutex {};
+ class MegaThread : public ::mega::CppThread {};
+ #else
+ #include "mega/thread/posixthread.h"
+-class MegaMutex : public ::mega::PosixMutex {};
+ class MegaThread : public ::mega::PosixThread {};
+ #endif
+
+@@ -118,7 +116,7 @@ public:
+ MegaCmdShellCommunications();
+ virtual ~MegaCmdShellCommunications();
+
+- static MegaMutex megaCmdStdoutputing;
++ static std::recursive_mutex megaCmdStdoutputing;
+ virtual int executeCommand(std::string command, std::string (*readresponse)(const char *) = NULL, OUTSTREAMTYPE &output = COUT, bool interactiveshell = true, std::wstring = L"");
+ virtual int executeCommandW(std::wstring command, std::string (*readresponse)(const char *) = NULL, OUTSTREAMTYPE &output = COUT, bool interactiveshell = true);
+
diff --git a/srcpkgs/MEGAcmd/patches/musl.patch b/srcpkgs/MEGAcmd/patches/musl.patch
deleted file mode 100644
index 3e0a395fb19..00000000000
--- a/srcpkgs/MEGAcmd/patches/musl.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/configurationmanager.h 2018-10-03 16:27:51.311763612 +0200
-+++ - 2018-10-03 16:29:44.035272722 +0200
-@@ -23,6 +23,10 @@
- #include <map>
- #include <set>
-
-+#ifndef _WIN32
-+#include <sys/file.h> // LOCK_EX and LOCK_NB
-+#endif
-+
- #define CONFIGURATIONSTOREDBYVERSION -2
- class ConfigurationManager
- {
diff --git a/srcpkgs/MEGAcmd/template b/srcpkgs/MEGAcmd/template
index 2345b3972b8..9b5d931596d 100644
--- a/srcpkgs/MEGAcmd/template
+++ b/srcpkgs/MEGAcmd/template
@@ -1,8 +1,9 @@
# Template file for 'MEGAcmd'
pkgname=MEGAcmd
-version=1.0.0
-revision=11
+version=1.1.0
+revision=1
build_style=gnu-configure
+wrksrc="${pkgname}-${version}_Linux"
make_build_args='LIBTOOLFLAGS="--tag=CXX"'
hostmakedepends="autoconf-archive autogen gettext automake libtool pkg-config"
makedepends="MEGAsdk-devel readline-devel pcre-devel"
@@ -10,8 +11,8 @@ short_desc="Command Line Interactive and Scriptable Application to access MEGA"
maintainer="John <johnz@posteo.net>"
license="BSD-2-Clause, GPL-3.0-or-later"
homepage="https://github.com/meganz/MEGAcmd"
-distfiles="https://github.com/meganz/MEGAcmd/archive/${version}.tar.gz"
-checksum=1200363bee2f387a2287e286b38d15b1a01079967e20b8c489815cc7c8d9ff63
+distfiles="https://github.com/meganz/MEGAcmd/archive/${version}_Linux.tar.gz"
+checksum=8064a21b1d1436537ab9ccc98f1f411f9496aace000584bea87d95f8e7b3a550
replaces="megacmd>=0"
if [ "$CROSS_BUILD" ]; then
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] Update MEGA*
2019-09-13 19:36 [PR PATCH] Update MEGA* voidlinux-github
` (5 preceding siblings ...)
2019-09-15 8:31 ` voidlinux-github
@ 2019-09-15 9:51 ` voidlinux-github
2019-09-15 9:51 ` voidlinux-github
2019-09-15 11:04 ` [PR PATCH] [Merged]: " voidlinux-github
8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-09-15 9:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 307 bytes --]
There is an updated pull request by Johnnynator against master on the void-packages repository
https://github.com/Johnnynator/void-packages MEGA
https://github.com/void-linux/void-packages/pull/14439
Update MEGA*
A patch file from https://github.com/void-linux/void-packages/pull/14439.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-MEGA-14439.patch --]
[-- Type: text/x-diff, Size: 21245 bytes --]
From 58e179d53b27caae208fde7b0d548ce86b2728de Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 21:50:34 +0300
Subject: [PATCH 1/3] MEGAsdk: update to 3.6.2a.
---
common/shlibs | 2 +-
srcpkgs/MEGAsdk/template | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/shlibs b/common/shlibs
index 30b3b4653d5..de88e754ae7 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2953,7 +2953,7 @@ libvted-3.so.0 libvted-3.7.0_2
libpeasd-3.so.0 libpeasd-3.7.0_2
libgstreamerd-3.so.0 libgstreamerd-3.7.0_2
libgtkdgl-3.so.0 libgtkdgl-3.7.0_2
-libmega.so.30504 MEGAsdk-3.5.4_1
+libmega.so.30602 MEGAsdk-3.6.2a_1
libopenglrecorder.so.0 libopenglrecorder-0.1.0_1
libgpod.so.4 libgpod-0.8.3_1
libi2c.so.0 i2c-tools-4.0_1
diff --git a/srcpkgs/MEGAsdk/template b/srcpkgs/MEGAsdk/template
index a7a9977393e..864b70a7adc 100644
--- a/srcpkgs/MEGAsdk/template
+++ b/srcpkgs/MEGAsdk/template
@@ -1,6 +1,6 @@
# Template file for 'MEGAsdk'
pkgname=MEGAsdk
-version=3.5.4
+version=3.6.2a
revision=1
wrksrc="sdk-${version}"
build_style=gnu-configure
@@ -16,7 +16,7 @@ maintainer="John <johnz@posteo.net>"
license="BSD-2-Clause"
homepage="https://mega.nz"
distfiles="https://github.com/meganz/sdk/archive/v${version}.tar.gz"
-checksum=7fc81a64a77829bbc8dd316aac2159890a556dfdeade527a1386482e6dee26ee
+checksum=22d910bcd799f30a499fe748cc2b3917e9e213558b1d5fba07b3f3908a833897
replaces="libmega>=0"
build_options="libuv mediainfo"
From 602a3ee580fbefdf599b64d68711aea2813201fa Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 22:34:24 +0300
Subject: [PATCH 2/3] MEGAsync: update to 4.2.4.0.
---
srcpkgs/MEGAsync/patches/breakpad.patch | 16 ++++++++++++++++
srcpkgs/MEGAsync/template | 12 ++++++------
2 files changed, 22 insertions(+), 6 deletions(-)
create mode 100644 srcpkgs/MEGAsync/patches/breakpad.patch
diff --git a/srcpkgs/MEGAsync/patches/breakpad.patch b/srcpkgs/MEGAsync/patches/breakpad.patch
new file mode 100644
index 00000000000..36495af4460
--- /dev/null
+++ b/srcpkgs/MEGAsync/patches/breakpad.patch
@@ -0,0 +1,16 @@
+--- src/MEGASync/google_breakpad/client/linux/handler/exception_handler.cc 2019-09-13 22:27:23.351723073 +0300
++++ - 2019-09-13 22:33:08.244312688 +0300
+@@ -104,11 +104,13 @@
+ #define PR_SET_PTRACER 0x59616d61
+ #endif
+
++#if defined(__GLIBC__) && __GLIBC__ < 2 && __GLIBC_MINOR__ < 30
+ // A wrapper for the tgkill syscall: send a signal to a specific thread.
+ static int tgkill(pid_t tgid, pid_t tid, int sig) {
+ return syscall(__NR_tgkill, tgid, tid, sig);
+ return 0;
+ }
++#endif
+
+ namespace google_breakpad {
+
diff --git a/srcpkgs/MEGAsync/template b/srcpkgs/MEGAsync/template
index 913e8fe7dee..4b66868b06e 100644
--- a/srcpkgs/MEGAsync/template
+++ b/srcpkgs/MEGAsync/template
@@ -1,20 +1,20 @@
# Template file for 'MEGAsync'
pkgname=MEGAsync
-version=4.1.1.0
+version=4.2.4.0
revision=1
-wrksrc="${pkgname}-${version}_Linux"
+wrksrc="${pkgname}-${version}_Win"
build_wrksrc=src
build_style=qmake
-configure_args='"CONFIG-=with_tools"'
+configure_args='"CONFIG+=FULLREQUIREMENTS"'
hostmakedepends="libtool qt5-qmake qt5-host-tools"
makedepends="qt5-tools-devel qt5-devel qt5-svg-devel MEGAsdk-devel MEGAsdk-qt
libraw-devel libgomp-devel"
short_desc="Automated syncing with MEGA Cloud Drive"
maintainer="John <johnz@posteo.net>"
-license="custom"
+license="custom: Proprietary"
homepage="https://mega.co.nz"
-distfiles="https://github.com/meganz/MEGAsync/archive/v${version}_Linux.tar.gz"
-checksum=5f43a3f402c10519e2f59c8c2a70c55affd3eb1a323767127929fb5f4baa429c
+distfiles="https://github.com/meganz/MEGAsync/archive/v${version}_Win.tar.gz"
+checksum=5fd90c93677085a2f73faa6a5a3548fcd29fc9f3203f6ddbcac7f170b580f239
restricted=yes
nocross=yes
From 9b003a1140e83478b0129077676395296b9588bc Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Sun, 15 Sep 2019 11:27:39 +0300
Subject: [PATCH 3/3] MEGAcmd: update to 1.1.0.
---
srcpkgs/MEGAcmd/patches/include.am.patch | 16 +-
srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff | 381 +++++++++++++++++++++
srcpkgs/MEGAcmd/patches/musl.patch | 13 -
srcpkgs/MEGAcmd/template | 9 +-
4 files changed, 390 insertions(+), 29 deletions(-)
create mode 100644 srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff
delete mode 100644 srcpkgs/MEGAcmd/patches/musl.patch
diff --git a/srcpkgs/MEGAcmd/patches/include.am.patch b/srcpkgs/MEGAcmd/patches/include.am.patch
index 45e1a9fcdd5..66a0d7287d4 100644
--- a/srcpkgs/MEGAcmd/patches/include.am.patch
+++ b/srcpkgs/MEGAcmd/patches/include.am.patch
@@ -1,20 +1,12 @@
---- src/include.am.orig 2017-12-01 23:56:36.199044786 +0100
-+++ src/include.am 2017-12-01 23:56:54.073045467 +0100
-@@ -7,7 +7,7 @@
+--- src/include.am 2019-09-15 11:19:21.139430520 +0300
++++ - 2019-09-15 11:20:24.234994345 +0300
+@@ -7,9 +7,9 @@
MEGACMD = mega-cmd mega-exec mega-cmd-server
bin_PROGRAMS += $(MEGACMD)
-$(MEGACMD): $(MEGA_LIBS)
+$(MEGACMD):
- noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
- megacmdcompletiondir = $(sysconfdir)/bash_completion.d/
- megacmdcompletion_DATA = src/client/megacmd_completion.sh
---- src/include.am 2018-12-06 14:42:18.308589868 +0100
-+++ - 2018-12-06 14:45:15.075785487 +0100
-@@ -9,7 +9,7 @@
- bin_PROGRAMS += $(MEGACMD)
- $(MEGACMD):
- noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
+ noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/megacmdcommonutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
-megacmdcompletiondir = $(sysconfdir)/bash_completion.d/
+megacmdcompletiondir = $(datarootdir)/bash-completion/completions
megacmdcompletion_DATA = src/client/megacmd_completion.sh
diff --git a/srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff b/srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff
new file mode 100644
index 00000000000..a30a142156e
--- /dev/null
+++ b/srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff
@@ -0,0 +1,381 @@
+--- src/comunicationsmanagerfilesockets.cpp
++++ src/comunicationsmanagerfilesockets.cpp
+@@ -134,14 +134,13 @@ int ComunicationsManagerFileSockets::create_new_socket(int *sockId)
+ ComunicationsManagerFileSockets::ComunicationsManagerFileSockets()
+ {
+ count = 0;
+- mtx = new MegaMutex();
+- informerMutex = new MegaMutex(false);
++ mtx = new std::recursive_mutex();
++ informerMutex = new std::recursive_mutex();
+ initialize();
+ }
+
+ int ComunicationsManagerFileSockets::initialize()
+ {
+- mtx->init(false);
+
+ MegaFileSystemAccess *fsAccess = new MegaFileSystemAccess();
+ char csocketsFolder[34]; // enough to hold all numbers up to 64-bits
+@@ -394,7 +393,7 @@ void ComunicationsManagerFileSockets::sendPartialOutput(CmdPetition *inf, OUTSTR
+
+ int ComunicationsManagerFileSockets::informStateListener(CmdPetition *inf, string &s)
+ {
+- MutexGuard g(*informerMutex);
++ std::lock_guard<std::recursive_mutex> g(*informerMutex);
+ LOG_verbose << "Inform State Listener: Output to write in socket " << ((CmdPetitionPosixSockets *)inf)->outSocket << ": <<" << s << ">>";
+
+ sockaddr_in cliAddr;
+--- src/comunicationsmanagerfilesockets.h
++++ src/comunicationsmanagerfilesockets.h
+@@ -58,8 +58,8 @@ private:
+
+ // to get next socket id
+ int count;
+- mega::MegaMutex *mtx;
+- mega::MegaMutex *informerMutex;
++ std::recursive_mutex *mtx;
++ std::recursive_mutex *informerMutex;
+
+ /**
+ * @brief create_new_socket
+--- src/comunicationsmanagerportsockets.cpp
++++ src/comunicationsmanagerportsockets.cpp
+@@ -161,13 +161,12 @@ SOCKET ComunicationsManagerPortSockets::create_new_socket(int *sockId)
+ ComunicationsManagerPortSockets::ComunicationsManagerPortSockets()
+ {
+ count = 0;
+- mtx = new MegaMutex();
++ mtx = new std::recursive_mutex();
+ initialize();
+ }
+
+ int ComunicationsManagerPortSockets::initialize()
+ {
+- mtx->init(false);
+ #if _WIN32
+ WORD wVersionRequested;
+ WSADATA wsaData;
+--- src/comunicationsmanagerportsockets.h
++++ src/comunicationsmanagerportsockets.h
+@@ -69,7 +69,7 @@ private:
+
+ // to get next socket id
+ int count;
+- mega::MegaMutex *mtx;
++ std::recursive_mutex *mtx;
+
+ /**
+ * @brief create_new_socket
+--- src/listeners.cpp
++++ src/listeners.cpp
+@@ -902,7 +902,6 @@ MegaCmdGlobalTransferListener::MegaCmdGlobalTransferListener(MegaApi *megaApi, M
+ this->megaApi = megaApi;
+ this->sandboxCMD = sandboxCMD;
+ this->listener = parent;
+- completedTransfersMutex.init(false);
+ };
+
+ void MegaCmdGlobalTransferListener::onTransferFinish(MegaApi* api, MegaTransfer *transfer, MegaError* error)
+--- src/listeners.h
++++ src/listeners.h
+@@ -178,7 +178,7 @@ private:
+ static const int MAXCOMPLETEDTRANSFERSBUFFER;
+
+ public:
+- mega::MegaMutex completedTransfersMutex;
++ std::recursive_mutex completedTransfersMutex;
+ std::deque<mega::MegaTransfer *> completedTransfers;
+ std::map<mega::MegaHandle,std::string> completedPathsByHandle;
+ public:
+--- src/megacmd.cpp
++++ src/megacmd.cpp
+@@ -103,11 +103,11 @@ MegaApi *api;
+ std::queue<MegaApi *> apiFolders;
+ std::vector<MegaApi *> occupiedapiFolders;
+ MegaSemaphore semaphoreapiFolders;
+-MegaMutex mutexapiFolders;
++std::recursive_mutex mutexapiFolders;
+
+ MegaCMDLogger *loggerCMD;
+
+-MegaMutex mutexEndedPetitionThreads;
++std::recursive_mutex mutexEndedPetitionThreads;
+ std::vector<MegaThread *> petitionThreads;
+ std::vector<MegaThread *> endedPetitionThreads;
+ MegaThread *threadRetryConnections;
+@@ -194,7 +194,7 @@ static prompttype prompt = COMMAND;
+ // local console
+ Console* console;
+
+-MegaMutex mutexHistory;
++std::recursive_mutex mutexHistory;
+
+ map<unsigned long long, string> threadline;
+
+@@ -4411,9 +4411,7 @@ int main(int argc, char* argv[])
+ loggerCMD->setCmdLoggerLevel(MegaApi::LOG_LEVEL_MAX);
+ }
+
+- mutexHistory.init(false);
+
+- mutexEndedPetitionThreads.init(false);
+
+ ConfigurationManager::loadConfiguration(( argc > 1 ) && debug);
+ if (!ConfigurationManager::lockExecution() && !skiplockcheck)
+@@ -4476,7 +4474,6 @@ int main(int argc, char* argv[])
+ semaphoreClients.release();
+ }
+
+- mutexapiFolders.init(false);
+
+ LOG_debug << "Language set to: " << localecode;
+
+--- src/megacmdexecuter.cpp
++++ src/megacmdexecuter.cpp
+@@ -124,12 +124,6 @@ MegaCmdExecuter::MegaCmdExecuter(MegaApi *api, MegaCMDLogger *loggerCMD, MegaCmd
+ api->addTransferListener(globalTransferListener);
+ cwd = UNDEF;
+ fsAccessCMD = new MegaFileSystemAccess();
+- mtxSyncMap.init(false);
+- mtxWebDavLocations.init(false);
+- mtxFtpLocations.init(false);
+-#ifdef ENABLE_BACKUPS
+- mtxBackupsMap.init(true);
+-#endif
+ session = NULL;
+ }
+
+--- src/megacmdexecuter.h
++++ src/megacmdexecuter.h
+@@ -33,12 +33,12 @@ private:
+ MegaCMDLogger *loggerCMD;
+ MegaCmdSandbox *sandboxCMD;
+ MegaCmdGlobalTransferListener *globalTransferListener;
+- mega::MegaMutex mtxSyncMap;
+- mega::MegaMutex mtxWebDavLocations; //TODO: destroy these two
+- mega::MegaMutex mtxFtpLocations;
++ std::recursive_mutex mtxSyncMap;
++ std::recursive_mutex mtxWebDavLocations; //TODO: destroy these two
++ std::recursive_mutex mtxFtpLocations;
+
+ #ifdef ENABLE_BACKUPS
+- mega::MegaMutex mtxBackupsMap;
++ std::recursive_mutex mtxBackupsMap;
+ #endif
+
+ // login/signup e-mail address
+--- src/megacmdlogger.cpp
++++ src/megacmdlogger.cpp
+@@ -38,7 +38,7 @@ using namespace std;
+ using namespace mega;
+
+ // different outstreams for every thread. to gather all the output data
+-MUTEX_CLASS threadLookups(false);
++std::mutex threadLookups;
+ map<uint64_t, LoggedStream *> outstreams;
+ map<uint64_t, int> threadLogLevel;
+ map<uint64_t, int> threadoutCode;
+@@ -50,7 +50,7 @@ LoggedStream LCOUT(&COUT);
+
+ LoggedStream &getCurrentOut()
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ uint64_t currentThread = MegaThread::currentThreadId();
+ if (outstreams.find(currentThread) == outstreams.end())
+ {
+@@ -71,7 +71,7 @@ bool interactiveThread()
+
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (outstreams.find(currentThread) == outstreams.end())
+ {
+ return true;
+@@ -86,7 +86,7 @@ int getCurrentOutCode()
+ {
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (threadoutCode.find(currentThread) == threadoutCode.end())
+ {
+ return 0; //default OK
+@@ -102,7 +102,7 @@ CmdPetition * getCurrentPetition()
+ {
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (threadpetition.find(currentThread) == threadpetition.end())
+ {
+ return NULL;
+@@ -117,7 +117,7 @@ int getCurrentThreadLogLevel()
+ {
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (threadLogLevel.find(currentThread) == threadLogLevel.end())
+ {
+ return -1;
+@@ -132,7 +132,7 @@ bool getCurrentThreadIsCmdShell()
+ {
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (threadIsCmdShell.find(currentThread) == threadIsCmdShell.end())
+ {
+ return false; //default not
+@@ -146,31 +146,31 @@ bool getCurrentThreadIsCmdShell()
+
+ void setCurrentThreadLogLevel(int level)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ threadLogLevel[MegaThread::currentThreadId()] = level;
+ }
+
+ void setCurrentThreadOutStream(LoggedStream *s)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ outstreams[MegaThread::currentThreadId()] = s;
+ }
+
+ void setCurrentThreadIsCmdShell(bool isit)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ threadIsCmdShell[MegaThread::currentThreadId()] = isit;
+ }
+
+ void setCurrentOutCode(int outCode)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ threadoutCode[MegaThread::currentThreadId()] = outCode;
+ }
+
+ void setCurrentPetition(CmdPetition *petition)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ threadpetition[MegaThread::currentThreadId()] = petition;
+ }
+
+@@ -179,7 +179,7 @@ MegaCMDLogger::MegaCMDLogger()
+ {
+ this->output = &LCOUT;
+ this->apiLoggerLevel = MegaApi::LOG_LEVEL_ERROR;
+- this->outputmutex = new MegaMutex(false);
++ this->outputmutex = new std::recursive_mutex;
+ }
+
+ MegaCMDLogger::~MegaCMDLogger()
+@@ -199,7 +199,7 @@ void MegaCMDLogger::log(const char *time, int loglevel, const char *source, cons
+ if (loglevel <= cmdLoggerLevel)
+ {
+ #ifdef _WIN32
+- MutexGuard g(*outputmutex);
++ std::lock_guard<std::mutex> g(*outputmutex);
+ int oldmode;
+ oldmode = _setmode(_fileno(stdout), _O_U8TEXT);
+ *output << "[" << SimpleLogger::toStr(LogLevel(loglevel)) << ": " << time << "] " << message << endl;
+@@ -233,7 +233,7 @@ void MegaCMDLogger::log(const char *time, int loglevel, const char *source, cons
+ return;
+ }
+ #ifdef _WIN32
+- MutexGuard g(*outputmutex);
++ std::lock_guard<std::mutex> g(*outputmutex);
+ int oldmode;
+ oldmode = _setmode(_fileno(stdout), _O_U8TEXT);
+ *output << "[API:" << SimpleLogger::toStr(LogLevel(loglevel)) << ": " << time << "] " << message << endl;
+--- src/megacmdlogger.h
++++ src/megacmdlogger.h
+@@ -112,7 +112,7 @@ private:
+ int apiLoggerLevel;
+ int cmdLoggerLevel;
+ LoggedStream * output;
+- mega::MegaMutex *outputmutex;
++ std::recursive_mutex *outputmutex;
+
+ public:
+ MegaCMDLogger();
+--- src/megacmdshell/megacmdshell.cpp
++++ src/megacmdshell/megacmdshell.cpp
+@@ -199,7 +199,7 @@ bool confirmingcancellink = false;
+ // communications with megacmdserver:
+ MegaCmdShellCommunications *comms;
+
+-MUTEX_CLASS mutexPrompt(false);
++std::mutex mutexPrompt;
+
+ void printWelcomeMsg(unsigned int width = 0);
+
+@@ -627,7 +627,7 @@ void install_rl_handler(const char *theprompt)
+
+ void changeprompt(const char *newprompt, bool redisplay)
+ {
+- MutexGuard g(mutexPrompt);
++ std::lock_guard<std::mutex> g(mutexPrompt);
+
+ if (*dynamicprompt)
+ {
+--- src/megacmdshell/megacmdshellcommunications.cpp
++++ src/megacmdshell/megacmdshellcommunications.cpp
+@@ -80,7 +80,7 @@ bool MegaCmdShellCommunications::stopListener;
+ bool MegaCmdShellCommunications::updating;
+ ::mega::Thread *MegaCmdShellCommunications::listenerThread;
+ SOCKET MegaCmdShellCommunications::newsockfd = INVALID_SOCKET;
+-MegaMutex MegaCmdShellCommunications::megaCmdStdoutputing;
++std::recursive_mutex MegaCmdShellCommunications::megaCmdStdoutputing;
+
+ bool MegaCmdShellCommunications::socketValid(SOCKET socket)
+ {
+@@ -483,7 +483,6 @@ MegaCmdShellCommunications::MegaCmdShellCommunications()
+ stopListener = false;
+ updating = false;
+ listenerThread = NULL;
+- MegaCmdShellCommunications::megaCmdStdoutputing.init(false);
+ }
+
+
+--- src/megacmdshell/megacmdshellcommunications.h
++++ src/megacmdshell/megacmdshellcommunications.h
+@@ -26,6 +26,7 @@
+
+ #include <string>
+ #include <iostream>
++#include <mutex>
+
+ #ifdef _WIN32
+ #include <WinSock2.h>
+@@ -40,15 +41,12 @@
+
+ #if defined(_WIN32) && !defined(WINDOWS_PHONE) && !defined(USE_CPPTHREAD)
+ #include "mega/thread/win32thread.h"
+-class MegaMutex : public ::mega::Win32Mutex {};
+ class MegaThread : public ::mega::Win32Thread {};
+ #elif defined(USE_CPPTHREAD)
+ #include "mega/thread/cppthread.h"
+-class MegaMutex : public ::mega::CppMutex {};
+ class MegaThread : public ::mega::CppThread {};
+ #else
+ #include "mega/thread/posixthread.h"
+-class MegaMutex : public ::mega::PosixMutex {};
+ class MegaThread : public ::mega::PosixThread {};
+ #endif
+
+@@ -118,7 +116,7 @@ public:
+ MegaCmdShellCommunications();
+ virtual ~MegaCmdShellCommunications();
+
+- static MegaMutex megaCmdStdoutputing;
++ static std::recursive_mutex megaCmdStdoutputing;
+ virtual int executeCommand(std::string command, std::string (*readresponse)(const char *) = NULL, OUTSTREAMTYPE &output = COUT, bool interactiveshell = true, std::wstring = L"");
+ virtual int executeCommandW(std::wstring command, std::string (*readresponse)(const char *) = NULL, OUTSTREAMTYPE &output = COUT, bool interactiveshell = true);
+
diff --git a/srcpkgs/MEGAcmd/patches/musl.patch b/srcpkgs/MEGAcmd/patches/musl.patch
deleted file mode 100644
index 3e0a395fb19..00000000000
--- a/srcpkgs/MEGAcmd/patches/musl.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/configurationmanager.h 2018-10-03 16:27:51.311763612 +0200
-+++ - 2018-10-03 16:29:44.035272722 +0200
-@@ -23,6 +23,10 @@
- #include <map>
- #include <set>
-
-+#ifndef _WIN32
-+#include <sys/file.h> // LOCK_EX and LOCK_NB
-+#endif
-+
- #define CONFIGURATIONSTOREDBYVERSION -2
- class ConfigurationManager
- {
diff --git a/srcpkgs/MEGAcmd/template b/srcpkgs/MEGAcmd/template
index 2345b3972b8..63e7c4f6986 100644
--- a/srcpkgs/MEGAcmd/template
+++ b/srcpkgs/MEGAcmd/template
@@ -1,7 +1,8 @@
# Template file for 'MEGAcmd'
pkgname=MEGAcmd
-version=1.0.0
-revision=11
+version=1.1.0
+revision=1
+wrksrc="${pkgname}-${version}_Linux"
build_style=gnu-configure
make_build_args='LIBTOOLFLAGS="--tag=CXX"'
hostmakedepends="autoconf-archive autogen gettext automake libtool pkg-config"
@@ -10,8 +11,8 @@ short_desc="Command Line Interactive and Scriptable Application to access MEGA"
maintainer="John <johnz@posteo.net>"
license="BSD-2-Clause, GPL-3.0-or-later"
homepage="https://github.com/meganz/MEGAcmd"
-distfiles="https://github.com/meganz/MEGAcmd/archive/${version}.tar.gz"
-checksum=1200363bee2f387a2287e286b38d15b1a01079967e20b8c489815cc7c8d9ff63
+distfiles="https://github.com/meganz/MEGAcmd/archive/${version}_Linux.tar.gz"
+checksum=8064a21b1d1436537ab9ccc98f1f411f9496aace000584bea87d95f8e7b3a550
replaces="megacmd>=0"
if [ "$CROSS_BUILD" ]; then
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Updated] Update MEGA*
2019-09-13 19:36 [PR PATCH] Update MEGA* voidlinux-github
` (6 preceding siblings ...)
2019-09-15 9:51 ` voidlinux-github
@ 2019-09-15 9:51 ` voidlinux-github
2019-09-15 11:04 ` [PR PATCH] [Merged]: " voidlinux-github
8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-09-15 9:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 307 bytes --]
There is an updated pull request by Johnnynator against master on the void-packages repository
https://github.com/Johnnynator/void-packages MEGA
https://github.com/void-linux/void-packages/pull/14439
Update MEGA*
A patch file from https://github.com/void-linux/void-packages/pull/14439.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-MEGA-14439.patch --]
[-- Type: text/x-diff, Size: 21245 bytes --]
From 58e179d53b27caae208fde7b0d548ce86b2728de Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 21:50:34 +0300
Subject: [PATCH 1/3] MEGAsdk: update to 3.6.2a.
---
common/shlibs | 2 +-
srcpkgs/MEGAsdk/template | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/common/shlibs b/common/shlibs
index 30b3b4653d5..de88e754ae7 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2953,7 +2953,7 @@ libvted-3.so.0 libvted-3.7.0_2
libpeasd-3.so.0 libpeasd-3.7.0_2
libgstreamerd-3.so.0 libgstreamerd-3.7.0_2
libgtkdgl-3.so.0 libgtkdgl-3.7.0_2
-libmega.so.30504 MEGAsdk-3.5.4_1
+libmega.so.30602 MEGAsdk-3.6.2a_1
libopenglrecorder.so.0 libopenglrecorder-0.1.0_1
libgpod.so.4 libgpod-0.8.3_1
libi2c.so.0 i2c-tools-4.0_1
diff --git a/srcpkgs/MEGAsdk/template b/srcpkgs/MEGAsdk/template
index a7a9977393e..864b70a7adc 100644
--- a/srcpkgs/MEGAsdk/template
+++ b/srcpkgs/MEGAsdk/template
@@ -1,6 +1,6 @@
# Template file for 'MEGAsdk'
pkgname=MEGAsdk
-version=3.5.4
+version=3.6.2a
revision=1
wrksrc="sdk-${version}"
build_style=gnu-configure
@@ -16,7 +16,7 @@ maintainer="John <johnz@posteo.net>"
license="BSD-2-Clause"
homepage="https://mega.nz"
distfiles="https://github.com/meganz/sdk/archive/v${version}.tar.gz"
-checksum=7fc81a64a77829bbc8dd316aac2159890a556dfdeade527a1386482e6dee26ee
+checksum=22d910bcd799f30a499fe748cc2b3917e9e213558b1d5fba07b3f3908a833897
replaces="libmega>=0"
build_options="libuv mediainfo"
From 602a3ee580fbefdf599b64d68711aea2813201fa Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Fri, 13 Sep 2019 22:34:24 +0300
Subject: [PATCH 2/3] MEGAsync: update to 4.2.4.0.
---
srcpkgs/MEGAsync/patches/breakpad.patch | 16 ++++++++++++++++
srcpkgs/MEGAsync/template | 12 ++++++------
2 files changed, 22 insertions(+), 6 deletions(-)
create mode 100644 srcpkgs/MEGAsync/patches/breakpad.patch
diff --git a/srcpkgs/MEGAsync/patches/breakpad.patch b/srcpkgs/MEGAsync/patches/breakpad.patch
new file mode 100644
index 00000000000..36495af4460
--- /dev/null
+++ b/srcpkgs/MEGAsync/patches/breakpad.patch
@@ -0,0 +1,16 @@
+--- src/MEGASync/google_breakpad/client/linux/handler/exception_handler.cc 2019-09-13 22:27:23.351723073 +0300
++++ - 2019-09-13 22:33:08.244312688 +0300
+@@ -104,11 +104,13 @@
+ #define PR_SET_PTRACER 0x59616d61
+ #endif
+
++#if defined(__GLIBC__) && __GLIBC__ < 2 && __GLIBC_MINOR__ < 30
+ // A wrapper for the tgkill syscall: send a signal to a specific thread.
+ static int tgkill(pid_t tgid, pid_t tid, int sig) {
+ return syscall(__NR_tgkill, tgid, tid, sig);
+ return 0;
+ }
++#endif
+
+ namespace google_breakpad {
+
diff --git a/srcpkgs/MEGAsync/template b/srcpkgs/MEGAsync/template
index 913e8fe7dee..4b66868b06e 100644
--- a/srcpkgs/MEGAsync/template
+++ b/srcpkgs/MEGAsync/template
@@ -1,20 +1,20 @@
# Template file for 'MEGAsync'
pkgname=MEGAsync
-version=4.1.1.0
+version=4.2.4.0
revision=1
-wrksrc="${pkgname}-${version}_Linux"
+wrksrc="${pkgname}-${version}_Win"
build_wrksrc=src
build_style=qmake
-configure_args='"CONFIG-=with_tools"'
+configure_args='"CONFIG+=FULLREQUIREMENTS"'
hostmakedepends="libtool qt5-qmake qt5-host-tools"
makedepends="qt5-tools-devel qt5-devel qt5-svg-devel MEGAsdk-devel MEGAsdk-qt
libraw-devel libgomp-devel"
short_desc="Automated syncing with MEGA Cloud Drive"
maintainer="John <johnz@posteo.net>"
-license="custom"
+license="custom: Proprietary"
homepage="https://mega.co.nz"
-distfiles="https://github.com/meganz/MEGAsync/archive/v${version}_Linux.tar.gz"
-checksum=5f43a3f402c10519e2f59c8c2a70c55affd3eb1a323767127929fb5f4baa429c
+distfiles="https://github.com/meganz/MEGAsync/archive/v${version}_Win.tar.gz"
+checksum=5fd90c93677085a2f73faa6a5a3548fcd29fc9f3203f6ddbcac7f170b580f239
restricted=yes
nocross=yes
From 9b003a1140e83478b0129077676395296b9588bc Mon Sep 17 00:00:00 2001
From: John <johnz@posteo.net>
Date: Sun, 15 Sep 2019 11:27:39 +0300
Subject: [PATCH 3/3] MEGAcmd: update to 1.1.0.
---
srcpkgs/MEGAcmd/patches/include.am.patch | 16 +-
srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff | 381 +++++++++++++++++++++
srcpkgs/MEGAcmd/patches/musl.patch | 13 -
srcpkgs/MEGAcmd/template | 9 +-
4 files changed, 390 insertions(+), 29 deletions(-)
create mode 100644 srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff
delete mode 100644 srcpkgs/MEGAcmd/patches/musl.patch
diff --git a/srcpkgs/MEGAcmd/patches/include.am.patch b/srcpkgs/MEGAcmd/patches/include.am.patch
index 45e1a9fcdd5..66a0d7287d4 100644
--- a/srcpkgs/MEGAcmd/patches/include.am.patch
+++ b/srcpkgs/MEGAcmd/patches/include.am.patch
@@ -1,20 +1,12 @@
---- src/include.am.orig 2017-12-01 23:56:36.199044786 +0100
-+++ src/include.am 2017-12-01 23:56:54.073045467 +0100
-@@ -7,7 +7,7 @@
+--- src/include.am 2019-09-15 11:19:21.139430520 +0300
++++ - 2019-09-15 11:20:24.234994345 +0300
+@@ -7,9 +7,9 @@
MEGACMD = mega-cmd mega-exec mega-cmd-server
bin_PROGRAMS += $(MEGACMD)
-$(MEGACMD): $(MEGA_LIBS)
+$(MEGACMD):
- noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
- megacmdcompletiondir = $(sysconfdir)/bash_completion.d/
- megacmdcompletion_DATA = src/client/megacmd_completion.sh
---- src/include.am 2018-12-06 14:42:18.308589868 +0100
-+++ - 2018-12-06 14:45:15.075785487 +0100
-@@ -9,7 +9,7 @@
- bin_PROGRAMS += $(MEGACMD)
- $(MEGACMD):
- noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
+ noinst_HEADERS += src/comunicationsmanager.h src/configurationmanager.h src/megacmd.h src/megacmdlogger.h src/megacmdsandbox.h src/megacmdutils.h src/megacmdcommonutils.h src/listeners.h src/megacmdexecuter.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
-megacmdcompletiondir = $(sysconfdir)/bash_completion.d/
+megacmdcompletiondir = $(datarootdir)/bash-completion/completions
megacmdcompletion_DATA = src/client/megacmd_completion.sh
diff --git a/srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff b/srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff
new file mode 100644
index 00000000000..a30a142156e
--- /dev/null
+++ b/srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff
@@ -0,0 +1,381 @@
+--- src/comunicationsmanagerfilesockets.cpp
++++ src/comunicationsmanagerfilesockets.cpp
+@@ -134,14 +134,13 @@ int ComunicationsManagerFileSockets::create_new_socket(int *sockId)
+ ComunicationsManagerFileSockets::ComunicationsManagerFileSockets()
+ {
+ count = 0;
+- mtx = new MegaMutex();
+- informerMutex = new MegaMutex(false);
++ mtx = new std::recursive_mutex();
++ informerMutex = new std::recursive_mutex();
+ initialize();
+ }
+
+ int ComunicationsManagerFileSockets::initialize()
+ {
+- mtx->init(false);
+
+ MegaFileSystemAccess *fsAccess = new MegaFileSystemAccess();
+ char csocketsFolder[34]; // enough to hold all numbers up to 64-bits
+@@ -394,7 +393,7 @@ void ComunicationsManagerFileSockets::sendPartialOutput(CmdPetition *inf, OUTSTR
+
+ int ComunicationsManagerFileSockets::informStateListener(CmdPetition *inf, string &s)
+ {
+- MutexGuard g(*informerMutex);
++ std::lock_guard<std::recursive_mutex> g(*informerMutex);
+ LOG_verbose << "Inform State Listener: Output to write in socket " << ((CmdPetitionPosixSockets *)inf)->outSocket << ": <<" << s << ">>";
+
+ sockaddr_in cliAddr;
+--- src/comunicationsmanagerfilesockets.h
++++ src/comunicationsmanagerfilesockets.h
+@@ -58,8 +58,8 @@ private:
+
+ // to get next socket id
+ int count;
+- mega::MegaMutex *mtx;
+- mega::MegaMutex *informerMutex;
++ std::recursive_mutex *mtx;
++ std::recursive_mutex *informerMutex;
+
+ /**
+ * @brief create_new_socket
+--- src/comunicationsmanagerportsockets.cpp
++++ src/comunicationsmanagerportsockets.cpp
+@@ -161,13 +161,12 @@ SOCKET ComunicationsManagerPortSockets::create_new_socket(int *sockId)
+ ComunicationsManagerPortSockets::ComunicationsManagerPortSockets()
+ {
+ count = 0;
+- mtx = new MegaMutex();
++ mtx = new std::recursive_mutex();
+ initialize();
+ }
+
+ int ComunicationsManagerPortSockets::initialize()
+ {
+- mtx->init(false);
+ #if _WIN32
+ WORD wVersionRequested;
+ WSADATA wsaData;
+--- src/comunicationsmanagerportsockets.h
++++ src/comunicationsmanagerportsockets.h
+@@ -69,7 +69,7 @@ private:
+
+ // to get next socket id
+ int count;
+- mega::MegaMutex *mtx;
++ std::recursive_mutex *mtx;
+
+ /**
+ * @brief create_new_socket
+--- src/listeners.cpp
++++ src/listeners.cpp
+@@ -902,7 +902,6 @@ MegaCmdGlobalTransferListener::MegaCmdGlobalTransferListener(MegaApi *megaApi, M
+ this->megaApi = megaApi;
+ this->sandboxCMD = sandboxCMD;
+ this->listener = parent;
+- completedTransfersMutex.init(false);
+ };
+
+ void MegaCmdGlobalTransferListener::onTransferFinish(MegaApi* api, MegaTransfer *transfer, MegaError* error)
+--- src/listeners.h
++++ src/listeners.h
+@@ -178,7 +178,7 @@ private:
+ static const int MAXCOMPLETEDTRANSFERSBUFFER;
+
+ public:
+- mega::MegaMutex completedTransfersMutex;
++ std::recursive_mutex completedTransfersMutex;
+ std::deque<mega::MegaTransfer *> completedTransfers;
+ std::map<mega::MegaHandle,std::string> completedPathsByHandle;
+ public:
+--- src/megacmd.cpp
++++ src/megacmd.cpp
+@@ -103,11 +103,11 @@ MegaApi *api;
+ std::queue<MegaApi *> apiFolders;
+ std::vector<MegaApi *> occupiedapiFolders;
+ MegaSemaphore semaphoreapiFolders;
+-MegaMutex mutexapiFolders;
++std::recursive_mutex mutexapiFolders;
+
+ MegaCMDLogger *loggerCMD;
+
+-MegaMutex mutexEndedPetitionThreads;
++std::recursive_mutex mutexEndedPetitionThreads;
+ std::vector<MegaThread *> petitionThreads;
+ std::vector<MegaThread *> endedPetitionThreads;
+ MegaThread *threadRetryConnections;
+@@ -194,7 +194,7 @@ static prompttype prompt = COMMAND;
+ // local console
+ Console* console;
+
+-MegaMutex mutexHistory;
++std::recursive_mutex mutexHistory;
+
+ map<unsigned long long, string> threadline;
+
+@@ -4411,9 +4411,7 @@ int main(int argc, char* argv[])
+ loggerCMD->setCmdLoggerLevel(MegaApi::LOG_LEVEL_MAX);
+ }
+
+- mutexHistory.init(false);
+
+- mutexEndedPetitionThreads.init(false);
+
+ ConfigurationManager::loadConfiguration(( argc > 1 ) && debug);
+ if (!ConfigurationManager::lockExecution() && !skiplockcheck)
+@@ -4476,7 +4474,6 @@ int main(int argc, char* argv[])
+ semaphoreClients.release();
+ }
+
+- mutexapiFolders.init(false);
+
+ LOG_debug << "Language set to: " << localecode;
+
+--- src/megacmdexecuter.cpp
++++ src/megacmdexecuter.cpp
+@@ -124,12 +124,6 @@ MegaCmdExecuter::MegaCmdExecuter(MegaApi *api, MegaCMDLogger *loggerCMD, MegaCmd
+ api->addTransferListener(globalTransferListener);
+ cwd = UNDEF;
+ fsAccessCMD = new MegaFileSystemAccess();
+- mtxSyncMap.init(false);
+- mtxWebDavLocations.init(false);
+- mtxFtpLocations.init(false);
+-#ifdef ENABLE_BACKUPS
+- mtxBackupsMap.init(true);
+-#endif
+ session = NULL;
+ }
+
+--- src/megacmdexecuter.h
++++ src/megacmdexecuter.h
+@@ -33,12 +33,12 @@ private:
+ MegaCMDLogger *loggerCMD;
+ MegaCmdSandbox *sandboxCMD;
+ MegaCmdGlobalTransferListener *globalTransferListener;
+- mega::MegaMutex mtxSyncMap;
+- mega::MegaMutex mtxWebDavLocations; //TODO: destroy these two
+- mega::MegaMutex mtxFtpLocations;
++ std::recursive_mutex mtxSyncMap;
++ std::recursive_mutex mtxWebDavLocations; //TODO: destroy these two
++ std::recursive_mutex mtxFtpLocations;
+
+ #ifdef ENABLE_BACKUPS
+- mega::MegaMutex mtxBackupsMap;
++ std::recursive_mutex mtxBackupsMap;
+ #endif
+
+ // login/signup e-mail address
+--- src/megacmdlogger.cpp
++++ src/megacmdlogger.cpp
+@@ -38,7 +38,7 @@ using namespace std;
+ using namespace mega;
+
+ // different outstreams for every thread. to gather all the output data
+-MUTEX_CLASS threadLookups(false);
++std::mutex threadLookups;
+ map<uint64_t, LoggedStream *> outstreams;
+ map<uint64_t, int> threadLogLevel;
+ map<uint64_t, int> threadoutCode;
+@@ -50,7 +50,7 @@ LoggedStream LCOUT(&COUT);
+
+ LoggedStream &getCurrentOut()
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ uint64_t currentThread = MegaThread::currentThreadId();
+ if (outstreams.find(currentThread) == outstreams.end())
+ {
+@@ -71,7 +71,7 @@ bool interactiveThread()
+
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (outstreams.find(currentThread) == outstreams.end())
+ {
+ return true;
+@@ -86,7 +86,7 @@ int getCurrentOutCode()
+ {
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (threadoutCode.find(currentThread) == threadoutCode.end())
+ {
+ return 0; //default OK
+@@ -102,7 +102,7 @@ CmdPetition * getCurrentPetition()
+ {
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (threadpetition.find(currentThread) == threadpetition.end())
+ {
+ return NULL;
+@@ -117,7 +117,7 @@ int getCurrentThreadLogLevel()
+ {
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (threadLogLevel.find(currentThread) == threadLogLevel.end())
+ {
+ return -1;
+@@ -132,7 +132,7 @@ bool getCurrentThreadIsCmdShell()
+ {
+ unsigned long long currentThread = MegaThread::currentThreadId();
+
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ if (threadIsCmdShell.find(currentThread) == threadIsCmdShell.end())
+ {
+ return false; //default not
+@@ -146,31 +146,31 @@ bool getCurrentThreadIsCmdShell()
+
+ void setCurrentThreadLogLevel(int level)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ threadLogLevel[MegaThread::currentThreadId()] = level;
+ }
+
+ void setCurrentThreadOutStream(LoggedStream *s)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ outstreams[MegaThread::currentThreadId()] = s;
+ }
+
+ void setCurrentThreadIsCmdShell(bool isit)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ threadIsCmdShell[MegaThread::currentThreadId()] = isit;
+ }
+
+ void setCurrentOutCode(int outCode)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ threadoutCode[MegaThread::currentThreadId()] = outCode;
+ }
+
+ void setCurrentPetition(CmdPetition *petition)
+ {
+- MutexGuard g(threadLookups);
++ std::lock_guard<std::mutex> g(threadLookups);
+ threadpetition[MegaThread::currentThreadId()] = petition;
+ }
+
+@@ -179,7 +179,7 @@ MegaCMDLogger::MegaCMDLogger()
+ {
+ this->output = &LCOUT;
+ this->apiLoggerLevel = MegaApi::LOG_LEVEL_ERROR;
+- this->outputmutex = new MegaMutex(false);
++ this->outputmutex = new std::recursive_mutex;
+ }
+
+ MegaCMDLogger::~MegaCMDLogger()
+@@ -199,7 +199,7 @@ void MegaCMDLogger::log(const char *time, int loglevel, const char *source, cons
+ if (loglevel <= cmdLoggerLevel)
+ {
+ #ifdef _WIN32
+- MutexGuard g(*outputmutex);
++ std::lock_guard<std::mutex> g(*outputmutex);
+ int oldmode;
+ oldmode = _setmode(_fileno(stdout), _O_U8TEXT);
+ *output << "[" << SimpleLogger::toStr(LogLevel(loglevel)) << ": " << time << "] " << message << endl;
+@@ -233,7 +233,7 @@ void MegaCMDLogger::log(const char *time, int loglevel, const char *source, cons
+ return;
+ }
+ #ifdef _WIN32
+- MutexGuard g(*outputmutex);
++ std::lock_guard<std::mutex> g(*outputmutex);
+ int oldmode;
+ oldmode = _setmode(_fileno(stdout), _O_U8TEXT);
+ *output << "[API:" << SimpleLogger::toStr(LogLevel(loglevel)) << ": " << time << "] " << message << endl;
+--- src/megacmdlogger.h
++++ src/megacmdlogger.h
+@@ -112,7 +112,7 @@ private:
+ int apiLoggerLevel;
+ int cmdLoggerLevel;
+ LoggedStream * output;
+- mega::MegaMutex *outputmutex;
++ std::recursive_mutex *outputmutex;
+
+ public:
+ MegaCMDLogger();
+--- src/megacmdshell/megacmdshell.cpp
++++ src/megacmdshell/megacmdshell.cpp
+@@ -199,7 +199,7 @@ bool confirmingcancellink = false;
+ // communications with megacmdserver:
+ MegaCmdShellCommunications *comms;
+
+-MUTEX_CLASS mutexPrompt(false);
++std::mutex mutexPrompt;
+
+ void printWelcomeMsg(unsigned int width = 0);
+
+@@ -627,7 +627,7 @@ void install_rl_handler(const char *theprompt)
+
+ void changeprompt(const char *newprompt, bool redisplay)
+ {
+- MutexGuard g(mutexPrompt);
++ std::lock_guard<std::mutex> g(mutexPrompt);
+
+ if (*dynamicprompt)
+ {
+--- src/megacmdshell/megacmdshellcommunications.cpp
++++ src/megacmdshell/megacmdshellcommunications.cpp
+@@ -80,7 +80,7 @@ bool MegaCmdShellCommunications::stopListener;
+ bool MegaCmdShellCommunications::updating;
+ ::mega::Thread *MegaCmdShellCommunications::listenerThread;
+ SOCKET MegaCmdShellCommunications::newsockfd = INVALID_SOCKET;
+-MegaMutex MegaCmdShellCommunications::megaCmdStdoutputing;
++std::recursive_mutex MegaCmdShellCommunications::megaCmdStdoutputing;
+
+ bool MegaCmdShellCommunications::socketValid(SOCKET socket)
+ {
+@@ -483,7 +483,6 @@ MegaCmdShellCommunications::MegaCmdShellCommunications()
+ stopListener = false;
+ updating = false;
+ listenerThread = NULL;
+- MegaCmdShellCommunications::megaCmdStdoutputing.init(false);
+ }
+
+
+--- src/megacmdshell/megacmdshellcommunications.h
++++ src/megacmdshell/megacmdshellcommunications.h
+@@ -26,6 +26,7 @@
+
+ #include <string>
+ #include <iostream>
++#include <mutex>
+
+ #ifdef _WIN32
+ #include <WinSock2.h>
+@@ -40,15 +41,12 @@
+
+ #if defined(_WIN32) && !defined(WINDOWS_PHONE) && !defined(USE_CPPTHREAD)
+ #include "mega/thread/win32thread.h"
+-class MegaMutex : public ::mega::Win32Mutex {};
+ class MegaThread : public ::mega::Win32Thread {};
+ #elif defined(USE_CPPTHREAD)
+ #include "mega/thread/cppthread.h"
+-class MegaMutex : public ::mega::CppMutex {};
+ class MegaThread : public ::mega::CppThread {};
+ #else
+ #include "mega/thread/posixthread.h"
+-class MegaMutex : public ::mega::PosixMutex {};
+ class MegaThread : public ::mega::PosixThread {};
+ #endif
+
+@@ -118,7 +116,7 @@ public:
+ MegaCmdShellCommunications();
+ virtual ~MegaCmdShellCommunications();
+
+- static MegaMutex megaCmdStdoutputing;
++ static std::recursive_mutex megaCmdStdoutputing;
+ virtual int executeCommand(std::string command, std::string (*readresponse)(const char *) = NULL, OUTSTREAMTYPE &output = COUT, bool interactiveshell = true, std::wstring = L"");
+ virtual int executeCommandW(std::wstring command, std::string (*readresponse)(const char *) = NULL, OUTSTREAMTYPE &output = COUT, bool interactiveshell = true);
+
diff --git a/srcpkgs/MEGAcmd/patches/musl.patch b/srcpkgs/MEGAcmd/patches/musl.patch
deleted file mode 100644
index 3e0a395fb19..00000000000
--- a/srcpkgs/MEGAcmd/patches/musl.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/configurationmanager.h 2018-10-03 16:27:51.311763612 +0200
-+++ - 2018-10-03 16:29:44.035272722 +0200
-@@ -23,6 +23,10 @@
- #include <map>
- #include <set>
-
-+#ifndef _WIN32
-+#include <sys/file.h> // LOCK_EX and LOCK_NB
-+#endif
-+
- #define CONFIGURATIONSTOREDBYVERSION -2
- class ConfigurationManager
- {
diff --git a/srcpkgs/MEGAcmd/template b/srcpkgs/MEGAcmd/template
index 2345b3972b8..63e7c4f6986 100644
--- a/srcpkgs/MEGAcmd/template
+++ b/srcpkgs/MEGAcmd/template
@@ -1,7 +1,8 @@
# Template file for 'MEGAcmd'
pkgname=MEGAcmd
-version=1.0.0
-revision=11
+version=1.1.0
+revision=1
+wrksrc="${pkgname}-${version}_Linux"
build_style=gnu-configure
make_build_args='LIBTOOLFLAGS="--tag=CXX"'
hostmakedepends="autoconf-archive autogen gettext automake libtool pkg-config"
@@ -10,8 +11,8 @@ short_desc="Command Line Interactive and Scriptable Application to access MEGA"
maintainer="John <johnz@posteo.net>"
license="BSD-2-Clause, GPL-3.0-or-later"
homepage="https://github.com/meganz/MEGAcmd"
-distfiles="https://github.com/meganz/MEGAcmd/archive/${version}.tar.gz"
-checksum=1200363bee2f387a2287e286b38d15b1a01079967e20b8c489815cc7c8d9ff63
+distfiles="https://github.com/meganz/MEGAcmd/archive/${version}_Linux.tar.gz"
+checksum=8064a21b1d1436537ab9ccc98f1f411f9496aace000584bea87d95f8e7b3a550
replaces="megacmd>=0"
if [ "$CROSS_BUILD" ]; then
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PR PATCH] [Merged]: Update MEGA*
2019-09-13 19:36 [PR PATCH] Update MEGA* voidlinux-github
` (7 preceding siblings ...)
2019-09-15 9:51 ` voidlinux-github
@ 2019-09-15 11:04 ` voidlinux-github
8 siblings, 0 replies; 10+ messages in thread
From: voidlinux-github @ 2019-09-15 11:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 146 bytes --]
There's a merged pull request on the void-packages repository
Update MEGA*
https://github.com/void-linux/void-packages/pull/14439
Description:
^ permalink raw reply [flat|nested] 10+ messages in thread