Gentoo Archives: gentoo-commits

From: Davide Pesavento <pesa@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/PyQt5/
Date: Thu, 28 Apr 2016 01:19:28
Message-Id: 1461806355.e01bb7f9fd44b0b86c847f9512c0671d15dc8523.pesa@gentoo
1 commit: e01bb7f9fd44b0b86c847f9512c0671d15dc8523
2 Author: Davide Pesavento <pesa <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 28 01:18:21 2016 +0000
4 Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 28 01:19:15 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e01bb7f9
7
8 dev-python/PyQt5: version bump
9
10 Package-Manager: portage-2.2.28
11
12 dev-python/PyQt5/Manifest | 1 +
13 dev-python/PyQt5/PyQt5-5.6.ebuild | 185 ++++++++++++++++++++++++++++++++++++++
14 2 files changed, 186 insertions(+)
15
16 diff --git a/dev-python/PyQt5/Manifest b/dev-python/PyQt5/Manifest
17 index 12d7478..1abdc4a 100644
18 --- a/dev-python/PyQt5/Manifest
19 +++ b/dev-python/PyQt5/Manifest
20 @@ -1 +1,2 @@
21 DIST PyQt-gpl-5.5.1.tar.gz 3705749 SHA256 0a70ef94fbffcf674b0dde024aae2a2a7a3f5a8c42806109ff7df2c941bd8386 SHA512 ed9a4f30a50c0879f25b6a0841247f3f0de86942b55c1de9efea963bfbf64ee963a9e5c09be036ff2dec76164863b3b6235e45e8662776425f15378fa0abeab4 WHIRLPOOL 199a36ff1ee3689a76d0aae9d2bee586f9de3a0e3cf23c5b625c1f62b5f19311450afd9d009cbdb4f5be63ba024326c63ff0e6c9ea515216c686db9d8e07bcb3
22 +DIST PyQt5_gpl-5.6.tar.gz 3720782 SHA256 2e481a6c4c41b96ed3b33449e5f9599987c63a5c8db93313bd57a6acbf20f0e1 SHA512 979537b35b7b6f7f63f702200db35453a9efe93565a0f0ea99d8092df4ca8c2a3d0fc10a5adcb499058e2340ed9141b3b38febf8049793beb471920c03645ee8 WHIRLPOOL ca7a023371005416e2846fd50be113ca72e9713b423b54f5d9c9bf75414a98f3f6c4ef69d913bf3c2f8783d684440e006feab85dea796354e931e80fa8a80ac4
23
24 diff --git a/dev-python/PyQt5/PyQt5-5.6.ebuild b/dev-python/PyQt5/PyQt5-5.6.ebuild
25 new file mode 100644
26 index 0000000..a3dbd3e
27 --- /dev/null
28 +++ b/dev-python/PyQt5/PyQt5-5.6.ebuild
29 @@ -0,0 +1,185 @@
30 +# Copyright 1999-2016 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +# $Id$
33 +
34 +EAPI=6
35 +PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
36 +
37 +inherit multibuild python-r1 qmake-utils
38 +
39 +DESCRIPTION="Python bindings for the Qt framework"
40 +HOMEPAGE="http://www.riverbankcomputing.com/software/pyqt/intro
41 + https://pypi.python.org/pypi/PyQt5"
42 +
43 +MY_P=${PN}_gpl-${PV/_pre/.dev}
44 +if [[ ${PV} == *_pre* ]]; then
45 + SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.xz"
46 +else
47 + SRC_URI="mirror://sourceforge/pyqt/${MY_P}.tar.gz"
48 +fi
49 +
50 +LICENSE="GPL-3"
51 +SLOT="0"
52 +KEYWORDS="~amd64 ~arm ~x86"
53 +
54 +# TODO: QtBluetooth, QtLocation, QtNfc, QtWebEngine{Core,Widgets}
55 +IUSE="dbus debug declarative designer doc examples gles2 gui help multimedia
56 + network opengl positioning printsupport sensors serialport sql svg
57 + testlib webchannel webkit websockets widgets x11extras xmlpatterns"
58 +
59 +# The requirements below were extracted from configure.py
60 +# and from the output of 'grep -r "%Import " "${S}"/sip'
61 +REQUIRED_USE="
62 + ${PYTHON_REQUIRED_USE}
63 + declarative? ( gui network )
64 + designer? ( widgets )
65 + help? ( gui widgets )
66 + multimedia? ( gui network )
67 + opengl? ( gui widgets )
68 + positioning? ( gui )
69 + printsupport? ( widgets )
70 + sensors? ( gui )
71 + serialport? ( gui )
72 + sql? ( widgets )
73 + svg? ( gui widgets )
74 + testlib? ( widgets )
75 + webchannel? ( network )
76 + webkit? ( gui network printsupport widgets )
77 + websockets? ( network )
78 + widgets? ( gui )
79 + xmlpatterns? ( network )
80 +"
81 +
82 +# Minimal supported version of Qt.
83 +QT_PV="5.4.2:5"
84 +
85 +RDEPEND="
86 + ${PYTHON_DEPS}
87 + >=dev-python/sip-4.18:=[${PYTHON_USEDEP}]
88 + >=dev-qt/qtcore-${QT_PV}
89 + >=dev-qt/qtxml-${QT_PV}
90 + dbus? (
91 + dev-python/dbus-python[${PYTHON_USEDEP}]
92 + >=dev-qt/qtdbus-${QT_PV}
93 + )
94 + declarative? ( >=dev-qt/qtdeclarative-${QT_PV}[widgets?] )
95 + designer? ( >=dev-qt/designer-${QT_PV} )
96 + gui? ( >=dev-qt/qtgui-${QT_PV}[gles2=] )
97 + help? ( >=dev-qt/qthelp-${QT_PV} )
98 + multimedia? ( >=dev-qt/qtmultimedia-${QT_PV}[widgets?] )
99 + network? ( >=dev-qt/qtnetwork-${QT_PV} )
100 + opengl? ( >=dev-qt/qtopengl-${QT_PV} )
101 + positioning? ( >=dev-qt/qtpositioning-${QT_PV} )
102 + printsupport? ( >=dev-qt/qtprintsupport-${QT_PV} )
103 + sensors? ( >=dev-qt/qtsensors-${QT_PV} )
104 + serialport? ( >=dev-qt/qtserialport-${QT_PV} )
105 + sql? ( >=dev-qt/qtsql-${QT_PV} )
106 + svg? ( >=dev-qt/qtsvg-${QT_PV} )
107 + testlib? ( >=dev-qt/qttest-${QT_PV} )
108 + webchannel? ( >=dev-qt/qtwebchannel-${QT_PV} )
109 + webkit? ( >=dev-qt/qtwebkit-${QT_PV}[printsupport] )
110 + websockets? ( >=dev-qt/qtwebsockets-${QT_PV} )
111 + widgets? ( >=dev-qt/qtwidgets-${QT_PV} )
112 + x11extras? ( >=dev-qt/qtx11extras-${QT_PV} )
113 + xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV} )
114 +"
115 +DEPEND="${RDEPEND}
116 + dbus? ( virtual/pkgconfig )
117 +"
118 +
119 +S=${WORKDIR}/${MY_P}
120 +
121 +DOCS=( "${S}"/{ChangeLog,NEWS} )
122 +
123 +pyqt_use_enable() {
124 + use "$1" || return
125 +
126 + if [[ $# -eq 1 ]]; then
127 + echo --enable=Qt$(tr 'a-z' 'A-Z' <<< ${1:0:1})${1:1}
128 + else
129 + shift
130 + echo ${@/#/--enable=}
131 + fi
132 +}
133 +
134 +src_configure() {
135 + configuration() {
136 + local myconf=(
137 + "${PYTHON}"
138 + "${S}"/configure.py
139 + $(usex debug '--debug --trace' '')
140 + --verbose
141 + --confirm-license
142 + --qmake="$(qt5_get_bindir)"/qmake
143 + --bindir="${EPREFIX}/usr/bin"
144 + --destdir="$(python_get_sitedir)"
145 + --sip-incdir="$(python_get_includedir)"
146 + --qsci-api
147 + --enable=QtCore
148 + --enable=QtXml
149 + $(pyqt_use_enable dbus QtDBus)
150 + $(usex dbus '' --no-python-dbus)
151 + $(pyqt_use_enable declarative QtQml QtQuick $(usex widgets QtQuickWidgets ''))
152 + $(usex declarative '' --no-qml-plugin)
153 + $(pyqt_use_enable designer)
154 + $(usex designer '' --no-designer-plugin)
155 + $(pyqt_use_enable gui)
156 + $(pyqt_use_enable gui $(use gles2 && echo _QOpenGLFunctions_ES2 || echo _QOpenGLFunctions_{2_0,2_1,4_1_Core}))
157 + $(pyqt_use_enable help)
158 + $(pyqt_use_enable multimedia QtMultimedia $(usex widgets QtMultimediaWidgets ''))
159 + $(pyqt_use_enable network)
160 + $(pyqt_use_enable opengl QtOpenGL)
161 + $(pyqt_use_enable positioning)
162 + $(pyqt_use_enable printsupport QtPrintSupport)
163 + $(pyqt_use_enable sensors)
164 + $(pyqt_use_enable serialport QtSerialPort)
165 + $(pyqt_use_enable sql)
166 + $(pyqt_use_enable svg)
167 + $(pyqt_use_enable testlib QtTest)
168 + $(pyqt_use_enable webchannel QtWebChannel)
169 + $(pyqt_use_enable webkit QtWebKit QtWebKitWidgets)
170 + $(pyqt_use_enable websockets QtWebSockets)
171 + $(pyqt_use_enable widgets)
172 + $(pyqt_use_enable x11extras QtX11Extras)
173 + $(pyqt_use_enable xmlpatterns QtXmlPatterns)
174 + )
175 + echo "${myconf[@]}"
176 + "${myconf[@]}" || die
177 +
178 + eqmake5 -recursive ${PN}.pro
179 + }
180 + python_foreach_impl run_in_build_dir configuration
181 +}
182 +
183 +src_compile() {
184 + python_foreach_impl run_in_build_dir default
185 +}
186 +
187 +src_install() {
188 + installation() {
189 + local tmp_root=${D%/}/tmp
190 + emake INSTALL_ROOT="${tmp_root}" install
191 +
192 + local uic_dir=${tmp_root}$(python_get_sitedir)/${PN}/uic
193 + if python_is_python3; then
194 + rm -r "${uic_dir}"/port_v2 || die
195 + else
196 + rm -r "${uic_dir}"/port_v3 || die
197 + fi
198 +
199 + python_doexe "${tmp_root}${EPREFIX}"/usr/bin/pyuic5
200 + rm "${tmp_root}${EPREFIX}"/usr/bin/pyuic5 || die
201 +
202 + multibuild_merge_root "${tmp_root}" "${D}"
203 + python_optimize
204 + }
205 + python_foreach_impl run_in_build_dir installation
206 +
207 + einstalldocs
208 + use doc && dodoc -r doc/html
209 +
210 + if use examples; then
211 + insinto /usr/share/doc/${PF}
212 + doins -r examples
213 + fi
214 +}