summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO48
-rw-r--r--010-megasync-libpdfium.patch14
-rw-r--r--020-megasync-ffmpeg.patch26
-rw-r--r--PKGBUILD85
-rw-r--r--pdfium.patch16
5 files changed, 113 insertions, 76 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c83378a17f40..f26b3f4e8dde 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,33 +1,43 @@
pkgbase = megasync
- pkgdesc = Easy automated syncing between your computers and your MEGA cloud drive
- pkgver = 4.3.0.8
+ pkgdesc = Official MEGA desktop application for syncing with MEGA Cloud Drive
+ pkgver = 5.2.1.0
pkgrel = 1
- url = https://github.com/meganz/MEGAsync
- arch = i686
+ url = https://github.com/meganz/MEGAsync/
arch = x86_64
- license = custom:MEGA LIMITED CODE REVIEW LICENCE
- makedepends = qt5-tools
- makedepends = swig
+ license = LicenseRef-Mega-Limited-Code-License
+ makedepends = git
makedepends = doxygen
makedepends = lsb-release
- makedepends = git
+ makedepends = qt5-tools
+ makedepends = swig
depends = c-ares
depends = crypto++
+ depends = curl
+ depends = ffmpeg
+ depends = freeimage
+ depends = icu
+ depends = libmediainfo
+ depends = libpdfium
depends = libsodium
- depends = hicolor-icon-theme
+ depends = libudev.so
depends = libuv
- depends = qt5-svg
- depends = libmediainfo
- depends = libraw
+ depends = libxcb
+ depends = libzen
+ depends = openssl
depends = qt5-base
- depends = ffmpeg
- depends = libpdfium
- source = git+https://github.com/meganz/MEGAsync.git#tag=v4.3.0.8_Linux
+ depends = qt5-quickcontrols
+ depends = qt5-svg
+ depends = qt5-x11extras
+ depends = sqlite
+ depends = zlib
+ depends = hicolor-icon-theme
+ source = git+https://github.com/meganz/MEGAsync.git#tag=v5.2.1.0_Linux
source = meganz-sdk::git+https://github.com/meganz/sdk.git
- source = pdfium.patch
+ source = 010-megasync-libpdfium.patch
+ source = 020-megasync-ffmpeg.patch
+ sha256sums = b3ef84d4a33f6fbced388b882c3189a367cfba63bcc4a55e4ba0ad97dfecad81
sha256sums = SKIP
- sha256sums = SKIP
- sha256sums = f913ff490771e170610829f42f9285412ed8f4e7343f5dd7cb33e3bda4175aba
+ sha256sums = 9a1c1b15f99a5858f91f892a17f80dc3ad08850b90e07d8226f1f2412c97025a
+ sha256sums = 49690421d98e8f61a600ee1ec97adc3e4d1cbe2f736fcf56056da23d02db378b
pkgname = megasync
-
diff --git a/010-megasync-libpdfium.patch b/010-megasync-libpdfium.patch
new file mode 100644
index 000000000000..ca8d3fc4814b
--- /dev/null
+++ b/010-megasync-libpdfium.patch
@@ -0,0 +1,14 @@
+--- a/bindings/qt/sdk.pri
++++ b/bindings/qt/sdk.pri
+@@ -295,6 +295,11 @@ CONFIG(USE_PDFIUM) {
+ DEFINES += HAVE_PDFIUM
+ LIBS += -lpdfium
+ }
++ else:exists(/usr/include/pdfium/fpdfview.h) {
++ DEFINES += HAVE_PDFIUM
++ INCLUDEPATH += /usr/include/pdfium
++ LIBS += -lpdfium
++ }
+ }
+ else {#win/mac
+ DEFINES += HAVE_PDFIUM
diff --git a/020-megasync-ffmpeg.patch b/020-megasync-ffmpeg.patch
new file mode 100644
index 000000000000..b3b1424afad7
--- /dev/null
+++ b/020-megasync-ffmpeg.patch
@@ -0,0 +1,26 @@
+--- a/src/gfx/freeimage.cpp
++++ b/src/gfx/freeimage.cpp
+@@ -209,12 +209,6 @@ bool GfxProviderFreeImage::readbitmapFreeimage(FileSystemAccess*, const LocalPat
+
+ #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"
+@@ -330,10 +324,6 @@ bool GfxProviderFreeImage::readbitmapFfmpeg(FileSystemAccess* fa, const LocalPat
+
+ // Force seeking to key frames
+ formatContext->seek2any = false;
+- if (decoder->capabilities & CAP_TRUNCATED)
+- {
+- codecContext->flags |= CAP_TRUNCATED;
+- }
+
+ AVPixelFormat sourcePixelFormat = static_cast<AVPixelFormat>(codecParm->format);
+ AVPixelFormat targetPixelFormat = AV_PIX_FMT_BGR24; //raw data expected by freeimage is in this format
diff --git a/PKGBUILD b/PKGBUILD
index e7bfcc96cb04..41a31280ee6b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,5 @@
-# Maintainer: Rafał Kozdrój <kozeid2+aur@gmail.com>
+# Maintainer : Daniel Bermond <dbermond@archlinux.org>
+# Contributor: Rafał Kozdrój <kozeid2+aur@gmail.com>
# Contributor: kikadf <kikadf.01@gmail.com>
# Contributor: Daniel Henry <d at hackr dot pl>
# Contributor: Miguel Revilla <yo at miguelrevilla dot com>
@@ -6,38 +7,43 @@
# Contributor: Hexchain Tong <i at hexchain dot org>
pkgname=megasync
-pkgver=4.3.0.8
+pkgver=5.2.1.0
pkgrel=1
-pkgdesc="Easy automated syncing between your computers and your MEGA cloud drive"
-arch=('i686' 'x86_64')
-url="https://github.com/meganz/MEGAsync"
-license=('custom:MEGA LIMITED CODE REVIEW LICENCE')
-depends=('c-ares' 'crypto++' 'libsodium' 'hicolor-icon-theme' 'libuv'
- 'qt5-svg' 'libmediainfo' 'libraw' 'qt5-base' 'ffmpeg' 'libpdfium')
-makedepends=('qt5-tools' 'swig' 'doxygen' 'lsb-release' 'git')
-_extname="_Linux"
-source=("git+https://github.com/meganz/MEGAsync.git#tag=v${pkgver}${_extname}"
- "meganz-sdk::git+https://github.com/meganz/sdk.git"
- "pdfium.patch")
-sha256sums=('SKIP'
+pkgdesc='Official MEGA desktop application for syncing with MEGA Cloud Drive'
+arch=('x86_64')
+url='https://github.com/meganz/MEGAsync/'
+license=('LicenseRef-Mega-Limited-Code-License')
+depends=('c-ares' 'crypto++' 'curl' 'ffmpeg' 'freeimage' 'icu' 'libmediainfo'
+ 'libpdfium' 'libsodium' 'libudev.so' 'libuv' 'libxcb' 'libzen' 'openssl'
+ 'qt5-base' 'qt5-quickcontrols' 'qt5-svg' 'qt5-x11extras' 'sqlite' 'zlib'
+ 'hicolor-icon-theme')
+makedepends=('git' 'doxygen' 'lsb-release' 'qt5-tools' 'swig')
+source=("git+https://github.com/meganz/MEGAsync.git#tag=v${pkgver}_Linux"
+ 'meganz-sdk'::'git+https://github.com/meganz/sdk.git'
+ '010-megasync-libpdfium.patch'
+ '020-megasync-ffmpeg.patch')
+sha256sums=('b3ef84d4a33f6fbced388b882c3189a367cfba63bcc4a55e4ba0ad97dfecad81'
'SKIP'
- 'f913ff490771e170610829f42f9285412ed8f4e7343f5dd7cb33e3bda4175aba')
+ '9a1c1b15f99a5858f91f892a17f80dc3ad08850b90e07d8226f1f2412c97025a'
+ '49690421d98e8f61a600ee1ec97adc3e4d1cbe2f736fcf56056da23d02db378b')
prepare() {
- cd "MEGAsync"
- git submodule init
- git config submodule.src/MEGASync/mega.url "../meganz-sdk"
- git submodule update
-
- cd "src/MEGASync/mega"
- patch -Np1 -i "../../../../pdfium.patch"
+ git -C MEGAsync submodule init
+ git -C MEGAsync config --local submodule.src/MEGASync/mega.url "${srcdir}/meganz-sdk"
+ git -C MEGAsync -c protocol.file.allow='always' submodule update
+
+ patch -d MEGAsync/src/MEGASync/mega -Np1 -i "${srcdir}/010-megasync-libpdfium.patch"
+ patch -d MEGAsync/src/MEGASync/mega -Np1 -i "${srcdir}/020-megasync-ffmpeg.patch"
+
+ cd MEGAsync/src/MEGASync/mega
+ ./autogen.sh
}
build() {
- # build sdk
- cd "MEGAsync/src/MEGASync/mega"
- ./autogen.sh
+ # sdk
+ cd MEGAsync/src/MEGASync/mega
./configure \
+ --prefix="${srcdir}/MEGAsync/src/MEGASync/mega/bindings/qt/3rdparty" \
--disable-shared \
--enable-static \
--disable-silent-rules \
@@ -49,30 +55,27 @@ build() {
--with-sqlite \
--with-cares \
--with-curl \
- --without-freeimage \
+ --with-freeimage \
--with-libuv \
--disable-posix-threads \
--disable-examples \
--with-libzen \
--with-libmediainfo \
- --prefix="${srcdir}/MEGAsync/src/MEGASync/mega/bindings/qt/3rdparty"
-
- # build megasync
- cd "../.."
- qmake-qt5 "CONFIG += FULLREQUIREMENTS" MEGA.pro
+ --with-ffmpeg \
+ --enable-drive-notifications
+
+ # megasync
+ cd "${srcdir}/MEGAsync/src"
+ qmake-qt5 'CONFIG += FULLREQUIREMENTS' MEGA.pro
lrelease-qt5 MEGASync/MEGASync.pro
make
}
package () {
- cd "MEGAsync"
- install -Dm 644 LICENCE.md "${pkgdir}/usr/share/licenses/megasync/LICENCE"
- install -Dm 644 installer/terms.txt "${pkgdir}/usr/share/licenses/megasync/terms.txt"
- install -Dm 644 src/MEGASync/mega/LICENSE "${pkgdir}/usr/share/licenses/megasync/SDK-LICENCE"
-
- cd "src"
- mkdir -pm 755 "${pkgdir}/usr/bin"
- make INSTALL_ROOT="${pkgdir}" TARGET="${pkgdir}/usr/bin/megasync" install
-
- install -Dm 755 "MEGASync/megasync" "${pkgdir}/usr/bin/megasync"
+ make -C MEGAsync/src INSTALL_ROOT="$pkgdir" TARGET="${pkgdir}/usr/bin/megasync" install
+ install -D -m755 MEGAsync/src/MEGASync/megasync -t "${pkgdir}/usr/bin"
+ install -D -m644 MEGAsync/LICENCE.md -t "${pkgdir}/usr/share/licenses/megasync"
+ install -D -m644 MEGAsync/installer/terms.txt -t "${pkgdir}/usr/share/licenses/megasync"
+ install -D -m644 MEGAsync/src/MEGASync/mega/LICENSE "${pkgdir}/usr/share/licenses/megasync/SDK-LICENCE"
+ rm -r "${pkgdir}/usr/share/icons/ubuntu-mono-dark"
}
diff --git a/pdfium.patch b/pdfium.patch
deleted file mode 100644
index 478ba46c20e7..000000000000
--- a/pdfium.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/bindings/qt/sdk.pri b/bindings/qt/sdk.pri
-index aa68cb00d..1d495d78f 100644
---- a/bindings/qt/sdk.pri
-+++ b/bindings/qt/sdk.pri
-@@ -206,6 +206,11 @@ CONFIG(USE_PDFIUM) {
- DEFINES += HAVE_PDFIUM
- LIBS += -lpdfium
- }
-+ else:exists(/usr/include/pdfium/fpdfview.h) {
-+ DEFINES += HAVE_PDFIUM
-+ INCLUDEPATH += /usr/include/pdfium
-+ LIBS += -lpdfium
-+ }
- }
- else {#win/mac
- DEFINES += HAVE_PDFIUM