pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/net/megacmd



Module Name:    pkgsrc
Committed By:   wiz
Date:           Sat Feb 15 07:40:14 UTC 2025

Modified Files:
        pkgsrc/net/megacmd: Makefile PLIST distinfo
        pkgsrc/net/megacmd/patches: patch-sdk_include_mega_posix_megafs.h
            patch-sdk_src_posix_fs.cpp
            patch-src_megacmdshell_megacmdshellcommunications.cpp
Added Files:
        pkgsrc/net/megacmd/patches: patch-CMakeLists.txt
            patch-build_cmake_modules_megacmd__libraries.cmake
            patch-sdk_cmake_modules_sdklib__libraries.cmake
            patch-sdk_cmake_modules_sdklib__target.cmake
            patch-src_megacmdcommonutils.cpp patch-src_megacmdcommonutils.h
Removed Files:
        pkgsrc/net/megacmd/patches: patch-Makefile.am patch-configure.ac
            patch-sdk_Makefile.am patch-sdk_configure.ac
            patch-sdk_include_mega_http.h
            patch-sdk_include_mega_posix_megasys.h patch-sdk_src_http.cpp
            patch-sdk_src_include.am patch-src_include.am

Log Message:
net/megacmd: update to 2.0.0

Provided by Robert Bagdan in wip.

- Update to version 2.0.0:
  * New Sync Engine: See sync-issues and sync-ignore commands
  * Rotating Logger: Introduced a robust rotating logging system across all platforms for better performance and debugging
  * Platform-specific enhancements: Addressed various file descriptor issues on Linux and macOS, and improved non-ascii support on Windows
  * Improved overall reliability: Fixed memory leaks, resolved potential data races, and eliminated deadlock scenarios
  * Fixed an issue when handling double-quoted arguments
  * Various fixes and refinements to enhance usability and performance

- Use builtin megasdk-8.3.1


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 pkgsrc/net/megacmd/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/net/megacmd/PLIST pkgsrc/net/megacmd/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/net/megacmd/patches/patch-CMakeLists.txt \
    pkgsrc/net/megacmd/patches/patch-build_cmake_modules_megacmd__libraries.cmake \
    pkgsrc/net/megacmd/patches/patch-sdk_cmake_modules_sdklib__libraries.cmake \
    pkgsrc/net/megacmd/patches/patch-sdk_cmake_modules_sdklib__target.cmake \
    pkgsrc/net/megacmd/patches/patch-src_megacmdcommonutils.cpp \
    pkgsrc/net/megacmd/patches/patch-src_megacmdcommonutils.h
cvs rdiff -u -r1.2 -r0 pkgsrc/net/megacmd/patches/patch-Makefile.am \
    pkgsrc/net/megacmd/patches/patch-sdk_Makefile.am \
    pkgsrc/net/megacmd/patches/patch-sdk_configure.ac \
    pkgsrc/net/megacmd/patches/patch-sdk_src_http.cpp \
    pkgsrc/net/megacmd/patches/patch-src_include.am
cvs rdiff -u -r1.1 -r0 pkgsrc/net/megacmd/patches/patch-configure.ac \
    pkgsrc/net/megacmd/patches/patch-sdk_include_mega_http.h \
    pkgsrc/net/megacmd/patches/patch-sdk_include_mega_posix_megasys.h \
    pkgsrc/net/megacmd/patches/patch-sdk_src_include.am
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/net/megacmd/patches/patch-sdk_include_mega_posix_megafs.h \
    pkgsrc/net/megacmd/patches/patch-src_megacmdshell_megacmdshellcommunications.cpp
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/net/megacmd/patches/patch-sdk_src_posix_fs.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/megacmd/Makefile
diff -u pkgsrc/net/megacmd/Makefile:1.9 pkgsrc/net/megacmd/Makefile:1.10
--- pkgsrc/net/megacmd/Makefile:1.9     Mon Jan 27 12:09:02 2025
+++ pkgsrc/net/megacmd/Makefile Sat Feb 15 07:40:13 2025
@@ -1,12 +1,11 @@
-# $NetBSD: Makefile,v 1.9 2025/01/27 12:09:02 wiz Exp $
+# $NetBSD: Makefile,v 1.10 2025/02/15 07:40:13 wiz Exp $
 
-DISTNAME=      megacmd-1.7.0
-PKGREVISION=   4
+DISTNAME=      megacmd-2.0.0
 CATEGORIES=    net
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=meganz/}
 GITHUB_PROJECT=        MEGAcmd
 GITHUB_TAG=    ${PKGVERSION_NOREV}_Linux
-SDK_VERSION=   v4.31.0b
+SDK_VERSION=   v8.3.1
 
 GITHUB_SUBMODULES=     meganz sdk ${SDK_VERSION} sdk
 
@@ -16,46 +15,40 @@ COMMENT=    CLI and scriptable application 
 # MEGAcmd: GPLv3, SDK: BSD 2-clause
 LICENSE=       gnu-gpl-v3 AND 2-clause-bsd
 
+TOOL_DEPENDS+= git-base-[0-9]*:../../devel/git-base
+
 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
+USE_TOOLS+=            pkg-config
 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
+CMAKE_CONFIGURE_ARGS+= -DCMAKE_BUILD_TYPE=Release
+CMAKE_CONFIGURE_ARGS+= -DFULL_REQS=OFF
+CMAKE_CONFIGURE_ARGS+= -DUSE_MEDIAINFO=OFF
+CMAKE_CONFIGURE_ARGS+= -DUSE_FREEIMAGE=OFF
+CMAKE_CONFIGURE_ARGS+= -DUSE_FFMPEG=OFF
+CMAKE_CONFIGURE_ARGS+= -DUSE_PDFIUM=OFF
 
 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/cmake/build.mk"
 .include "../../devel/pcre/buildlink3.mk"
+.include "../../devel/libinotify/buildlink3.mk"
 .include "../../devel/libuv/buildlink3.mk"
 .include "../../devel/readline/buildlink3.mk"
 .include "../../net/libcares/buildlink3.mk"
+BUILDLINK_API_DEPENDS.cryptopp+=       cryptopp>=8.7.0nb1
 .include "../../security/crypto++/buildlink3.mk"
 .include "../../security/libsodium/buildlink3.mk"
 .include "../../textproc/icu/buildlink3.mk"

Index: pkgsrc/net/megacmd/PLIST
diff -u pkgsrc/net/megacmd/PLIST:1.2 pkgsrc/net/megacmd/PLIST:1.3
--- pkgsrc/net/megacmd/PLIST:1.2        Tue Jun 18 18:23:15 2024
+++ pkgsrc/net/megacmd/PLIST    Sat Feb 15 07:40:13 2025
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2024/06/18 18:23:15 bsiegert Exp $
+@comment $NetBSD: PLIST,v 1.3 2025/02/15 07:40:13 wiz Exp $
 bin/mega-attr
 bin/mega-backup
 bin/mega-cancel
@@ -52,6 +52,8 @@ bin/mega-showpcr
 bin/mega-signup
 bin/mega-speedlimit
 bin/mega-sync
+bin/mega-sync-ignore
+bin/mega-sync-issues
 bin/mega-thumbnail
 bin/mega-transfers
 bin/mega-tree
@@ -60,73 +62,5 @@ 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
Index: pkgsrc/net/megacmd/distinfo
diff -u pkgsrc/net/megacmd/distinfo:1.2 pkgsrc/net/megacmd/distinfo:1.3
--- pkgsrc/net/megacmd/distinfo:1.2     Tue Jun 18 18:23:15 2024
+++ pkgsrc/net/megacmd/distinfo Sat Feb 15 07:40:13 2025
@@ -1,20 +1,17 @@
-$NetBSD: distinfo,v 1.2 2024/06/18 18:23:15 bsiegert Exp $
+$NetBSD: distinfo,v 1.3 2025/02/15 07:40:13 wiz 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
+BLAKE2s (megacmd-2.0.0.tar.gz) = 46f5f94b6cb1af5dbdb8afb595608f88a14727f33c7aea46a0604fb8c3037b86
+SHA512 (megacmd-2.0.0.tar.gz) = a0ff37c33de492f0751d27f46bd83f506314f43985a247e1fe0de7683f3a8bfc059d05441816147acbda95b349b4d39e56cdac5f3893b697cda4f77efb197ce4
+Size (megacmd-2.0.0.tar.gz) = 2104772 bytes
+BLAKE2s (meganz-sdk-v8.3.1.tar.gz) = 4851001b7556d6a25f6d39e1e082e057b877cf68b55e85eba5b30486f1a0559c
+SHA512 (meganz-sdk-v8.3.1.tar.gz) = d80c7aa7a27f9f56405cd0bb5943135d6fb3590196c1a8f74b41ad3e94dc7704fe905342d6bdd431fc80e38eac74b0d8b11d8b8802b2c868931d0d11bb78f883
+Size (meganz-sdk-v8.3.1.tar.gz) = 4061833 bytes
+SHA1 (patch-CMakeLists.txt) = f8936fbcd4200139fec6ada0bad5644ddb54145b
+SHA1 (patch-build_cmake_modules_megacmd__libraries.cmake) = afabd22177c0437fbe1d13fdf6601832bc60cd96
+SHA1 (patch-sdk_cmake_modules_sdklib__libraries.cmake) = 67c919b57515659075ea43e26e349d9a94180a8c
+SHA1 (patch-sdk_cmake_modules_sdklib__target.cmake) = 33f5b16dc561e37f076c60fa537a4c5b8d8c992e
+SHA1 (patch-sdk_include_mega_posix_megafs.h) = b266e3a568925df3227387e16e1cb9f6670d9b4a
+SHA1 (patch-sdk_src_posix_fs.cpp) = 90d71c411c8fd733b9fdef288880fb9d74d12fed
+SHA1 (patch-src_megacmdcommonutils.cpp) = 6128e295e1a816ad4d7ea1ec59fa963391eb3bfb
+SHA1 (patch-src_megacmdcommonutils.h) = 194d991a02e8e48c9c31c60384549c276e4ee735
+SHA1 (patch-src_megacmdshell_megacmdshellcommunications.cpp) = ff794d128ffa6e0626296a504b22f391e0fc923b

Index: pkgsrc/net/megacmd/patches/patch-sdk_include_mega_posix_megafs.h
diff -u pkgsrc/net/megacmd/patches/patch-sdk_include_mega_posix_megafs.h:1.1 pkgsrc/net/megacmd/patches/patch-sdk_include_mega_posix_megafs.h:1.2
--- pkgsrc/net/megacmd/patches/patch-sdk_include_mega_posix_megafs.h:1.1        Tue Jun 18 18:23:15 2024
+++ pkgsrc/net/megacmd/patches/patch-sdk_include_mega_posix_megafs.h    Sat Feb 15 07:40:13 2025
@@ -1,16 +1,16 @@
-$NetBSD: patch-sdk_include_mega_posix_megafs.h,v 1.1 2024/06/18 18:23:15 bsiegert Exp $
+$NetBSD: patch-sdk_include_mega_posix_megafs.h,v 1.2 2025/02/15 07:40:13 wiz Exp $
 
-Add support to other BSDs.
-Upstream pull req: https://github.com/meganz/sdk/pull/2662
+* Use FSACCESS_CLASS of linux on BSDs
 
---- sdk/include/mega/posix/megafs.h.orig       2024-05-17 14:19:43.000000000 +0000
+--- sdk/include/mega/posix/megafs.h.orig       2025-02-13 10:44:28.677854322 +0100
 +++ 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>
+@@ -192,7 +192,8 @@ private:
+ 
+ };
+ 
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
++    defined(__NetBSD__) || defined(__DragonFly__)
+ 
+ #define FSACCESS_CLASS LinuxFileSystemAccess
+ 
Index: pkgsrc/net/megacmd/patches/patch-src_megacmdshell_megacmdshellcommunications.cpp
diff -u pkgsrc/net/megacmd/patches/patch-src_megacmdshell_megacmdshellcommunications.cpp:1.1 pkgsrc/net/megacmd/patches/patch-src_megacmdshell_megacmdshellcommunications.cpp:1.2
--- pkgsrc/net/megacmd/patches/patch-src_megacmdshell_megacmdshellcommunications.cpp:1.1        Tue Jun 18 18:23:15 2024
+++ pkgsrc/net/megacmd/patches/patch-src_megacmdshell_megacmdshellcommunications.cpp    Sat Feb 15 07:40:14 2025
@@ -1,7 +1,6 @@
-$NetBSD: patch-src_megacmdshell_megacmdshellcommunications.cpp,v 1.1 2024/06/18 18:23:15 bsiegert Exp $
+$NetBSD: patch-src_megacmdshell_megacmdshellcommunications.cpp,v 1.2 2025/02/15 07:40:14 wiz Exp $
 
-Fix include on BSDs
-Upstream pull req: https://github.com/meganz/MEGAcmd/pull/949
+* Fix include on BSDs
 
 --- src/megacmdshell/megacmdshellcommunications.cpp.orig       2024-05-20 12:29:43.000000000 +0000
 +++ src/megacmdshell/megacmdshellcommunications.cpp

Index: pkgsrc/net/megacmd/patches/patch-sdk_src_posix_fs.cpp
diff -u pkgsrc/net/megacmd/patches/patch-sdk_src_posix_fs.cpp:1.2 pkgsrc/net/megacmd/patches/patch-sdk_src_posix_fs.cpp:1.3
--- pkgsrc/net/megacmd/patches/patch-sdk_src_posix_fs.cpp:1.2   Tue Jun 18 18:23:15 2024
+++ pkgsrc/net/megacmd/patches/patch-sdk_src_posix_fs.cpp       Sat Feb 15 07:40:14 2025
@@ -1,16 +1,128 @@
-$NetBSD: patch-sdk_src_posix_fs.cpp,v 1.2 2024/06/18 18:23:15 bsiegert Exp $
+$NetBSD: patch-sdk_src_posix_fs.cpp,v 1.3 2025/02/15 07:40:14 wiz Exp $
 
-Fix build on NetBSD, use statvfs
+* Fix build on NetBSD, use statvfs
+* Don't use mntent features on BSDs
+* O_NOATIME not available on BSDs
+* BSDs use LinuxFileSystemAccess
 
---- sdk/src/posix/fs.cpp.orig  2024-05-17 14:19:43.000000000 +0000
+--- sdk/src/posix/fs.cpp.orig  2025-01-24 13:56:57.000000000 +0100
 +++ sdk/src/posix/fs.cpp
-@@ -27,6 +27,9 @@
- #include <sys/utsname.h>
+@@ -22,7 +22,8 @@
+  * You should have received a copy of the license along with this
+  * program.
+  */
+-#ifndef __APPLE__
++#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && \
++    !defined(__NetBSD__) && !defined(__DragonFly__)
+ #include <mntent.h>
+ #endif // ! __APPLE__
+ 
+@@ -32,6 +33,9 @@
  #include <sys/ioctl.h>
+ #include <sys/resource.h>
  #include <sys/statvfs.h>
 +#if defined(__NetBSD__)
 +#define statfs statvfs
 +#endif
- #include <sys/resource.h>
+ #include <sys/types.h>
+ #include <sys/utsname.h>
  #ifdef TARGET_OS_MAC
- #include "mega/osx/osxutils.h"
+@@ -818,7 +822,8 @@ PosixFileSystemAccess::PosixFileSystemAc
+     defaultfolderpermissions = 0700;
+ }
+ 
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
++    defined(__NetBSD__) || defined(__DragonFly__)
+ #ifdef ENABLE_SYNC
+ 
+ bool LinuxFileSystemAccess::initFilesystemNotificationSystem()
+@@ -878,7 +883,8 @@ bool PosixFileSystemAccess::cwd_static(L
+ 
+ // wake up from filesystem updates
+ 
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
++    defined(__NetBSD__) || defined(__DragonFly__)
+ void LinuxFileSystemAccess::addevents([[maybe_unused]] Waiter* waiter, int /*flags*/)
+ {
+ #ifdef ENABLE_SYNC
+@@ -1637,7 +1643,8 @@ void PosixFileSystemAccess::statsid(stri
+ }
+ 
+ #if defined(ENABLE_SYNC)
+-#if defined(__linux__)
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
++    defined(__NetBSD__) || defined(__DragonFly__)
+ 
+ LinuxDirNotify::LinuxDirNotify(LinuxFileSystemAccess& owner,
+                                LocalNode& /*root*/,
+@@ -1802,8 +1809,8 @@ private:
+     // open with O_NOATIME if possible
+     int open(const char *path)
+     {
+-#ifdef TARGET_OS_IPHONE
+-        // building for iOS, there is no O_NOATIME flag
++#ifndef O_NOATIME
++        // building for iOS and BSDs, there is no O_NOATIME flag
+         int fd = ::open(path, O_RDONLY) ;
+ #else
+         // for sync in particular, try to open without setting access-time
+@@ -2062,6 +2069,7 @@ ScanResult PosixFileSystemAccess::direct
+ }
+ 
+ #ifndef __APPLE__
++#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)
+ 
+ // Determine which device contains the specified path.
+ static std::string deviceOf(const std::string& database,
+@@ -2230,6 +2238,7 @@ static std::string deviceOf(const std::s
+     // No database has a mapping for this path.
+     return std::string();
+ }
++#endif
+ 
+ // Compute legacy filesystem fingerprint.
+ static std::uint64_t fingerprintOf(const std::string& path)
+@@ -2258,6 +2267,7 @@ static std::uint64_t fingerprintOf(const
+     return ++value;
+ }
+ 
++#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)
+ // Determine the UUID of the specified device.
+ static std::string uuidOf(const std::string& device)
+ {
+@@ -2334,6 +2344,7 @@ static std::string uuidOf(const std::str
+     // Couldn't determine device's UUID.
+     return std::string();
+ }
++#endif
+ 
+ fsfp_t FileSystemAccess::fsFingerprint(const LocalPath& path) const
+ {
+@@ -2344,6 +2355,7 @@ fsfp_t FileSystemAccess::fsFingerprint(c
+     if (!fingerprint)
+         return fsfp_t();
+ 
++#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)
+     // What device contains the specified path?
+     auto device = deviceOf(path.localpath);
+ 
+@@ -2360,6 +2372,7 @@ fsfp_t FileSystemAccess::fsFingerprint(c
+ 
+     LOG_warn << "Falling back to legacy filesystem fingerprint: "
+              << path;
++#endif
+ 
+     // Couldn't determine filesystem UUID.
+     return fsfp_t(fingerprint, std::string());
+@@ -2419,7 +2432,8 @@ unique_ptr<DirAccess>  PosixFileSystemAc
+     return unique_ptr<DirAccess>(new PosixDirAccess());
+ }
+ 
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
++    defined(__NetBSD__) || defined(__DragonFly__)
+ #ifdef ENABLE_SYNC
+ DirNotify* LinuxFileSystemAccess::newdirnotify(LocalNode& root,
+     const LocalPath& rootPath,

Added files:

Index: pkgsrc/net/megacmd/patches/patch-CMakeLists.txt
diff -u /dev/null pkgsrc/net/megacmd/patches/patch-CMakeLists.txt:1.1
--- /dev/null   Sat Feb 15 07:40:14 2025
+++ pkgsrc/net/megacmd/patches/patch-CMakeLists.txt     Sat Feb 15 07:40:13 2025
@@ -0,0 +1,83 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2025/02/15 07:40:13 wiz Exp $
+
+* Use system dependencies instead of vcpkg
+* Fix install directories
+* Install inotify conf file only on Linux
+
+--- CMakeLists.txt.orig        2025-01-30 14:04:12.000000000 +0100
++++ CMakeLists.txt
+@@ -26,7 +26,8 @@ set(QT_CREATOR_SKIP_VCPKG_SETUP TRUE CAC
+ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/build/cmake/modules) # Modules from MEGAcmd
+ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/sdk/cmake/modules) # Modules from MEGAsdk
+ 
+-set(VCPKG_ROOT "${CMAKE_CURRENT_LIST_DIR}/../vcpkg" CACHE PATH "If set, it will build and use the VCPKG packages defined in the manifest file")
++#set(VCPKG_ROOT "${CMAKE_CURRENT_LIST_DIR}/../vcpkg" CACHE PATH "If set, it will build and use the VCPKG packages defined in the manifest file")
++set(VCPKG_ROOT "" CACHE PATH "If set, it will build and use the VCPKG packages defined in the manifest file")
+ 
+ include(detect_host_architecture)
+ 
+@@ -39,7 +40,7 @@ execute_process(
+ )
+ endif()
+ 
+-if((NOT WIN32 OR BASH_VERSION_RESULT EQUAL 0) AND NOT EXISTS ${VCPKG_ROOT})
++if(VCPKG_ROOT AND (NOT WIN32 OR BASH_VERSION_RESULT EQUAL 0) AND NOT EXISTS ${VCPKG_ROOT})
+     message(STATUS "vcpkg will be cloned into ${VCPKG_ROOT}")
+     execute_process(
+         #TODO: have the same for windows ... or at least check if bash is available
+@@ -134,8 +135,8 @@ if(UNIX AND NOT APPLE)
+     # If CMAKE_INSTALL_PREFIX is not set, it will set rpath to /opt/....
+     # Note: using cmake --install --prefix /some/prefix will not set rpath relative to that prefix
+     # The above can be used for building packages: in which install dir is a path construction folder that will not be there in packages
+-    set(CMAKE_INSTALL_LIBDIR "opt/megacmd/lib")
+-    set(CMAKE_INSTALL_BINDIR "usr/bin") #override default "bin"
++    set(CMAKE_INSTALL_LIBDIR "lib")
++    set(CMAKE_INSTALL_BINDIR "bin") #override default "bin"
+ 
+     if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
+         message(STATUS "Overriding default CMAKE_INSTALL_PREFIX to /")
+@@ -457,27 +458,31 @@ elseif(NOT WIN32)
+         PATTERN "win" EXCLUDE)
+ 
+     install(FILES "${CMAKE_CURRENT_LIST_DIR}/src/client/megacmd_completion.sh"
+-        DESTINATION "etc/bash_completion.d"
++        DESTINATION "share/bash-completion/completions"
+         )
+ 
+-    # generate 100-megacmd-inotify-limit.conf file and have it installed
+-    execute_process(COMMAND echo "fs.inotify.max_user_watches = 524288"
++    if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
++        # generate 100-megacmd-inotify-limit.conf file and have it installed
++        execute_process(COMMAND echo "fs.inotify.max_user_watches = 524288"
+                 OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/99-megacmd-inotify-limit.conf)
+-    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/99-megacmd-inotify-limit.conf
+-        DESTINATION "etc/sysctl.d"
+-        )
+-
+-    #Install vcpkg dynamic libraries in locations defined by GNUInstallDirs.
+-    if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+-        SET(vcpkg_lib_folder "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/")
+-    else()
+-        SET(vcpkg_lib_folder "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/")
++        install(FILES ${CMAKE_CURRENT_BINARY_DIR}/99-megacmd-inotify-limit.conf
++            DESTINATION "etc/sysctl.d"
++            )
+     endif()
+-    install(DIRECTORY "${vcpkg_lib_folder}"
++
++    if(VCPKG_ROOT)
++        #Install vcpkg dynamic libraries in locations defined by GNUInstallDirs.
++        if(CMAKE_BUILD_TYPE STREQUAL "Debug")
++            SET(vcpkg_lib_folder "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/")
++        else()
++            SET(vcpkg_lib_folder "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/")
++        endif()
++        install(DIRECTORY "${vcpkg_lib_folder}"
+             DESTINATION ${CMAKE_INSTALL_LIBDIR}
+             FILES_MATCHING
+             PATTERN "lib*.so*"
+             PATTERN "*dylib*" #macOS
+             PATTERN "manual-link" EXCLUDE
+             PATTERN "pkgconfig" EXCLUDE)
++    endif()
+ endif() #not WIN32
Index: pkgsrc/net/megacmd/patches/patch-build_cmake_modules_megacmd__libraries.cmake
diff -u /dev/null pkgsrc/net/megacmd/patches/patch-build_cmake_modules_megacmd__libraries.cmake:1.1
--- /dev/null   Sat Feb 15 07:40:14 2025
+++ pkgsrc/net/megacmd/patches/patch-build_cmake_modules_megacmd__libraries.cmake       Sat Feb 15 07:40:13 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-build_cmake_modules_megacmd__libraries.cmake,v 1.1 2025/02/15 07:40:13 wiz Exp $
+
+* Fix used pcre library name
+
+--- build/cmake/modules/megacmd_libraries.cmake.orig   2025-01-30 14:04:12.000000000 +0100
++++ build/cmake/modules/megacmd_libraries.cmake
+@@ -16,7 +16,7 @@ macro(load_megacmdserver_libraries)
+         find_package(PkgConfig REQUIRED) # For libraries loaded using pkg-config
+ 
+         if(USE_PCRE) #TODO: UNTESTED!
+-            pkg_check_modules(pcre REQUIRED IMPORTED_TARGET libpcre)
++            pkg_check_modules(pcre REQUIRED IMPORTED_TARGET libpcrecpp)
+             target_link_libraries(LMegacmdServer PRIVATE PkgConfig::pcre)
+             set(USE_PCRE 1)
+         endif()
Index: pkgsrc/net/megacmd/patches/patch-sdk_cmake_modules_sdklib__libraries.cmake
diff -u /dev/null pkgsrc/net/megacmd/patches/patch-sdk_cmake_modules_sdklib__libraries.cmake:1.1
--- /dev/null   Sat Feb 15 07:40:14 2025
+++ pkgsrc/net/megacmd/patches/patch-sdk_cmake_modules_sdklib__libraries.cmake  Sat Feb 15 07:40:13 2025
@@ -0,0 +1,21 @@
+$NetBSD: patch-sdk_cmake_modules_sdklib__libraries.cmake,v 1.1 2025/02/15 07:40:13 wiz Exp $
+
+* Fix to find libcrypto++
+* Add libinotify check
+
+--- sdk/cmake/modules/sdklib_libraries.cmake.orig      2025-01-24 13:56:57.000000000 +0100
++++ sdk/cmake/modules/sdklib_libraries.cmake
+@@ -95,9 +95,12 @@ macro(load_sdklib_libraries)
+ 
+         find_package(PkgConfig REQUIRED) # For libraries loaded using pkg-config
+ 
+-        pkg_check_modules(cryptopp REQUIRED IMPORTED_TARGET libcrypto++)
++        pkg_check_modules(cryptopp REQUIRED IMPORTED_TARGET libcryptopp)
+         target_link_libraries(SDKlib PUBLIC PkgConfig::cryptopp) # TODO: Private for SDK core
+ 
++        pkg_check_modules(inotify REQUIRED IMPORTED_TARGET libinotify)
++        target_link_libraries(SDKlib PRIVATE PkgConfig::inotify)
++
+         pkg_check_modules(sodium REQUIRED IMPORTED_TARGET libsodium)
+         target_link_libraries(SDKlib PRIVATE PkgConfig::sodium)
+ 
Index: pkgsrc/net/megacmd/patches/patch-sdk_cmake_modules_sdklib__target.cmake
diff -u /dev/null pkgsrc/net/megacmd/patches/patch-sdk_cmake_modules_sdklib__target.cmake:1.1
--- /dev/null   Sat Feb 15 07:40:14 2025
+++ pkgsrc/net/megacmd/patches/patch-sdk_cmake_modules_sdklib__target.cmake     Sat Feb 15 07:40:13 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-sdk_cmake_modules_sdklib__target.cmake,v 1.1 2025/02/15 07:40:13 wiz Exp $
+
+* On gcc-10 std::filesystem is in stdc++
+
+--- sdk/cmake/modules/sdklib_target.cmake.orig 2025-02-07 10:00:44.872621812 +0100
++++ sdk/cmake/modules/sdklib_target.cmake
+@@ -358,7 +358,7 @@ endif()
+ load_sdklib_libraries()
+ 
+ # System libraries
+-if((NOT (WIN32 OR APPLE OR ANDROID)) AND CMAKE_CXX_STANDARD LESS_EQUAL 17)
++if((NOT (WIN32 OR APPLE OR ANDROID OR UNIX)) AND CMAKE_CXX_STANDARD LESS_EQUAL 17)
+     # Needed for std::experimental::filesystem
+     # Needed for c++17 and std::filesystem for some compilers. Not needed starting in gcc9, but harmless.
+     target_link_libraries(SDKlib PRIVATE stdc++fs)
Index: pkgsrc/net/megacmd/patches/patch-src_megacmdcommonutils.cpp
diff -u /dev/null pkgsrc/net/megacmd/patches/patch-src_megacmdcommonutils.cpp:1.1
--- /dev/null   Sat Feb 15 07:40:14 2025
+++ pkgsrc/net/megacmd/patches/patch-src_megacmdcommonutils.cpp Sat Feb 15 07:40:14 2025
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_megacmdcommonutils.cpp,v 1.1 2025/02/15 07:40:14 wiz Exp $
+
+* BSDs use the functions of linux
+
+--- src/megacmdcommonutils.cpp.orig    2025-02-07 09:43:13.320748794 +0100
++++ src/megacmdcommonutils.cpp
+@@ -1128,7 +1128,8 @@ bool isValidEmail(string email)
+                     || (email.find("@") > email.find_last_of(".")));
+ }
+ 
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
++    defined(__NetBSD__) || defined(__DragonFly__)
+ std::string getCurrentExecPath()
+ {
+     std::string path = ".";
Index: pkgsrc/net/megacmd/patches/patch-src_megacmdcommonutils.h
diff -u /dev/null pkgsrc/net/megacmd/patches/patch-src_megacmdcommonutils.h:1.1
--- /dev/null   Sat Feb 15 07:40:14 2025
+++ pkgsrc/net/megacmd/patches/patch-src_megacmdcommonutils.h   Sat Feb 15 07:40:14 2025
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_megacmdcommonutils.h,v 1.1 2025/02/15 07:40:14 wiz Exp $
+
+* BSDs use the functions of linux
+
+--- src/megacmdcommonutils.h.orig      2025-02-07 09:44:39.977015171 +0100
++++ src/megacmdcommonutils.h
+@@ -269,7 +269,8 @@ void sleepMilliSeconds(long microseconds
+ 
+ bool isValidEmail(std::string email);
+ 
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || \
++    defined(__NetBSD__) || defined(__DragonFly__)
+ std::string getCurrentExecPath();
+ #endif
+ 



Home | Main Index | Thread Index | Old Index