* [PR PATCH] Update MEGAsdk and MEGAcmd
@ 2020-12-31 14:21 Duncaen
2020-12-31 14:34 ` [PR PATCH] [Updated] " Duncaen
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Duncaen @ 2020-12-31 14:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 343 bytes --]
There is a new pull request by Duncaen against master on the void-packages repository
https://github.com/Duncaen/void-packages MEGA
https://github.com/void-linux/void-packages/pull/27576
Update MEGAsdk and MEGAcmd
Tested and works on `x86_64-glibc`.
A patch file from https://github.com/void-linux/void-packages/pull/27576.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-MEGA-27576.patch --]
[-- Type: text/x-diff, Size: 19588 bytes --]
From f6025af2abc4b3defade674564bca3a3d08fb9d4 Mon Sep 17 00:00:00 2001
From: Duncaen <duncaen@voidlinux.org>
Date: Thu, 31 Dec 2020 15:20:00 +0100
Subject: [PATCH 1/2] MEGAsdk: update to 3.7.3c.
---
common/shlibs | 2 +-
srcpkgs/MEGAsdk/patches/megacmd-02-qt.patch | 85 ---------------------
srcpkgs/MEGAsdk/template | 6 +-
3 files changed, 4 insertions(+), 89 deletions(-)
delete mode 100644 srcpkgs/MEGAsdk/patches/megacmd-02-qt.patch
diff --git a/common/shlibs b/common/shlibs
index 30b88c76902..26a6259f6d2 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3175,7 +3175,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.30602 MEGAsdk-3.6.2a_1
+libmega.so.30703 MEGAsdk-3.7.3c_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/patches/megacmd-02-qt.patch b/srcpkgs/MEGAsdk/patches/megacmd-02-qt.patch
deleted file mode 100644
index 92772b509b8..00000000000
--- a/srcpkgs/MEGAsdk/patches/megacmd-02-qt.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-diff --git bindings/qt/sdk.pri bindings/qt/sdk.pri
-index c64482fc..0c9c4520 100644
---- bindings/qt/sdk.pri
-+++ bindings/qt/sdk.pri
-@@ -2,7 +2,7 @@
- MEGASDK_BASE_PATH = $$PWD/../../
-
- VPATH += $$MEGASDK_BASE_PATH
--SOURCES += src/attrmap.cpp \
-+SOURCES -= src/attrmap.cpp \
- src/backofftimer.cpp \
- src/base64.cpp \
- src/command.cpp \
-@@ -42,7 +42,7 @@ SOURCES += src/attrmap.cpp \
- src/mediafileattribute.cpp
-
- CONFIG(USE_MEGAAPI) {
-- SOURCES += src/megaapi.cpp src/megaapi_impl.cpp
-+ SOURCES -= src/megaapi.cpp src/megaapi_impl.cpp
-
- CONFIG(qt) {
- SOURCES += bindings/qt/QTMegaRequestListener.cpp \
-@@ -67,7 +67,7 @@ CONFIG(USE_LIBWEBSOCKETS) {
- }
-
- CONFIG(USE_LIBUV) {
-- SOURCES += src/mega_http_parser.cpp
-+ SOURCES -= src/mega_http_parser.cpp
- DEFINES += HAVE_LIBUV
- INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/libuv
- win32 {
-@@ -197,7 +197,7 @@ win32 {
- CONFIG += USE_CURL
-
- CONFIG(USE_CURL) {
-- SOURCES += src/wincurl/net.cpp \
-+ SOURCES -= src/wincurl/net.cpp \
- src/wincurl/fs.cpp \
- src/wincurl/waiter.cpp
- HEADERS += include/mega/wincurl/meganet.h
-@@ -205,7 +205,7 @@ win32 {
- LIBS += -llibcurl -lcares -llibeay32 -lssleay32
- }
- else {
-- SOURCES += src/win32/net.cpp \
-+ SOURCES -= src/win32/net.cpp \
- src/win32/fs.cpp \
- src/win32/waiter.cpp
- HEADERS += include/mega/win32/meganet.h
-@@ -218,7 +218,7 @@ win32 {
-
-
- unix {
--SOURCES += src/posix/net.cpp \
-+SOURCES -= src/posix/net.cpp \
- src/posix/fs.cpp \
- src/posix/waiter.cpp
- }
-@@ -293,7 +293,7 @@ win32 {
- }
-
- unix {
-- !exists($$MEGASDK_BASE_PATH/include/mega/config.h) {
-+ exists($$MEGASDK_BASE_PATH/include/mega/config.h) {
- error("Configuration file not found! Please re-run configure script located in the project's root directory!")
- }
- HEADERS += include/mega/posix/meganet.h \
-@@ -309,7 +309,7 @@ CONFIG(USE_PCRE) {
-
- CONFIG(qt) {
- DEFINES += USE_QT MEGA_QT_LOGGING
-- SOURCES += src/gfx/qt.cpp src/thread/qtthread.cpp
-+ SOURCES -= src/gfx/qt.cpp src/thread/qtthread.cpp
- }
- else {
- DEFINES += USE_FREEIMAGE
-@@ -385,7 +385,7 @@ win32 {
-
- unix:!macx {
- INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/posix
-- LIBS += -lsqlite3 -lrt
-+ LIBS += -lmega -lsqlite3 -lrt
-
- exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a) {
- LIBS += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a
diff --git a/srcpkgs/MEGAsdk/template b/srcpkgs/MEGAsdk/template
index e0e42f80f28..711cbadebf2 100644
--- a/srcpkgs/MEGAsdk/template
+++ b/srcpkgs/MEGAsdk/template
@@ -1,7 +1,7 @@
# Template file for 'MEGAsdk'
pkgname=MEGAsdk
-version=3.6.2a
-revision=4
+version=3.7.3c
+revision=1
wrksrc="sdk-${version}"
build_style=gnu-configure
configure_args="--enable-chat --disable-examples $(vopt_with libuv)"
@@ -16,7 +16,7 @@ maintainer="John <me@johnnynator.dev>"
license="BSD-2-Clause"
homepage="https://mega.nz"
distfiles="https://github.com/meganz/sdk/archive/v${version}.tar.gz"
-checksum=22d910bcd799f30a499fe748cc2b3917e9e213558b1d5fba07b3f3908a833897
+checksum=0b55c1752d590a0367b9fcddd2465ea574308eb97e065540121f6261807aa111
replaces="libmega>=0"
build_options="libuv mediainfo"
From 7b7e2d77ed6b385b5942658b9ee42a07047f7c6a Mon Sep 17 00:00:00 2001
From: Duncaen <duncaen@voidlinux.org>
Date: Thu, 31 Dec 2020 15:20:06 +0100
Subject: [PATCH 2/2] MEGAcmd: update to 1.4.0.
---
srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff | 381 ---------------------
srcpkgs/MEGAcmd/template | 8 +-
2 files changed, 4 insertions(+), 385 deletions(-)
delete mode 100644 srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff
diff --git a/srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff b/srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff
deleted file mode 100644
index a30a142156e..00000000000
--- a/srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff
+++ /dev/null
@@ -1,381 +0,0 @@
---- 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/template b/srcpkgs/MEGAcmd/template
index ea6d3772fca..1d926be7339 100644
--- a/srcpkgs/MEGAcmd/template
+++ b/srcpkgs/MEGAcmd/template
@@ -1,6 +1,6 @@
# Template file for 'MEGAcmd'
pkgname=MEGAcmd
-version=1.1.0
+version=1.4.0
revision=1
wrksrc="${pkgname}-${version}_Linux"
build_style=gnu-configure
@@ -12,7 +12,7 @@ maintainer="John <me@johnnynator.dev>"
license="BSD-2-Clause, GPL-3.0-or-later"
homepage="https://github.com/meganz/MEGAcmd"
distfiles="https://github.com/meganz/MEGAcmd/archive/${version}_Linux.tar.gz"
-checksum=8064a21b1d1436537ab9ccc98f1f411f9496aace000584bea87d95f8e7b3a550
+checksum=2a3626a9f1d22303fe2123f984a8ecf3779d6d59ac6c67c1bf43c2423dcb832d
replaces="megacmd>=0"
if [ "$CROSS_BUILD" ]; then
@@ -20,12 +20,12 @@ if [ "$CROSS_BUILD" ]; then
fi
post_extract() {
- sed \
+ vsed \
-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 \
+ vsed \
-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):' \
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Updated] Update MEGAsdk and MEGAcmd
2020-12-31 14:21 [PR PATCH] Update MEGAsdk and MEGAcmd Duncaen
@ 2020-12-31 14:34 ` Duncaen
2020-12-31 14:46 ` Johnnynator
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Duncaen @ 2020-12-31 14:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 348 bytes --]
There is an updated pull request by Duncaen against master on the void-packages repository
https://github.com/Duncaen/void-packages MEGA
https://github.com/void-linux/void-packages/pull/27576
Update MEGAsdk and MEGAcmd
Tested and works on `x86_64-glibc`.
A patch file from https://github.com/void-linux/void-packages/pull/27576.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-MEGA-27576.patch --]
[-- Type: text/x-diff, Size: 19716 bytes --]
From f6025af2abc4b3defade674564bca3a3d08fb9d4 Mon Sep 17 00:00:00 2001
From: Duncaen <duncaen@voidlinux.org>
Date: Thu, 31 Dec 2020 15:20:00 +0100
Subject: [PATCH 1/2] MEGAsdk: update to 3.7.3c.
---
common/shlibs | 2 +-
srcpkgs/MEGAsdk/patches/megacmd-02-qt.patch | 85 ---------------------
srcpkgs/MEGAsdk/template | 6 +-
3 files changed, 4 insertions(+), 89 deletions(-)
delete mode 100644 srcpkgs/MEGAsdk/patches/megacmd-02-qt.patch
diff --git a/common/shlibs b/common/shlibs
index 30b88c769028..26a6259f6d2b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -3175,7 +3175,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.30602 MEGAsdk-3.6.2a_1
+libmega.so.30703 MEGAsdk-3.7.3c_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/patches/megacmd-02-qt.patch b/srcpkgs/MEGAsdk/patches/megacmd-02-qt.patch
deleted file mode 100644
index 92772b509b81..000000000000
--- a/srcpkgs/MEGAsdk/patches/megacmd-02-qt.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-diff --git bindings/qt/sdk.pri bindings/qt/sdk.pri
-index c64482fc..0c9c4520 100644
---- bindings/qt/sdk.pri
-+++ bindings/qt/sdk.pri
-@@ -2,7 +2,7 @@
- MEGASDK_BASE_PATH = $$PWD/../../
-
- VPATH += $$MEGASDK_BASE_PATH
--SOURCES += src/attrmap.cpp \
-+SOURCES -= src/attrmap.cpp \
- src/backofftimer.cpp \
- src/base64.cpp \
- src/command.cpp \
-@@ -42,7 +42,7 @@ SOURCES += src/attrmap.cpp \
- src/mediafileattribute.cpp
-
- CONFIG(USE_MEGAAPI) {
-- SOURCES += src/megaapi.cpp src/megaapi_impl.cpp
-+ SOURCES -= src/megaapi.cpp src/megaapi_impl.cpp
-
- CONFIG(qt) {
- SOURCES += bindings/qt/QTMegaRequestListener.cpp \
-@@ -67,7 +67,7 @@ CONFIG(USE_LIBWEBSOCKETS) {
- }
-
- CONFIG(USE_LIBUV) {
-- SOURCES += src/mega_http_parser.cpp
-+ SOURCES -= src/mega_http_parser.cpp
- DEFINES += HAVE_LIBUV
- INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/libuv
- win32 {
-@@ -197,7 +197,7 @@ win32 {
- CONFIG += USE_CURL
-
- CONFIG(USE_CURL) {
-- SOURCES += src/wincurl/net.cpp \
-+ SOURCES -= src/wincurl/net.cpp \
- src/wincurl/fs.cpp \
- src/wincurl/waiter.cpp
- HEADERS += include/mega/wincurl/meganet.h
-@@ -205,7 +205,7 @@ win32 {
- LIBS += -llibcurl -lcares -llibeay32 -lssleay32
- }
- else {
-- SOURCES += src/win32/net.cpp \
-+ SOURCES -= src/win32/net.cpp \
- src/win32/fs.cpp \
- src/win32/waiter.cpp
- HEADERS += include/mega/win32/meganet.h
-@@ -218,7 +218,7 @@ win32 {
-
-
- unix {
--SOURCES += src/posix/net.cpp \
-+SOURCES -= src/posix/net.cpp \
- src/posix/fs.cpp \
- src/posix/waiter.cpp
- }
-@@ -293,7 +293,7 @@ win32 {
- }
-
- unix {
-- !exists($$MEGASDK_BASE_PATH/include/mega/config.h) {
-+ exists($$MEGASDK_BASE_PATH/include/mega/config.h) {
- error("Configuration file not found! Please re-run configure script located in the project's root directory!")
- }
- HEADERS += include/mega/posix/meganet.h \
-@@ -309,7 +309,7 @@ CONFIG(USE_PCRE) {
-
- CONFIG(qt) {
- DEFINES += USE_QT MEGA_QT_LOGGING
-- SOURCES += src/gfx/qt.cpp src/thread/qtthread.cpp
-+ SOURCES -= src/gfx/qt.cpp src/thread/qtthread.cpp
- }
- else {
- DEFINES += USE_FREEIMAGE
-@@ -385,7 +385,7 @@ win32 {
-
- unix:!macx {
- INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/posix
-- LIBS += -lsqlite3 -lrt
-+ LIBS += -lmega -lsqlite3 -lrt
-
- exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a) {
- LIBS += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a
diff --git a/srcpkgs/MEGAsdk/template b/srcpkgs/MEGAsdk/template
index e0e42f80f28c..711cbadebf28 100644
--- a/srcpkgs/MEGAsdk/template
+++ b/srcpkgs/MEGAsdk/template
@@ -1,7 +1,7 @@
# Template file for 'MEGAsdk'
pkgname=MEGAsdk
-version=3.6.2a
-revision=4
+version=3.7.3c
+revision=1
wrksrc="sdk-${version}"
build_style=gnu-configure
configure_args="--enable-chat --disable-examples $(vopt_with libuv)"
@@ -16,7 +16,7 @@ maintainer="John <me@johnnynator.dev>"
license="BSD-2-Clause"
homepage="https://mega.nz"
distfiles="https://github.com/meganz/sdk/archive/v${version}.tar.gz"
-checksum=22d910bcd799f30a499fe748cc2b3917e9e213558b1d5fba07b3f3908a833897
+checksum=0b55c1752d590a0367b9fcddd2465ea574308eb97e065540121f6261807aa111
replaces="libmega>=0"
build_options="libuv mediainfo"
From d44b09473f399ee83bb6d7200d9e49b3c77ad5a9 Mon Sep 17 00:00:00 2001
From: Duncaen <duncaen@voidlinux.org>
Date: Thu, 31 Dec 2020 15:20:06 +0100
Subject: [PATCH 2/2] MEGAcmd: update to 1.4.0.
---
srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff | 381 ---------------------
srcpkgs/MEGAcmd/template | 13 +-
2 files changed, 9 insertions(+), 385 deletions(-)
delete mode 100644 srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff
diff --git a/srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff b/srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff
deleted file mode 100644
index a30a142156ed..000000000000
--- a/srcpkgs/MEGAcmd/patches/megacmd-sdk36.diff
+++ /dev/null
@@ -1,381 +0,0 @@
---- 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/template b/srcpkgs/MEGAcmd/template
index ea6d3772fca2..67a373586fa7 100644
--- a/srcpkgs/MEGAcmd/template
+++ b/srcpkgs/MEGAcmd/template
@@ -1,6 +1,6 @@
# Template file for 'MEGAcmd'
pkgname=MEGAcmd
-version=1.1.0
+version=1.4.0
revision=1
wrksrc="${pkgname}-${version}_Linux"
build_style=gnu-configure
@@ -12,20 +12,25 @@ maintainer="John <me@johnnynator.dev>"
license="BSD-2-Clause, GPL-3.0-or-later"
homepage="https://github.com/meganz/MEGAcmd"
distfiles="https://github.com/meganz/MEGAcmd/archive/${version}_Linux.tar.gz"
-checksum=8064a21b1d1436537ab9ccc98f1f411f9496aace000584bea87d95f8e7b3a550
+checksum=2a3626a9f1d22303fe2123f984a8ecf3779d6d59ac6c67c1bf43c2423dcb832d
replaces="megacmd>=0"
if [ "$CROSS_BUILD" ]; then
configure_args="--with-libtool-sysroot=${XBPS_CROSS_BASE}"
fi
+if [ "$XBPS_TARGET_NO_ATOMIC8" ]; then
+ makedepends+=" libatomic-devel"
+ LDFLAGS+=" -latomic"
+fi
+
post_extract() {
- sed \
+ vsed \
-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 \
+ vsed \
-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):' \
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Update MEGAsdk and MEGAcmd
2020-12-31 14:21 [PR PATCH] Update MEGAsdk and MEGAcmd Duncaen
2020-12-31 14:34 ` [PR PATCH] [Updated] " Duncaen
@ 2020-12-31 14:46 ` Johnnynator
2020-12-31 14:56 ` Duncaen
2020-12-31 14:56 ` [PR PATCH] [Closed]: " Duncaen
3 siblings, 0 replies; 5+ messages in thread
From: Johnnynator @ 2020-12-31 14:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 281 bytes --]
New comment by Johnnynator on void-packages repository
https://github.com/void-linux/void-packages/pull/27576#issuecomment-752978527
Comment:
I do not use nor care about this package anymore. So if it works for you, feel free to merge it. (You can also remove me as maintainer).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Update MEGAsdk and MEGAcmd
2020-12-31 14:21 [PR PATCH] Update MEGAsdk and MEGAcmd Duncaen
2020-12-31 14:34 ` [PR PATCH] [Updated] " Duncaen
2020-12-31 14:46 ` Johnnynator
@ 2020-12-31 14:56 ` Duncaen
2020-12-31 14:56 ` [PR PATCH] [Closed]: " Duncaen
3 siblings, 0 replies; 5+ messages in thread
From: Duncaen @ 2020-12-31 14:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 218 bytes --]
New comment by Duncaen on void-packages repository
https://github.com/void-linux/void-packages/pull/27576#issuecomment-752981160
Comment:
Ok, merged and orphaned the packages, not sure if I would want my name to it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PR PATCH] [Closed]: Update MEGAsdk and MEGAcmd
2020-12-31 14:21 [PR PATCH] Update MEGAsdk and MEGAcmd Duncaen
` (2 preceding siblings ...)
2020-12-31 14:56 ` Duncaen
@ 2020-12-31 14:56 ` Duncaen
3 siblings, 0 replies; 5+ messages in thread
From: Duncaen @ 2020-12-31 14:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 195 bytes --]
There's a closed pull request on the void-packages repository
Update MEGAsdk and MEGAcmd
https://github.com/void-linux/void-packages/pull/27576
Description:
Tested and works on `x86_64-glibc`.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-12-31 14:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-31 14:21 [PR PATCH] Update MEGAsdk and MEGAcmd Duncaen
2020-12-31 14:34 ` [PR PATCH] [Updated] " Duncaen
2020-12-31 14:46 ` Johnnynator
2020-12-31 14:56 ` Duncaen
2020-12-31 14:56 ` [PR PATCH] [Closed]: " Duncaen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).