1 |
commit: 1e62500ce0d6c601d39ca6d20e34a04c9a288138 |
2 |
Author: Davide Pesavento <pesa <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Nov 11 20:21:03 2017 +0000 |
4 |
Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 11 21:05:10 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e62500c |
7 |
|
8 |
dev-python/sip: generalize live ebuild to support also non-live versions |
9 |
|
10 |
Package-Manager: Portage-2.3.13, Repoman-2.3.4 |
11 |
|
12 |
dev-python/sip/sip-4.9999.ebuild | 44 ++++++++++++++++++++++++++-------------- |
13 |
1 file changed, 29 insertions(+), 15 deletions(-) |
14 |
|
15 |
diff --git a/dev-python/sip/sip-4.9999.ebuild b/dev-python/sip/sip-4.9999.ebuild |
16 |
index 04bf7478ce7..8605ad96cf0 100644 |
17 |
--- a/dev-python/sip/sip-4.9999.ebuild |
18 |
+++ b/dev-python/sip/sip-4.9999.ebuild |
19 |
@@ -5,11 +5,21 @@ EAPI=6 |
20 |
|
21 |
PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) |
22 |
|
23 |
-inherit python-r1 toolchain-funcs mercurial |
24 |
+inherit python-r1 toolchain-funcs |
25 |
|
26 |
DESCRIPTION="Python extension module generator for C and C++ libraries" |
27 |
HOMEPAGE="https://www.riverbankcomputing.com/software/sip/intro" |
28 |
-EHG_REPO_URI="https://www.riverbankcomputing.com/hg/sip" |
29 |
+ |
30 |
+if [[ ${PV} == *9999 ]]; then |
31 |
+ inherit mercurial |
32 |
+ EHG_REPO_URI="https://www.riverbankcomputing.com/hg/sip" |
33 |
+elif [[ ${PV} == *_pre* ]]; then |
34 |
+ MY_P=${P/_pre/.dev} |
35 |
+ SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz" |
36 |
+ S=${WORKDIR}/${MY_P} |
37 |
+else |
38 |
+ SRC_URI="mirror://sourceforge/pyqt/${P}.tar.gz" |
39 |
+fi |
40 |
|
41 |
# Sub-slot based on SIP_API_MAJOR_NR from siplib/sip.h.in |
42 |
SLOT="0/12" |
43 |
@@ -18,24 +28,28 @@ KEYWORDS="" |
44 |
IUSE="debug doc" |
45 |
|
46 |
RDEPEND="${PYTHON_DEPS}" |
47 |
-DEPEND="${RDEPEND} |
48 |
- sys-devel/bison |
49 |
- sys-devel/flex |
50 |
- doc? ( dev-python/sphinx[$(python_gen_usedep 'python2*')] ) |
51 |
-" |
52 |
+DEPEND="${RDEPEND}" |
53 |
+if [[ ${PV} == *9999 ]]; then |
54 |
+ DEPEND+=" |
55 |
+ sys-devel/bison |
56 |
+ sys-devel/flex |
57 |
+ doc? ( dev-python/sphinx[$(python_gen_usedep 'python2*')] )" |
58 |
+fi |
59 |
|
60 |
-REQUIRED_USE=" |
61 |
- ${PYTHON_REQUIRED_USE} |
62 |
- || ( $(python_gen_useflags 'python2*') ) |
63 |
-" |
64 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
65 |
+if [[ ${PV} == *9999 ]]; then |
66 |
+ REQUIRED_USE+=" || ( $(python_gen_useflags 'python2*') )" |
67 |
+fi |
68 |
|
69 |
PATCHES=( "${FILESDIR}"/${PN}-4.18-darwin.patch ) |
70 |
|
71 |
src_prepare() { |
72 |
- python_setup 'python2*' |
73 |
- "${PYTHON}" build.py prepare || die |
74 |
- if use doc; then |
75 |
- "${PYTHON}" build.py doc || die |
76 |
+ if [[ ${PV} == *9999 ]]; then |
77 |
+ python_setup 'python2*' |
78 |
+ "${PYTHON}" build.py prepare || die |
79 |
+ if use doc; then |
80 |
+ "${PYTHON}" build.py doc || die |
81 |
+ fi |
82 |
fi |
83 |
|
84 |
# Sub-slot sanity check |