From fad94949b18d7ee62a2f5c9127624176ce82670d Mon Sep 17 00:00:00 2001 From: HackerNCoder Date: Tue, 12 Nov 2024 23:11:10 +0100 Subject: [PATCH] megasync: remove freeimage also use lib.cmakeBool --- ...eimage-remove-obsolete-ffmpeg-macros.patch | 26 ------------------- pkgs/applications/misc/megasync/default.nix | 7 ++--- 2 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 pkgs/applications/misc/megasync/010-megasync-freeimage-remove-obsolete-ffmpeg-macros.patch diff --git a/pkgs/applications/misc/megasync/010-megasync-freeimage-remove-obsolete-ffmpeg-macros.patch b/pkgs/applications/misc/megasync/010-megasync-freeimage-remove-obsolete-ffmpeg-macros.patch deleted file mode 100644 index 19c96c78dc61..000000000000 --- a/pkgs/applications/misc/megasync/010-megasync-freeimage-remove-obsolete-ffmpeg-macros.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/src/MEGASync/mega/src/gfx/freeimage.cpp -+++ b/src/MEGASync/mega/src/gfx/freeimage.cpp -@@ -200,12 +200,6 @@ bool GfxProviderFreeImage::readbitmapFreeimage(const LocalPath& imagePath, int s - - #ifdef HAVE_FFMPEG - --#ifdef AV_CODEC_CAP_TRUNCATED --#define CAP_TRUNCATED AV_CODEC_CAP_TRUNCATED --#else --#define CAP_TRUNCATED CODEC_CAP_TRUNCATED --#endif -- - const char *GfxProviderFreeImage::supportedformatsFfmpeg() - { - return ".264.265.3g2.3gp.3gpa.3gpp.3gpp2.mp3" -@@ -321,10 +315,6 @@ bool GfxProviderFreeImage::readbitmapFfmpeg(const LocalPath& imagePath, int size - - // Force seeking to key frames - formatContext->seek2any = false; -- if (decoder->capabilities & CAP_TRUNCATED) -- { -- codecContext->flags |= CAP_TRUNCATED; -- } - - AVPixelFormat sourcePixelFormat = static_cast(codecParm->format); - AVPixelFormat targetPixelFormat = AV_PIX_FMT_BGR24; //raw data expected by freeimage is in this format diff --git a/pkgs/applications/misc/megasync/default.nix b/pkgs/applications/misc/megasync/default.nix index b76650b4f2d7..56c4347b36b7 100644 --- a/pkgs/applications/misc/megasync/default.nix +++ b/pkgs/applications/misc/megasync/default.nix @@ -8,7 +8,6 @@ curl, fetchFromGitHub, ffmpeg, - freeimage, hicolor-icon-theme, icu, libmediainfo, @@ -59,7 +58,6 @@ mkDerivation rec { cryptopp curl ffmpeg - freeimage hicolor-icon-theme icu libmediainfo @@ -82,7 +80,6 @@ mkDerivation rec { ]; patches = [ - ./010-megasync-freeimage-remove-obsolete-ffmpeg-macros.patch ./020-megasync-sdk-fix-cmake-dependencies-detection.patch ./030-megasync-app-fix-cmake-dependencies-detection.patch #Thanks Arch Linux ./040-megasync-fix-cmake-install-bindir.patch @@ -99,8 +96,8 @@ mkDerivation rec { cmakeFlags = [ "-DCMAKE_MODULE_PATH:PATH=${src}/src/MEGASync/mega/contrib/cmake/modules/packages" - "-Wno-dev" - "-DUSE_PDFIUM=FALSE" # PDFIUM is not in nixpkgs + (lib.cmakeBool "USE_PDFIUM" false) # PDFIUM is not in nixpkgs + (lib.cmakeBool "USE_FREEIMAGE" false) # freeimage is insecure ]; meta = with lib; {