public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/qt:master commit in: dev-python/PyQt4/, dev-python/PyQt4/files/
@ 2012-02-21  0:50 Davide Pesavento
  0 siblings, 0 replies; 3+ messages in thread
From: Davide Pesavento @ 2012-02-21  0:50 UTC (permalink / raw
  To: gentoo-commits

commit:     ac32b12ec969983fc98886dfdd236b1711b8c6fd
Author:     Davide Pesavento <davidepesa <AT> gmail <DOT> com>
AuthorDate: Tue Feb 21 00:49:05 2012 +0000
Commit:     Davide Pesavento <pesa <AT> gentoo <DOT> org>
CommitDate: Tue Feb 21 00:49:05 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=ac32b12e

[dev-python/PyQt4] Sync with portage ebuild.

---
 dev-python/PyQt4/PyQt4-4.9.1_pre20120204.ebuild    |   84 +++++--
 .../files/PyQt4-4.6.1-configure-multilib.patch     |   13 -
 .../files/PyQt4-4.7.3-qreal_float_support.patch    |  254 ++++++++++++++++++++
 .../files/PyQt4-4.8.3-configure-multilib.patch     |   13 -
 4 files changed, 311 insertions(+), 53 deletions(-)

diff --git a/dev-python/PyQt4/PyQt4-4.9.1_pre20120204.ebuild b/dev-python/PyQt4/PyQt4-4.9.1_pre20120204.ebuild
index 1252ccf..1ca6a55 100644
--- a/dev-python/PyQt4/PyQt4-4.9.1_pre20120204.ebuild
+++ b/dev-python/PyQt4/PyQt4-4.9.1_pre20120204.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
@@ -6,30 +6,39 @@ EAPI="3"
 PYTHON_DEPEND="*"
 PYTHON_EXPORT_PHASE_FUNCTIONS="1"
 SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="*-jython *-pypy-*"
+RESTRICT_PYTHON_ABIS="*-jython 2.7-pypy-*"
 
 inherit python qt4-r2 toolchain-funcs
 
 REVISION=83ed847d0273
-MY_P="PyQt-x11-gpl-snapshot-${PV/_pre*/}-${REVISION}"
-QT_VER="4.8.0"
+
+# Minimal supported version of Qt.
+QT_VER="4.7.2"
 
 DESCRIPTION="Python bindings for the Qt toolkit"
 HOMEPAGE="http://www.riverbankcomputing.co.uk/software/pyqt/intro/ http://pypi.python.org/pypi/PyQt"
-#SRC_URI="http://www.riverbankcomputing.com/static/Downloads/${PN}/${MY_P}.tar.gz"
 
-SRC_URI="http://www.gentoo-el.org/~hwoarang/distfiles/${MY_P}.tar.gz"
+if [[ ${PV} == *_pre* ]]; then
+	MY_P="PyQt-x11-gpl-snapshot-${PV%_pre*}-${REVISION}"
+	SRC_URI="http://www.gentoo-el.org/~hwoarang/distfiles/${MY_P}.tar.gz"
+else
+	MY_P="PyQt-x11-gpl-${PV}"
+	SRC_URI="http://www.riverbankcomputing.com/static/Downloads/${PN}/${MY_P}.tar.gz"
+fi
 
-SLOT="0"
 LICENSE="|| ( GPL-2 GPL-3 )"
-KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
 IUSE="X assistant +dbus debug declarative doc examples kde multimedia opengl phonon sql svg webkit xmlpatterns"
 
-DEPEND=">=dev-python/sip-4.13.1
+RDEPEND="
+	>=dev-python/sip-4.13.1
 	>=x11-libs/qt-core-${QT_VER}:4
 	>=x11-libs/qt-script-${QT_VER}:4
-	>=x11-libs/qt-test-${QT_VER}:4
-	X? ( >=x11-libs/qt-gui-${QT_VER}:4[dbus?] )
+	X? (
+		>=x11-libs/qt-gui-${QT_VER}:4[dbus?]
+		>=x11-libs/qt-test-${QT_VER}:4
+	)
 	assistant? ( >=x11-libs/qt-assistant-${QT_VER}:4 )
 	dbus? (
 		>=dev-python/dbus-python-0.80
@@ -37,7 +46,10 @@ DEPEND=">=dev-python/sip-4.13.1
 	)
 	declarative? ( >=x11-libs/qt-declarative-${QT_VER}:4 )
 	multimedia? ( >=x11-libs/qt-multimedia-${QT_VER}:4 )
-	opengl? ( >=x11-libs/qt-opengl-${QT_VER}:4 || ( >=x11-libs/qt-opengl-4.7.0:4[-egl] <x11-libs/qt-opengl-4.7.0:4 ) )
+	opengl? (
+		>=x11-libs/qt-opengl-${QT_VER}:4
+		|| ( >=x11-libs/qt-opengl-4.8.0:4 <x11-libs/qt-opengl-4.8.0:4[-egl] )
+	)
 	phonon? (
 		!kde? ( || ( >=x11-libs/qt-phonon-${QT_VER}:4 media-libs/phonon ) )
 		kde? ( media-libs/phonon )
@@ -45,8 +57,11 @@ DEPEND=">=dev-python/sip-4.13.1
 	sql? ( >=x11-libs/qt-sql-${QT_VER}:4 )
 	svg? ( >=x11-libs/qt-svg-${QT_VER}:4 )
 	webkit? ( >=x11-libs/qt-webkit-${QT_VER}:4 )
-	xmlpatterns? ( >=x11-libs/qt-xmlpatterns-${QT_VER}:4 )"
-RDEPEND="${DEPEND}"
+	xmlpatterns? ( >=x11-libs/qt-xmlpatterns-${QT_VER}:4 )
+"
+DEPEND="${RDEPEND}
+	dbus? ( dev-util/pkgconfig )
+"
 
 S=${WORKDIR}/${MY_P}
 
@@ -54,6 +69,8 @@ PATCHES=(
 	"${FILESDIR}/${PN}-4.7.2-configure.py.patch"
 )
 
+PYTHON_VERSIONED_EXECUTABLES=("/usr/bin/pyuic4")
+
 src_prepare() {
 	if ! use dbus; then
 		sed -e "s/^\([[:blank:]]\+\)check_dbus()/\1pass/" -i configure.py || die "sed configure.py failed"
@@ -70,7 +87,7 @@ src_prepare() {
 	python_copy_sources
 
 	preparation() {
-		if [[ "$(python_get_version --major)" == "3" ]]; then
+		if [[ "$(python_get_version -l --major)" == "3" ]]; then
 			rm -fr pyuic/uic/port_v2
 		else
 			rm -fr pyuic/uic/port_v3
@@ -91,16 +108,18 @@ src_configure() {
 			--bindir="${EPREFIX}/usr/bin"
 			--destdir="${EPREFIX}$(python_get_sitedir)"
 			--sipdir="${EPREFIX}/usr/share/sip"
+			--assume-shared
+			--no-timestamp
 			--qsci-api
 			$(use debug && echo --debug)
 			--enable=QtCore
 			--enable=QtNetwork
 			--enable=QtScript
-			--enable=QtTest
 			--enable=QtXml
 			$(pyqt4_use_enable X QtGui)
-			$(pyqt4_use_enable X QtDesigner)
+			$(pyqt4_use_enable X QtDesigner) $(use X || echo --no-designer-plugin)
 			$(pyqt4_use_enable X QtScriptTools)
+			$(pyqt4_use_enable X QtTest)
 			# QtAssistant module is not available with Qt >=4.7.0.
 			$(pyqt4_use_enable assistant QtAssistant)
 			$(pyqt4_use_enable assistant QtHelp)
@@ -124,21 +143,27 @@ src_configure() {
 		"${myconf[@]}" || return 1
 
 		local mod
-		for mod in QtCore $(use X && echo QtDesigner QtGui) $(use declarative &&
-		echo QtDeclarative) $(use opengl && echo QtOpenGL); do
-			# Run eqmake4 inside the qpy subdirectories to avoid stripping and many other QA issues.
+		for mod in QtCore \
+				$(use X && echo QtDesigner QtGui) \
+				$(use dbus && echo QtDBus) \
+				$(use declarative && echo QtDeclarative) \
+				$(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 1
 			eqmake4 $(ls w_qpy*.pro)
 			popd > /dev/null || return 1
 
 			# Fix insecure runpaths.
-			sed -e "/^LFLAGS/s:-Wl,-rpath,${BUILDDIR}/qpy/${mod}::" -i ${mod}/Makefile || die "Fixing of rpaths failed"
+			sed -e "/^LFLAGS[[:space:]]*=/s:-Wl,-rpath,${BUILDDIR}/qpy/${mod}::" \
+				-i ${mod}/Makefile || die "Failed to fix rpath for ${mod}"
 		done
 
-		# Fix pre-stripping of libpythonplugin.so
+		# Avoid stripping of libpythonplugin.so.
 		if use X; then
-			cd "${BUILDDIR}/designer"
+			pushd designer > /dev/null || return 1
 			eqmake4 python.pro
+			popd > /dev/null || return 1
 		fi
 	}
 	python_execute_function -s configuration
@@ -150,15 +175,16 @@ src_compile() {
 
 src_install() {
 	installation() {
-		# INSTALL_ROOT is needed for the QtDesigner module, other Makefiles use DESTDIR.
-		emake DESTDIR="${D}" INSTALL_ROOT="${D}" install
+		# INSTALL_ROOT is used by designer/Makefile, other Makefiles use DESTDIR.
+		emake DESTDIR="${T}/images/${PYTHON_ABI}" INSTALL_ROOT="${T}/images/${PYTHON_ABI}" install
 	}
 	python_execute_function -s installation
+	python_merge_intermediate_installation_images "${T}/images"
 
-	dodoc NEWS README THANKS || die "dodoc failed"
+	dodoc NEWS THANKS || die "dodoc failed"
 
 	if use doc; then
-		dohtml -r doc/* || die "dohtml failed"
+		dohtml -r doc/html/* || die "dohtml failed"
 	fi
 
 	if use examples; then
@@ -169,6 +195,10 @@ src_install() {
 
 pkg_postinst() {
 	python_mod_optimize PyQt4
+
+	ewarn "When updating dev-python/PyQt4, you usually need to rebuild packages, which depend on"
+	ewarn "dev-python/PyQt4, such as dev-python/qscintilla-python. If you have app-portage/gentoolkit"
+	ewarn "installed, you can find these packages with \`equery d dev-python/PyQt4\`."
 }
 
 pkg_postrm() {

diff --git a/dev-python/PyQt4/files/PyQt4-4.6.1-configure-multilib.patch b/dev-python/PyQt4/files/PyQt4-4.6.1-configure-multilib.patch
deleted file mode 100644
index c187dcd..0000000
--- a/dev-python/PyQt4/files/PyQt4-4.6.1-configure-multilib.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- PyQt-x11-gpl-4.6.1~orig/configure.py	2009-11-04 22:28:05.000000000 +0100
-+++ PyQt-x11-gpl-4.6.1/configure.py	2009-11-04 23:10:01.000000000 +0100
-@@ -854,8 +854,8 @@
-                     # version.
-                     link = "-framework Python"
-                 elif ("--enable-shared" in ducfg.get("CONFIG_ARGS", "") and
--                      glob.glob("%s/lib/libpython%d.%d*" % (ducfg["exec_prefix"], py_major, py_minor))):
--                    lib_dir_flag = quote("-L%s/lib" % ducfg["exec_prefix"])
-+                      glob.glob("%s/libpython%d.%d*" % (ducfg["LIBDIR"], py_major, py_minor))):
-+                    lib_dir_flag = quote("-L%s" % ducfg["LIBDIR"])
-                     link = "%s -lpython%d.%d" % (lib_dir_flag, py_major, py_minor)
-                 else:
-                     sipconfig.inform("Qt Designer plugin disabled because Python library is static")

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 0000000..958fe56
--- /dev/null
+++ b/dev-python/PyQt4/files/PyQt4-4.7.3-qreal_float_support.patch
@@ -0,0 +1,254 @@
+#! /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/configure.py
+===================================================================
+--- python-qt4-4.7.2.orig/configure.py	2010-03-17 19:29:19.000000000 +0100
++++ python-qt4-4.7.2/configure.py	2010-03-25 23:53:55.468631945 +0100
+@@ -1915,8 +1915,9 @@
+     out << "PyQt_NoOpenGLES\\n";
+ #endif
+ 
+-    if (sizeof (qreal) != sizeof (double))
++#if defined(QT_NO_FPU) || defined(QT_ARCH_ARM) || defined(QT_ARCH_WINDOWSCE)
+         out << "PyQt_qreal_double\\n";
++#endif
+ 
+     return 0;
+ }
+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/files/PyQt4-4.8.3-configure-multilib.patch b/dev-python/PyQt4/files/PyQt4-4.8.3-configure-multilib.patch
deleted file mode 100644
index 2a463dc..0000000
--- a/dev-python/PyQt4/files/PyQt4-4.8.3-configure-multilib.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- configure.py
-+++ configure.py
-@@ -941,8 +941,8 @@
-                     # version.
-                     link = "-framework Python"
-                 elif ("--enable-shared" in ducfg.get("CONFIG_ARGS", "") and
--                      glob.glob("%s/lib/libpython%d.%d*" % (ducfg["exec_prefix"], py_major, py_minor))):
--                    lib_dir_flag = quote("-L%s/lib" % ducfg["exec_prefix"])
-+                      glob.glob("%s/libpython%d.%d*" % (ducfg["LIBDIR"], py_major, py_minor))):
-+                    lib_dir_flag = quote("-L%s" % ducfg["LIBDIR"])
-                     link = "%s -lpython%d.%d%s" % (lib_dir_flag, py_major, py_minor, abi)
-                 else:
-                     sipconfig.inform("Qt Designer plugin disabled because Python library is static")



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/qt:master commit in: dev-python/PyQt4/, dev-python/PyQt4/files/
@ 2012-11-05 10:24 Davide Pesavento
  0 siblings, 0 replies; 3+ messages in thread
From: Davide Pesavento @ 2012-11-05 10:24 UTC (permalink / raw
  To: gentoo-commits

commit:     d8df2d6e2960935643ac45da932e04417337811c
Author:     Davide Pesavento <davidepesa <AT> gmail <DOT> com>
AuthorDate: Mon Nov  5 10:22:21 2012 +0000
Commit:     Davide Pesavento <pesa <AT> gentoo <DOT> org>
CommitDate: Mon Nov  5 10:22:21 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=d8df2d6e

[dev-python/PyQt4] Replace patch+sed with just one sed.

Package-Manager: portage-2.2.0_alpha142

---
 dev-python/PyQt4/PyQt4-4.9.6_pre20121105.ebuild    |   19 ++++++--------
 .../PyQt4/files/PyQt4-4.7.2-configure.py.patch     |   27 --------------------
 2 files changed, 8 insertions(+), 38 deletions(-)

diff --git a/dev-python/PyQt4/PyQt4-4.9.6_pre20121105.ebuild b/dev-python/PyQt4/PyQt4-4.9.6_pre20121105.ebuild
index 3eb5987..1cfbeb9 100644
--- a/dev-python/PyQt4/PyQt4-4.9.6_pre20121105.ebuild
+++ b/dev-python/PyQt4/PyQt4-4.9.6_pre20121105.ebuild
@@ -77,24 +77,21 @@ DEPEND="${RDEPEND}
 
 S=${WORKDIR}/${MY_P}
 
-PATCHES=(
-#	"${FILESDIR}/${PN}-4.7.2-configure.py.patch"
-)
-
 PYTHON_VERSIONED_EXECUTABLES=("/usr/bin/pyuic4")
 
 src_prepare() {
-	if ! use dbus; then
-		sed -e 's/^\([[:blank:]]\+\)check_dbus()/\1pass/' -i configure.py || die
-	fi
+	qt4-r2_src_prepare
 
-	# Support qreal for arm architecture (bug #322349).
+	# Support qreal on arm architecture (bug 322349).
 	use arm && epatch "${FILESDIR}/${PN}-4.7.3-qreal_float_support.patch"
 
-	qt4-r2_src_prepare
+	# Use proper include directory for phonon.
+	sed -i -e "s:^\s\+generate_code(\"phonon\":&, extra_include_dirs=[\"${EPREFIX}/usr/include/phonon\"]:" \
+		configure.py || die
 
-	# Use proper include directory.
-	sed -e "s:/usr/include:${EPREFIX}/usr/include:g" -i configure.py || die
+	if ! use dbus; then
+		sed -i -e 's/^\(\s\+\)check_dbus()/\1pass/' configure.py || die
+	fi
 
 	python_copy_sources
 

diff --git a/dev-python/PyQt4/files/PyQt4-4.7.2-configure.py.patch b/dev-python/PyQt4/files/PyQt4-4.7.2-configure.py.patch
deleted file mode 100644
index 4f3b251..0000000
--- a/dev-python/PyQt4/files/PyQt4-4.7.2-configure.py.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- PyQt-x11-gpl-4.7.2/configure.py.orig	2010-03-18 00:59:51.000000000 +0100
-+++ PyQt-x11-gpl-4.7.2/configure.py	2010-03-18 01:08:46.000000000 +0100
-@@ -478,7 +478,7 @@
-             generate_code("QtXmlPatterns")
- 
-         if "phonon" in pyqt_modules:
--            generate_code("phonon")
-+            generate_code("phonon", extra_include_dirs=["/usr/include/phonon"])
- 
-         if "QtAssistant" in pyqt_modules:
-             generate_code("QtAssistant")
-@@ -797,6 +797,7 @@
-                 install_dir=pydbusmoddir,
-                 qt=["QtCore"],
-                 debug=opts.debug,
-+                strip=0,
-                 universal=sipcfg.universal,
-                 arch=sipcfg.arch
-             )
-@@ -1611,6 +1612,7 @@
-         warnings=1,
-         static=opts.static,
-         debug=opts.debug,
-+        strip=0,
-         universal=sipcfg.universal,
-         arch=sipcfg.arch,
-         prot_is_public=opts.prot_is_public


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/qt:master commit in: dev-python/PyQt4/, dev-python/PyQt4/files/
@ 2014-06-10  8:07 Michael Palimaka
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Palimaka @ 2014-06-10  8:07 UTC (permalink / raw
  To: gentoo-commits

commit:     c4fb1a83d92d4187f147c7b2e3edbb71cf36d99c
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 10 08:06:09 2014 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Tue Jun 10 08:06:09 2014 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=c4fb1a83

[dev-python/PyQt4] Remove old snapshot.

---
 dev-python/PyQt4/Manifest                          |   1 -
 dev-python/PyQt4/PyQt4-4.10.2_pre20130505.ebuild   | 211 ------------------
 .../files/PyQt4-4.7.3-qreal_float_support.patch    | 239 ---------------------
 dev-python/PyQt4/metadata.xml                      |  29 ---
 4 files changed, 480 deletions(-)

diff --git a/dev-python/PyQt4/Manifest b/dev-python/PyQt4/Manifest
deleted file mode 100644
index 3bbadd1..0000000
--- a/dev-python/PyQt4/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST PyQt-x11-gpl-snapshot-4.10.2-6f54723ef2ba.tar.gz 11462772 SHA256 bbcf488599dfde14d621204a6081aedbd988771a98eec2a1151864cc90ee9c3f SHA512 56a0fb1363a5df6a4d761f7056f86469e4135cb71db01180966b26601e1edd9c9f00d7608fdeabf1938f9b4b34c19c9f37315dc55f02b8eda60c8e9a441b08cd WHIRLPOOL 790c28b669b27dfa56396049c2e6d91d049099a6b30bed3ae86e51ab71cbcf6c48f954dc2e909a34f9ec3ba08cb78c4f67ad20e5bcb40d676e39133bf5fe9557

diff --git a/dev-python/PyQt4/PyQt4-4.10.2_pre20130505.ebuild b/dev-python/PyQt4/PyQt4-4.10.2_pre20130505.ebuild
deleted file mode 100644
index 5660ecf..0000000
--- a/dev-python/PyQt4/PyQt4-4.10.2_pre20130505.ebuild
+++ /dev/null
@@ -1,211 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/PyQt4/PyQt4-4.10.3-r3.ebuild,v 1.2 2014/05/21 21:29:32 pesa Exp $
-
-EAPI=5
-PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3} )
-REVISION=6f54723ef2ba
-
-inherit eutils multibuild python-r1 qmake-utils toolchain-funcs
-
-DESCRIPTION="Python bindings for the Qt toolkit"
-HOMEPAGE="http://www.riverbankcomputing.co.uk/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.0:4"
-
-RDEPEND="
-	${PYTHON_DEPS}
-	>=dev-python/sip-4.15.0:=[${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:4 <dev-qt/qtgui-4.8.5:4 ) )
-	help? ( >=dev-qt/qthelp-${QT_PV} )
-	multimedia? ( >=dev-qt/qtmultimedia-${QT_PV} )
-	opengl? ( >=dev-qt/qtopengl-${QT_PV} )
-	phonon? (
-		kde? ( media-libs/phonon )
-		!kde? ( || ( >=dev-qt/qtphonon-${QT_PV} media-libs/phonon ) )
-	)
-	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
-		dohtml -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.7.3-qreal_float_support.patch b/dev-python/PyQt4/files/PyQt4-4.7.3-qreal_float_support.patch
deleted file mode 100644
index 37e1e69..0000000
--- a/dev-python/PyQt4/files/PyQt4-4.7.3-qreal_float_support.patch
+++ /dev/null
@@ -1,239 +0,0 @@
-#! /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
deleted file mode 100644
index 02d3937..0000000
--- a/dev-python/PyQt4/metadata.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?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 QtGui and QtTest modules</flag>
-		<flag name="declarative">Build QtDeclarative module</flag>
-		<flag name="designer">Build QtDesigner module</flag>
-		<flag name="help">Build QtHelp module</flag>
-		<flag name="kde">Select <pkg>media-libs/phonon</pkg> as Phonon variant (needed for KDE)</flag>
-		<flag name="multimedia">Build QtMultimedia module</flag>
-		<flag name="opengl">Build QtOpenGL module</flag>
-		<flag name="phonon">Build phonon module</flag>
-		<flag name="script">Build QtScript module</flag>
-		<flag name="scripttools">Build QtScriptTools module</flag>
-		<flag name="sql">Build QtSql module</flag>
-		<flag name="svg">Build QtSvg module</flag>
-		<flag name="webkit">Build QtWebKit module</flag>
-		<flag name="xmlpatterns">Build 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>
-	</upstream>
-</pkgmetadata>


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-10  8:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-21  0:50 [gentoo-commits] proj/qt:master commit in: dev-python/PyQt4/, dev-python/PyQt4/files/ Davide Pesavento
  -- strict thread matches above, loose matches on Subject: below --
2012-11-05 10:24 Davide Pesavento
2014-06-10  8:07 Michael Palimaka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox