net-misc/megasync: add 5.3.0.0

Set myself as a primary maintainer since the original maintainer lacks
time to maintain this.

Signed-off-by: Takuya Wakazono <pastalian46@gmail.com>
This commit is contained in:
Takuya Wakazono
2024-07-13 02:28:40 +09:00
parent 353ff10e34
commit 66b1ec0cd4
7 changed files with 320 additions and 61 deletions

View File

@@ -1,2 +1,4 @@
DIST megasync-5.2.1.0.tar.gz 23819376 BLAKE2B 249471d14f146b0bbe4c97690c1832d63f06005b2dcc6f334a9fe2a33672d0b1bce3b738270d28a1674804320f53b25e3533548ed4a6f1af01ce91e24d138e32 SHA512 f667e73a8e6527cb79608584d486aeb9a8ebde4b6f3bc10f560030ee725575622c561fe75a217e8d9d97ddf204fd94ce258cc2b70a200baead7a5e44ab285aa8
DIST megasync-5.3.0.0.tar.gz 24307650 BLAKE2B 4b4253f40abea54856d869ba5094d18dd7239f3c7a9d25611e1a053d370e943f29f3cbb4a672b559b1908600f6eafea586ec65e8a24cceb44a592337ff5e0f8a SHA512 61a4e0bf351816113bca23328dfe1872a031f6457368127dd1ec55f5147d22059e3cbb8998497398dbf706050eb228e09b41ed6300262a89c3abf71e1152f0e7
DIST megasync-sdk-5.2.1.0.tar.gz 3809248 BLAKE2B acf9be7b3d0faf843e394b717cb75ee703aadfdf2b79a6ea06eccb49d6d179ef8b2f3d430edce4bc37e6e53a45f1eab3865c433d015cf8d8412d6b037edbd81a SHA512 2c65c53050dcd7757a1015200d4e25ca260e833105e577c6506d36efa280c5e5e511e8b5ea029a6efac09f36ffd6bfdb49b71417d32457d42397de83240451ec
DIST megasync-sdk-5.3.0.0.tar.gz 4146154 BLAKE2B 7b73f4475958f0d2ad341638f0f5c7ab1c9570f38ecceb7393268b4307cd4052a6ba5b358fabf3138ba7ad6e503c18c4314204d2a4c8c2d19846e4093889b24e SHA512 8b301cf8654112893bb79e3ce8f9f2c7ee27bafcc68df6f4bceb88bb54a2f5168cedf34bd262dfeb0ef0c67b46c9420259d7f0f13bc067f9ae7799cc09d28abc

View File

@@ -0,0 +1,27 @@
--- a/contrib/cmake/modules/desktopapp_configuration.cmake
+++ b/contrib/cmake/modules/desktopapp_configuration.cmake
@@ -29,8 +29,6 @@ if(UNIX AND NOT APPLE)
# Note: using cmake --install --prefix /some/prefix will keep the RPATH as configured above.
# Used for building packages: in which install dir is a path construction folder that will not be there in packages
- set(CMAKE_INSTALL_LIBDIR "opt/megasync/lib") # override default "lib" from GNUInstallDirs
- set(CMAKE_INSTALL_BINDIR "usr/bin") # override default "bin" from GNUInstallDirs
# Override CMAKE_INSTALL_PREFIX
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) # In consecutive runs it will always be undef/false
--- a/src/MEGASync/CMakeLists.txt
+++ b/src/MEGASync/CMakeLists.txt
@@ -142,13 +142,6 @@ if (UNIX AND NOT APPLE)
set(vcpkg_lib_folder "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/$<$<CONFIG:Debug>:debug/>lib/")
- install(DIRECTORY "${vcpkg_lib_folder}"
- TYPE LIB # In CMAKE_INSTALL_LIBDIR directory
- FILES_MATCHING
- PATTERN "*.so*"
- PATTERN "manual-link" EXCLUDE
- PATTERN "pkgconfig" EXCLUDE
- )
if(DEPLOY_QT_LIBRARIES)
include(desktopapp_deploy_qt)

View File

@@ -0,0 +1,12 @@
--- a/src/MEGASync/control/control.cmake
+++ b/src/MEGASync/control/control.cmake
@@ -71,6 +71,9 @@ set(DESKTOP_APP_CONTROL_SOURCES
control/StatsEventHandler.cpp
)
+find_package(ZLIB REQUIRED)
+target_link_libraries(MEGAsync PRIVATE ZLIB::ZLIB)
+
target_sources(MEGAsync
PRIVATE
${DESKTOP_APP_CONTROL_HEADERS}

View File

@@ -0,0 +1,11 @@
--- a/src/MEGASync/mega/contrib/cmake/modules/sdklib_libraries.cmake
+++ b/src/MEGASync/mega/contrib/cmake/modules/sdklib_libraries.cmake
@@ -95,7 +95,7 @@ macro(load_sdklib_libraries)
find_package(PkgConfig REQUIRED) # For libraries loaded using pkg-config
- pkg_check_modules(cryptopp REQUIRED IMPORTED_TARGET libcrypto++)
+ pkg_check_modules(cryptopp REQUIRED IMPORTED_TARGET libcryptopp)
target_link_libraries(SDKlib PUBLIC PkgConfig::cryptopp) # TODO: Private for SDK core
pkg_check_modules(sodium REQUIRED IMPORTED_TARGET libsodium)

View File

@@ -0,0 +1,172 @@
# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake flag-o-matic qmake-utils xdg
DESCRIPTION="The official Qt-based program for syncing your MEGA account in your PC"
HOMEPAGE="
https://mega.io
https://github.com/meganz/MEGAsync
"
if [[ ${PV} == 9999 ]];then
inherit git-r3
EGIT_REPO_URI="https://github.com/meganz/MEGAsync"
EGIT_BRANCH="master"
EGIT_SUBMODULES=( '*' )
else
MEGA_SDK_REV="eb8dba09149e1aad0210c3591f3ef6e50022f714" # commit of src/MEGASync/mega submodule
MEGA_TAG_SUFFIX="Linux"
SRC_URI="
https://github.com/meganz/MEGAsync/archive/v${PV}_${MEGA_TAG_SUFFIX}.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}_${MEGA_TAG_SUFFIX}
fi
LICENSE="MEGA"
SLOT="0"
IUSE="dolphin mediainfo nautilus nemo thumbnail thunar"
DEPEND="
dev-db/sqlite:3
dev-libs/crypto++:=
dev-libs/icu:=
dev-libs/libsodium:=
dev-libs/libuv:=
dev-libs/openssl:0=
dev-qt/qtconcurrent:5
dev-qt/qtcore:5
dev-qt/qtdbus:5
dev-qt/qtdeclarative:5
dev-qt/qtgui:5
dev-qt/qtnetwork:5
dev-qt/qtimageformats:5
dev-qt/qtsvg:5
dev-qt/qtwidgets:5
dev-qt/qtx11extras:5
net-dns/c-ares:=
net-misc/curl[ssl]
sys-libs/zlib
x11-libs/libxcb:=
dolphin? (
kde-apps/dolphin:5
kde-frameworks/kcoreaddons:5
kde-frameworks/kio:5
kde-frameworks/kwidgetsaddons:5
)
mediainfo? (
media-libs/libmediainfo
media-libs/libzen
)
nautilus? (
dev-libs/glib:2
>=gnome-base/nautilus-43
)
nemo? (
dev-libs/glib:2
gnome-extra/nemo
)
thumbnail? (
media-libs/freeimage
media-video/ffmpeg:=
)
thunar? ( xfce-base/thunar:= )
"
RDEPEND="${DEPEND}"
BDEPEND="
dev-qt/linguist-tools:5
dolphin? ( kde-frameworks/extra-cmake-modules )
"
PATCHES=(
"${FILESDIR}/${PN}-4.10.0.0_ffmpeg6.patch"
"${FILESDIR}/${PN}-4.10.0.0_fix-build.patch"
"${FILESDIR}/${PN}-5.3.0.0-link-zlib.patch"
"${FILESDIR}/${PN}-5.3.0.0-fix-install-dir.patch"
"${FILESDIR}/${PN}-5.3.0.0-rename-libcryptopp.patch"
)
BUILD_DIR_DOLPHIN="${S}_dolphin"
dolphin_run() {
if use dolphin; then
cd "${S}/src/MEGAShellExtDolphin" || die
BUILD_DIR="${BUILD_DIR_DOLPHIN}" CMAKE_USE_DIR="${S}/src/MEGAShellExtDolphin" "$@"
fi
}
nautilus_run() {
if use nautilus; then
cd "${S}/src/MEGAShellExtNautilus" || die
"$@"
fi
}
nemo_run() {
if use nemo; then
cd "${S}/src/MEGAShellExtNemo" || die
"$@"
fi
}
thunar_run() {
if use thunar; then
cd "${S}/src/MEGAShellExtThunar" || die
"$@"
fi
}
src_prepare() {
if [[ ${PV} != 9999 ]]; then
rmdir src/MEGASync/mega || die
mv "${WORKDIR}/sdk-${MEGA_SDK_REV}" src/MEGASync/mega || die
fi
cmake_src_prepare
}
src_configure() {
# https://github.com/meganz/sdk/issues/2679
append-cppflags -DNDEBUG
local mycmakeargs=(
# build internal libs as static
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_MODULE_PATH="${S}/src/MEGASync/mega/contrib/cmake/modules/packages"
-DENABLE_DESKTOP_UPDATE_GEN=OFF
-DUSE_FFMPEG=$(usex thumbnail)
-DUSE_FREEIMAGE=$(usex thumbnail)
-DUSE_MEDIAINFO=$(usex mediainfo)
-DUSE_PDFIUM=OFF
-DUSE_READLINE=OFF
)
cmake_src_configure
unset mycmakeargs
dolphin_run cmake_src_configure
nautilus_run eqmake5
nemo_run eqmake5
thunar_run eqmake5
}
src_compile() {
cmake_src_compile
dolphin_run cmake_src_compile
nautilus_run emake
nemo_run emake
thunar_run emake
}
src_install() {
cmake_src_install
dolphin_run cmake_src_install
nautilus_run emake INSTALL_ROOT="${D}" install
nemo_run emake INSTALL_ROOT="${D}" install
thunar_run emake INSTALL_ROOT="${D}" install
}

View File

@@ -3,7 +3,7 @@
EAPI=8
inherit autotools cmake qmake-utils xdg
inherit cmake flag-o-matic qmake-utils xdg
DESCRIPTION="The official Qt-based program for syncing your MEGA account in your PC"
HOMEPAGE="
@@ -17,7 +17,7 @@ if [[ ${PV} == 9999 ]];then
EGIT_BRANCH="master"
EGIT_SUBMODULES=( '*' )
else
MEGA_SDK_REV="f71b60452a5d6c32bebc5125a13977a335d78e71" # commit of src/MEGASync/mega submodule
MEGA_SDK_REV="eb8dba09149e1aad0210c3591f3ef6e50022f714" # commit of src/MEGASync/mega submodule
MEGA_TAG_SUFFIX="Linux"
SRC_URI="
https://github.com/meganz/MEGAsync/archive/v${PV}_${MEGA_TAG_SUFFIX}.tar.gz -> ${P}.tar.gz
@@ -29,7 +29,7 @@ fi
LICENSE="MEGA"
SLOT="0"
IUSE="dolphin freeimage nautilus nemo thunar"
IUSE="dolphin mediainfo nautilus nemo thumbnail thunar"
DEPEND="
dev-db/sqlite:3
@@ -48,26 +48,35 @@ DEPEND="
dev-qt/qtsvg:5
dev-qt/qtwidgets:5
dev-qt/qtx11extras:5
media-libs/libmediainfo
media-libs/libraw
media-libs/libzen
net-dns/c-ares:=
net-misc/curl[ssl,curl_ssl_openssl(-)]
net-misc/curl[ssl]
sys-libs/zlib
x11-libs/libxcb:=
dolphin? ( kde-apps/dolphin )
freeimage? (
dolphin? (
kde-apps/dolphin:5
kde-frameworks/kcoreaddons:5
kde-frameworks/kio:5
kde-frameworks/kwidgetsaddons:5
)
mediainfo? (
media-libs/libmediainfo
media-libs/libzen
)
nautilus? (
dev-libs/glib:2
>=gnome-base/nautilus-43
)
nemo? (
dev-libs/glib:2
gnome-extra/nemo
)
thumbnail? (
media-libs/freeimage
media-video/ffmpeg:=
)
nautilus? ( >=gnome-base/nautilus-43 )
nemo? ( gnome-extra/nemo )
thunar? ( xfce-base/thunar )
"
RDEPEND="
${DEPEND}
x11-themes/hicolor-icon-theme
thunar? ( xfce-base/thunar:= )
"
RDEPEND="${DEPEND}"
BDEPEND="
dev-qt/linguist-tools:5
dolphin? ( kde-frameworks/extra-cmake-modules )
@@ -76,9 +85,40 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/${PN}-4.10.0.0_ffmpeg6.patch"
"${FILESDIR}/${PN}-4.10.0.0_fix-build.patch"
"${FILESDIR}/${PN}-5.3.0.0-link-zlib.patch"
"${FILESDIR}/${PN}-5.3.0.0-fix-install-dir.patch"
"${FILESDIR}/${PN}-5.3.0.0-rename-libcryptopp.patch"
)
CMAKE_USE_DIR="${S}/src/MEGAShellExtDolphin"
BUILD_DIR_DOLPHIN="${S}_dolphin"
dolphin_run() {
if use dolphin; then
cd "${S}/src/MEGAShellExtDolphin" || die
BUILD_DIR="${BUILD_DIR_DOLPHIN}" CMAKE_USE_DIR="${S}/src/MEGAShellExtDolphin" "$@"
fi
}
nautilus_run() {
if use nautilus; then
cd "${S}/src/MEGAShellExtNautilus" || die
"$@"
fi
}
nemo_run() {
if use nemo; then
cd "${S}/src/MEGAShellExtNemo" || die
"$@"
fi
}
thunar_run() {
if use thunar; then
cd "${S}/src/MEGAShellExtThunar" || die
"$@"
fi
}
src_prepare() {
if [[ ${PV} != 9999 ]]; then
@@ -86,52 +126,47 @@ src_prepare() {
mv "${WORKDIR}/sdk-${MEGA_SDK_REV}" src/MEGASync/mega || die
fi
if use dolphin; then
cmake_src_prepare
else
default
fi
cd "${S}/src/MEGASync/mega" || die
eautoreconf
cmake_src_prepare
}
src_configure() {
cd "${S}/src/MEGASync/mega" || die
econf \
"--disable-curl-checks" \
"--disable-examples" \
$(use_with freeimage)
# https://github.com/meganz/sdk/issues/2679
append-cppflags -DNDEBUG
cd "${S}/src" || die
local myqmakeargs=(
MEGA.pro
CONFIG+="release"
$(usex freeimage "" "CONFIG+=nofreeimage")
$(usev nautilus "SUBDIRS+=MEGAShellExtNautilus")
$(usev nemo "SUBDIRS+=MEGAShellExtNemo")
$(usev thunar "SUBDIRS+=MEGAShellExtThunar")
local mycmakeargs=(
# build internal libs as static
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_MODULE_PATH="${S}/src/MEGASync/mega/contrib/cmake/modules/packages"
-DENABLE_DESKTOP_UPDATE_GEN=OFF
-DUSE_FFMPEG=$(usex thumbnail)
-DUSE_FREEIMAGE=$(usex thumbnail)
-DUSE_MEDIAINFO=$(usex mediainfo)
-DUSE_PDFIUM=OFF
-DUSE_READLINE=OFF
)
cmake_src_configure
eqmake5 "${myqmakeargs[@]}"
$(qt5_get_bindir)/lrelease MEGASync/MEGASync.pro || die
use dolphin && cmake_src_configure
unset mycmakeargs
dolphin_run cmake_src_configure
nautilus_run eqmake5
nemo_run eqmake5
thunar_run eqmake5
}
src_compile() {
emake -C src
cmake_src_compile
use dolphin && cmake_src_compile
dolphin_run cmake_src_compile
nautilus_run emake
nemo_run emake
thunar_run emake
}
src_install() {
emake -C src INSTALL_ROOT="${D}" install
dobin "src/MEGASync/${PN}"
dodoc CREDITS.md README.md
cmake_src_install
rm -rf "${D}"/usr/share/doc/megasync || die
rm -rf "${D}"/usr/share/icons/ubuntu-mono-dark || die
use dolphin && cmake_src_install
dolphin_run cmake_src_install
nautilus_run emake INSTALL_ROOT="${D}" install
nemo_run emake INSTALL_ROOT="${D}" install
thunar_run emake INSTALL_ROOT="${D}" install
}

View File

@@ -1,23 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>samuelbernardo.mail@gmail.com</email>
<name>Samuel Bernardo</name>
<description>megasync client from mega.nz</description>
</maintainer>
<maintainer type="person">
<email>pastalian46@gmail.com</email>
<name>Takuya Wakazono</name>
</maintainer>
<maintainer type="person">
<email>samuelbernardo.mail@gmail.com</email>
<name>Samuel Bernardo</name>
</maintainer>
<upstream>
<remote-id type="github">meganz/MEGAsync</remote-id>
</upstream>
<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='freeimage'>Use freeimage to manage graphic images format.</flag>
<flag name='dolphin'>Build a plugin for Dolphin</flag>
<flag name='mediainfo'>Use <pkg>media-libs/libmediainfo</pkg> to determine media properties</flag>
<flag name='nautilus'>Build a plugin for nautilus</flag>
<flag name='nemo'>Build a plugin for Nemo</flag>
<flag name='thumbnail'>Enable support for thumbnail generation</flag>
<flag name='thunar'>Build a plugin for Thunar</flag>
</use>
</pkgmetadata>