1
0
Fork 0

first commit

This commit is contained in:
root 2024-11-23 01:15:11 +02:00
commit 528f89a79b
90 changed files with 13567 additions and 0 deletions

View file

@ -0,0 +1,2 @@
DIST megasync-5.4.1.0.tar.gz 24718226 BLAKE2B ab89ed026efc0e28ef5c21554db259e74199d12d1194ecf358ad658b0ecee5a7c421ce374e3ba54a752e813c38b535034c04e9749b1f9d876a7df88951d2250a SHA512 d908308135cdd717555002d58c4faa1917bd049a0a2f99ae0b487f2ccfda6d7a00c9dee72aae52210079e656f3031bf3cf414020090e4a6b600e3cef5af11901
DIST megasync-sdk-5.4.1.0.tar.gz 4248625 BLAKE2B 96e76e6e421b2f4b7423d5870f0cfcf89bbec6392191e84b2ee7daa0ac4a6a9c6c9599773bd124ce5189abf7a80db981c0f260eec18be8ef7825bba5422123f4 SHA512 740dad61901775ef2e93861c4a42e9e20a779c7189084ed8336cb06d64a3743638e7ca499279b71d2e8bf68d225a3a6397fdfff1a89c18d413ab44eec489c7ea

View file

@ -0,0 +1,27 @@
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 2023-09-27 22:20:26.000000000 +0900
+++ b/src/MEGASync/mega/src/gfx/freeimage.cpp 2023-11-03 11:01:24.526257561 +0900
@@ -209,12 +209,6 @@
#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 @@
// 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

View file

@ -0,0 +1,45 @@
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/google_breakpad/google_breakpad.pri b/src/MEGASync/google_breakpad/google_breakpad.pri
index 122268aba..cd141a5f9 100644
--- a/src/MEGASync/google_breakpad/google_breakpad.pri
+++ b/src/MEGASync/google_breakpad/google_breakpad.pri
@@ -43,8 +43,6 @@ unix:!macx {
SOURCES += $$PWD/common/linux/elfutils.cc
SOURCES += $$PWD/common/string_conversion.cc
SOURCES += $$PWD/common/convert_UTF.c
-
- QMAKE_CXXFLAGS+=-g
}
win32 {
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

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,176 @@
# 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="159dcc4a61d43dfdf5997cf8113755fbe2452bd7" # 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}
dev-qt/qtquickcontrols:5
dev-qt/qtquickcontrols2:5
"
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

@ -0,0 +1,176 @@
# 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}
dev-qt/qtquickcontrols:5
dev-qt/qtquickcontrols2:5
"
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

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>noreply@local</email>
<name>nil</name>
</maintainer>
<use>
<flag name="dolphin">Add support for kde-apps/dolphin.</flag>
<flag name="nautilus">Add support for gnome-base/nautilus.</flag>
<flag name="nemo">Add support for gnome-extra/nemo.</flag>
<flag name="thunar">Add support for xfce-base/thunar.</flag>
<flag name="mediainfo">Use media-libs/libmediainfo to determine media properties.</flag>
<flag name="thumbnail">Enable support for thumbnail generation.</flag>
</use>
</pkgmetadata>