commit:     16dfc71df33b7e3b827379c13e0ec9f5bb471538
Author:     Takuya Wakazono <pastalian46 <AT> gmail <DOT> com>
AuthorDate: Sun Nov  5 04:58:01 2023 +0000
Commit:     Takuya Wakazono <pastalian46 <AT> gmail <DOT> com>
CommitDate: Sun Nov  5 04:58:01 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=16dfc71d

net-misc/megasync: fix USE flags for file manager

Signed-off-by: Takuya Wakazono <pastalian46 <AT> gmail.com>

 .../files/megasync-4.10.0.0_fix-build.patch        | 32 +++++++++++++++
 net-misc/megasync/megasync-4.10.0.0.ebuild         | 46 +++++++++++-----------
 net-misc/megasync/metadata.xml                     |  1 +
 3 files changed, 57 insertions(+), 22 deletions(-)

diff --git a/net-misc/megasync/files/megasync-4.10.0.0_fix-build.patch 
b/net-misc/megasync/files/megasync-4.10.0.0_fix-build.patch
new file mode 100644
index 0000000000..dfb6b9f3b1
--- /dev/null
+++ b/net-misc/megasync/files/megasync-4.10.0.0_fix-build.patch
@@ -0,0 +1,32 @@
+diff --git a/src/MEGAShellExtNautilus/MEGAShellExtNautilus.pro 
b/src/MEGAShellExtNautilus/MEGAShellExtNautilus.pro
+index 06cbb08cd..7ca767132 100644
+--- a/src/MEGAShellExtNautilus/MEGAShellExtNautilus.pro
++++ b/src/MEGAShellExtNautilus/MEGAShellExtNautilus.pro
+@@ -52,5 +52,4 @@ INSTALLS += emblems32  emblems64
+ !contains(DEFINES, no_desktop) {
+     update_cache.commands = gtk-update-icon-cache -f -t $${HICOLOR} || true
+     update_cache.path = $${HICOLOR}
+-    INSTALLS += update_cache
+ }
+diff --git a/src/MEGAShellExtNemo/MEGAShellExtNemo.pro 
b/src/MEGAShellExtNemo/MEGAShellExtNemo.pro
+index 33668b4ee..061e0d445 100644
+--- a/src/MEGAShellExtNemo/MEGAShellExtNemo.pro
++++ b/src/MEGAShellExtNemo/MEGAShellExtNemo.pro
+@@ -43,5 +43,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
+ }
+diff --git a/src/MEGASync/platform/platform.pri 
b/src/MEGASync/platform/platform.pri
+index 99f4dbd4f..ef5553508 100644
+--- a/src/MEGASync/platform/platform.pri
++++ b/src/MEGASync/platform/platform.pri
+@@ -89,7 +89,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

diff --git a/net-misc/megasync/megasync-4.10.0.0.ebuild 
b/net-misc/megasync/megasync-4.10.0.0.ebuild
index 9eb43c9724..e71a988b03 100644
--- a/net-misc/megasync/megasync-4.10.0.0.ebuild
+++ b/net-misc/megasync/megasync-4.10.0.0.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit autotools desktop qmake-utils xdg cmake
+inherit autotools cmake qmake-utils xdg
 
 DESCRIPTION="The official Qt-based program for syncing your MEGA account in 
your PC"
 HOMEPAGE="
@@ -29,7 +29,7 @@ fi
 
 LICENSE="MEGA"
 SLOT="0"
-IUSE="+cryptopp +curl +sqlite +zlib dolphin examples freeimage java nautilus 
php python readline threads thunar"
+IUSE="+cryptopp +curl +sqlite +zlib dolphin examples freeimage java nautilus 
nemo php python readline threads thunar"
 
 RDEPEND="
        app-arch/xz-utils
@@ -44,7 +44,8 @@ RDEPEND="
        curl? ( net-misc/curl[ssl,curl_ssl_openssl(-)] )
        dolphin? ( kde-apps/dolphin )
        freeimage? ( media-libs/freeimage )
-       nautilus? ( >=gnome-base/nautilus-3 )
+       nautilus? ( >=gnome-base/nautilus-43 )
+       nemo? ( gnome-extra/nemo )
        readline? ( sys-libs/readline:0 )
        sqlite? ( dev-db/sqlite:3 )
        thunar? ( xfce-base/thunar )
@@ -67,30 +68,28 @@ DEPEND="
 BDEPEND="
        dev-lang/swig
        dev-qt/linguist-tools
+       dolphin? ( kde-frameworks/extra-cmake-modules )
 "
 
-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
+               mv "${WORKDIR}/sdk-${MEGA_SDK_REV}" src/MEGASync/mega
        fi
-       cd "${S}/src/MEGASync/mega"
-       eapply -Np1 "${FILESDIR}/${PN}-4.5.0.0_pdfium.patch"
-       cd "${S}"
+
        if has_version ">=media-video/ffmpeg-6.0"; then
                eapply "${FILESDIR}/${PN}-4.10.0.0_ffmpeg6.patch"
        fi
+       eapply "${FILESDIR}/${PN}-4.10.0.0_fix-build.patch"
+
        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
 }
@@ -116,33 +115,36 @@ src_configure() {
                $(use_enable php) \
                $(use_enable python) \
                "--enable-gcc-hardening"
-       cd "${S}/src"
 
+       cd "${S}/src"
        local myeqmakeargs=(
                MEGA.pro
                CONFIG+="release"
                $(usex freeimage "" "CONFIG+=nofreeimage")
+               $(usev nautilus "SUBDIRS+=MEGAShellExtNautilus")
+               $(usev nemo "SUBDIRS+=MEGAShellExtNemo")
+               $(usev thunar "SUBDIRS+=MEGAShellExtThunar")
        )
 
        eqmake5 ${myeqmakeargs[@]}
-       use dolphin && cmake_src_configure
        $(qt5_get_bindir)/lrelease MEGASync/MEGASync.pro
+
+       use dolphin && cmake_src_configure
 }
 
 src_compile() {
-       emake -C src INSTALL_ROOT=. || die
+       emake -C src
+
        use dolphin && cmake_src_compile
 }
 
 src_install() {
-       use dolphin && cmake_src_install
-       einstalldocs
+       emake -C src INSTALL_ROOT="${D}" install
+       dobin "src/MEGASync/${PN}"
+       dodoc CREDITS.md README.md
 
-       dobin src/MEGASync/${PN}
-       domenu src/MEGASync/platform/linux/data/${PN}.desktop
+       rm -rf "${D}"/usr/share/doc/megasync
+       rm -rf "${D}"/usr/share/icons/ubuntu-mono-dark
 
-       cd src/MEGASync/platform/linux/data/icons/hicolor
-       for size in 16x16 32x32 48x48 128x128 256x256;do
-               doicon -s $size $size/apps/mega.png
-       done
+       use dolphin && cmake_src_install
 }

diff --git a/net-misc/megasync/metadata.xml b/net-misc/megasync/metadata.xml
index 45ac224f44..548893d860 100644
--- a/net-misc/megasync/metadata.xml
+++ b/net-misc/megasync/metadata.xml
@@ -12,6 +12,7 @@
        <use>
                <flag name='dolphin'>Upload your files to your Mega account 
from Dolphin file manager.</flag>
                <flag name='nautilus'>Upload your files to your Mega account 
from nautilus.</flag>
+               <flag name='nemo'>Upload your files to your Mega account from 
Nemo.</flag>
                <flag name='thunar'>Upload your files to your Mega account from 
Thunar.</flag>
                <flag name='cryptopp'>Compile with Crypto++ Library.</flag>
                <flag name='freeimage'>Use freeimage to manage graphic images 
format.</flag>

Reply via email to