megasync: 4.5.3.0 -> 4.6.1.0

with ffmpeg
with freeimage

Signed-off-by: Michal Minář <mm@michojel.cz>
This commit is contained in:
Michal Minář 2021-11-25 11:32:45 +01:00
parent 38116953c2
commit 28b5d59de2
3 changed files with 26 additions and 9 deletions

View file

@ -7,7 +7,8 @@
, curl
, doxygen
, fetchFromGitHub
#, ffmpeg
, ffmpeg
, freeimage
, libmediainfo
, libraw
, libsodium
@ -27,13 +28,13 @@
}:
mkDerivation rec {
pname = "megasync";
version = "4.5.3.0";
version = "4.6.1.0";
src = fetchFromGitHub {
owner = "meganz";
repo = "MEGAsync";
rev = "v${version}_Linux";
sha256 = "1lwjmdbqyxx5wd8nx4mc830fna37jad4h93viwfh5x7sxn104js7";
sha256 = "0v2fvji9hs7valya0wx5qjx01c7yjld6nnp6m9gpxfkr30h5s5wb";
fetchSubmodules = true;
};
@ -52,8 +53,8 @@ mkDerivation rec {
c-ares
cryptopp
curl
# temporarily disable until patched for ffmpeg 4.4
#ffmpeg
ffmpeg
freeimage
libmediainfo
libraw
libsodium
@ -71,6 +72,7 @@ mkDerivation rec {
./noinstall-distro-version.patch
# megasync target is not part of the install rule thanks to a commented block
./install-megasync.patch
./ffmpeg_44.patch
];
postPatch = ''
@ -95,9 +97,8 @@ mkDerivation rec {
"--with-cares"
"--with-cryptopp"
"--with-curl"
# temporarily disable until patched for ffmpeg 4.4
#"--with-ffmpeg"
"--without-freeimage" # unreferenced even when found
"--with-ffmpeg"
"--with-freeimage"
"--without-readline"
"--without-termcap"
"--with-sodium"

View file

@ -0,0 +1,14 @@
Index: megasync-4.6.1.0/src/MEGASync/mega/src/gfx/freeimage.cpp
===================================================================
--- megasync-4.6.1.0.orig/src/MEGASync/mega/src/gfx/freeimage.cpp
+++ megasync-4.6.1.0/src/MEGASync/mega/src/gfx/freeimage.cpp
@@ -253,7 +253,8 @@ bool GfxProcFreeImage::readbitmapFfmpeg(
// Force seeking to key frames
formatContext->seek2any = false;
- videoStream->skip_to_keyframe = true;
+ // no longer exposed in ffmpeg 4.4; the line above should be sufficient
+ //videoStream->skip_to_keyframe = true;
if (decoder->capabilities & CAP_TRUNCATED)
{
codecContext->flags |= CAP_TRUNCATED;

View file

@ -3288,7 +3288,9 @@ with pkgs;
medusa = callPackage ../tools/security/medusa { };
megasync = libsForQt515.callPackage ../applications/misc/megasync { };
megasync = libsForQt5.callPackage ../applications/misc/megasync {
ffmpeg = ffmpeg-full;
};
megacmd = callPackage ../applications/misc/megacmd { };