summaryrefslogtreecommitdiff
path: root/dev-python/PyQt4
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/PyQt4
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/PyQt4')
-rw-r--r--dev-python/PyQt4/Manifest9
-rw-r--r--dev-python/PyQt4/PyQt4-4.12.1.ebuild193
-rw-r--r--dev-python/PyQt4/PyQt4-4.12.ebuild193
-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.xml36
6 files changed, 695 insertions, 0 deletions
diff --git a/dev-python/PyQt4/Manifest b/dev-python/PyQt4/Manifest
new file mode 100644
index 000000000000..b484c66cc51e
--- /dev/null
+++ b/dev-python/PyQt4/Manifest
@@ -0,0 +1,9 @@
+AUX PyQt4-4.11.2-phonon.patch 897 SHA256 0e0f5ff891fce64e9d8b6e743e2807c622921456e08af35f7f20085281ab2737 SHA512 e6e0364a24e43682c829da0a3d2ece8fdf54df00ee4fb00927a0530f3d5b62177877452058ab67cd9006ef8902d72f863e69d9ffb3b98b49f407566f96430bee WHIRLPOOL ebc3f8da193764195f63b4306a7d8f240d95bb276f4702f0dd81af6cd766b4a0f984cee153ff0ae153481464724a53246f009bd21d6b2503a3c212076849a424
+AUX PyQt4-4.7.3-qreal_float_support.patch 5954 SHA256 e2f86905d0d648eda5bebf50b165120bcb0f4c83e99742eeb2ed17568a6429ec SHA512 5431778103c333c1f13850f4b5fe982f4fe8e04c6cabb013ab8fff7d6117f9d0d5b8c7bbc6d5ceaceaa84fa8984276dda373e989ef3a8d90d3a1ae2220a97af2 WHIRLPOOL 83f8c3d00fb92099414a03492d40ddbee362e53be75b180f3842980e0dec69e1a3094e3ea7d951140de028e75c36acb040ca159d710c4a20d20da9c04e6a31dd
+DIST PyQt4_gpl_x11-4.12.1.tar.gz 11328010 SHA256 45d724461ae58b019b9be95076ca07e212eb73084aec9125bb254825c3a05383 SHA512 0651816ed5a371c24827e182eac5b2a2afe67928d95a09f63bd8158117aacd3e835b1efa06d4fc0c147a28038613a5bc088bd736a1348de68199da7952299af1 WHIRLPOOL 4b216d1d4598363d9107a2ed5df6537a9fd1e36c37b7fbb6ccefc22bd4fd93f96f9ac72799bb028259bc80f2216c81ccb738df978d8a48e1f37e7fc2ac146676
+DIST PyQt4_gpl_x11-4.12.tar.gz 11325395 SHA256 3c1d4b55314adb3e1132de8fc2a92eed216d37e58aceed41294dbca210ca88db SHA512 bc5ee53e6ab8d32e240bbbd85aec9ce18a398848c0ee73d874763156256f7942a4a452a26f34fe035fdbeba5fb1df060910688f8a1bc7f7f183543d3dd0fd731 WHIRLPOOL 001df301c9620873794c33f5294ae30ec9d4a32359d26a8607377fe2468dd33a313ef09e96d2491056cdc066edc5d80b4e80afa19976dfb2a7d291cd829e2791
+EBUILD PyQt4-4.12.1.ebuild 4732 SHA256 ff43d6e06c31044f4433009ca2b80f48b21dce3e55e9a31fdcdd7bf869e905ec SHA512 0ec2700f17c11740e883bce2126833fa81a1e99c57ed0b6e4d5c977e023d29f97b8ef396cc9fad755a6051e1c403110e40041170fc98f058ad192dc25f72a0e5 WHIRLPOOL 03b831cad3aee8026d55c943b70af20a50ea8a1a85d4124f1e5f50c5d67bd72e9a8fae9d47c0ca0a05dea2f7e2ad4b868037f8fb81acd92a7ecec466caccd6bf
+EBUILD PyQt4-4.12.ebuild 4723 SHA256 169b3e61865def91376f7b3a4aa45b5b61e2fd3c73a0ea8e95ce022454dc4650 SHA512 04a5e08557d5f44c247105c9a52b3b524dc03f02e4798c7f3833bb6455ccc511ece323d3341c2e9e6213d9bd5f3d09b51258b006195a73072f5dc797ec448236 WHIRLPOOL 17138966dca1b6b16243a1fda5ce85d2028c1069667ab62a6b43320c3e417a37b3fb7760d38181677067ae1c5f8b072f304fe07d784c1564c2f10e8476d006ee
+MISC ChangeLog 5436 SHA256 72e2896cbd0d40eee0a9da0420740d7168a3e8da88b3db8a1f9b3747d9c4b3cb SHA512 11cb8c64dd656bdd0f46493918726b0830d354ab15b3cbee2f1ecfdf9578de42c662b617acdedfa70ddb7ed97f9047b9f270571f6e8d38f89bb4ee4c5a920c25 WHIRLPOOL 8a46b31fa8522951ae07459d8296705a36b20a5c32f92c358b67e8e6c765847c4934a2419e176062962200fe8f65f5083f38e3bea125874a9db9912fcb180ae4
+MISC ChangeLog-2015 40285 SHA256 a116d408d2dd7fda518a8c809ff1550fca142a0a4488f9274e315ddb069bf67a SHA512 c8861b44fd1142724d99b95c9bcd38d156c1182510e2825bd84e440bfab9162b274c78e3cf5ee77079c77ccc8d020f3a04b647651076885c3c0a0e9a84fd12a0 WHIRLPOOL e3984f7f1f04246879cadbe8e3ac437ff2e52f7ed537c6018d52e10b43adaa2894e4bc5e425a5a16cbb18aef9b3b0d89c6af8d5612926c7e318fbb920bf22bcb
+MISC metadata.xml 1770 SHA256 2962ade1ceeff1cef76e7c965155f7893fe38e3cf9f1bc6d1b13ab31016038b0 SHA512 6c6671ad8dd20f4d1701facd3b7de794b4eca907ba273f5c6626b691753ea26c0679cd4d91c1847beebcc298341ddf19d71bb4d3eb203e10720c64c54a2ee559 WHIRLPOOL 6f1b840f68b3680b5cd78566d04c8962c5a4a026cb9f1450cb2308e7d40922ea42d9d8e1ef4c421a099dec057e8b2e284076e40e196a8ac77c43ad5b1f53889e
diff --git a/dev-python/PyQt4/PyQt4-4.12.1.ebuild b/dev-python/PyQt4/PyQt4-4.12.1.ebuild
new file mode 100644
index 000000000000..d632d951e8d7
--- /dev/null
+++ b/dev-python/PyQt4/PyQt4-4.12.1.ebuild
@@ -0,0 +1,193 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit multibuild python-r1 qmake-utils toolchain-funcs
+
+DESCRIPTION="Python bindings for the Qt framework"
+HOMEPAGE="https://www.riverbankcomputing.com/software/pyqt/intro"
+
+MY_P=${PN}_gpl_x11-${PV/_pre/.dev}
+if [[ ${PV} == *_pre* ]]; then
+ SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.xz"
+else
+ SRC_URI="mirror://sourceforge/pyqt/${MY_P}.tar.gz"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+IUSE="X compat dbus debug declarative designer doc examples help 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.19.1:=[${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? ( >=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}
+
+DOCS=( "${S}"/{ChangeLog,NEWS,THANKS} )
+PATCHES=(
+ # Allow building against KDE's phonon (bug 525354)
+ "${FILESDIR}/${PN}-4.11.2-phonon.patch"
+)
+
+src_prepare() {
+ # Support qreal on arm architecture (bug 322349)
+ use arm && PATCHES+=("${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch")
+
+ default
+}
+
+pyqt_run() {
+ echo "$@"
+ "${PYTHON}" "$@"
+}
+
+pyqt_use_enable() {
+ use "$1" || return
+
+ echo --enable=${2:-Qt$(tr 'a-z' 'A-Z' <<< ${1:0:1})${1:1}}
+}
+
+src_configure() {
+ configuration() {
+ local myconf=(
+ $(usex debug '--debug --trace' '')
+ --verbose
+ --confirm-license
+ --qmake="$(qt4_get_bindir)"/qmake
+ --bindir="${EPREFIX}/usr/bin"
+ --destdir="$(python_get_sitedir)"
+ --qsci-api
+ --enable=QtCore
+ --enable=QtNetwork
+ --enable=QtXml
+ $(pyqt_use_enable X QtGui)
+ $(pyqt_use_enable dbus QtDBus)
+ $(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)
+ )
+
+ if use compat; then
+ local compat_build_dir=${BUILD_DIR%/}-compat
+ cp -Rp "${S}" "${compat_build_dir}" || die
+ pushd "${compat_build_dir}" >/dev/null || die
+
+ local mycompatconf=(
+ "${myconf[@]}"
+ 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=
+ )
+ pyqt_run configure.py "${mycompatconf[@]}" || die
+
+ popd >/dev/null || die
+ fi
+
+ myconf+=(
+ --sip-incdir="$(python_get_includedir)"
+ $(usex dbus '' --no-python-dbus)
+ )
+ pyqt_run "${S}"/configure-ng.py "${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}"
+
+ if use compat; then
+ local compat_build_dir=${BUILD_DIR%/}-compat
+ python_moduleinto ${PN}
+ python_domodule "${compat_build_dir}"/pyqtconfig.py
+ fi
+
+ python_optimize
+ }
+ python_foreach_impl run_in_build_dir installation
+
+ einstalldocs
+ use doc && dodoc -r doc/html
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
diff --git a/dev-python/PyQt4/PyQt4-4.12.ebuild b/dev-python/PyQt4/PyQt4-4.12.ebuild
new file mode 100644
index 000000000000..979f8323a03b
--- /dev/null
+++ b/dev-python/PyQt4/PyQt4-4.12.ebuild
@@ -0,0 +1,193 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit multibuild python-r1 qmake-utils toolchain-funcs
+
+DESCRIPTION="Python bindings for the Qt framework"
+HOMEPAGE="https://www.riverbankcomputing.com/software/pyqt/intro"
+
+MY_P=${PN}_gpl_x11-${PV/_pre/.dev}
+if [[ ${PV} == *_pre* ]]; then
+ SRC_URI="https://dev.gentoo.org/~pesa/distfiles/${MY_P}.tar.xz"
+else
+ SRC_URI="mirror://sourceforge/pyqt/${MY_P}.tar.gz"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 ia64 ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux"
+
+IUSE="X compat dbus debug declarative designer doc examples help 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.19:=[${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? ( >=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}
+
+DOCS=( "${S}"/{ChangeLog,NEWS,THANKS} )
+PATCHES=(
+ # Allow building against KDE's phonon (bug 525354)
+ "${FILESDIR}/${PN}-4.11.2-phonon.patch"
+)
+
+src_prepare() {
+ # Support qreal on arm architecture (bug 322349)
+ use arm && PATCHES+=("${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch")
+
+ default
+}
+
+pyqt_run() {
+ echo "$@"
+ "${PYTHON}" "$@"
+}
+
+pyqt_use_enable() {
+ use "$1" || return
+
+ echo --enable=${2:-Qt$(tr 'a-z' 'A-Z' <<< ${1:0:1})${1:1}}
+}
+
+src_configure() {
+ configuration() {
+ local myconf=(
+ $(usex debug '--debug --trace' '')
+ --verbose
+ --confirm-license
+ --qmake="$(qt4_get_bindir)"/qmake
+ --bindir="${EPREFIX}/usr/bin"
+ --destdir="$(python_get_sitedir)"
+ --qsci-api
+ --enable=QtCore
+ --enable=QtNetwork
+ --enable=QtXml
+ $(pyqt_use_enable X QtGui)
+ $(pyqt_use_enable dbus QtDBus)
+ $(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)
+ )
+
+ if use compat; then
+ local compat_build_dir=${BUILD_DIR%/}-compat
+ cp -Rp "${S}" "${compat_build_dir}" || die
+ pushd "${compat_build_dir}" >/dev/null || die
+
+ local mycompatconf=(
+ "${myconf[@]}"
+ 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=
+ )
+ pyqt_run configure.py "${mycompatconf[@]}" || die
+
+ popd >/dev/null || die
+ fi
+
+ myconf+=(
+ --sip-incdir="$(python_get_includedir)"
+ $(usex dbus '' --no-python-dbus)
+ )
+ pyqt_run "${S}"/configure-ng.py "${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}"
+
+ if use compat; then
+ local compat_build_dir=${BUILD_DIR%/}-compat
+ python_moduleinto ${PN}
+ python_domodule "${compat_build_dir}"/pyqtconfig.py
+ fi
+
+ python_optimize
+ }
+ python_foreach_impl run_in_build_dir installation
+
+ einstalldocs
+ use doc && dodoc -r doc/html
+
+ 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..7cc6900ee958
--- /dev/null
+++ b/dev-python/PyQt4/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>qt@gentoo.org</email>
+ <name>Gentoo Qt Project</name>
+ </maintainer>
+ <use>
+ <flag name="X">Build bindings for the QtGui module</flag>
+ <flag name="compat">Install the deprecated pyqtconfig module for backward compatibility</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="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>
+ <doc>http://pyqt.sourceforge.net/Docs/PyQt4/</doc>
+ <remote-id type="pypi">PyQt4</remote-id>
+ <remote-id type="sourceforge">pyqt</remote-id>
+ </upstream>
+</pkgmetadata>