File fix-build.patch of Package megasync

diff --color -ru a/src/configure b/src/configure
--- a/src/configure	2021-11-17 22:50:23.000000000 +0600
+++ b/src/configure	2021-12-02 12:33:44.251689587 +0600
@@ -73,7 +73,6 @@
 # if archives are not yet downloaded
 if [ ! -d "$archives" ]; then
     mkdir $archives
-    ./MEGASync/mega/contrib/build_sdk.sh $FLAG_CRYPTOPP -n -N $FLAG_CARES $FLAG_LIBMEDIA -f $FLAG_CURL $FLAG_DISABLE_ZLIB $FLAG_RAW -w -s -v -u -o $archives
     rm_archives=1
 fi
 
@@ -88,9 +87,8 @@
     -c \
     -t \
     -s \
-    -v \
     -I \
-    -u \
+    -y \
     -p $root_dir/MEGASync/mega/bindings/qt/3rdparty
 
 # For compatibility with other platforms
diff --color -ru a/src/MEGASync/google_breakpad/client/linux/handler/exception_handler.cc b/src/MEGASync/google_breakpad/client/linux/handler/exception_handler.cc
--- a/src/MEGASync/google_breakpad/client/linux/handler/exception_handler.cc	2021-11-17 22:50:23.000000000 +0600
+++ b/src/MEGASync/google_breakpad/client/linux/handler/exception_handler.cc	2021-12-02 12:34:32.351523641 +0600
@@ -105,7 +105,7 @@
 
 #if !defined(__GLIBC__) || ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 30 )))
 // A wrapper for the tgkill syscall: send a signal to a specific thread.
-static int tgkill(pid_t tgid, pid_t tid, int sig) {
+int tgkill(pid_t tgid, pid_t tid, int sig) {
   return syscall(__NR_tgkill, tgid, tid, sig);
   return 0;
 }
diff --color -ru a/src/MEGASync/mega/contrib/build_sdk.sh b/src/MEGASync/mega/contrib/build_sdk.sh
--- a/src/MEGASync/mega/contrib/build_sdk.sh	2021-11-15 17:28:12.000000000 +0600
+++ b/src/MEGASync/mega/contrib/build_sdk.sh	2021-12-02 12:35:21.083355512 +0600
@@ -1422,8 +1422,6 @@
         zlib_pkg $build_dir $install_dir
     fi
     
-    sqlite_pkg $build_dir $install_dir
-    
     if [ $enable_cares -eq 1 ]; then
         cares_pkg $build_dir $install_dir
     fi
diff --color -ru a/src/MEGASync/mega/src/gfx/freeimage.cpp b/src/MEGASync/mega/src/gfx/freeimage.cpp
--- a/src/MEGASync/mega/src/gfx/freeimage.cpp	2021-11-15 17:28:12.000000000 +0600
+++ b/src/MEGASync/mega/src/gfx/freeimage.cpp	2021-12-02 12:36:16.455164543 +0600
@@ -253,7 +253,8 @@
 
     // 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;
diff --color -ru a/src/MEGASync/MEGASync.pro b/src/MEGASync/MEGASync.pro
--- a/src/MEGASync/MEGASync.pro	2021-11-17 22:50:23.000000000 +0600
+++ b/src/MEGASync/MEGASync.pro	2021-12-02 12:37:14.454964623 +0600
@@ -83,6 +83,8 @@
 CONFIG += USE_MEDIAINFO
 CONFIG += USE_LIBRAW
 CONFIG += USE_FFMPEG
+CONFIG += link_pkgconfig
+PKGCONFIG += libavcodec
 
 macx {
 CONFIG += USE_PDFIUM
@@ -214,7 +216,6 @@
 DEFINES += REQUIRE_HAVE_PDFIUM
 }
 else:contains(BUILD_ARCH, x86_64) { #Notice this might not work for clang!
-DEFINES += REQUIRE_HAVE_PDFIUM
 }
 
 #DEFINES += REQUIRE_ENABLE_CHAT
openSUSE Build Service is sponsored by