summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Pesavento <pesa@gentoo.org>2017-11-11 21:21:03 +0100
committerDavide Pesavento <pesa@gentoo.org>2017-11-11 22:05:10 +0100
commit1e62500ce0d6c601d39ca6d20e34a04c9a288138 (patch)
tree05d6df199e2a6bfa6e6327e7d742c6df5b6fb69f /dev-python/sip/sip-4.9999.ebuild
parentmedia-sound/mpd: Sort DEPENDs (diff)
downloadgentoo-1e62500ce0d6c601d39ca6d20e34a04c9a288138.tar.gz
gentoo-1e62500ce0d6c601d39ca6d20e34a04c9a288138.tar.bz2
gentoo-1e62500ce0d6c601d39ca6d20e34a04c9a288138.zip
dev-python/sip: generalize live ebuild to support also non-live versions
Package-Manager: Portage-2.3.13, Repoman-2.3.4
Diffstat (limited to 'dev-python/sip/sip-4.9999.ebuild')
-rw-r--r--dev-python/sip/sip-4.9999.ebuild44
1 files changed, 29 insertions, 15 deletions
diff --git a/dev-python/sip/sip-4.9999.ebuild b/dev-python/sip/sip-4.9999.ebuild
index 04bf7478ce7f..8605ad96cf08 100644
--- a/dev-python/sip/sip-4.9999.ebuild
+++ b/dev-python/sip/sip-4.9999.ebuild
@@ -5,11 +5,21 @@ EAPI=6
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
-inherit python-r1 toolchain-funcs mercurial
+inherit python-r1 toolchain-funcs
DESCRIPTION="Python extension module generator for C and C++ libraries"
HOMEPAGE="https://www.riverbankcomputing.com/software/sip/intro"
-EHG_REPO_URI="https://www.riverbankcomputing.com/hg/sip"
+
+if [[ ${PV} == *9999 ]]; then
+ inherit mercurial
+ EHG_REPO_URI="https://www.riverbankcomputing.com/hg/sip"
+elif [[ ${PV} == *_pre* ]]; then
+ MY_P=${P/_pre/.dev}
+ SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.gz"
+ S=${WORKDIR}/${MY_P}
+else
+ SRC_URI="mirror://sourceforge/pyqt/${P}.tar.gz"
+fi
# Sub-slot based on SIP_API_MAJOR_NR from siplib/sip.h.in
SLOT="0/12"
@@ -18,24 +28,28 @@ KEYWORDS=""
IUSE="debug doc"
RDEPEND="${PYTHON_DEPS}"
-DEPEND="${RDEPEND}
- sys-devel/bison
- sys-devel/flex
- doc? ( dev-python/sphinx[$(python_gen_usedep 'python2*')] )
-"
+DEPEND="${RDEPEND}"
+if [[ ${PV} == *9999 ]]; then
+ DEPEND+="
+ sys-devel/bison
+ sys-devel/flex
+ doc? ( dev-python/sphinx[$(python_gen_usedep 'python2*')] )"
+fi
-REQUIRED_USE="
- ${PYTHON_REQUIRED_USE}
- || ( $(python_gen_useflags 'python2*') )
-"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+if [[ ${PV} == *9999 ]]; then
+ REQUIRED_USE+=" || ( $(python_gen_useflags 'python2*') )"
+fi
PATCHES=( "${FILESDIR}"/${PN}-4.18-darwin.patch )
src_prepare() {
- python_setup 'python2*'
- "${PYTHON}" build.py prepare || die
- if use doc; then
- "${PYTHON}" build.py doc || die
+ if [[ ${PV} == *9999 ]]; then
+ python_setup 'python2*'
+ "${PYTHON}" build.py prepare || die
+ if use doc; then
+ "${PYTHON}" build.py doc || die
+ fi
fi
# Sub-slot sanity check