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, 21 Oct 2021 05:05:31
Message-Id: 1634792708.1b3042a8da92940f68bd1317cfb143ccfb32add5.pesa@gentoo
1 commit: 1b3042a8da92940f68bd1317cfb143ccfb32add5
2 Author: Davide Pesavento <pesa <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 21 05:05:08 2021 +0000
4 Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 21 05:05:08 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b3042a8
7
8 dev-python/PyQt5: add 5.15.5
9
10 Package-Manager: Portage-3.0.28, Repoman-3.0.3
11 Signed-off-by: Davide Pesavento <pesa <AT> gentoo.org>
12
13 dev-python/PyQt5/Manifest | 1 +
14 dev-python/PyQt5/PyQt5-5.15.5.ebuild | 183 +++++++++++++++++++++++++++++++++++
15 2 files changed, 184 insertions(+)
16
17 diff --git a/dev-python/PyQt5/Manifest b/dev-python/PyQt5/Manifest
18 index 82a985d16fd..6a2527b1eb8 100644
19 --- a/dev-python/PyQt5/Manifest
20 +++ b/dev-python/PyQt5/Manifest
21 @@ -1,2 +1,3 @@
22 DIST PyQt5-5.15.4.tar.gz 3258085 BLAKE2B 96bda4da1321e499707d29d9870693815170ccc32e2e0d7bb3c6977ea2933f9684557124deb92abbf92b923e0071cf47ee4822f6cb5d06fdc61b498efc44db4c SHA512 6d19f549a71eb8df8ba8407398ccd6e3d339436f4f2e7c5dca6885849d6ce510c4f4dea3c97257685aa462bb09a2ead33d80234ccb934f9b1a40285dbec631c7
23 DIST PyQt5-5.15.5.dev2107091435.tar.gz 3264477 BLAKE2B 8289bcce9ebef9b8c289992d508ee1d365c86a127b03e175bb14382ad72150aea396d8358d560ce62b9ff33f3b54f3ebb0bbad8ab26a23edc73217c8325d9853 SHA512 5baf434f57c72a0e01753c69f8b40bc37321441efb652e002e3fff330edb8b7b318af3803fc8702897545763a952f99b68a0043a08e364e6fc1feb1e5d8520f5
24 +DIST PyQt5-5.15.5.tar.gz 3239628 BLAKE2B 8992eb9293bb823f1298108a48d0c8578d0acfcccbabc6cb7c209bb591bfed61caf3ab8b8717205698149b5e4b59b4181e67491332e38ae87856b8169d74ba86 SHA512 67600668c769deb37052e6099a35756519987a0796045cdc291add1763bad103df1226f1b6e304e74808279d6ce56231e614617011ce238e1cf91a302981dd26
25
26 diff --git a/dev-python/PyQt5/PyQt5-5.15.5.ebuild b/dev-python/PyQt5/PyQt5-5.15.5.ebuild
27 new file mode 100644
28 index 00000000000..c4effe4968b
29 --- /dev/null
30 +++ b/dev-python/PyQt5/PyQt5-5.15.5.ebuild
31 @@ -0,0 +1,183 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=8
36 +
37 +PYTHON_COMPAT=( python3_{8..10} )
38 +inherit python-r1 qmake-utils
39 +
40 +DESCRIPTION="Python bindings for the Qt framework"
41 +HOMEPAGE="https://www.riverbankcomputing.com/software/pyqt/ https://pypi.org/project/PyQt5/"
42 +
43 +MY_P=${PN}-${PV/_pre/.dev}
44 +if [[ ${PV} == *_pre* ]]; then
45 + SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz"
46 +else
47 + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_P}.tar.gz"
48 +fi
49 +S=${WORKDIR}/${MY_P}
50 +
51 +LICENSE="GPL-3"
52 +SLOT="0"
53 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
54 +
55 +# TODO: QtNfc, QtQuick3D, QtRemoteObjects
56 +IUSE="bluetooth dbus debug declarative designer examples gles2-only gui help location
57 + multimedia network opengl positioning printsupport sensors serialport speech
58 + sql +ssl svg testlib webchannel websockets widgets x11extras xmlpatterns"
59 +
60 +# The requirements below were extracted from the qmake_QT declarations
61 +# in project.py and from the output of 'grep -r "%Import " ${S}/sip'
62 +REQUIRED_USE="
63 + ${PYTHON_REQUIRED_USE}
64 + bluetooth? ( gui )
65 + declarative? ( gui network )
66 + designer? ( widgets )
67 + help? ( gui widgets )
68 + location? ( positioning )
69 + multimedia? ( gui network )
70 + opengl? ( gui widgets )
71 + positioning? ( gui )
72 + printsupport? ( gui widgets )
73 + sensors? ( gui )
74 + serialport? ( gui )
75 + sql? ( widgets )
76 + svg? ( gui widgets )
77 + testlib? ( widgets )
78 + webchannel? ( network )
79 + websockets? ( network )
80 + widgets? ( gui )
81 + xmlpatterns? ( network )
82 +"
83 +
84 +# Minimal supported version of Qt.
85 +QT_PV="5.15:5"
86 +
87 +DEPEND="${PYTHON_DEPS}
88 + >=dev-qt/qtcore-${QT_PV}
89 + >=dev-qt/qtxml-${QT_PV}
90 + bluetooth? ( >=dev-qt/qtbluetooth-${QT_PV} )
91 + dbus? (
92 + dev-python/dbus-python[${PYTHON_USEDEP}]
93 + >=dev-qt/qtdbus-${QT_PV}
94 + )
95 + declarative? ( >=dev-qt/qtdeclarative-${QT_PV}[widgets?] )
96 + designer? ( >=dev-qt/designer-${QT_PV} )
97 + gui? ( >=dev-qt/qtgui-${QT_PV}[gles2-only=] )
98 + help? ( >=dev-qt/qthelp-${QT_PV} )
99 + location? ( >=dev-qt/qtlocation-${QT_PV} )
100 + multimedia? ( >=dev-qt/qtmultimedia-${QT_PV}[widgets?] )
101 + network? ( >=dev-qt/qtnetwork-${QT_PV}[ssl=] )
102 + opengl? ( >=dev-qt/qtopengl-${QT_PV} )
103 + positioning? ( >=dev-qt/qtpositioning-${QT_PV} )
104 + printsupport? ( >=dev-qt/qtprintsupport-${QT_PV} )
105 + sensors? ( >=dev-qt/qtsensors-${QT_PV} )
106 + serialport? ( >=dev-qt/qtserialport-${QT_PV} )
107 + speech? ( >=dev-qt/qtspeech-${QT_PV} )
108 + sql? ( >=dev-qt/qtsql-${QT_PV} )
109 + svg? ( >=dev-qt/qtsvg-${QT_PV} )
110 + testlib? ( >=dev-qt/qttest-${QT_PV} )
111 + webchannel? ( >=dev-qt/qtwebchannel-${QT_PV} )
112 + websockets? ( >=dev-qt/qtwebsockets-${QT_PV} )
113 + widgets? ( >=dev-qt/qtwidgets-${QT_PV} )
114 + x11extras? ( >=dev-qt/qtx11extras-${QT_PV} )
115 + xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV} )
116 +"
117 +RDEPEND="${DEPEND}
118 + >=dev-python/PyQt5-sip-12.9:=[${PYTHON_USEDEP}]
119 +"
120 +BDEPEND="
121 + >=dev-python/PyQt-builder-1.10[${PYTHON_USEDEP}]
122 + >=dev-python/sip-6.2[${PYTHON_USEDEP}]
123 + >=dev-qt/qtcore-${QT_PV}
124 + dbus? ( virtual/pkgconfig )
125 +"
126 +
127 +src_configure() {
128 + pyqt_use_enable() {
129 + use "$1" || return
130 +
131 + if [[ $# -eq 1 ]]; then
132 + echo --enable=Qt${1^}
133 + else
134 + shift
135 + echo ${@/#/--enable=}
136 + fi
137 + }
138 +
139 + configuration() {
140 + local myconf=(
141 + sip-build
142 + --verbose
143 + --confirm-license
144 + --build-dir="${BUILD_DIR}"
145 + --scripts-dir="$(python_get_scriptdir)"
146 + --qmake="$(qt5_get_bindir)"/qmake
147 + --no-make
148 + $(usev debug '--debug --qml-debug --tracing')
149 + $(usev !dbus --no-dbus-python)
150 + $(usev !declarative --no-qml-plugin)
151 + $(usev !designer --no-designer-plugin)
152 + $(usev gles2-only --disabled-feature=PyQt_Desktop_OpenGL)
153 + $(usev !ssl --disabled-feature=PyQt_SSL)
154 + --enable=pylupdate
155 + --enable=pyrcc
156 + --enable=Qt
157 + $(pyqt_use_enable bluetooth)
158 + --enable=QtCore
159 + $(pyqt_use_enable dbus QtDBus)
160 + $(pyqt_use_enable declarative QtQml QtQuick $(usev widgets QtQuickWidgets))
161 + $(pyqt_use_enable designer)
162 + $(pyqt_use_enable gui)
163 + $(pyqt_use_enable gui $(use gles2-only && echo _QOpenGLFunctions_ES2 || echo _QOpenGLFunctions_{2_0,2_1,4_1_Core}))
164 + $(pyqt_use_enable help)
165 + $(pyqt_use_enable location)
166 + $(pyqt_use_enable multimedia QtMultimedia $(usev widgets QtMultimediaWidgets))
167 + $(pyqt_use_enable network)
168 + $(pyqt_use_enable opengl QtOpenGL)
169 + $(pyqt_use_enable positioning)
170 + $(pyqt_use_enable printsupport QtPrintSupport)
171 + $(pyqt_use_enable sensors)
172 + $(pyqt_use_enable serialport QtSerialPort)
173 + $(pyqt_use_enable speech QtTextToSpeech)
174 + $(pyqt_use_enable sql)
175 + $(pyqt_use_enable svg)
176 + $(pyqt_use_enable testlib QtTest)
177 + $(pyqt_use_enable webchannel QtWebChannel)
178 + $(pyqt_use_enable websockets QtWebSockets)
179 + $(pyqt_use_enable widgets)
180 + $(pyqt_use_enable x11extras QtX11Extras)
181 + --enable=QtXml
182 + $(pyqt_use_enable xmlpatterns QtXmlPatterns)
183 + )
184 + echo "${myconf[@]}"
185 + "${myconf[@]}" || die
186 +
187 + # Run eqmake to respect toolchain and build flags
188 + run_in_build_dir eqmake5 -recursive ${PN}.pro
189 + }
190 + python_foreach_impl configuration
191 +}
192 +
193 +src_compile() {
194 + python_foreach_impl run_in_build_dir default
195 +}
196 +
197 +src_install() {
198 + installation() {
199 + emake INSTALL_ROOT="${D}" install
200 + python_optimize
201 +
202 + local exe
203 + for exe in "${D}$(python_get_scriptdir)"/*; do
204 + python_doexe "${exe}"
205 + done
206 + }
207 + python_foreach_impl run_in_build_dir installation
208 +
209 + einstalldocs
210 +
211 + if use examples; then
212 + dodoc -r examples
213 + fi
214 +}