pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Import net/megacmd
Module Name: pkgsrc-wip
Committed By: kikadf <kikadf.01%gmail.com@localhost>
Pushed By: kikadf
Date: Sat Oct 26 13:54:35 2024 +0200
Changeset: dc6f60db89eb404e5bc2d070e52bf87beacf0960
Modified Files:
Makefile
Added Files:
megacmd/DESCR
megacmd/Makefile
megacmd/PLIST
megacmd/distinfo
megacmd/files/README
megacmd/patches/patch-Makefile.am
megacmd/patches/patch-configure.ac
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_include_mega_posix_megasys.h
megacmd/patches/patch-sdk_src_http.cpp
megacmd/patches/patch-sdk_src_include.am
megacmd/patches/patch-sdk_src_posix_fs.cpp
megacmd/patches/patch-src_include.am
megacmd/patches/patch-src_megacmdshell_megacmdshellcommunications.cpp
Log Message:
Import net/megacmd
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=dc6f60db89eb404e5bc2d070e52bf87beacf0960
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 +
megacmd/DESCR | 8 ++
megacmd/Makefile | 62 +++++++++
megacmd/PLIST | 132 ++++++++++++++++++
megacmd/distinfo | 20 +++
megacmd/files/README | 8 ++
megacmd/patches/patch-Makefile.am | 22 +++
megacmd/patches/patch-configure.ac | 38 ++++++
megacmd/patches/patch-sdk_Makefile.am | 22 +++
megacmd/patches/patch-sdk_configure.ac | 149 +++++++++++++++++++++
megacmd/patches/patch-sdk_include_mega_http.h | 16 +++
.../patches/patch-sdk_include_mega_posix_megafs.h | 16 +++
.../patches/patch-sdk_include_mega_posix_megasys.h | 17 +++
megacmd/patches/patch-sdk_src_http.cpp | 20 +++
megacmd/patches/patch-sdk_src_include.am | 24 ++++
megacmd/patches/patch-sdk_src_posix_fs.cpp | 16 +++
megacmd/patches/patch-src_include.am | 15 +++
...src_megacmdshell_megacmdshellcommunications.cpp | 16 +++
18 files changed, 602 insertions(+)
diffs:
diff --git a/Makefile b/Makefile
index bc085900a5..39c6f0ce26 100644
--- a/Makefile
+++ b/Makefile
@@ -2268,6 +2268,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..e9403124a5
--- /dev/null
+++ b/megacmd/DESCR
@@ -0,0 +1,8 @@
+MEGA is a cloud storage, file and folder sharing
+provider.
+MEGAcmd is a free, open source tool that 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
+or streaming server.
diff --git a/megacmd/Makefile b/megacmd/Makefile
new file mode 100644
index 0000000000..3e1ec37daf
--- /dev/null
+++ b/megacmd/Makefile
@@ -0,0 +1,62 @@
+# $NetBSD: Makefile,v 1.4 2024/06/18 18:23:15 bsiegert Exp $
+
+DISTNAME= megacmd-1.7.0
+CATEGORIES= net
+MASTER_SITES= ${MASTER_SITE_GITHUB:=meganz/}
+GITHUB_PROJECT= MEGAcmd
+GITHUB_TAG= ${PKGVERSION_NOREV}_Linux
+SDK_VERSION= v4.31.0b
+
+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
+FORCE_CXX_STD= c++17
+USE_LIBTOOL= yes
+USE_TOOLS+= autoreconf autoconf automake gmake
+GNU_CONFIGURE= yes
+REPLACE_SH= src/client/mega-*
+CXXFLAGS+= -DCRYPTOPP_DISABLE_ASM
+
+CONFIGURE_ARGS+= --disable-examples
+CONFIGURE_ARGS+= --disable-java
+CONFIGURE_ARGS+= --disable-php
+CONFIGURE_ARGS+= --disable-python
+CONFIGURE_ARGS+= --disable-chat
+CONFIGURE_ARGS+= --without-freeimage
+CONFIGURE_ARGS+= --without-termcap
+CONFIGURE_ARGS+= --without-ffmpeg
+CONFIGURE_ARGS+= --without-libraw
+CONFIGURE_ARGS+= --without-libzen
+CONFIGURE_ARGS+= --without-libmediainfo
+CONFIGURE_ARGS+= --without-rt
+CONFIGURE_ARGS+= --enable-gcc-hardening
+
+CHECK_PORTABILITY_SKIP+= sdk/bindings/ios/3rdparty/*.sh
+
+INSTALLATION_DIRS+= share/doc/megacmd
+
+pre-configure:
+ cd ${WRKSRC} && ${SH} autogen.sh
+
+post-install:
+ ${MV} ${DESTDIR}${PREFIX}/share/bash-completion/completions/megacmd_completion.sh \
+ ${DESTDIR}${PREFIX}/share/bash-completion/completions/megacmd
+ ${INSTALL_DATA} ${FILESDIR}/README ${DESTDIR}${PREFIX}/share/doc/megacmd
+
+.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 "../../textproc/icu/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..2f7ecc7bdf
--- /dev/null
+++ b/megacmd/PLIST
@@ -0,0 +1,132 @@
+@comment $NetBSD: PLIST,v 1.2 2024/06/18 18:23:15 bsiegert Exp $
+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/process.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/bash-completion/completions/megacmd
+share/doc/megacmd/README
diff --git a/megacmd/distinfo b/megacmd/distinfo
new file mode 100644
index 0000000000..15e6ea5217
--- /dev/null
+++ b/megacmd/distinfo
@@ -0,0 +1,20 @@
+$NetBSD: distinfo,v 1.2 2024/06/18 18:23:15 bsiegert Exp $
+
+BLAKE2s (megacmd-1.7.0.tar.gz) = 3b0008daa28b220ae909c491aebce7fd32a595607744acf7f7b0a6cef3a956c0
+SHA512 (megacmd-1.7.0.tar.gz) = 9e29a318d062a7d01d2a7e7e7655ef3adf079f2ff64c2eee3c035816821f9c981411f3676c8749a6fc51c44fad06a1428b1db0d6b61f32be5e222553bd9bb0dd
+Size (megacmd-1.7.0.tar.gz) = 2124305 bytes
+BLAKE2s (meganz-sdk-v4.31.0b.tar.gz) = ca471a7fc6fbcb3a5cea04aff2bfedcd77d33ca6cfd741f3954381f9bfc1af94
+SHA512 (meganz-sdk-v4.31.0b.tar.gz) = 525fbdb7bb4bb6e02cc0268a788f744258e41bb39e78c33c3ac1d21c54ad78a630775aa4440529cc3faa4c0679db0a72161f856c49e15d721487a748a0a08969
+Size (meganz-sdk-v4.31.0b.tar.gz) = 3592431 bytes
+SHA1 (patch-Makefile.am) = 68b2a67c0b3ddac4b247fc6e0f6dd7ab068d90bd
+SHA1 (patch-configure.ac) = e05d9a14c7190f450bbb7264fa3641a8b50b3c7f
+SHA1 (patch-sdk_Makefile.am) = 3b83578498bf2917116bc18b31adf09f0c46d9b8
+SHA1 (patch-sdk_configure.ac) = ed55c46f0614a5acc5ea3edc69934fb72f5afd46
+SHA1 (patch-sdk_include_mega_http.h) = a3845e17a6bb5ea9985f1a7de152f1c43a1767ec
+SHA1 (patch-sdk_include_mega_posix_megafs.h) = cee06d1b594588a9fb2c07828d436c74188022e5
+SHA1 (patch-sdk_include_mega_posix_megasys.h) = 02b6259c8932163dee52baeec5e1e07003288279
+SHA1 (patch-sdk_src_http.cpp) = 85b1ef20d4f512e38e336cb4ca2cfbe74372e040
+SHA1 (patch-sdk_src_include.am) = 93eae44fc1fa3ec6f621c7aba8266d63ec835ad7
+SHA1 (patch-sdk_src_posix_fs.cpp) = fdf5129f54a65d3bc52e9a6c6b2e76fdc40026e2
+SHA1 (patch-src_include.am) = 6a7d0dc05a23463066fa74434af1af18f18e0885
+SHA1 (patch-src_megacmdshell_megacmdshellcommunications.cpp) = 7ce41cfcfbc7c8df8f6176bc2abd6a08825fef80
diff --git a/megacmd/files/README b/megacmd/files/README
new file mode 100644
index 0000000000..3296fb1b80
--- /dev/null
+++ b/megacmd/files/README
@@ -0,0 +1,8 @@
+$NetBSD: README,v 1.1 2024/06/18 18:23:15 bsiegert Exp $
+
+To use megacmd features you need machine-id.
+If /etc/machine-id or /var/lib/dbus/machine-id
+not exists, you should generate one. For that,
+run the following command as root:
+
+ dbus-uuidgen --ensure
diff --git a/megacmd/patches/patch-Makefile.am b/megacmd/patches/patch-Makefile.am
new file mode 100644
index 0000000000..faa9b68de3
--- /dev/null
+++ b/megacmd/patches/patch-Makefile.am
@@ -0,0 +1,22 @@
+$NetBSD: patch-Makefile.am,v 1.2 2024/06/18 18:23:15 bsiegert Exp $
+
+Add --tag=CXX libtool flag on NetBSD and Dragonfly.
+Upstream pull req: https://github.com/meganz/MEGAcmd/pull/949
+
+--- Makefile.am.orig 2024-05-20 12:29:43.000000000 +0000
++++ Makefile.am
+@@ -39,6 +39,14 @@ if LINUX
+ AM_LIBTOOLFLAGS="--tag=CXX"
+ endif
+
++if DRAGONFLY
++AM_LIBTOOLFLAGS="--tag=CXX"
++endif
++
++if NETBSD
++AM_LIBTOOLFLAGS="--tag=CXX"
++endif
++
+ VERSION_INFO=$(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+
+ CLEANFILES=
diff --git a/megacmd/patches/patch-configure.ac b/megacmd/patches/patch-configure.ac
new file mode 100644
index 0000000000..dcf3682fa1
--- /dev/null
+++ b/megacmd/patches/patch-configure.ac
@@ -0,0 +1,38 @@
+$NetBSD: patch-configure.ac,v 1.1 2024/06/18 18:23:15 bsiegert Exp $
+
+Add NetBSD and DragonFly support to configure script.
+Upstream pull req: https://github.com/meganz/MEGAcmd/pull/949
+
+--- configure.ac.orig 2024-05-20 12:29:43.000000000 +0000
++++ configure.ac
+@@ -209,6 +209,8 @@ WIN32=no
+ DARWIN=no
+ ANDROID=no
+ LINUX=no
++DRAGONFLY=no
++NETBSD=no
+ AC_MSG_CHECKING([if building for Win32 platform])
+ case $host in
+ *-*-cygwin*)
+@@ -231,6 +233,12 @@ case $host in
+ *-linux*)
+ LINUX=yes
+ ;;
++ *-dragonfly*)
++ DRAGONFLY=yes
++ ;;
++ *-netbsd*)
++ NETBSD=yes
++ ;;
+ *)
+ LIBS_EXTRA=""
+ ;;
+@@ -240,6 +248,8 @@ AM_CONDITIONAL([WIN32], [test "${WIN32}"
+ AM_CONDITIONAL([DARWIN], [test "${DARWIN}" = "yes"])
+ AM_CONDITIONAL([ANDROID], [test "${ANDROID}" = "yes"])
+ AM_CONDITIONAL([LINUX], [test "${LINUX}" = "yes"])
++AM_CONDITIONAL([DRAGONFLY], [test "${DRAGONFLY}" = "yes"])
++AM_CONDITIONAL([NETBSD], [test "${NETBSD}" = "yes"])
+
+ SAVE_LDFLAGS=$LDFLAGS
+ SAVE_CXXFLAGS=$CXXFLAGS
diff --git a/megacmd/patches/patch-sdk_Makefile.am b/megacmd/patches/patch-sdk_Makefile.am
new file mode 100644
index 0000000000..f55a9fcb34
--- /dev/null
+++ b/megacmd/patches/patch-sdk_Makefile.am
@@ -0,0 +1,22 @@
+$NetBSD: patch-sdk_Makefile.am,v 1.2 2024/06/18 18:23:15 bsiegert Exp $
+
+Add --tag=CXX libtool flag on NetBSD and DragonFly
+Upstream pull req: https://github.com/meganz/sdk/pull/2663
+
+--- sdk/Makefile.am.orig 2024-05-17 14:19:43.000000000 +0000
++++ sdk/Makefile.am
+@@ -46,6 +46,14 @@ if LINUX
+ AM_LIBTOOLFLAGS="--tag=CXX"
+ endif
+
++if DRAGONFLY
++AM_LIBTOOLFLAGS="--tag=CXX"
++endif
++
++if NETBSD
++AM_LIBTOOLFLAGS="--tag=CXX"
++endif
++
+ VERSION_INFO=$(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+
+ CLEANFILES=
diff --git a/megacmd/patches/patch-sdk_configure.ac b/megacmd/patches/patch-sdk_configure.ac
new file mode 100644
index 0000000000..57669e433b
--- /dev/null
+++ b/megacmd/patches/patch-sdk_configure.ac
@@ -0,0 +1,149 @@
+$NetBSD: patch-sdk_configure.ac,v 1.2 2024/06/18 18:23:15 bsiegert Exp $
+
+Add NetBSD and DragonFly support.
+Upstream pull req: https://github.com/meganz/sdk/pull/2663
+
+Add --with-rt=... configure option, syncing with aio_write
+doesn't work on NetBSD, workaround build without rt support.
+Upstream pull req: https://github.com/meganz/sdk/pull/2665
+
+--- sdk/configure.ac.orig 2024-05-17 14:19:43.000000000 +0000
++++ sdk/configure.ac
+@@ -208,6 +208,8 @@ WIN32=no
+ DARWIN=no
+ ANDROID=no
+ LINUX=no
++DRAGONFLY=no
++NETBSD=no
+ AC_MSG_CHECKING([platform options])
+ case $host in
+ *-*-cygwin*)
+@@ -238,6 +240,12 @@ case $host in
+ *-linux*)
+ LINUX=yes
+ ;;
++ *-dragonfly*)
++ DRAGONFLY=yes
++ ;;
++ *-netbsd*)
++ NETBSD=yes
++ ;;
+ *)
+ LIBS_EXTRA=""
+ ;;
+@@ -247,6 +255,8 @@ AM_CONDITIONAL([WIN32], [test "${WIN32}"
+ AM_CONDITIONAL([DARWIN], [test "${DARWIN}" = "yes"])
+ AM_CONDITIONAL([ANDROID], [test "${ANDROID}" = "yes"])
+ AM_CONDITIONAL([LINUX], [test "${LINUX}" = "yes"])
++AM_CONDITIONAL([DRAGONFLY], [test "${DRAGONFLY}" = "yes"])
++AM_CONDITIONAL([NETBSD], [test "${NETBSD}" = "yes"])
+
+ AC_SUBST(LIBS_EXTRA)
+
+@@ -1369,6 +1379,7 @@ AM_CONDITIONAL([USE_LIBMEDIAINFO], [test
+ #
+ openssl=false
+ cares=false
++rt=undef
+ if test "x$WIN32" = "xno" ; then
+
+ AC_ARG_WITH([poll],
+@@ -1381,12 +1392,71 @@ if test "x$WIN32" = "xno" ; then
+ LDFLAGS="-pthread $LDFLAGS"
+ 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])
+- ],
++ # librt
++ AC_MSG_CHECKING(for rt)
++ AC_ARG_WITH([rt],
++ AS_HELP_STRING(--with-rt=PATH, base of Real-time Library installation),
++ [
++ case $with_rt in
++ no)
++ AC_MSG_RESULT([no])
++
++ rt=false
++ ;;
++ yes)
++ AC_CHECK_HEADERS([aio.h], [],
++ AC_MSG_ERROR([aio.h header not found or not usable])
++ )
++ AC_CHECK_LIB(rt, [aio_write], [LIBRT_LIBS="$LIBRT_LIBS -lrt"],
++ AC_MSG_ERROR([Could not find rt library!])
++ )
++
++ AC_SUBST(LIBRT_LIBS)
++ rt=true
++ ;;
++ *)
++ # determine if library is installed
++ if test -d "$with_rt/lib"; then
++ LDFLAGS="-L$with_rt/lib $LDFLAGS"
++ CXXFLAGS="-I$with_rt/include $CXXFLAGS"
++
++ AC_CHECK_HEADERS([aio.h], [
++ LIBRT_LDFLAGS="-L$with_rt/lib"
++ LIBRT_CXXFLAGS="-I$with_rt/include"],
++ AC_MSG_ERROR([aio.h header not found or not usable])
++ )
++
++ AC_CHECK_LIB(rt, [aio_write], [LIBRT_LIBS="$LIBRT_LIBS -lrt"],
++ AC_MSG_ERROR([Could not find rt library!])
++ )
++ else
++ AC_MSG_ERROR([Could not find rt library in "$with_rt/lib"!])
++ fi
++
++ AC_SUBST(LIBRT_LDFLAGS)
++ AC_SUBST(LIBRT_CXXFLAGS)
++ AC_SUBST(LIBRT_LIBS)
++ rt=true
++
++ #restore
++ LDFLAGS=$SAVE_LDFLAGS
++ CXXFLAGS=$SAVE_CXXFLAGS
++ ;;
++ esac
++ ],
++ [
++ AC_MSG_RESULT([--with-rt not specified])
++
++ AC_CHECK_HEADERS([aio.h], [],
++ AC_MSG_ERROR([aio.h header not found or not usable])
++ )
++ AC_CHECK_LIB(rt, [aio_write], [LIBRT_LIBS="$LIBRT_LIBS -lrt"],
++ AC_MSG_NOTICE([Could not find librt])
++ )
++
++ AC_SUBST(LIBRT_LIBS)
++ rt=true
++ ]
+ )
+
+ # OpenSSL
+@@ -1617,6 +1687,12 @@ if test "x$WIN32" = "xno" ; then
+ fi
+
+ # define on all platforms
++AM_CONDITIONAL(HAVE_RT, test x$rt = xtrue)
++if test "x$rt" = "xtrue" ; then
++ AC_DEFINE(HAVE_AIO_RT, [1], [Define to indicate AIO presence in librt])
++fi
++
++# define on all platforms
+ AM_CONDITIONAL(HAVE_OPENSSL, test x$openssl = xtrue)
+ if test "x$openssl" = "xtrue" ; then
+ AC_DEFINE(USE_OPENSSL, [1], [Define to use OpenSSL])
+@@ -2308,6 +2384,7 @@ AC_MSG_NOTICE([Configured to build Mega
+ PCRE: $PCRE_CXXFLAGS $PCRE_LDFLAGS $PCRE_LIBS
+ LIBUV: $LIBUV_CXXFLAGS $LIBUV_LDFLAGS $LIBUV_LIBS
+ LIBRAW: $LIBRAW_CXXFLAGS $LIBRAW_LDFLAGS $LIBRAW_LIBS
++ LIBRT: $LIBRT_CXXFLAGS $LIBRT_LDFLAGS $LIBRT_LIBS
+ LIBMEDIAINFO: $LIBMEDIAINFO_CXXFLAGS $LIBMEDIAINFO_LDFLAGS $LIBMEDIAINFO_LIBS
+ FFMPEG: $FFMPEG_CXXFLAGS $FFMPEG_LDFLAGS $FFMPEG_LIBS
+
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..5f54538713
--- /dev/null
+++ b/megacmd/patches/patch-sdk_include_mega_http.h
@@ -0,0 +1,16 @@
+$NetBSD: patch-sdk_include_mega_http.h,v 1.1 2024/06/18 18:23:15 bsiegert Exp $
+
+Add support to other BSDs.
+Upstream pull req: https://github.com/meganz/sdk/pull/2662
+
+--- sdk/include/mega/http.h.orig 2024-05-17 14:19:43.000000000 +0000
++++ sdk/include/mega/http.h
+@@ -42,7 +42,7 @@
+ #pragma warning(pop)
+ #endif
+
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+ #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..173977c6b7
--- /dev/null
+++ b/megacmd/patches/patch-sdk_include_mega_posix_megafs.h
@@ -0,0 +1,16 @@
+$NetBSD: patch-sdk_include_mega_posix_megafs.h,v 1.1 2024/06/18 18:23:15 bsiegert Exp $
+
+Add support to other BSDs.
+Upstream pull req: https://github.com/meganz/sdk/pull/2662
+
+--- sdk/include/mega/posix/megafs.h.orig 2024-05-17 14:19:43.000000000 +0000
++++ sdk/include/mega/posix/megafs.h
+@@ -32,7 +32,7 @@
+ #define O_DIRECT 0
+ #include <sys/param.h>
+ #include <sys/mount.h>
+-#elif defined(__FreeBSD__)
++#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+ #include <sys/mount.h>
+ #else
+ #include <sys/vfs.h>
diff --git a/megacmd/patches/patch-sdk_include_mega_posix_megasys.h b/megacmd/patches/patch-sdk_include_mega_posix_megasys.h
new file mode 100644
index 0000000000..ac15d903d6
--- /dev/null
+++ b/megacmd/patches/patch-sdk_include_mega_posix_megasys.h
@@ -0,0 +1,17 @@
+$NetBSD: patch-sdk_include_mega_posix_megasys.h,v 1.1 2024/06/18 18:23:15 bsiegert Exp $
+
+Add support to other BSDs.
+Upstream pull req: https://github.com/meganz/sdk/pull/2662
+
+--- sdk/include/mega/posix/megasys.h.orig 2024-05-17 14:19:43.000000000 +0000
++++ sdk/include/mega/posix/megasys.h
+@@ -99,7 +99,8 @@
+ #include <endian.h>
+ #endif
+
+-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__minix)
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || defined(__minix) || \
++ defined(__OpenBSD__)
+ #include <sys/endian.h>
+ #endif
+
diff --git a/megacmd/patches/patch-sdk_src_http.cpp b/megacmd/patches/patch-sdk_src_http.cpp
new file mode 100644
index 0000000000..f8377f55b7
--- /dev/null
+++ b/megacmd/patches/patch-sdk_src_http.cpp
@@ -0,0 +1,20 @@
+$NetBSD: patch-sdk_src_http.cpp,v 1.2 2024/06/18 18:23:15 bsiegert Exp $
+
+NetBSD and OpenBSD don't support AI_V4MAPPED.
+Upstream pull req: https://github.com/meganz/sdk/pull/2664
+
+--- sdk/src/http.cpp.orig 2024-05-17 14:19:43.000000000 +0000
++++ sdk/src/http.cpp
+@@ -270,8 +270,12 @@ void HttpIO::getMEGADNSservers(string *d
+ hints.ai_family = AF_UNSPEC;
+
+ #ifndef __MINGW32__
++#if defined(__NetBSD__) || defined(__OpenBSD__)
++ hints.ai_flags = AI_ADDRCONFIG;
++#else
+ hints.ai_flags = AI_V4MAPPED | AI_ADDRCONFIG;
+ #endif
++#endif
+
+ if (!getaddrinfo("ns.mega.co.nz", NULL, &hints, &aiList))
+ {
diff --git a/megacmd/patches/patch-sdk_src_include.am b/megacmd/patches/patch-sdk_src_include.am
new file mode 100644
index 0000000000..4745e359ab
--- /dev/null
+++ b/megacmd/patches/patch-sdk_src_include.am
@@ -0,0 +1,24 @@
+$NetBSD: patch-sdk_src_include.am,v 1.1 2024/06/18 18:23:15 bsiegert Exp $
+
+Handle LIBRT_* flags
+Upstream pull req: https://github.com/meganz/sdk/pull/2665
+
+--- sdk/src/include.am.orig 2024-05-17 14:19:43.000000000 +0000
++++ sdk/src/include.am
+@@ -5,14 +5,14 @@ lib_LTLIBRARIES = src/libmega.la
+ if WIN32
+ src_libmega_la_CXXFLAGS = -D_WIN32=1 -Iinclude/ -Iinclude/mega/win32 $(LIBS_EXTRA) $(ZLIB_CXXFLAGS) $(LIBUV_CXXFLAGS) $(LIBRAW_CXXFLAGS) $(LIBMEDIAINFO_CXXFLAGS) $(FFMPEG_CXXFLAGS) $(CRYPTO_CXXFLAGS) $(SODIUM_CXXFLAGS) $(DB_CXXFLAGS) $(CXXFLAGS) $(WINHTTP_CXXFLAGS) $(FI_CXXFLAGS) $(PDF_CXXFLAGS) $(ICU_CXXFLAGS) $(PCRE_CXXFLAGS)
+ else
+-src_libmega_la_CXXFLAGS = $(CARES_FLAGS) $(LIBCURL_FLAGS) $(ZLIB_CXXFLAGS) $(LIBUV_CXXFLAGS) $(LIBRAW_CXXFLAGS) $(LIBMEDIAINFO_CXXFLAGS) $(FFMPEG_CXXFLAGS) $(CRYPTO_CXXFLAGS) $(SODIUM_CXXFLAGS) $(DB_CXXFLAGS) $(FI_CXXFLAGS) $(PDF_CXXFLAGS) $(ICU_CXXFLAGS) $(LIBSSL_FLAGS) $(PCRE_CXXFLAGS)
++src_libmega_la_CXXFLAGS = $(CARES_FLAGS) $(LIBCURL_FLAGS) $(ZLIB_CXXFLAGS) $(LIBUV_CXXFLAGS) $(LIBRAW_CXXFLAGS) $(LIBRT_CXXFLAGS) $(LIBMEDIAINFO_CXXFLAGS) $(FFMPEG_CXXFLAGS) $(CRYPTO_CXXFLAGS) $(SODIUM_CXXFLAGS) $(DB_CXXFLAGS) $(FI_CXXFLAGS) $(PDF_CXXFLAGS) $(ICU_CXXFLAGS) $(LIBSSL_FLAGS) $(PCRE_CXXFLAGS)
+ endif
+
+ # Libs
+ if WIN32
+ src_libmega_la_LIBADD = $(LIBS_EXTRA) $(FFMPEG_LDFLAGS) $(FFMPEG_LIBS) $(LIBUV_LDFLAGS) $(LIBUV_LIBS) $(LIBRAW_LDFLAGS) $(LIBRAW_LIBS) $(LIBMEDIAINFO_LDFLAGS) $(LIBMEDIAINFO_LIBS) $(ZLIB_LDFLAGS) $(ZLIB_LIBS) $(CRYPTO_LDFLAGS) $(CRYPTO_LIBS) $(SODIUM_LDFLAGS) $(SODIUM_LIBS) $(DB_LDFLAGS) $(DB_LIBS) $(WINHTTP_LDFLAGS) $(WINHTTP_LIBS) $(FI_LDFLAGS) $(FI_LIBS) $(PDF_LDFLAGS) $(PDF_LIBS) $(ICU_LDFLAGS) $(ICU_LIBS) $(PCRE_LDFLAGS) $(PCRE_LIBS)
+ else
+-src_libmega_la_LIBADD = $(CARES_LDFLAGS) $(CARES_LIBS) $(LIBCURL_LIBS) $(FFMPEG_LDFLAGS) $(FFMPEG_LIBS) $(LIBUV_LDFLAGS) $(LIBUV_LIBS) $(LIBRAW_LDFLAGS) $(LIBRAW_LIBS) $(LIBMEDIAINFO_LDFLAGS) $(LIBMEDIAINFO_LIBS) $(ZLIB_LDFLAGS) $(ZLIB_LIBS) $(CRYPTO_LDFLAGS) $(CRYPTO_LIBS) $(SODIUM_LDFLAGS) $(SODIUM_LIBS) $(DB_LDFLAGS) $(DB_LIBS) $(FI_LDFLAGS) $(FI_LIBS) $(PDF_LDFLAGS) $(PDF_LIBS) $(ICU_LDFLAGS) $(ICU_LIBS) $(LIBSSL_LDFLAGS) $(LIBSSL_LIBS) $(PCRE_LDFLAGS) $(PCRE_LIBS)
++src_libmega_la_LIBADD = $(CARES_LDFLAGS) $(CARES_LIBS) $(LIBCURL_LIBS) $(FFMPEG_LDFLAGS) $(FFMPEG_LIBS) $(LIBUV_LDFLAGS) $(LIBUV_LIBS) $(LIBRAW_LDFLAGS) $(LIBRAW_LIBS) $(LIBRT_LDFLAGS) $(LIBRT_LIBS) $(LIBMEDIAINFO_LDFLAGS) $(LIBMEDIAINFO_LIBS) $(ZLIB_LDFLAGS) $(ZLIB_LIBS) $(CRYPTO_LDFLAGS) $(CRYPTO_LIBS) $(SODIUM_LDFLAGS) $(SODIUM_LIBS) $(DB_LDFLAGS) $(DB_LIBS) $(FI_LDFLAGS) $(FI_LIBS) $(PDF_LDFLAGS) $(PDF_LIBS) $(ICU_LDFLAGS) $(ICU_LIBS) $(LIBSSL_LDFLAGS) $(LIBSSL_LIBS) $(PCRE_LDFLAGS) $(PCRE_LIBS)
+ endif
+
+ # add library version
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..79f164b895
--- /dev/null
+++ b/megacmd/patches/patch-sdk_src_posix_fs.cpp
@@ -0,0 +1,16 @@
+$NetBSD: patch-sdk_src_posix_fs.cpp,v 1.2 2024/06/18 18:23:15 bsiegert Exp $
+
+Fix build on NetBSD, use statvfs
+
+--- sdk/src/posix/fs.cpp.orig 2024-05-17 14:19:43.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..9d90511675
--- /dev/null
+++ b/megacmd/patches/patch-src_include.am
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_include.am,v 1.2 2024/06/18 18:23:15 bsiegert Exp $
+
+Fix bash-completion path
+
+--- src/include.am.orig 2024-05-20 12:29:43.000000000 +0000
++++ src/include.am
+@@ -16,7 +16,7 @@ bin_PROGRAMS += $(MEGACMD) $(TESTS)
+ $(MEGACMD): $(top_builddir)/sdk/src/libmega.la
+
+ #scripst (to install and where)
+-megacmdcompletiondir = $(sysconfdir)/bash_completion.d/
++megacmdcompletiondir = $(datadir)/bash-completion/completions/
+ megacmdcompletion_DATA = src/client/megacmd_completion.sh
+ megacmdscripts_bindir = $(bindir)
+ megacmdscripts_bin_SCRIPTS = src/client/mega-attr src/client/mega-cd src/client/mega-confirm src/client/mega-cp src/client/mega-debug src/client/mega-du src/client/mega-df src/client/mega-proxy src/client/mega-export src/client/mega-find src/client/mega-get src/client/mega-help src/client/mega-https src/client/mega-webdav src/client/mega-permissions src/client/mega-deleteversions src/client/mega-transfers src/client/mega-import src/client/mega-invite src/client/mega-ipc src/client/mega-killsession src/client/mega-lcd src/client/mega-log src/client/mega-login src/client/mega-logout src/client/mega-lpwd src/client/mega-ls src/client/mega-backup src/client/mega-mkdir src/client/mega-mount src/client/mega-mv src/client/mega-passwd src/client/mega-preview src/client/mega-put src/client/mega-speedlimit src/client/mega-pwd src/client/mega-quit src/client/mega-reload src/client/mega-rm src/client/mega-session src/client/mega-share src/client/mega-showpcr src/client/mega-signup src/
client/mega-sync src/client/mega-exclude src/client/mega-thumbnail src/client/mega-userattr src/client/mega-users src/client/mega-version src/client/mega-whoami src/client/mega-cat src/client/mega-tree src/client/mega-mediainfo src/client/mega-graphics src/client/mega-ftp src/client/mega-cancel src/client/mega-confirmcancel src/client/mega-errorcode
diff --git a/megacmd/patches/patch-src_megacmdshell_megacmdshellcommunications.cpp b/megacmd/patches/patch-src_megacmdshell_megacmdshellcommunications.cpp
new file mode 100644
index 0000000000..74c213f75e
--- /dev/null
+++ b/megacmd/patches/patch-src_megacmdshell_megacmdshellcommunications.cpp
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_megacmdshell_megacmdshellcommunications.cpp,v 1.1 2024/06/18 18:23:15 bsiegert Exp $
+
+Fix include on BSDs
+Upstream pull req: https://github.com/meganz/MEGAcmd/pull/949
+
+--- src/megacmdshell/megacmdshellcommunications.cpp.orig 2024-05-20 12:29:43.000000000 +0000
++++ src/megacmdshell/megacmdshellcommunications.cpp
+@@ -55,7 +55,7 @@
+ #include <limits.h>
+ #endif
+
+-#ifdef __FreeBSD__
++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+ #include <netinet/in.h>
+ #endif
+
Home |
Main Index |
Thread Index |
Old Index