Gentoo Archives: gentoo-commits

From: Samuel Bernardo <samuelbernardo.mail@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/user/ssnb:master commit in: net-misc/megasync/
Date: Mon, 30 Mar 2020 11:27:29
Message-Id: 1585567600.c415be170974ec4607ae275d458175312574279c.samuelbernardo@gentoo
1 commit: c415be170974ec4607ae275d458175312574279c
2 Author: Amedeo Salvati <amedeo <AT> linux <DOT> com>
3 AuthorDate: Sat Mar 28 19:49:26 2020 +0000
4 Commit: Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com>
5 CommitDate: Mon Mar 30 11:26:40 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/user/ssnb.git/commit/?id=c415be17
7
8 add megasync 4.3.1.0_Linux
9
10 Signed-off-by: Samuel Bernardo <samuelbernardo.mail <AT> gmail.com>
11
12 net-misc/megasync/megasync-4.3.1.ebuild | 162 ++++++++++++++++++++++++++++++++
13 1 file changed, 162 insertions(+)
14
15 diff --git a/net-misc/megasync/megasync-4.3.1.ebuild b/net-misc/megasync/megasync-4.3.1.ebuild
16 new file mode 100644
17 index 0000000..1bd032b
18 --- /dev/null
19 +++ b/net-misc/megasync/megasync-4.3.1.ebuild
20 @@ -0,0 +1,162 @@
21 +# Copyright 1999-2020 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Header: $
24 +
25 +EAPI=6
26 +
27 +inherit eutils multilib qmake-utils autotools versionator git-r3 toolchain-funcs
28 +
29 +DESCRIPTION="A Qt-based program for syncing your MEGA account in your PC. This is the official app."
30 +HOMEPAGE="http://mega.co.nz"
31 +RTAG="_Linux"
32 +if [[ ${PV} == *9999* ]];then
33 + EGIT_REPO_URI="https://github.com/meganz/MEGAsync"
34 + KEYWORDS=""
35 + EGIT_SUBMODULES=( '*' )
36 +else
37 + #SDK_COMMIT="e8e66e9f030febfb35c9e4dd503d69091e28fc04"
38 + #MY_PV="$(replace_all_version_separators _)"
39 + EGIT_REPO_URI="https://github.com/meganz/MEGAsync"
40 + EGIT_COMMIT="v${PV}.0${RTAG}"
41 + EGIT_SUBMODULES=( '*' )
42 + #SRC_URI="https://github.com/meganz/MEGAsync/archive/v${PV}.0_Linux.tar.gz -> ${P}.tar.gz
43 + #https://github.com/meganz/sdk/archive/${SDK_COMMIT}.tar.gz -> ${PN}-sdk-20170215.tar.gz"
44 + KEYWORDS="~x86 ~amd64"
45 + #RESTRICT="mirror"
46 + #S="${WORKDIR}/MEGAsync-${PV}.0_Linux"
47 +fi
48 +
49 +LICENSE="MEGA"
50 +SLOT="0"
51 +IUSE="dolphin nautilus thunar +cryptopp +sqlite +zlib +curl freeimage readline examples threads qt5 java php python gnome"
52 +
53 +DEPEND="
54 + dev-lang/swig
55 + app-doc/doxygen
56 + media-libs/libmediainfo
57 + media-libs/libraw
58 + !qt5? (
59 + dev-qt/qtcore:4
60 + dev-qt/qtgui:4
61 + dev-qt/qtdbus:4
62 + dev-libs/sni-qt
63 + dev-qt/qtimageformats:5
64 + dev-qt/qtsvg:5
65 + )
66 + qt5? (
67 + dev-qt/qtcore:5
68 + dev-qt/linguist-tools
69 + dev-qt/qtwidgets:5
70 + dev-qt/qtgui:5
71 + dev-qt/qtconcurrent:5
72 + dev-qt/qtnetwork:5
73 + dev-qt/qtdbus:5
74 + dev-qt/qtimageformats:5
75 + dev-qt/qtsvg:5
76 + )"
77 +RDEPEND="${DEPEND}
78 + x11-themes/hicolor-icon-theme
79 + dev-libs/openssl
80 + dev-libs/libgcrypt
81 + media-libs/libpng
82 + net-dns/c-ares
83 + cryptopp? ( dev-libs/crypto++ )
84 + app-arch/xz-utils
85 + dev-libs/libuv
86 + sqlite? ( dev-db/sqlite:3 )
87 + dev-libs/libsodium
88 + zlib? ( sys-libs/zlib )
89 + curl? ( net-misc/curl[ssl,curl_ssl_openssl] )
90 + freeimage? ( media-libs/freeimage )
91 + readline? ( sys-libs/readline:0 )
92 + dolphin? ( kde-apps/dolphin )
93 + nautilus? ( >=gnome-base/nautilus-3 )
94 + thunar? ( xfce-base/thunar )
95 + "
96 +
97 +PATCHES=( )
98 +
99 +if [[ ${PV} != *9999* ]];then
100 + src_prepare(){
101 + #default
102 + # Not needed, since using git submodules
103 + #cp -r ../sdk-${SDK_COMMIT}/* src/MEGASync/mega
104 + if [ -e "${FILESDIR}/MEGAsync-${PV}.0_Linux.patch" ]; then
105 + EPATCH_OPTS="-p0" epatch "${FILESDIR}/MEGAsync-${PV}.0_Linux.patch"
106 + fi
107 + if [ ! -z ${PATCHES} ]; then
108 + epatch ${PATCHES}
109 + fi
110 + if use gnome; then
111 + if [ -e "${FILESDIR}${P}-gnome.patch" ]; then
112 + epatch "${FILESDIR}/${P}-gnome.patch"
113 + fi
114 + fi
115 + eapply_user
116 + cd src/MEGASync/mega
117 + eautoreconf
118 + }
119 +fi
120 +
121 +src_configure(){
122 + cd "${S}"/src/MEGASync/mega
123 + econf \
124 + "--disable-silent-rules" \
125 + "--disable-curl-checks" \
126 + "--disable-megaapi" \
127 + $(use_with zlib) \
128 + $(use_with sqlite) \
129 + $(use_with cryptopp) \
130 + "--with-cares" \
131 + $(use_with curl) \
132 + "--without-termcap" \
133 + $(use_enable threads posix-threads) \
134 + "--with-sodium" \
135 + $(use_with freeimage) \
136 + $(use_with readline) \
137 + $(use_enable examples) \
138 + $(use_enable java) \
139 + $(use_enable php) \
140 + $(use_enable python) \
141 + "--enable-chat" \
142 + "--enable-gcc-hardening"
143 + cd ../..
144 + local myeqmakeargs=(
145 + MEGA.pro
146 + CONFIG+="release"
147 + )
148 + if [ $(gcc-major-version) -eq "9" ]; then
149 + myeqmakeargs+=(QMAKE_CXXFLAGS+="-fpermissive")
150 + fi
151 + if use qt5; then
152 + eqmake5 ${myeqmakeargs[@]}
153 + use dolphin && cmake-utils_src_configure
154 + $(qt5_get_bindir)/lrelease MEGASync/MEGASync.pro
155 + else
156 + eqmake4 ${myeqmakeargs[@]}
157 + use dolphin && cmake-utils_src_configure
158 + $(qt4_get_bindir)/lrelease MEGASync/MEGASync.pro
159 + fi
160 +}
161 +
162 +src_compile(){
163 + emake -C src INSTALL_ROOT="${D}" || die
164 + use dolphin && cmake-utils_src_compile
165 +}
166 +
167 +src_install(){
168 + use dolphin && cmake-utils_src_install
169 + local DOCS=( CREDITS.md README.md )
170 + einstalldocs
171 + insinto usr/share/licenses/${PN}
172 + doins LICENCE.md installer/terms.txt
173 + cd src/MEGASync
174 + dobin ${PN}
175 + cd platform/linux/data
176 + insinto usr/share/applications
177 + doins ${PN}.desktop
178 + cd icons/hicolor
179 + for size in 16x16 32x32 48x48 128x128 256x256;do
180 + doicon -s $size $size/apps/mega.png
181 + done
182 +}