Gentoo Archives: gentoo-commits

From: Davide Pesavento <pesa@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/qbittorrent/
Date: Mon, 02 May 2016 18:50:06
Message-Id: 1462214985.ecb5c63359c01fc910a1e7a101c462d7e5e5a341.pesa@gentoo
1 commit: ecb5c63359c01fc910a1e7a101c462d7e5e5a341
2 Author: Davide Pesavento <pesa <AT> gentoo <DOT> org>
3 AuthorDate: Mon May 2 18:49:09 2016 +0000
4 Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
5 CommitDate: Mon May 2 18:49:45 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ecb5c633
7
8 net-p2p/qbittorrent: almost completely rewritten ebuild
9
10 * EAPI 6
11 * switch to qmake-utils.eclass
12 * remove all python handling: it's a runtime-only, optional dep
13 * drop USE=qt4 as per Qt project policy
14 * add missing [ssl] USE dependency
15 * use system qjson when building with qt4
16 * drop obsolete boost workaround, now integrated upstream
17 * use econf
18 * install systemd unit file
19
20 Package-Manager: portage-2.2.28
21
22 net-p2p/qbittorrent/qbittorrent-3.3.4-r1.ebuild | 81 +++++++++++++++++++++++++
23 net-p2p/qbittorrent/qbittorrent-9999.ebuild | 78 +++++++++++-------------
24 2 files changed, 118 insertions(+), 41 deletions(-)
25
26 diff --git a/net-p2p/qbittorrent/qbittorrent-3.3.4-r1.ebuild b/net-p2p/qbittorrent/qbittorrent-3.3.4-r1.ebuild
27 new file mode 100644
28 index 0000000..c98d0ca
29 --- /dev/null
30 +++ b/net-p2p/qbittorrent/qbittorrent-3.3.4-r1.ebuild
31 @@ -0,0 +1,81 @@
32 +# Copyright 1999-2016 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI=6
37 +
38 +inherit qmake-utils
39 +
40 +DESCRIPTION="BitTorrent client in C++ and Qt"
41 +HOMEPAGE="http://www.qbittorrent.org/"
42 +
43 +if [[ ${PV} == *9999 ]]; then
44 + inherit git-r3
45 + EGIT_REPO_URI="https://github.com/${PN}/qBittorrent.git"
46 +else
47 + MY_P=${P/_}
48 + SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz"
49 + KEYWORDS="~amd64 ~arm ~ppc64 ~x86"
50 + S=${WORKDIR}/${MY_P}
51 +fi
52 +
53 +LICENSE="GPL-2"
54 +SLOT="0"
55 +IUSE="+dbus debug +qt5 webui +X"
56 +REQUIRED_USE="
57 + dbus? ( X )
58 +"
59 +
60 +RDEPEND="
61 + dev-libs/boost:=
62 + >=net-libs/rb_libtorrent-1.0.6
63 + sys-libs/zlib
64 + !qt5? (
65 + >=dev-libs/qjson-0.8.1[qt4(+)]
66 + dev-qt/qtcore:4[ssl]
67 + >=dev-qt/qtsingleapplication-2.6.1_p20130904-r1[qt4,X?]
68 + dbus? ( dev-qt/qtdbus:4 )
69 + X? ( dev-qt/qtgui:4 )
70 + )
71 + qt5? (
72 + dev-qt/qtconcurrent:5
73 + dev-qt/qtcore:5
74 + dev-qt/qtnetwork:5[ssl]
75 + >=dev-qt/qtsingleapplication-2.6.1_p20130904-r1[qt5,X?]
76 + dev-qt/qtxml:5
77 + dbus? ( dev-qt/qtdbus:5 )
78 + X? (
79 + dev-qt/qtgui:5
80 + dev-qt/qtwidgets:5
81 + )
82 + )
83 +"
84 +DEPEND="${RDEPEND}
85 + qt5? ( dev-qt/linguist-tools:5 )
86 + virtual/pkgconfig
87 +"
88 +
89 +DOCS=(AUTHORS Changelog CONTRIBUTING.md README.md TODO)
90 +
91 +src_configure() {
92 + econf \
93 + --with-qjson=system \
94 + --with-qtsingleapplication=system \
95 + $(use_enable dbus qt-dbus) \
96 + $(use_enable debug) \
97 + $(use_enable webui) \
98 + $(use_enable X gui) \
99 + $(use_enable !X systemd) \
100 + $(use_with !qt5 qt4)
101 +
102 + if use qt5; then
103 + eqmake5
104 + else
105 + eqmake4
106 + fi
107 +}
108 +
109 +src_install() {
110 + emake INSTALL_ROOT="${D}" install
111 + einstalldocs
112 +}
113
114 diff --git a/net-p2p/qbittorrent/qbittorrent-9999.ebuild b/net-p2p/qbittorrent/qbittorrent-9999.ebuild
115 index 786574f..c98d0ca 100644
116 --- a/net-p2p/qbittorrent/qbittorrent-9999.ebuild
117 +++ b/net-p2p/qbittorrent/qbittorrent-9999.ebuild
118 @@ -2,84 +2,80 @@
119 # Distributed under the terms of the GNU General Public License v2
120 # $Id$
121
122 -EAPI=5
123 -PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
124 +EAPI=6
125
126 -inherit eutils python-r1 qt4-r2 flag-o-matic
127 +inherit qmake-utils
128
129 DESCRIPTION="BitTorrent client in C++ and Qt"
130 HOMEPAGE="http://www.qbittorrent.org/"
131
132 -MY_P=${P/_}
133 -if [[ ${PV} == *9999* ]]; then
134 +if [[ ${PV} == *9999 ]]; then
135 inherit git-r3
136 EGIT_REPO_URI="https://github.com/${PN}/qBittorrent.git"
137 else
138 + MY_P=${P/_}
139 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz"
140 KEYWORDS="~amd64 ~arm ~ppc64 ~x86"
141 + S=${WORKDIR}/${MY_P}
142 fi
143
144 LICENSE="GPL-2"
145 SLOT="0"
146 -IUSE="+dbus debug qt4 +qt5 webui +X"
147 +IUSE="+dbus debug +qt5 webui +X"
148 REQUIRED_USE="
149 - ^^ ( qt4 qt5 )
150 dbus? ( X )
151 "
152
153 -CDEPEND="
154 +RDEPEND="
155 dev-libs/boost:=
156 - >=dev-qt/qtsingleapplication-2.6.1_p20130904-r1[qt4?,qt5?,X?]
157 >=net-libs/rb_libtorrent-1.0.6
158 sys-libs/zlib
159 - qt4? (
160 - dev-qt/qtcore:4
161 + !qt5? (
162 + >=dev-libs/qjson-0.8.1[qt4(+)]
163 + dev-qt/qtcore:4[ssl]
164 + >=dev-qt/qtsingleapplication-2.6.1_p20130904-r1[qt4,X?]
165 dbus? ( dev-qt/qtdbus:4 )
166 X? ( dev-qt/qtgui:4 )
167 )
168 qt5? (
169 dev-qt/qtconcurrent:5
170 dev-qt/qtcore:5
171 - dev-qt/qtnetwork:5
172 + dev-qt/qtnetwork:5[ssl]
173 + >=dev-qt/qtsingleapplication-2.6.1_p20130904-r1[qt5,X?]
174 dev-qt/qtxml:5
175 dbus? ( dev-qt/qtdbus:5 )
176 - X? ( dev-qt/qtgui:5
177 - dev-qt/qtwidgets:5 )
178 + X? (
179 + dev-qt/qtgui:5
180 + dev-qt/qtwidgets:5
181 + )
182 )
183 "
184 -DEPEND="${CDEPEND}
185 +DEPEND="${RDEPEND}
186 qt5? ( dev-qt/linguist-tools:5 )
187 virtual/pkgconfig
188 "
189 -RDEPEND="${CDEPEND}
190 - ${PYTHON_DEPS}"
191
192 -S=${WORKDIR}/${MY_P}
193 -DOCS=(AUTHORS Changelog README.md TODO)
194 -
195 -src_prepare() {
196 - epatch_user
197 - qt4-r2_src_prepare
198 -}
199 +DOCS=(AUTHORS Changelog CONTRIBUTING.md README.md TODO)
200
201 src_configure() {
202 - # See bug 569062
203 - append-cppflags "-DBOOST_NO_CXX11_REF_QUALIFIERS"
204 + econf \
205 + --with-qjson=system \
206 + --with-qtsingleapplication=system \
207 + $(use_enable dbus qt-dbus) \
208 + $(use_enable debug) \
209 + $(use_enable webui) \
210 + $(use_enable X gui) \
211 + $(use_enable !X systemd) \
212 + $(use_with !qt5 qt4)
213
214 - # Custom configure script, econf fails
215 - local myconf=(
216 - ./configure
217 - --prefix="${EPREFIX}/usr"
218 - --with-qtsingleapplication=system
219 - $(use dbus || echo --disable-qt-dbus)
220 - $(use debug && echo --enable-debug)
221 - $(use qt4 && echo --with-qt4)
222 - $(use webui || echo --disable-webui)
223 - $(use X || echo --disable-gui)
224 - )
225 + if use qt5; then
226 + eqmake5
227 + else
228 + eqmake4
229 + fi
230 +}
231
232 - echo "${myconf[@]}"
233 - "${myconf[@]}" || die "configure failed"
234 - use qt4 && eqmake4
235 - use qt5 && eqmake5
236 +src_install() {
237 + emake INSTALL_ROOT="${D}" install
238 + einstalldocs
239 }