summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-python/PyQt4
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-python/PyQt4')
-rw-r--r--dev-python/PyQt4/Manifest2
-rw-r--r--dev-python/PyQt4/PyQt4-4.11.1.ebuild211
-rw-r--r--dev-python/PyQt4/PyQt4-4.11.4.ebuild156
-rw-r--r--dev-python/PyQt4/files/PyQt4-4.11.2-phonon.patch25
-rw-r--r--dev-python/PyQt4/files/PyQt4-4.7.3-qreal_float_support.patch239
-rw-r--r--dev-python/PyQt4/metadata.xml32
6 files changed, 665 insertions, 0 deletions
diff --git a/dev-python/PyQt4/Manifest b/dev-python/PyQt4/Manifest
new file mode 100644
index 000000000000..ecc690557558
--- /dev/null
+++ b/dev-python/PyQt4/Manifest
@@ -0,0 +1,2 @@
+DIST PyQt-x11-gpl-4.11.1.tar.gz 11118850 SHA256 df9d7358d70748efa5b84fa3fe9e182a80c39ac590157daaabcc2618df176da3 SHA512 3851d4e61d9c6a0c62cbfd2a08153972fa3446c1982fc925796eb1d4c6524e7054cdb14ed2f4566386727e9e0cf67246765de19fab79152b0834477452681113 WHIRLPOOL 17e23997afcf06b99028d0d2115bc9328848acaaa1b6bcd8ec7397409ab2001d5fa29ca08bf42e0cef6dcd0441d0cff04e349fa8913a2b0fc86da878b79b5a5d
+DIST PyQt-x11-gpl-4.11.4.tar.gz 11317088 SHA256 fc1fe77495432ba3b0d74ff5cb164d375a97f5dddb728256330f615a7cdcf407 SHA512 58d0c5e30b0480c1b6ce1a3cc3ef0a1841bb15631830fb937d1f17f5d3d8cbe66a5e2adcfb2c3990fae38db66dd430668bd25413e254e72064a38c48f689f170 WHIRLPOOL cf635d6399bd04def2648eee65e038d720f06dddfac70f3df6f87deb7483e023ee1a4aa07285a5075adc19dc91bca4500b82f65b342e07a8845023cf98bb6233
diff --git a/dev-python/PyQt4/PyQt4-4.11.1.ebuild b/dev-python/PyQt4/PyQt4-4.11.1.ebuild
new file mode 100644
index 000000000000..42b49c764e5e
--- /dev/null
+++ b/dev-python/PyQt4/PyQt4-4.11.1.ebuild
@@ -0,0 +1,211 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit eutils multibuild python-r1 qmake-utils toolchain-funcs
+
+DESCRIPTION="Python bindings for the Qt toolkit"
+HOMEPAGE="http://www.riverbankcomputing.com/software/pyqt/intro
+ https://pypi.python.org/pypi/PyQt4"
+
+if [[ ${PV} == *_pre* ]]; then
+ MY_P="PyQt-x11-gpl-snapshot-${PV%_pre*}-${REVISION}"
+ SRC_URI="http://dev.gentoo.org/~hwoarang/distfiles/${MY_P}.tar.gz"
+else
+ MY_P="PyQt-x11-gpl-${PV}"
+ SRC_URI="mirror://sourceforge/pyqt/${MY_P}.tar.gz"
+fi
+
+LICENSE="|| ( GPL-2 GPL-3 )"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ia64 ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
+
+IUSE="X dbus debug declarative designer doc examples help kde multimedia opengl phonon script scripttools sql svg webkit xmlpatterns"
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ declarative? ( X )
+ designer? ( X )
+ help? ( X )
+ multimedia? ( X )
+ opengl? ( X )
+ phonon? ( X )
+ scripttools? ( X script )
+ sql? ( X )
+ svg? ( X )
+ webkit? ( X )
+"
+
+# Minimal supported version of Qt.
+QT_PV="4.8.5:4"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ >=dev-python/sip-4.16:=[${PYTHON_USEDEP}]
+ >=dev-qt/qtcore-${QT_PV}
+ X? (
+ >=dev-qt/qtgui-${QT_PV}
+ >=dev-qt/qttest-${QT_PV}
+ )
+ dbus? (
+ >=dev-python/dbus-python-0.80[${PYTHON_USEDEP}]
+ >=dev-qt/qtdbus-${QT_PV}
+ )
+ declarative? ( >=dev-qt/qtdeclarative-${QT_PV} )
+ designer? ( >=dev-qt/designer-${QT_PV} )
+ help? ( >=dev-qt/qthelp-${QT_PV} )
+ multimedia? ( >=dev-qt/qtmultimedia-${QT_PV} )
+ opengl? ( >=dev-qt/qtopengl-${QT_PV} )
+ phonon? (
+ kde? ( media-libs/phonon[qt4] )
+ !kde? ( || ( >=dev-qt/qtphonon-${QT_PV} media-libs/phonon[qt4] ) )
+ )
+ script? ( >=dev-qt/qtscript-${QT_PV} )
+ sql? ( >=dev-qt/qtsql-${QT_PV} )
+ svg? ( >=dev-qt/qtsvg-${QT_PV} )
+ webkit? ( >=dev-qt/qtwebkit-${QT_PV} )
+ xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV} )
+"
+DEPEND="${RDEPEND}
+ dbus? ( virtual/pkgconfig )
+"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ # Support qreal on arm architecture (bug 322349).
+ use arm && epatch "${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch"
+
+ # Allow building against KDE's phonon (bug 433944 and others).
+ sed -i \
+ -e "s:VideoWidget()\":&, extra_include_dirs=[\"${EPREFIX}/usr/include/qt4/QtGui\"]:" \
+ -e "s:^\s\+generate_code(\"phonon\":&, extra_include_dirs=[\"${EPREFIX}/usr/include/phonon\"]:" \
+ configure.py || die
+
+ if ! use dbus; then
+ sed -i -e 's/^\(\s\+\)check_dbus()/\1pass/' configure.py || die
+ fi
+
+ python_copy_sources
+
+ preparation() {
+ if [[ ${EPYTHON} == python3.* ]]; then
+ rm -fr pyuic/uic/port_v2
+ else
+ rm -fr pyuic/uic/port_v3
+ fi
+ }
+ python_foreach_impl run_in_build_dir preparation
+}
+
+pyqt4_use_enable() {
+ use $1 && echo --enable=${2:-Qt$(tr 'a-z' 'A-Z' <<< ${1:0:1})${1:1}}
+}
+
+src_configure() {
+ configuration() {
+ local myconf=(
+ "${PYTHON}" configure.py
+ --confirm-license
+ --bindir="${EPREFIX}/usr/bin"
+ --destdir="$(python_get_sitedir)"
+ --sipdir="${EPREFIX}/usr/share/sip"
+ --assume-shared
+ --no-timestamp
+ --qsci-api
+ $(use debug && echo --debug)
+ --enable=QtCore
+ --enable=QtNetwork
+ --enable=QtXml
+ $(pyqt4_use_enable X QtGui)
+ $(pyqt4_use_enable X QtTest)
+ $(pyqt4_use_enable dbus QtDBus)
+ $(pyqt4_use_enable declarative)
+ $(pyqt4_use_enable designer) $(use designer || echo --no-designer-plugin)
+ $(pyqt4_use_enable help)
+ $(pyqt4_use_enable multimedia)
+ $(pyqt4_use_enable opengl QtOpenGL)
+ $(pyqt4_use_enable phonon phonon)
+ $(pyqt4_use_enable script)
+ $(pyqt4_use_enable scripttools QtScriptTools)
+ $(pyqt4_use_enable sql)
+ $(pyqt4_use_enable svg)
+ $(pyqt4_use_enable webkit QtWebKit)
+ $(pyqt4_use_enable xmlpatterns QtXmlPatterns)
+ 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
+
+ local mod
+ for mod in QtCore \
+ $(use X && echo QtGui) \
+ $(use dbus && echo QtDBus) \
+ $(use declarative && echo QtDeclarative) \
+ $(use designer && echo QtDesigner) \
+ $(use opengl && echo QtOpenGL); do
+ # Run eqmake4 inside the qpy subdirectories to respect
+ # CC, CXX, CFLAGS, CXXFLAGS, LDFLAGS and avoid stripping.
+ pushd qpy/${mod} > /dev/null || return
+ eqmake4 $(ls w_qpy*.pro)
+ popd > /dev/null || return
+
+ # Fix insecure runpaths.
+ sed -i -e "/^LFLAGS\s*=/ s:-Wl,-rpath,${BUILD_DIR}/qpy/${mod}::" \
+ ${mod}/Makefile || die "failed to fix rpath for ${mod}"
+ done
+
+ # Avoid stripping of libpythonplugin.so.
+ if use designer; then
+ pushd designer > /dev/null || return
+ eqmake4 python.pro
+ popd > /dev/null || return
+ fi
+ }
+ python_parallel_foreach_impl run_in_build_dir configuration
+}
+
+src_compile() {
+ python_foreach_impl run_in_build_dir default
+}
+
+src_install() {
+ installation() {
+ local tmp_root=${D%/}/tmp
+
+ # INSTALL_ROOT is used by designer/Makefile, other Makefiles use DESTDIR.
+ emake DESTDIR="${tmp_root}" INSTALL_ROOT="${tmp_root}" install
+
+ python_doexe "${tmp_root}${EPREFIX}"/usr/bin/pyuic4
+ rm "${tmp_root}${EPREFIX}"/usr/bin/pyuic4 || die
+
+ multibuild_merge_root "${tmp_root}" "${D}"
+ python_optimize
+ }
+ python_foreach_impl run_in_build_dir installation
+
+ dodoc NEWS THANKS
+
+ if use doc; then
+ dodoc -r doc/html
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
diff --git a/dev-python/PyQt4/PyQt4-4.11.4.ebuild b/dev-python/PyQt4/PyQt4-4.11.4.ebuild
new file mode 100644
index 000000000000..a717793fca92
--- /dev/null
+++ b/dev-python/PyQt4/PyQt4-4.11.4.ebuild
@@ -0,0 +1,156 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit eutils multibuild multilib python-r1 qmake-utils
+
+DESCRIPTION="Python bindings for the Qt framework"
+HOMEPAGE="http://www.riverbankcomputing.com/software/pyqt/intro
+ https://pypi.python.org/pypi/PyQt4"
+
+MY_PN="PyQt-x11-gpl"
+if [[ ${PV} == *_pre* ]]; then
+ MY_P=${MY_PN}-${PV%_pre*}-snapshot-${REVISION}
+ SRC_URI="http://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.xz"
+else
+ MY_P=${MY_PN}-${PV}
+ SRC_URI="mirror://sourceforge/pyqt/${MY_P}.tar.gz"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+IUSE="X dbus debug declarative designer doc examples help kde multimedia
+ opengl phonon script scripttools sql svg testlib webkit xmlpatterns"
+REQUIRED_USE="
+ ${PYTHON_REQUIRED_USE}
+ sql? ( X )
+ testlib? ( X )
+"
+
+# Minimal supported version of Qt.
+QT_PV="4.8.5:4"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ >=dev-python/sip-4.16.6:=[${PYTHON_USEDEP}]
+ >=dev-qt/qtcore-${QT_PV}
+ X? ( >=dev-qt/qtgui-${QT_PV} )
+ dbus? (
+ dev-python/dbus-python[${PYTHON_USEDEP}]
+ >=dev-qt/qtdbus-${QT_PV}
+ )
+ declarative? ( >=dev-qt/qtdeclarative-${QT_PV} )
+ designer? ( >=dev-qt/designer-${QT_PV} )
+ help? ( >=dev-qt/qthelp-${QT_PV} )
+ multimedia? ( >=dev-qt/qtmultimedia-${QT_PV} )
+ opengl? ( >=dev-qt/qtopengl-${QT_PV} )
+ phonon? (
+ kde? ( >=media-libs/phonon-4.7[qt4] )
+ !kde? ( || ( >=dev-qt/qtphonon-${QT_PV} >=media-libs/phonon-4.7[qt4] ) )
+ )
+ script? ( >=dev-qt/qtscript-${QT_PV} )
+ scripttools? ( >=dev-qt/qtgui-${QT_PV} )
+ sql? ( >=dev-qt/qtsql-${QT_PV} )
+ svg? ( >=dev-qt/qtsvg-${QT_PV} )
+ testlib? ( >=dev-qt/qttest-${QT_PV} )
+ webkit? ( >=dev-qt/qtwebkit-${QT_PV} )
+ xmlpatterns? ( >=dev-qt/qtxmlpatterns-${QT_PV} )
+"
+DEPEND="${RDEPEND}
+ dbus? ( virtual/pkgconfig )
+"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ # Support qreal on arm architecture (bug 322349).
+ use arm && epatch "${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch"
+
+ # Allow building against KDE's phonon (bug 525354).
+ epatch "${FILESDIR}/${PN}-4.11.2-phonon.patch"
+}
+
+pyqt_use_enable() {
+ use $1 && echo --enable=${2:-Qt$(tr 'a-z' 'A-Z' <<< ${1:0:1})${1:1}}
+}
+
+src_configure() {
+ configuration() {
+ local myconf=(
+ "${PYTHON}"
+ "${S}"/configure-ng.py
+ $(use debug && echo --debug --trace)
+ --verbose
+ --confirm-license
+ --qmake="$(qt4_get_bindir)"/qmake
+ --destdir="$(python_get_sitedir)"
+ --qsci-api
+ --enable=QtCore
+ --enable=QtNetwork
+ --enable=QtXml
+ $(pyqt_use_enable X QtGui)
+ $(pyqt_use_enable dbus QtDBus)
+ $(usex dbus '' --no-python-dbus)
+ $(pyqt_use_enable declarative)
+ $(pyqt_use_enable designer)
+ $(usex designer '' --no-designer-plugin)
+ $(pyqt_use_enable help)
+ $(pyqt_use_enable multimedia)
+ $(pyqt_use_enable opengl QtOpenGL)
+ $(pyqt_use_enable phonon phonon)
+ $(pyqt_use_enable script)
+ $(pyqt_use_enable scripttools QtScriptTools)
+ $(pyqt_use_enable sql)
+ $(pyqt_use_enable svg)
+ $(pyqt_use_enable testlib QtTest)
+ $(pyqt_use_enable webkit QtWebKit)
+ $(pyqt_use_enable xmlpatterns QtXmlPatterns)
+ )
+ echo "${myconf[@]}"
+ "${myconf[@]}" || die
+
+ eqmake4 -recursive ${PN}.pro
+ }
+ python_foreach_impl run_in_build_dir configuration
+}
+
+src_compile() {
+ python_foreach_impl run_in_build_dir default
+}
+
+src_install() {
+ installation() {
+ local tmp_root=${D%/}/tmp
+ emake INSTALL_ROOT="${tmp_root}" install
+
+ local uic_dir=${tmp_root}$(python_get_sitedir)/${PN}/uic
+ if python_is_python3; then
+ rm -r "${uic_dir}"/port_v2 || die
+ else
+ rm -r "${uic_dir}"/port_v3 || die
+ fi
+
+ python_doexe "${tmp_root}${EPREFIX}"/usr/bin/pyuic4
+ rm "${tmp_root}${EPREFIX}"/usr/bin/pyuic4 || die
+
+ multibuild_merge_root "${tmp_root}" "${D}"
+ python_optimize
+ }
+ python_foreach_impl run_in_build_dir installation
+
+ dodoc ChangeLog NEWS THANKS
+
+ if use doc; then
+ dodoc -r doc/html
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
diff --git a/dev-python/PyQt4/files/PyQt4-4.11.2-phonon.patch b/dev-python/PyQt4/files/PyQt4-4.11.2-phonon.patch
new file mode 100644
index 000000000000..e3449b3b4bfc
--- /dev/null
+++ b/dev-python/PyQt4/files/PyQt4-4.11.2-phonon.patch
@@ -0,0 +1,25 @@
+From e8931ed7f49eb55d6259328a5a78f3fc18472d48 Mon Sep 17 00:00:00 2001
+From: Davide Pesavento <pesa@gentoo.org>
+Date: Tue, 14 Oct 2014 04:30:29 +0200
+Subject: [PATCH] Support building against KDE's phonon variant.
+
+---
+ configure-ng.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure-ng.py b/configure-ng.py
+index a80cb57..fd2c56c 100644
+--- a/configure-ng.py
++++ b/configure-ng.py
+@@ -2256,6 +2256,8 @@ def generate_sip_module_code(target_config, verbose, no_timestamp, parts, tracin
+ if mname == 'QtCore':
+ includepath = target_config.vend_inc_dir
+ libs = '-L%s -lvendorid' % target_config.vend_lib_dir
++ if mname == 'phonon':
++ includepath = os.path.join(sys.prefix, 'include', 'phonon')
+
+ generate_module_makefile(target_config, verbose, mname,
+ includepath=includepath, libs=libs, qpy_sources=qpy_sources,
+--
+2.1.2
+
diff --git a/dev-python/PyQt4/files/PyQt4-4.7.3-qreal_float_support.patch b/dev-python/PyQt4/files/PyQt4-4.7.3-qreal_float_support.patch
new file mode 100644
index 000000000000..37e1e69eb3f4
--- /dev/null
+++ b/dev-python/PyQt4/files/PyQt4-4.7.3-qreal_float_support.patch
@@ -0,0 +1,239 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_qreal_float_support.dpatch by Michael Casadevall <sonicmctails@gmail.com>
+##
+## DP: Corrects a configure test, and adds explicate double handling
+## to qlist.sip on architectures where qreal != double
+
+@DPATCH@
+Index: python-qt4-4.7.2/sip/QtCore/qlist.sip
+===================================================================
+--- python-qt4-4.7.2.orig/sip/QtCore/qlist.sip 2010-03-17 19:29:26.000000000 +0100
++++ python-qt4-4.7.2/sip/QtCore/qlist.sip 2010-03-25 23:53:55.468631945 +0100
+@@ -749,3 +749,227 @@
+ return sipGetState(sipTransferObj);
+ %End
+ };
++
++// If we're on an architecture where qreal != double, then we need to also
++// explicately handle doubles. On architectures where qreal == double, they
++// will automaticially be cast upwards
++
++%If (!PyQt_qreal_double)
++
++%If (Qt_4_3_0 -)
++// QList<QPair<double, double> > is implemented as a Python list of 2-element tuples.
++%MappedType QList<QPair<double, double> >
++{
++%TypeHeaderCode
++#include <qlist.h>
++#include <qpair.h>
++%End
++
++%ConvertFromTypeCode
++ // Create the list.
++ PyObject *l;
++
++ if ((l = PyList_New(sipCpp->size())) == NULL)
++ return NULL;
++
++ // Set the list elements.
++ for (int i = 0; i < sipCpp->size(); ++i)
++ {
++ const QPair<double, double> &p = sipCpp->at(i);
++ PyObject *pobj;
++
++ if ((pobj = Py_BuildValue((char *)"dd", p.first, p.second)) == NULL)
++ {
++ Py_DECREF(l);
++
++ return NULL;
++ }
++
++ PyList_SET_ITEM(l, i, pobj);
++ }
++
++ return l;
++%End
++
++%ConvertToTypeCode
++ SIP_SSIZE_T len;
++
++ // Check the type if that is all that is required.
++ if (sipIsErr == NULL)
++ {
++ if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
++ return 0;
++
++ for (SIP_SSIZE_T i = 0; i < len; ++i)
++ {
++ PyObject *tup = PySequence_ITEM(sipPy, i);
++
++ if (!PySequence_Check(tup) || PySequence_Size(tup) != 2)
++ return 0;
++ }
++
++ return 1;
++ }
++
++ QList<QPair<double, double> > *ql = new QList<QPair<double, double> >;
++ len = PySequence_Size(sipPy);
++
++ for (SIP_SSIZE_T i = 0; i < len; ++i)
++ {
++ PyObject *tup = PySequence_ITEM(sipPy, i);
++
++ double first = PyFloat_AsDouble(PySequence_ITEM(tup, 0));
++ double second = PyFloat_AsDouble(PySequence_ITEM(tup, 1));
++
++ ql->append(QPair<double, double>(first, second));
++ }
++
++ *sipCppPtr = ql;
++
++ return sipGetState(sipTransferObj);
++%End
++};
++%End
++%If (Qt_4_3_0 -)
++// QList<QPair<double, TYPE> > is implemented as a Python list of 2-element tuples.
++template<double, TYPE>
++%MappedType QList<QPair<double, TYPE> >
++{
++%TypeHeaderCode
++#include <qlist.h>
++#include <qpair.h>
++%End
++
++%ConvertFromTypeCode
++ // Create the list.
++ PyObject *l;
++
++ if ((l = PyList_New(sipCpp->size())) == NULL)
++ return NULL;
++
++ // Set the list elements.
++ for (int i = 0; i < sipCpp->size(); ++i)
++ {
++ const QPair<double, TYPE> &p = sipCpp->at(i);
++ TYPE *t = new TYPE(p.second);
++ PyObject *pobj;
++
++ if ((pobj = sipBuildResult(NULL, "(dB)", p.first, t, sipClass_TYPE, sipTransferObj)) == NULL)
++ {
++ Py_DECREF(l);
++ delete t;
++
++ return NULL;
++ }
++
++ PyList_SET_ITEM(l, i, pobj);
++ }
++
++ return l;
++%End
++
++%ConvertToTypeCode
++ SIP_SSIZE_T len;
++
++ // Check the type if that is all that is required.
++ if (sipIsErr == NULL)
++ {
++ if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
++ return 0;
++
++ for (SIP_SSIZE_T i = 0; i < len; ++i)
++ {
++ PyObject *tup = PySequence_ITEM(sipPy, i);
++
++ if (!PySequence_Check(tup) || PySequence_Size(tup) != 2)
++ return 0;
++
++ if (!sipCanConvertToInstance(PySequence_ITEM(tup, 1), sipClass_TYPE, SIP_NOT_NONE))
++ return 0;
++ }
++
++ return 1;
++ }
++
++ QList<QPair<double, TYPE> > *ql = new QList<QPair<double, TYPE> >;
++ len = PySequence_Size(sipPy);
++
++ for (SIP_SSIZE_T i = 0; i < len; ++i)
++ {
++ PyObject *tup = PySequence_ITEM(sipPy, i);
++ double d;
++ int state;
++
++ d = PyFloat_AsDouble(PySequence_ITEM(tup, 0));
++ TYPE *t = reinterpret_cast<TYPE *>(sipConvertToInstance(PySequence_ITEM(tup, 1), sipClass_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++
++ if (*sipIsErr)
++ {
++ sipReleaseInstance(t, sipClass_TYPE, state);
++
++ delete ql;
++ return 0;
++ }
++
++ ql->append(QPair<double, TYPE>(d, *t));
++
++ sipReleaseInstance(t, sipClass_TYPE, state);
++ }
++
++ *sipCppPtr = ql;
++
++ return sipGetState(sipTransferObj);
++%End
++};
++%End
++
++// QList<double> is implemented as a Python list of doubles.
++%MappedType QList<double>
++{
++%TypeHeaderCode
++#include <qlist.h>
++%End
++
++%ConvertFromTypeCode
++ // Create the list.
++ PyObject *l;
++
++ if ((l = PyList_New(sipCpp->size())) == NULL)
++ return NULL;
++
++ // Set the list elements.
++ for (int i = 0; i < sipCpp->size(); ++i)
++ {
++ PyObject *pobj;
++
++ if ((pobj = PyFloat_FromDouble(sipCpp->value(i))) == NULL)
++ {
++ Py_DECREF(l);
++
++ return NULL;
++ }
++
++ PyList_SET_ITEM(l, i, pobj);
++ }
++
++ return l;
++%End
++
++%ConvertToTypeCode
++ // Check the type if that is all that is required.
++ if (sipIsErr == NULL)
++ return (PySequence_Check(sipPy) && PySequence_Size(sipPy) >= 0);
++
++ QList<double> *ql = new QList<double>;
++ SIP_SSIZE_T len = PySequence_Size(sipPy);
++
++ for (SIP_SSIZE_T i = 0; i < len; ++i)
++ ql->append(PyFloat_AsDouble(PySequence_ITEM(sipPy, i)));
++
++ *sipCppPtr = ql;
++
++ return sipGetState(sipTransferObj);
++%End
++};
++
++%End
diff --git a/dev-python/PyQt4/metadata.xml b/dev-python/PyQt4/metadata.xml
new file mode 100644
index 000000000000..31d70a3f30fb
--- /dev/null
+++ b/dev-python/PyQt4/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>qt</herd>
+ <use>
+ <flag name="X">Build bindings for the QtGui module</flag>
+ <flag name="dbus">Build bindings for the QtDBus module</flag>
+ <flag name="declarative">Build bindings for the QtDeclarative module</flag>
+ <flag name="designer">Build bindings for the QtDesigner module and enable the designer plugin</flag>
+ <flag name="help">Build bindings for the QtHelp module</flag>
+ <flag name="kde">Select <pkg>media-libs/phonon</pkg> as Phonon variant (needed for KDE)</flag>
+ <flag name="multimedia">Build bindings for the QtMultimedia module</flag>
+ <flag name="opengl">Build bindings for the QtOpenGL module</flag>
+ <flag name="phonon">Build bindings for the phonon module</flag>
+ <flag name="script">Build bindings for the QtScript module</flag>
+ <flag name="scripttools">Build bindings for the QtScriptTools module</flag>
+ <flag name="sql">Build bindings for the QtSql module</flag>
+ <flag name="svg">Build bindings for the QtSvg module</flag>
+ <flag name="testlib">Build bindings for the QtTest module</flag>
+ <flag name="webkit">Build bindings for the QtWebKit module</flag>
+ <flag name="xmlpatterns">Build bindings for the QtXmlPatterns module</flag>
+ </use>
+ <upstream>
+ <maintainer status="active">
+ <email>phil@riverbankcomputing.com</email>
+ <name>Phil Thompson</name>
+ </maintainer>
+ <bugs-to>mailto:pyqt@riverbankcomputing.com</bugs-to>
+ <remote-id type="pypi">PyQt4</remote-id>
+ <remote-id type="sourceforge">pyqt</remote-id>
+ </upstream>
+</pkgmetadata>