public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Samuel Bernardo" <samuelbernardo.mail@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:dev commit in: net-misc/megasync/files/, net-misc/megasync/
Date: Mon, 24 May 2021 10:38:24 +0000 (UTC)	[thread overview]
Message-ID: <1621852696.917e847bf4d5c4f60544b3638bc16e0975b20e27.samuelbernardo@gentoo> (raw)

commit:     917e847bf4d5c4f60544b3638bc16e0975b20e27
Author:     Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com>
AuthorDate: Mon May 24 10:37:27 2021 +0000
Commit:     Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com>
CommitDate: Mon May 24 10:38:16 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=917e847b

net-misc/megasync: 4.5.0.0 and 9999

Correct pending upstream bugs and set the correct sdk commit.
Some additional improvements in ebuild.

Package-Manager: Portage-3.0.18, Repoman-3.0.2
Signed-off-by: Samuel Bernardo <samuelbernardo.mail <AT> gmail.com>

 .../megasync/files/megasync-4.5.0.0_ffmpeg.patch   | 24 +++++++++++++++
 .../megasync/files/megasync-4.5.0.0_pdfium.patch   | 16 ++++++++++
 net-misc/megasync/megasync-4.5.0.0.ebuild          | 20 +++++++++----
 net-misc/megasync/megasync-9999.ebuild             | 34 +++++++++++++++++-----
 4 files changed, 81 insertions(+), 13 deletions(-)

diff --git a/net-misc/megasync/files/megasync-4.5.0.0_ffmpeg.patch b/net-misc/megasync/files/megasync-4.5.0.0_ffmpeg.patch
new file mode 100644
index 000000000..a30d4a1ef
--- /dev/null
+++ b/net-misc/megasync/files/megasync-4.5.0.0_ffmpeg.patch
@@ -0,0 +1,24 @@
+diff -Naur 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-05-23 02:28:08.694081111 +0100
++++ b/src/MEGASync/mega/src/gfx/freeimage.cpp	2021-05-23 02:29:56.189964969 +0100
+@@ -188,7 +188,7 @@
+ 
+     // Force seeking to key frames
+     formatContext->seek2any = false;
+-    videoStream->skip_to_keyframe = true;
++    //videoStream->skip_to_keyframe = true;
+     if (decoder->capabilities & CAP_TRUNCATED)
+     {
+         codecContext.flags |= CAP_TRUNCATED;
+diff -Naur a/src/MEGASync/mega/src/gfx/qt.cpp b/src/MEGASync/mega/src/gfx/qt.cpp
+--- a/src/MEGASync/mega/src/gfx/qt.cpp	2021-05-23 02:28:08.694081111 +0100
++++ b/src/MEGASync/mega/src/gfx/qt.cpp	2021-05-23 02:29:36.172545153 +0100
+@@ -1209,7 +1209,7 @@
+ 
+     // Force seeking to key frames
+     formatContext->seek2any = false;
+-    videoStream->skip_to_keyframe = true;
++    //videoStream->skip_to_keyframe = true;
+     if (decoder->capabilities & CAP_TRUNCATED)
+     {
+         codecContext.flags |= CAP_TRUNCATED;

diff --git a/net-misc/megasync/files/megasync-4.5.0.0_pdfium.patch b/net-misc/megasync/files/megasync-4.5.0.0_pdfium.patch
new file mode 100644
index 000000000..141ab3057
--- /dev/null
+++ b/net-misc/megasync/files/megasync-4.5.0.0_pdfium.patch
@@ -0,0 +1,16 @@
+diff --git a/bindings/qt/sdk.pri b/bindings/qt/sdk.pri
+index 83ddc2e2f..46aa06d33 100644
+--- a/bindings/qt/sdk.pri
++++ b/bindings/qt/sdk.pri
+@@ -255,6 +255,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/net-misc/megasync/megasync-4.5.0.0.ebuild b/net-misc/megasync/megasync-4.5.0.0.ebuild
index 604202807..54c24108f 100644
--- a/net-misc/megasync/megasync-4.5.0.0.ebuild
+++ b/net-misc/megasync/megasync-4.5.0.0.ebuild
@@ -14,14 +14,16 @@ HOMEPAGE="
 if [[ ${PV} == 9999 ]];then
 	inherit git-r3
 	EGIT_REPO_URI="https://github.com/meganz/MEGAsync"
+	EGIT_BRANCH="master"
+	EGIT_SUBMODULES=( '*' )
 else
-	MEGA_SDK_REV="37b346c2e119559e40c08f43e1a8f54353e7ad59" # commit of src/MEGASync/mega submodule
+	MEGA_SDK_REV="c11a688d578e16dc25d4c94fee7995730be1aa50" # commit of src/MEGASync/mega submodule
 	SRC_URI="
 		https://github.com/meganz/MEGAsync/archive/v${PV}_Win.tar.gz -> ${P}.tar.gz
 		https://github.com/meganz/sdk/archive/${MEGA_SDK_REV}.tar.gz -> ${PN}-sdk-${PV}.tar.gz
 	"
 	KEYWORDS="~amd64 ~x86"
-	# 4.3.8.0 has no dedicated linux tag
+	# 4.5.0.0 has no dedicated linux tag
 	S="${WORKDIR}"/MEGAsync-${PV}_Win
 fi
 
@@ -76,6 +78,14 @@ src_prepare() {
 		rmdir src/MEGASync/mega
 		mv "${WORKDIR}"/sdk-${MEGA_SDK_REV} src/MEGASync/mega
 	fi
+	if [ -e "${FILESDIR}/${P}_pdfium.patch" ]; then
+		cd "${S}/src/MEGASync/mega"
+		eapply -Np1 "${FILESDIR}/${P}_pdfium.patch"
+		cd "${S}"
+	fi
+	if has_version ">=media-video/ffmpeg-4.4" && [ -e "${FILESDIR}/${P}_ffmpeg.patch" ]; then
+		eapply "${FILESDIR}/${P}_ffmpeg.patch"
+	fi
 	if use dolphin; then
 		# use the kde5 CMakeLists instead of the kde 4 version
 		mv src/MEGAShellExtDolphin/CMakeLists_kde5.txt src/MEGAShellExtDolphin/CMakeLists.txt || die
@@ -83,12 +93,12 @@ src_prepare() {
 	else
 		default
 	fi
-	cd src/MEGASync/mega
+	cd "${S}/src/MEGASync/mega"
 	eautoreconf
 }
 
 src_configure() {
-	cd src/MEGASync/mega
+	cd "${S}/src/MEGASync/mega"
 	econf \
 		"--disable-silent-rules" \
 		"--disable-curl-checks" \
@@ -109,7 +119,7 @@ src_configure() {
 		$(use_enable python) \
 		"--enable-chat" \
 		"--enable-gcc-hardening"
-	cd ../..
+	cd "${S}/src"
 
 	local myeqmakeargs=(
 		MEGA.pro

diff --git a/net-misc/megasync/megasync-9999.ebuild b/net-misc/megasync/megasync-9999.ebuild
index 5447073f4..54c24108f 100644
--- a/net-misc/megasync/megasync-9999.ebuild
+++ b/net-misc/megasync/megasync-9999.ebuild
@@ -14,14 +14,17 @@ HOMEPAGE="
 if [[ ${PV} == 9999 ]];then
 	inherit git-r3
 	EGIT_REPO_URI="https://github.com/meganz/MEGAsync"
+	EGIT_BRANCH="master"
+	EGIT_SUBMODULES=( '*' )
 else
-	MEGA_SDK_REV="ba4834cb6c22f4e996f328db3aa5b82ef20eed3e" # commit of src/MEGASync/mega submodule
+	MEGA_SDK_REV="c11a688d578e16dc25d4c94fee7995730be1aa50" # commit of src/MEGASync/mega submodule
 	SRC_URI="
-		https://github.com/meganz/MEGAsync/archive/v${PV}.0_Linux.tar.gz -> ${P}.tar.gz
+		https://github.com/meganz/MEGAsync/archive/v${PV}_Win.tar.gz -> ${P}.tar.gz
 		https://github.com/meganz/sdk/archive/${MEGA_SDK_REV}.tar.gz -> ${PN}-sdk-${PV}.tar.gz
 	"
 	KEYWORDS="~amd64 ~x86"
-	S="${WORKDIR}"/MEGAsync-${PV}.0_Linux
+	# 4.5.0.0 has no dedicated linux tag
+	S="${WORKDIR}"/MEGAsync-${PV}_Win
 fi
 
 LICENSE="MEGA"
@@ -62,25 +65,40 @@ DEPEND="
 	dev-qt/qtx11extras:5
 "
 BDEPEND="
-	app-doc/doxygen
 	dev-lang/swig
 	dev-qt/linguist-tools
 "
 
 DOCS=( CREDITS.md README.md )
 
+CMAKE_USE_DIR="${S}/src/MEGAShellExtDolphin"
+
 src_prepare() {
 	if [[ ${PV} != 9999 ]]; then
 		rmdir src/MEGASync/mega
 		mv "${WORKDIR}"/sdk-${MEGA_SDK_REV} src/MEGASync/mega
 	fi
-	default
-	cd src/MEGASync/mega
+	if [ -e "${FILESDIR}/${P}_pdfium.patch" ]; then
+		cd "${S}/src/MEGASync/mega"
+		eapply -Np1 "${FILESDIR}/${P}_pdfium.patch"
+		cd "${S}"
+	fi
+	if has_version ">=media-video/ffmpeg-4.4" && [ -e "${FILESDIR}/${P}_ffmpeg.patch" ]; then
+		eapply "${FILESDIR}/${P}_ffmpeg.patch"
+	fi
+	if use dolphin; then
+		# use the kde5 CMakeLists instead of the kde 4 version
+		mv src/MEGAShellExtDolphin/CMakeLists_kde5.txt src/MEGAShellExtDolphin/CMakeLists.txt || die
+		cmake_src_prepare
+	else
+		default
+	fi
+	cd "${S}/src/MEGASync/mega"
 	eautoreconf
 }
 
 src_configure() {
-	cd src/MEGASync/mega
+	cd "${S}/src/MEGASync/mega"
 	econf \
 		"--disable-silent-rules" \
 		"--disable-curl-checks" \
@@ -101,7 +119,7 @@ src_configure() {
 		$(use_enable python) \
 		"--enable-chat" \
 		"--enable-gcc-hardening"
-	cd ../..
+	cd "${S}/src"
 
 	local myeqmakeargs=(
 		MEGA.pro


             reply	other threads:[~2021-05-24 10:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24 10:38 Samuel Bernardo [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-11-07 14:03 [gentoo-commits] repo/proj/guru:dev commit in: net-misc/megasync/files/, net-misc/megasync/ Takuya Wakazono
2023-11-23  6:09 Takuya Wakazono
2024-07-12 17:56 Takuya Wakazono
2024-10-03 16:08 Takuya Wakazono
2025-01-02 13:47 Takuya Wakazono
2025-02-06 13:04 Takuya Wakazono
2025-03-05 14:23 Takuya Wakazono

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1621852696.917e847bf4d5c4f60544b3638bc16e0975b20e27.samuelbernardo@gentoo \
    --to=samuelbernardo.mail@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox