diff options
Diffstat (limited to 'net-misc/megasync/megasync-9999.ebuild')
-rw-r--r-- | net-misc/megasync/megasync-9999.ebuild | 139 |
1 files changed, 87 insertions, 52 deletions
diff --git a/net-misc/megasync/megasync-9999.ebuild b/net-misc/megasync/megasync-9999.ebuild index f9b4f301f..c93022217 100644 --- a/net-misc/megasync/megasync-9999.ebuild +++ b/net-misc/megasync/megasync-9999.ebuild @@ -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) - - 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") + # 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 - 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 - - rm -rf "${D}"/usr/share/doc/megasync || die - rm -rf "${D}"/usr/share/icons/ubuntu-mono-dark || die + cmake_src_install - 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 } |