summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-misc/megasync/Manifest1
-rw-r--r--net-misc/megasync/files/megasync-qmake.diff50
-rw-r--r--net-misc/megasync/megasync-3.6.0.0.ebuild76
3 files changed, 127 insertions, 0 deletions
diff --git a/net-misc/megasync/Manifest b/net-misc/megasync/Manifest
new file mode 100644
index 00000000..f7c6d22a
--- /dev/null
+++ b/net-misc/megasync/Manifest
@@ -0,0 +1 @@
+DIST megasync-3.6.0.0.tar.gz 11077862 BLAKE2B 1351d3a370cba2dc82025008a93c08af2e049422e2ca3f493974da8ca7024e34ec2cd7b0cb21d5172a586aa381a0798a7fb490a14c96b00911b22d4700735192 SHA512 5b60182ed4d7924159c31842f7706ba21a770fec662258083e36c788876c890fd84c2099bc834450555e1ecc8457f36ffcde2aca3b1bd12d026210f27b3a05c2
diff --git a/net-misc/megasync/files/megasync-qmake.diff b/net-misc/megasync/files/megasync-qmake.diff
new file mode 100644
index 00000000..357454d7
--- /dev/null
+++ b/net-misc/megasync/files/megasync-qmake.diff
@@ -0,0 +1,50 @@
+--- a/src/MEGAShellExtNautilus/MEGAShellExtNautilus.pro
++++ b/src/MEGAShellExtNautilus/MEGAShellExtNautilus.pro
+@@ -1,6 +1,7 @@
+ QT -= core gui
+
+-TARGET = MEGAShellExtNautilus
++TARGET = libMEGAShellExtNautilus
++CONFIG += plugin no_plugin_name_prefix
+ TEMPLATE = lib
+
+ SOURCES += mega_ext_module.c \
+@@ -41,5 +42,4 @@ INSTALLS += emblems32 emblems64
+ !contains(DEFINES, no_desktop) {
+ update_cache.commands = gtk-update-icon-cache -f -t $${HICOLOR} || true
+ update_cache.path = $$PWD
+- INSTALLS += update_cache
+ }
+--- a/src/MEGASync/platform/platform.pri
++++ b/src/MEGASync/platform/platform.pri
+@@ -34,7 +34,8 @@ unix:!macx {
+ system(command -v lsb_release): version.commands = lsb_release -rs > $$version.target
+ version.files = $$version.target
+
+- INSTALLS += distro version
++ target.path = $$PREFIX/bin
++ INSTALLS += target
+
+ QT += dbus
+ SOURCES += $$PWD/linux/LinuxPlatform.cpp \
+@@ -62,7 +62,6 @@ unix:!macx {
+ # desktop
+ desktop.path = $$DESKTOP_DESTDIR/share/applications
+ desktop.files = $$PWD/linux/data/megasync.desktop
+- desktop.commands = update-desktop-database &> /dev/null || true
+ INSTALLS += desktop
+
+ HICOLOR = $$DESKTOP_DESTDIR/share/icons/hicolor
+--- a/src/MEGA.pro
++++ b/src/MEGA.pro
+@@ -17,8 +17,9 @@ win32 {
+ unix:!macx {
+ CONFIG(with_ext) {
+ SUBDIRS += MEGAShellExtNautilus
++ }
++ CONFIG(with_thu) {
+ SUBDIRS += MEGAShellExtThunar
+- SUBDIRS += MEGAShellExtDolphin
+ }
+ }
+
diff --git a/net-misc/megasync/megasync-3.6.0.0.ebuild b/net-misc/megasync/megasync-3.6.0.0.ebuild
new file mode 100644
index 00000000..43d089e6
--- /dev/null
+++ b/net-misc/megasync/megasync-3.6.0.0.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+CMAKE_USE_DIR="${S}/src/MEGAShellExtDolphin"
+CMAKE_IN_SOURCE_BUILD=y
+inherit gnome2 cmake-utils qmake-utils
+
+DESCRIPTION="Easy automated syncing with MEGA Cloud Drive"
+HOMEPAGE="https://github.com/meganz/MEGAsync"
+SRC_URI="https://github.com/meganz/MEGAsync/archive/v${PV}_Linux.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+IUSE="dolphin +mediainfo nautilus +qt5 thunar"
+REQUIRED_USE="dolphin? ( qt5 )"
+
+KEYWORDS="~amd64"
+
+RDEPEND="
+ net-misc/meganz-sdk[libuv,mediainfo?,qt,sodium(+),sqlite]
+ qt5? (
+ dev-qt/qtsvg:5
+ dev-qt/qtdbus:5
+ )
+ !qt5? (
+ dev-qt/qtsvg:4
+ dev-qt/qtdbus:4
+ )
+ dolphin? ( kde-apps/dolphin )
+ nautilus? ( >=gnome-base/nautilus-3 )
+ thunar? ( xfce-base/thunar )
+ mediainfo? ( media-libs/libmediainfo )"
+DEPEND="${RDEPEND}
+ qt5? ( dev-qt/linguist-tools:5 )"
+
+S="${WORKDIR}"/MEGAsync-"${PV}"_Linux
+
+src_prepare() {
+ local PATCHES=(
+ "${FILESDIR}"/${PN}-qmake.diff
+ )
+ cp -r "${EROOT}"usr/share/meganz-sdk/bindings "${S}"/src/MEGASync/mega/
+ cmake-utils_src_prepare
+ mv -f src/MEGAShellExtDolphin/CMakeLists{_kde5,}.txt
+ rm -f src/MEGAShellExtDolphin/megasync-plugin.moc
+ use mediainfo || sed -e '/CONFIG += USE_MEDIAINFO/d' \
+ -i src/MEGASync/MEGASync.pro
+}
+
+src_configure() {
+ cd src
+ local eqmakeargs=(
+ CONFIG$(usex nautilus + -)=with_ext
+ CONFIG$(usex thunar + -)=with_thu
+ CONFIG-=with_updater
+ CONFIG-=with_tools
+ )
+ eqmake$(usex qt5 5 4) "${eqmakeargs[@]}"
+ use dolphin && cmake-utils_src_configure
+}
+
+src_compile() {
+ cd src
+ $(usex qt5 $(qt5_get_bindir) $(qt4_get_bindir))/lrelease \
+ MEGASync/MEGASync.pro
+ emake
+ use dolphin && cmake-utils_src_compile
+}
+
+src_install() {
+ local DOCS=( CREDITS.md README.md )
+ einstalldocs
+ emake -C src INSTALL_ROOT="${D}" install
+ use dolphin && cmake-utils_src_install
+}