summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Pesavento <pesa@gentoo.org>2016-07-27 11:12:56 +0200
committerDavide Pesavento <pesa@gentoo.org>2016-07-27 11:12:56 +0200
commit58ada06b46b8a3e08a264bf04c6b649fd7b67764 (patch)
tree34c29634377f10e85f24bbc71791e5ff31888dd0 /dev-python/sip/sip-4.18.1.ebuild
parentsci-visualization/visit: version bump to 2.10.3 (diff)
downloadgentoo-58ada06b46b8a3e08a264bf04c6b649fd7b67764.tar.gz
gentoo-58ada06b46b8a3e08a264bf04c6b649fd7b67764.tar.bz2
gentoo-58ada06b46b8a3e08a264bf04c6b649fd7b67764.zip
dev-python/sip: version bump
Package-Manager: portage-2.3.0
Diffstat (limited to 'dev-python/sip/sip-4.18.1.ebuild')
-rw-r--r--dev-python/sip/sip-4.18.1.ebuild88
1 files changed, 88 insertions, 0 deletions
diff --git a/dev-python/sip/sip-4.18.1.ebuild b/dev-python/sip/sip-4.18.1.ebuild
new file mode 100644
index 000000000000..097b3314b3d5
--- /dev/null
+++ b/dev-python/sip/sip-4.18.1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
+
+inherit python-r1 toolchain-funcs
+
+DESCRIPTION="Python extension module generator for C and C++ libraries"
+HOMEPAGE="http://www.riverbankcomputing.com/software/sip/intro https://pypi.python.org/pypi/SIP"
+SRC_URI="mirror://sourceforge/pyqt/${P}.tar.gz"
+
+# Sub-slot based on SIP_API_MAJOR_NR from siplib/sip.h.in
+SLOT="0/11"
+LICENSE="|| ( GPL-2 GPL-3 SIP )"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
+IUSE="debug doc"
+
+RDEPEND="${PYTHON_DEPS}"
+DEPEND="${RDEPEND}"
+
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+"
+
+PATCHES=( "${FILESDIR}"/${PN}-4.18-darwin.patch )
+
+src_prepare() {
+ # Sub-slot sanity check
+ local sub_slot=${SLOT#*/}
+ local sip_api_major_nr=$(sed -nre 's:^#define SIP_API_MAJOR_NR\s+([0-9]+):\1:p' siplib/sip.h.in)
+ if [[ ${sub_slot} != ${sip_api_major_nr} ]]; then
+ eerror
+ eerror "Ebuild sub-slot (${sub_slot}) does not match SIP_API_MAJOR_NR (${sip_api_major_nr})"
+ eerror "Please update SLOT variable as follows:"
+ eerror " SLOT=\"${SLOT%%/*}/${sip_api_major_nr}\""
+ eerror
+ die "sub-slot sanity check failed"
+ fi
+
+ default
+}
+
+src_configure() {
+ configuration() {
+ local myconf=(
+ "${PYTHON}"
+ "${S}"/configure.py
+ --bindir="${EPREFIX}/usr/bin"
+ --destdir="$(python_get_sitedir)"
+ --incdir="$(python_get_includedir)"
+ $(usex debug --debug '')
+ AR="$(tc-getAR) cqs"
+ CC="$(tc-getCC)"
+ CFLAGS="${CFLAGS}"
+ CFLAGS_RELEASE=
+ CXX="$(tc-getCXX)"
+ CXXFLAGS="${CXXFLAGS}"
+ CXXFLAGS_RELEASE=
+ LINK="$(tc-getCXX)"
+ LINK_SHLIB="$(tc-getCXX)"
+ LFLAGS="${LDFLAGS}"
+ LFLAGS_RELEASE=
+ RANLIB=
+ STRIP=
+ )
+ echo "${myconf[@]}"
+ "${myconf[@]}" || die
+ }
+ python_foreach_impl run_in_build_dir configuration
+}
+
+src_compile() {
+ python_foreach_impl run_in_build_dir default
+}
+
+src_install() {
+ installation() {
+ emake DESTDIR="${D}" install
+ python_optimize
+ }
+ python_foreach_impl run_in_build_dir installation
+
+ einstalldocs
+ use doc && dodoc -r doc/html
+}