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/qscintilla-python/
Date: Sun, 12 Nov 2017 07:26:47
Message-Id: 1510471589.0cd1aa857f8fd6ba0b31764a75534d1fd933a229.pesa@gentoo
1 commit: 0cd1aa857f8fd6ba0b31764a75534d1fd933a229
2 Author: Davide Pesavento <pesa <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 12 07:19:56 2017 +0000
4 Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 12 07:26:29 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0cd1aa85
7
8 dev-python/qscintilla-python: install .sip files
9
10 Closes: https://bugs.gentoo.org/636606
11 Package-Manager: Portage-2.3.13, Repoman-2.3.4
12
13 .../qscintilla-python-2.10.1-r1.ebuild | 88 ++++++++++++++++++++++
14 1 file changed, 88 insertions(+)
15
16 diff --git a/dev-python/qscintilla-python/qscintilla-python-2.10.1-r1.ebuild b/dev-python/qscintilla-python/qscintilla-python-2.10.1-r1.ebuild
17 new file mode 100644
18 index 00000000000..ddaeac5786b
19 --- /dev/null
20 +++ b/dev-python/qscintilla-python/qscintilla-python-2.10.1-r1.ebuild
21 @@ -0,0 +1,88 @@
22 +# Copyright 1999-2017 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=6
26 +PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
27 +
28 +inherit multibuild python-r1 qmake-utils
29 +
30 +MY_P=QScintilla_gpl-${PV/_pre/.dev}
31 +
32 +DESCRIPTION="Python bindings for Qscintilla"
33 +HOMEPAGE="https://www.riverbankcomputing.com/software/qscintilla/intro"
34 +SRC_URI="mirror://sourceforge/pyqt/${MY_P}.tar.gz"
35 +
36 +LICENSE="GPL-3"
37 +SLOT="0"
38 +KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~sparc ~x86"
39 +IUSE="debug +qt4 qt5"
40 +
41 +REQUIRED_USE="
42 + ${PYTHON_REQUIRED_USE}
43 + || ( qt4 qt5 )
44 +"
45 +
46 +DEPEND="
47 + ${PYTHON_DEPS}
48 + >=dev-python/sip-4.19:=[${PYTHON_USEDEP}]
49 + ~x11-libs/qscintilla-${PV}:=[qt4?,qt5?]
50 + qt4? (
51 + >=dev-python/PyQt4-4.11.3[X,${PYTHON_USEDEP}]
52 + dev-qt/qtcore:4
53 + dev-qt/qtgui:4
54 + )
55 + qt5? (
56 + dev-python/PyQt5[gui,printsupport,widgets,${PYTHON_USEDEP}]
57 + dev-qt/qtcore:5
58 + dev-qt/qtgui:5
59 + dev-qt/qtprintsupport:5
60 + dev-qt/qtwidgets:5
61 + )
62 +"
63 +RDEPEND="${DEPEND}"
64 +
65 +S=${WORKDIR}/${MY_P}/Python
66 +
67 +pkg_setup() {
68 + MULTIBUILD_VARIANTS=( $(usev qt4) $(usev qt5) )
69 +}
70 +
71 +src_configure() {
72 + configuration() {
73 + # Fix out-of-source build and installation of .sip files
74 + ln -s "${S}"/sip || die
75 +
76 + local my_qt_ver=4
77 + if [[ ${MULTIBUILD_ID} == *qt5* ]]; then
78 + my_qt_ver=5
79 + fi
80 +
81 + local myconf=(
82 + "${PYTHON}"
83 + "${S}"/configure.py
84 + --qmake="$(qt${my_qt_ver}_get_bindir)"/qmake
85 + --sip-incdir="$(python_get_includedir)"
86 + --pyqt=PyQt${my_qt_ver}
87 + $(usex debug '--debug --trace' '')
88 + --verbose
89 + )
90 + echo "${myconf[@]}"
91 + "${myconf[@]}" || die
92 +
93 + # Run eqmake to respect toolchain, build flags, and prevent stripping
94 + eqmake${my_qt_ver} -recursive
95 + }
96 + multibuild_foreach_variant python_foreach_impl run_in_build_dir configuration
97 +}
98 +
99 +src_compile() {
100 + multibuild_foreach_variant python_foreach_impl run_in_build_dir default
101 +}
102 +
103 +src_install() {
104 + installation() {
105 + emake INSTALL_ROOT="${D}" install
106 + python_optimize
107 + }
108 + multibuild_foreach_variant python_foreach_impl run_in_build_dir installation
109 +}