1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 )
8 inherit flag-o-matic python-r1 qmake-utils
10 DESCRIPTION="Python bindings for the Qwt library"
11 HOMEPAGE="http://pyqwt.sourceforge.net/"
13 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
17 KEYWORDS="amd64 arm ia64 x86"
18 IUSE="debug doc examples svg"
19 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
21 RDEPEND="${PYTHON_DEPS}
22 dev-python/numpy[${PYTHON_USEDEP}]
23 dev-python/PyQt4[${PYTHON_USEDEP},compat(+)]
24 dev-python/sip[${PYTHON_USEDEP}]
27 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
29 S=${WORKDIR}/${MY_P}/configure
32 sed -i -e "s|configuration.qt_dir, 'bin'|'$(qt4_get_bindir)'|" configure.py || die
40 use debug && myconf+=( --debug )
42 cd "${BUILD_DIR}" || die
43 # '-j' option can be buggy.
44 "${PYTHON}" configure.py \
45 --extra-cflags="${CFLAGS}" \
46 --extra-cxxflags="${CXXFLAGS}" \
47 --extra-lflags="${LDFLAGS}" \
53 || die "configure.py failed"
55 # Avoid stripping of the libraries.
56 sed -i -e "/strip/d" {iqt5qt4,qwt5qt4}/Makefile || die "sed failed"
58 python_foreach_impl configuration
63 cd "${BUILD_DIR}" || die
66 python_foreach_impl compilation
69 cd "${S}"/../sphinx || die
76 cd "${BUILD_DIR}" || die
77 emake DESTDIR="${D}" install
79 python_foreach_impl installation
83 dodoc ANNOUNCEMENT-${PV} README
85 use doc && dodoc -r sphinx/build/.
88 dodoc -r qt4examples/.