pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
net/megacmd: import megacmd 1.6.3
Module Name: pkgsrc-wip
Committed By: kikadf <kikadf.01%gmail.com@localhost>
Pushed By: kikadf
Date: Sat Mar 2 11:06:55 2024 +0100
Changeset: 3eeb6594140cc045254190d0e98b8fb19df4520c
Modified Files:
Makefile
Added Files:
megacmd/DESCR
megacmd/MESSAGE
megacmd/Makefile
megacmd/PLIST
megacmd/TODO
megacmd/distinfo
megacmd/patches/patch-Makefile.am
megacmd/patches/patch-sdk_Makefile.am
megacmd/patches/patch-sdk_configure.ac
megacmd/patches/patch-sdk_include_mega_http_h
megacmd/patches/patch-sdk_include_mega_posix_megafs_h
megacmd/patches/patch-sdk_src_http.cpp
megacmd/patches/patch-sdk_src_posix_fs.cpp
megacmd/patches/patch-src_include.am
megacmd/patches/patch-src_megacmdshell_megacmdshellcommunications_cpp
Log Message:
net/megacmd: import megacmd 1.6.3
MEGAcmd provides non UI access to MEGA services.
It intends to offer all the functionality with your
MEGA account via commands. It features synchronization,
backup of local folders into your MEGA account and
a webdav/streaming server.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=3eeb6594140cc045254190d0e98b8fb19df4520c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
megacmd/DESCR | 5 +
megacmd/MESSAGE | 8 ++
megacmd/Makefile | 54 +++++++++
megacmd/PLIST | 130 +++++++++++++++++++++
megacmd/TODO | 7 ++
megacmd/distinfo | 17 +++
megacmd/patches/patch-Makefile.am | 16 +++
megacmd/patches/patch-sdk_Makefile.am | 16 +++
megacmd/patches/patch-sdk_configure.ac | 26 +++++
megacmd/patches/patch-sdk_include_mega_http_h | 16 +++
.../patches/patch-sdk_include_mega_posix_megafs_h | 16 +++
megacmd/patches/patch-sdk_src_http.cpp | 15 +++
megacmd/patches/patch-sdk_src_posix_fs.cpp | 16 +++
megacmd/patches/patch-src_include.am | 15 +++
...src_megacmdshell_megacmdshellcommunications_cpp | 16 +++
16 files changed, 374 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index f64c29e0cf..29fa245e3f 100644
--- a/Makefile
+++ b/Makefile
@@ -2190,6 +2190,7 @@ SUBDIR+= mdadm
SUBDIR+= mdbtools
SUBDIR+= mdpress
SUBDIR+= mediawiki-mode
+SUBDIR+= megacmd
SUBDIR+= meka-git
SUBDIR+= melonds
SUBDIR+= memdump
diff --git a/megacmd/DESCR b/megacmd/DESCR
new file mode 100644
index 0000000000..31497df882
--- /dev/null
+++ b/megacmd/DESCR
@@ -0,0 +1,5 @@
+MEGAcmd provides non UI access to MEGA services.
+It intends to offer all the functionality with your
+MEGA account via commands. It features synchronization,
+backup of local folders into your MEGA account and
+a webdav/streaming server.
diff --git a/megacmd/MESSAGE b/megacmd/MESSAGE
new file mode 100644
index 0000000000..1a4bb7ae76
--- /dev/null
+++ b/megacmd/MESSAGE
@@ -0,0 +1,8 @@
+===========================================================================
+$NetBSD$
+$NetBSD: MESSAGE,
+
+To use megacmd features need to generate machine-id.
+Run as root: dbus-uuidgen --ensure
+
+===========================================================================
diff --git a/megacmd/Makefile b/megacmd/Makefile
new file mode 100644
index 0000000000..0f87300607
--- /dev/null
+++ b/megacmd/Makefile
@@ -0,0 +1,54 @@
+# $NetBSD$
+
+DISTNAME= megacmd-1.6.3
+CATEGORIES= net
+#PKGREVISION= 1
+MASTER_SITES= ${MASTER_SITE_GITHUB:=meganz/}
+GITHUB_PROJECT= MEGAcmd
+GITHUB_TAG= ${PKGVERSION_NOREV}_Linux
+SDK_VERSION= v4.17.1d
+
+GITHUB_SUBMODULES= meganz sdk ${SDK_VERSION} sdk
+
+MAINTAINER= kikadf.01%gmail.com@localhost
+HOMEPAGE= https://mega.io/
+COMMENT= CLI and scriptable application to access MEGA
+# MEGAcmd: GPLv3, SDK: BSD 2-clause
+LICENSE= gnu-gpl-v3 AND 2-clause-bsd
+
+USE_LANGUAGES+= c c++
+USE_CXX_FEATURES+= filesystem
+USE_LIBTOOL= yes
+USE_TOOLS+= autoreconf autoconf automake
+GNU_CONFIGURE= yes
+REPLACE_SH= src/client/mega-*
+CXXFLAGS+= -DCRYPTOPP_DISABLE_ASM -std=c++17
+BUILDLINK_TRANSFORM+= rm:-std=c++11
+
+EGDIR= ${PREFIX}/share/examples/megacmd
+CONF_FILES= ${EGDIR}/megacmd_completion.sh ${PKG_SYSCONFDIR}/bash_completion.d/megacmd_completion.sh
+
+#INSTALLATION_DIRS= ${EGDIR}
+#MAKE_DIRS= ${PKG_SYSCONFDIR}/bash_completion.d
+
+CONFIGURE_ARGS= --disable-examples --disable-java --disable-php \
+ --disable-python --disable-chat --without-freeimage \
+ --without-termcap --without-ffmpeg --without-libraw \
+ --without-libzen --without-libmediainfo \
+ --without-rt --enable-gcc-hardening
+
+CHECK_PORTABILITY_SKIP+= sdk/bindings/ios/3rdparty/*.sh
+
+pre-configure:
+ cd ${WRKSRC} && ${SH} autogen.sh
+
+
+.include "../../databases/sqlite3/buildlink3.mk"
+.include "../../devel/pcre/buildlink3.mk"
+.include "../../devel/libuv/buildlink3.mk"
+.include "../../devel/readline/buildlink3.mk"
+.include "../../net/libcares/buildlink3.mk"
+.include "../../security/crypto++/buildlink3.mk"
+.include "../../security/libsodium/buildlink3.mk"
+.include "../../www/curl/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/megacmd/PLIST b/megacmd/PLIST
new file mode 100644
index 0000000000..371fd428ea
--- /dev/null
+++ b/megacmd/PLIST
@@ -0,0 +1,130 @@
+@comment $NetBSD$
+bin/mega-attr
+bin/mega-backup
+bin/mega-cancel
+bin/mega-cat
+bin/mega-cd
+bin/mega-cmd
+bin/mega-cmd-server
+bin/mega-confirm
+bin/mega-confirmcancel
+bin/mega-cp
+bin/mega-debug
+bin/mega-deleteversions
+bin/mega-df
+bin/mega-du
+bin/mega-errorcode
+bin/mega-exclude
+bin/mega-exec
+bin/mega-export
+bin/mega-find
+bin/mega-ftp
+bin/mega-get
+bin/mega-graphics
+bin/mega-help
+bin/mega-https
+bin/mega-import
+bin/mega-invite
+bin/mega-ipc
+bin/mega-killsession
+bin/mega-lcd
+bin/mega-log
+bin/mega-login
+bin/mega-logout
+bin/mega-lpwd
+bin/mega-ls
+bin/mega-mediainfo
+bin/mega-mkdir
+bin/mega-mount
+bin/mega-mv
+bin/mega-passwd
+bin/mega-permissions
+bin/mega-preview
+bin/mega-proxy
+bin/mega-put
+bin/mega-pwd
+bin/mega-quit
+bin/mega-reload
+bin/mega-rm
+bin/mega-session
+bin/mega-share
+bin/mega-showpcr
+bin/mega-signup
+bin/mega-speedlimit
+bin/mega-sync
+bin/mega-thumbnail
+bin/mega-transfers
+bin/mega-tree
+bin/mega-userattr
+bin/mega-users
+bin/mega-version
+bin/mega-webdav
+bin/mega-whoami
+include/mega.h
+include/mega/account.h
+include/mega/attrmap.h
+include/mega/backofftimer.h
+include/mega/base64.h
+include/mega/command.h
+include/mega/config.h
+include/mega/console.h
+include/mega/crypto/cryptopp.h
+include/mega/crypto/sodium.h
+include/mega/db.h
+include/mega/db/sqlite.h
+include/mega/drivenotify.h
+include/mega/file.h
+include/mega/fileattributefetch.h
+include/mega/filefingerprint.h
+include/mega/filesystem.h
+include/mega/gfx.h
+include/mega/gfx/GfxProcCG.h
+include/mega/gfx/external.h
+include/mega/gfx/freeimage.h
+include/mega/gfx/gfx_pdfium.h
+include/mega/http.h
+include/mega/json.h
+include/mega/logging.h
+include/mega/mediafileattribute.h
+include/mega/mega_ccronexpr.h
+include/mega/mega_dict-src.h
+include/mega/mega_evt_queue.h
+include/mega/mega_evt_tls.h
+include/mega/mega_http_parser.h
+include/mega/mega_utf8proc.h
+include/mega/mega_zxcvbn.h
+include/mega/megaapp.h
+include/mega/megaclient.h
+include/mega/node.h
+include/mega/pendingcontactrequest.h
+include/mega/posix/megaconsole.h
+include/mega/posix/megaconsolewaiter.h
+include/mega/posix/megafs.h
+include/mega/posix/meganet.h
+include/mega/posix/megasys.h
+include/mega/posix/megawaiter.h
+include/mega/proxy.h
+include/mega/pubkeyaction.h
+include/mega/raid.h
+include/mega/request.h
+include/mega/serialize64.h
+include/mega/share.h
+include/mega/sharenodekeys.h
+include/mega/sync.h
+include/mega/thread.h
+include/mega/thread/cppthread.h
+include/mega/thread/posixthread.h
+include/mega/transfer.h
+include/mega/transferslot.h
+include/mega/treeproc.h
+include/mega/types.h
+include/mega/user.h
+include/mega/useralerts.h
+include/mega/utils.h
+include/mega/version.h
+include/mega/waiter.h
+include/megaapi.h
+include/megaapi_impl.h
+lib/libmega.la
+lib/pkgconfig/libmega.pc
+share/examples/megacmd/megacmd_completion.sh
diff --git a/megacmd/TODO b/megacmd/TODO
new file mode 100644
index 0000000000..87ab1fc0d5
--- /dev/null
+++ b/megacmd/TODO
@@ -0,0 +1,7 @@
+Tested on NetBSD-10_RC3 amd64, works.
+
+Todo:
+1) Test on NetBSD-9
+2) Check async issue, not sync with enabled librt
+3) COMMIT_MSG
+
diff --git a/megacmd/distinfo b/megacmd/distinfo
new file mode 100644
index 0000000000..3fb4be584b
--- /dev/null
+++ b/megacmd/distinfo
@@ -0,0 +1,17 @@
+$NetBSD$
+
+BLAKE2s (megacmd-1.6.3.tar.gz) = c3df7a71184d4bc373e41273361e1a9818881d1b4b00ca4703fa1c199cd7093c
+SHA512 (megacmd-1.6.3.tar.gz) = 425584a1350e5965aea8a09076bb447b4d6a00fc0305e9a19ad91ed8292eae5b758e4c1a41ea7c0887c2f8e0644cf1d1154e3b33503ddcf4713e4a13dd80a6f6
+Size (megacmd-1.6.3.tar.gz) = 2085751 bytes
+BLAKE2s (meganz-sdk-v4.17.1d.tar.gz) = e3490a45338f2d1b62cbc607e80aa806906cc693ca8428b77973340bfba9ac39
+SHA512 (meganz-sdk-v4.17.1d.tar.gz) = bc67910b0a5fbbe9bb5d9d6ef9a746f1762dbb9968d9c825fd0ede256ab674670d804c2d99c9c472f72b2f06fd2bac4765bd7fa7dbebb3746cd1e1cfd780d71c
+Size (meganz-sdk-v4.17.1d.tar.gz) = 3695020 bytes
+SHA1 (patch-Makefile.am) = e6e092d8da00df3d2d73e542de61bea37336e9df
+SHA1 (patch-sdk_Makefile.am) = 8fedc590e7423e8a32d3cbe47b9503e8b197cf04
+SHA1 (patch-sdk_configure.ac) = 264edd914b05e24221a2fdd1c9890920f3f00521
+SHA1 (patch-sdk_include_mega_http_h) = 6d2acb2bdfe444d94c27ee523c9499f73f2fb5fe
+SHA1 (patch-sdk_include_mega_posix_megafs_h) = 69b099d0e8b5ac54c70808ec825d834d9edac2a9
+SHA1 (patch-sdk_src_http.cpp) = 23ebb74d092c27ed26c34c41c5a812a1ba835933
+SHA1 (patch-sdk_src_posix_fs.cpp) = a6e2b45e8e4740ae4eb362a11e165b7740daf7c2
+SHA1 (patch-src_include.am) = 87f64f18c599ba3f5c1c7391f61c1cee7ac9b97e
+SHA1 (patch-src_megacmdshell_megacmdshellcommunications_cpp) = 99610633144ae5bcfcfbc52da43797c70ab9dd53
diff --git a/megacmd/patches/patch-Makefile.am b/megacmd/patches/patch-Makefile.am
new file mode 100644
index 0000000000..f3316c4880
--- /dev/null
+++ b/megacmd/patches/patch-Makefile.am
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Add NetBSD support
+
+--- Makefile.am.orig 2023-05-05 10:48:34.000000000 +0000
++++ Makefile.am
+@@ -35,9 +35,7 @@ if ANDROID
+ AM_LIBTOOLFLAGS="--tag=CXX"
+ endif
+
+-if LINUX
+ AM_LIBTOOLFLAGS="--tag=CXX"
+-endif
+
+ VERSION_INFO=$(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+
diff --git a/megacmd/patches/patch-sdk_Makefile.am b/megacmd/patches/patch-sdk_Makefile.am
new file mode 100644
index 0000000000..549f43ddf1
--- /dev/null
+++ b/megacmd/patches/patch-sdk_Makefile.am
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Add NetBSD support
+
+--- sdk/Makefile.am.orig 2023-05-02 16:07:05.000000000 +0000
++++ sdk/Makefile.am
+@@ -42,9 +42,7 @@ if ANDROID
+ AM_LIBTOOLFLAGS="--tag=CXX"
+ endif
+
+-if LINUX
+ AM_LIBTOOLFLAGS="--tag=CXX"
+-endif
+
+ VERSION_INFO=$(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+
diff --git a/megacmd/patches/patch-sdk_configure.ac b/megacmd/patches/patch-sdk_configure.ac
new file mode 100644
index 0000000000..34f4f57a3d
--- /dev/null
+++ b/megacmd/patches/patch-sdk_configure.ac
@@ -0,0 +1,26 @@
+$NetBSD$
+
+* mega-cmd-server not syncing with aio_write function,
+* workaround disable librt. #TODO
+
+--- sdk/configure.ac.orig 2024-02-27 08:17:47.102044837 +0000
++++ sdk/configure.ac
+@@ -1382,12 +1382,12 @@ if test "x$WIN32" = "xno" ; then
+ fi
+
+ # librt #TODO: allow --with-rt=...
+- AC_CHECK_LIB([rt], [aio_write], [
+- SAVE_LDFLAGS="-lrt $SAVE_LDFLAGS"
+- LDFLAGS="-lrt $LDFLAGS"
+- AC_DEFINE(HAVE_AIO_RT, [1], [Define to indicate AIO presence in librt])
+- ],
+- )
++ #AC_CHECK_LIB([rt], [aio_write], [
++ #SAVE_LDFLAGS="-lrt $SAVE_LDFLAGS"
++ #LDFLAGS="-lrt $LDFLAGS"
++ #AC_DEFINE(HAVE_AIO_RT, [1], [Define to indicate AIO presence in librt])
++ #],
++ #)
+
+ # OpenSSL
+ AC_MSG_CHECKING(for OpenSSL)
diff --git a/megacmd/patches/patch-sdk_include_mega_http_h b/megacmd/patches/patch-sdk_include_mega_http_h
new file mode 100644
index 0000000000..ae25e467ba
--- /dev/null
+++ b/megacmd/patches/patch-sdk_include_mega_http_h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Add NetBSD support
+
+Index: sdk/include/mega/http.h
+--- sdk/include/mega/http.h.orig 2023-05-02 16:07:05.000000000 +0000
++++ sdk/include/mega/http.h
+@@ -42,7 +42,7 @@
+ #pragma warning(pop)
+ #endif
+
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ #include <netinet/in.h>
+ #endif
+
diff --git a/megacmd/patches/patch-sdk_include_mega_posix_megafs_h b/megacmd/patches/patch-sdk_include_mega_posix_megafs_h
new file mode 100644
index 0000000000..9b5558101f
--- /dev/null
+++ b/megacmd/patches/patch-sdk_include_mega_posix_megafs_h
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Add NetBSD support
+
+Index: sdk/include/mega/posix/megafs.h
+--- sdk/include/mega/posix/megafs.h.orig
++++ sdk/include/mega/posix/megafs.h
+@@ -28,7 +28,7 @@
+ #define O_DIRECT 0
+ #include <sys/param.h>
+ #include <sys/mount.h>
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__NetBSD__)
+ #include <sys/mount.h>
+ #else
+ #include <sys/vfs.h>
diff --git a/megacmd/patches/patch-sdk_src_http.cpp b/megacmd/patches/patch-sdk_src_http.cpp
new file mode 100644
index 0000000000..0cca5fd61f
--- /dev/null
+++ b/megacmd/patches/patch-sdk_src_http.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+* Fix build on NetBSD, missing AI_V4MAPPED
+
+--- sdk/src/http.cpp.orig 2023-06-20 16:04:22.829147987 +0000
++++ sdk/src/http.cpp
+@@ -270,7 +270,7 @@ void HttpIO::getMEGADNSservers(string *d
+ hints.ai_family = AF_UNSPEC;
+
+ #ifndef __MINGW32__
+- hints.ai_flags = AI_V4MAPPED | AI_ADDRCONFIG;
++ hints.ai_flags = AI_ADDRCONFIG;
+ #endif
+
+ if (!getaddrinfo("ns.mega.co.nz", NULL, &hints, &aiList))
diff --git a/megacmd/patches/patch-sdk_src_posix_fs.cpp b/megacmd/patches/patch-sdk_src_posix_fs.cpp
new file mode 100644
index 0000000000..ec7534c009
--- /dev/null
+++ b/megacmd/patches/patch-sdk_src_posix_fs.cpp
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Add NetBSD support
+
+--- sdk/src/posix/fs.cpp.orig 2023-05-02 16:07:05.000000000 +0000
++++ sdk/src/posix/fs.cpp
+@@ -27,6 +27,9 @@
+ #include <sys/utsname.h>
+ #include <sys/ioctl.h>
+ #include <sys/statvfs.h>
++#if defined(__NetBSD__)
++#define statfs statvfs
++#endif
+ #include <sys/resource.h>
+ #ifdef TARGET_OS_MAC
+ #include "mega/osx/osxutils.h"
diff --git a/megacmd/patches/patch-src_include.am b/megacmd/patches/patch-src_include.am
new file mode 100644
index 0000000000..edd5f2e0c4
--- /dev/null
+++ b/megacmd/patches/patch-src_include.am
@@ -0,0 +1,15 @@
+$NetBSD$
+
+* Add NetBSD support
+
+--- src/include.am.orig 2023-05-05 10:48:34.000000000 +0000
++++ src/include.am
+@@ -9,7 +9,7 @@ MEGACMD = mega-cmd mega-exec mega-cmd-se
+ bin_PROGRAMS += $(MEGACMD)
+ $(MEGACMD): $(top_builddir)/sdk/src/libmega.la
+ 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/megacmdtransfermanager.h src/megacmdversion.h src/megacmdplatform.h src/comunicationsmanagerportsockets.h
+-megacmdcompletiondir = $(sysconfdir)/bash_completion.d/
++megacmdcompletiondir = $(datadir)/examples/megacmd/
+ megacmdcompletion_DATA = src/client/megacmd_completion.sh
+ megacmdscripts_bindir = $(bindir)
+
diff --git a/megacmd/patches/patch-src_megacmdshell_megacmdshellcommunications_cpp b/megacmd/patches/patch-src_megacmdshell_megacmdshellcommunications_cpp
new file mode 100644
index 0000000000..5c713ce154
--- /dev/null
+++ b/megacmd/patches/patch-src_megacmdshell_megacmdshellcommunications_cpp
@@ -0,0 +1,16 @@
+$NetBSD$
+
+* Add NetBSD support
+
+Index: src/megacmdshell/megacmdshellcommunications.cpp
+--- src/megacmdshell/megacmdshellcommunications.cpp.orig
++++ src/megacmdshell/megacmdshellcommunications.cpp
+@@ -54,7 +54,7 @@
+ #include <limits.h>
+ #endif
+
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__NetBSD__)
+ #include <netinet/in.h>
+ #endif
+
Home |
Main Index |
Thread Index |
Old Index