dev-python/PythonQt: new ebuild
authorVladimir Pavljuchenko (SpiderX) <spiderx@spiderx.dp.ua>
Sun, 13 Nov 2016 22:26:42 +0000 (00:26 +0200)
committerDavid Seifert <soap@gentoo.org>
Mon, 14 Nov 2016 17:32:15 +0000 (18:32 +0100)
PythonQt is a dynamic Python binding for the Qt framework.
It offers an easy way to embed the Python scripting language
into your C++ Qt applications.
The focus of PythonQt is on embedding Python into
an existing C++ application, not on writing the whole
application completely in Python.

Base for ebuild from https://github.com/SpiderX/portage-overlay/tree/master/dev-python/PythonQt

Gentoo-Bug: https://bugs.gentoo.org/214331

Package-Manager: portage-2.3.0
Closes: https://github.com/gentoo/gentoo/pull/2634

Signed-off-by: David Seifert <soap@gentoo.org>
dev-python/PythonQt/Manifest [new file with mode: 0644]
dev-python/PythonQt/PythonQt-3.1.ebuild [new file with mode: 0644]
dev-python/PythonQt/PythonQt-9999.ebuild [new file with mode: 0644]
dev-python/PythonQt/files/PythonQt-3.1-commit-433-441.patch [new file with mode: 0644]
dev-python/PythonQt/metadata.xml [new file with mode: 0644]

diff --git a/dev-python/PythonQt/Manifest b/dev-python/PythonQt/Manifest
new file mode 100644 (file)
index 0000000..bec8743
--- /dev/null
@@ -0,0 +1 @@
+DIST PythonQt3.1.zip 4526699 SHA256 2fcb07f6e3e63bc5299ff968b64ca35e05c3f599fe0965285ae92b2317f0f940 SHA512 b3c208e3f909ebb15d40a6e83385f03e6196a8439e39cad4f924e7b1e774edbce83680298ab032161619d1358696a0d073028860f68540aadd8028b712ae8fc1 WHIRLPOOL f21d5c44bae648a33011b30b70d4064f872d7637f89b40f8f907da33ae0bdca6812f880832e33b8f623e6a398bd5d6e7e5a9bea0df8c29efe5d96e31fbeb5d03
diff --git a/dev-python/PythonQt/PythonQt-3.1.ebuild b/dev-python/PythonQt/PythonQt-3.1.ebuild
new file mode 100644 (file)
index 0000000..da164d4
--- /dev/null
@@ -0,0 +1,89 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+
+MY_P=${PN}${PV}
+
+inherit qmake-utils python-single-r1
+
+DESCRIPTION="A dynamic Python binding for the Qt framework"
+HOMEPAGE="http://pythonqt.sourceforge.net/"
+SRC_URI="mirror://sourceforge/pythonqt/pythonqt/${P}/${MY_P}.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc +extensions webkit"
+
+RDEPEND="${PYTHON_DEPS}
+       dev-qt/qtcore:5
+       dev-qt/qtgui:5
+       dev-qt/qtwidgets:5
+       extensions? (
+               dev-qt/designer:5
+               dev-qt/qtdeclarative:5[widgets]
+               dev-qt/qtmultimedia:5[widgets]
+               dev-qt/qtnetwork:5
+               dev-qt/qtopengl:5
+               dev-qt/qtprintsupport:5
+               dev-qt/qtsql:5
+               dev-qt/qtsvg:5
+               dev-qt/qtxml:5
+               dev-qt/qtxmlpatterns:5
+               webkit? ( dev-qt/qtwebkit:5 )
+       )"
+DEPEND="${RDEPEND}
+       dev-qt/qtxml:5
+       virtual/pkgconfig
+       doc? ( app-doc/doxygen )"
+
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="webkit? ( extensions ) ${PYTHON_REQUIRED_USE}"
+
+# Bring uitools back, backport other fixes from trunk
+PATCHES=( "${FILESDIR}/${P}-commit-433-441.patch" )
+
+src_prepare() {
+       default
+
+       if ! use extensions ; then
+               sed -i '/SUBDIRS/s/extensions//' PythonQt.pro || die "sed for extensions"
+       fi
+       if ! use webkit ; then
+               # Remove webkit support if not used
+               sed -i '/qtHaveModule(webkit):CONFIG += PythonQtWebKit/d' \
+                       extensions/PythonQt_QtAll/PythonQt_QtAll.pro \
+                       || die "sed for webkit"
+       fi
+
+       # Unset python version to use python-config
+       sed -i "/unix:PYTHON_VERSION=/s/2.7//" build/python.prf \
+               || die "sed for python version"
+}
+
+src_configure() {
+       eqmake5 PREFIX="${ED%/}"/usr
+}
+
+src_install() {
+       einstalldocs
+
+       # Includes
+       insinto /usr/include/PythonQt
+       doins -r src/*.h
+       insinto /usr/include/PythonQt/gui
+       doins -r src/gui/*.h
+
+       if use extensions ; then
+               insinto /usr/include/PythonQt/extensions/PythonQt_QtAll
+               doins -r extensions/PythonQt_QtAll/*.h
+       fi
+
+       # Libraries
+       dolib.so lib/libPythonQt*
+}
diff --git a/dev-python/PythonQt/PythonQt-9999.ebuild b/dev-python/PythonQt/PythonQt-9999.ebuild
new file mode 100644 (file)
index 0000000..ce47fa7
--- /dev/null
@@ -0,0 +1,87 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} )
+
+MY_P=${PN}${PV}
+
+inherit qmake-utils python-single-r1 subversion
+
+DESCRIPTION="A dynamic Python binding for the Qt framework"
+HOMEPAGE="http://pythonqt.sourceforge.net/"
+SRC_URI=""
+ESVN_REPO_URI="https://pythonqt.svn.sourceforge.net/svnroot/pythonqt/trunk"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS=""
+IUSE="doc +extensions webkit"
+
+RDEPEND="${PYTHON_DEPS}
+       dev-qt/qtcore:5
+       dev-qt/qtgui:5
+       dev-qt/qtwidgets:5
+       extensions? (
+               dev-qt/designer:5
+               dev-qt/qtdeclarative:5[widgets]
+               dev-qt/qtmultimedia:5[widgets]
+               dev-qt/qtnetwork:5
+               dev-qt/qtopengl:5
+               dev-qt/qtprintsupport:5
+               dev-qt/qtsql:5
+               dev-qt/qtsvg:5
+               dev-qt/qtxml:5
+               dev-qt/qtxmlpatterns:5
+               webkit? ( dev-qt/qtwebkit:5 )
+       )"
+DEPEND="${RDEPEND}
+       dev-qt/qtxml:5
+       virtual/pkgconfig
+       doc? ( app-doc/doxygen )"
+
+S="${WORKDIR}/${MY_P}"
+
+REQUIRED_USE="webkit? ( extensions ) ${PYTHON_REQUIRED_USE}"
+
+src_prepare() {
+       default
+
+       if ! use extensions ; then
+               sed -i '/SUBDIRS/s/extensions//' PythonQt.pro || die "sed for extensions"
+       fi
+       if ! use webkit ; then
+               # Remove webkit support if not used
+               sed -i '/qtHaveModule(webkit):CONFIG += PythonQtWebKit/d' \
+                       extensions/PythonQt_QtAll/PythonQt_QtAll.pro \
+                       || die "sed for webkit"
+       fi
+
+       # Unset python version to use python-config
+       sed -i "/unix:PYTHON_VERSION=/s/2.7//" build/python.prf \
+               || die "sed for python version"
+}
+
+src_configure() {
+       eqmake5 PREFIX="${ED%/}"/usr
+}
+
+src_install() {
+       einstalldocs
+
+       # Includes
+       insinto /usr/include/PythonQt
+       doins -r src/*.h
+       insinto /usr/include/PythonQt/gui
+       doins -r src/gui/*.h
+
+       if use extensions ; then
+               insinto /usr/include/PythonQt/extensions/PythonQt_QtAll
+               doins -r extensions/PythonQt_QtAll/*.h
+       fi
+
+       # Libraries
+       dolib.so lib/libPythonQt*
+}
diff --git a/dev-python/PythonQt/files/PythonQt-3.1-commit-433-441.patch b/dev-python/PythonQt/files/PythonQt-3.1-commit-433-441.patch
new file mode 100644 (file)
index 0000000..90d3cb9
--- /dev/null
@@ -0,0 +1,301 @@
+diff -uprNEBZ --suppress-blank-empty a/extensions/PythonQt_QtAll/PythonQt_QtAll.cpp b/extensions/PythonQt_QtAll/PythonQt_QtAll.cpp
+--- a/extensions/PythonQt_QtAll/PythonQt_QtAll.cpp     2016-06-09 06:46:16.000000000 -0500
++++ b/extensions/PythonQt_QtAll/PythonQt_QtAll.cpp     2016-07-25 06:06:45.000000000 -0500
+@@ -45,6 +45,7 @@ void PythonQt_init_QtXmlPatterns(PyObjec
+ void PythonQt_init_QtMultimedia(PyObject*);\r
+ void PythonQt_init_QtQml(PyObject*);\r
+ void PythonQt_init_QtQuick(PyObject*);\r
++void PythonQt_init_QtUiTools(PyObject*);
+ \r
+ #ifdef PYTHONQT_WITH_WEBKIT\r
+ void PythonQt_init_QtWebKit(PyObject*);\r
+@@ -67,6 +68,7 @@ namespace PythonQt_QtAll
+     PythonQt_init_QtMultimedia(0);\r
+     PythonQt_init_QtQml(0);\r
+     PythonQt_init_QtQuick(0);\r
++    PythonQt_init_QtUiTools(0);
+   };\r
+ };\r
+ \r
+diff -uprNEBZ --suppress-blank-empty a/extensions/PythonQt_QtAll/PythonQt_QtAll.pro b/extensions/PythonQt_QtAll/PythonQt_QtAll.pro
+--- a/extensions/PythonQt_QtAll/PythonQt_QtAll.pro     2016-06-09 07:00:18.000000000 -0500
++++ b/extensions/PythonQt_QtAll/PythonQt_QtAll.pro     2016-07-25 06:06:45.000000000 -0500
+@@ -21,7 +21,7 @@ SOURCES +=                \
+ \r
+ QT += gui svg sql network xml xmlpatterns opengl\r
+ QT += widgets printsupport multimedia multimediawidgets\r
+-QT += quick qml quickwidgets\r
++QT += quick qml quickwidgets uitools
+ \r
+ include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_core/com_trolltech_qt_core.pri)\r
+ include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_gui/com_trolltech_qt_gui.pri)\r
+@@ -34,6 +34,7 @@ include ($$PYTHONQT_GENERATED_PATH/com_t
+ include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_multimedia/com_trolltech_qt_multimedia.pri)\r
+ include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_qml/com_trolltech_qt_qml.pri)\r
+ include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_quick/com_trolltech_qt_quick.pri)\r
++include ($$PYTHONQT_GENERATED_PATH/com_trolltech_qt_uitools/com_trolltech_qt_uitools.pri)
+ \r
+ PythonQtWebKit {\r
+   QT += webkit webkitwidgets\r
+diff -uprNEBZ --suppress-blank-empty a/generator/abstractmetalang.cpp b/generator/abstractmetalang.cpp
+--- a/generator/abstractmetalang.cpp   2015-06-18 08:32:57.000000000 -0500
++++ b/generator/abstractmetalang.cpp   2016-08-03 02:16:08.000000000 -0500
+@@ -838,14 +838,24 @@ AbstractMetaFunctionList AbstractMetaCla
+     return returned;\r
+ }\r
+ \r
+-bool AbstractMetaClass::hasDefaultIsNull() const \r
++QString AbstractMetaClass::getDefaultNonZeroFunction() const
+ {\r
++  foreach(const AbstractMetaFunction* fun, queryFunctionsByName("isEmpty")) {
++    if (fun->actualMinimumArgumentCount()==0 && fun->isPublic()) {
++      return "isEmpty";
++    }
++  }
++  foreach(const AbstractMetaFunction* fun, queryFunctionsByName("isValid")) {
++    if (fun->actualMinimumArgumentCount() == 0 && fun->isPublic()) {
++      return "isValid";
++    }
++  }
+   foreach(const AbstractMetaFunction* fun, queryFunctionsByName("isNull")) {\r
+-    if (fun->actualMinimumArgumentCount()==0) {\r
+-      return true;\r
++    if (fun->actualMinimumArgumentCount() == 0 && fun->isPublic()) {
++      return "isNull";
+     }\r
+   }\r
+-  return false;\r
++  return QString();
+ }\r
+ \r
+ /*******************************************************************************\r
+diff -uprNEBZ --suppress-blank-empty a/generator/abstractmetalang.h b/generator/abstractmetalang.h
+--- a/generator/abstractmetalang.h     2014-09-25 05:51:32.000000000 -0500
++++ b/generator/abstractmetalang.h     2016-08-01 04:12:32.000000000 -0500
+@@ -800,7 +800,8 @@ public:
+     void setHasCloneOperator(bool on) { m_has_clone_operator = on; }\r
+     bool hasCloneOperator() const { return m_has_clone_operator; }\r
+ \r
+-    bool hasDefaultIsNull() const;\r
++    QString getDefaultNonZeroFunction() const;
++
+     void addPropertySpec(QPropertySpec *spec) { m_property_specs << spec; }\r
+     QList<QPropertySpec *> propertySpecs() const { return m_property_specs; }\r
+ \r
+diff -uprNEBZ --suppress-blank-empty a/generator/merge.sh b/generator/merge.sh
+--- a/generator/merge.sh       1969-12-31 18:00:00.000000000 -0600
++++ b/generator/merge.sh       2010-03-05 16:03:37.000000000 -0600
+@@ -0,0 +1,11 @@
++#!/bin/sh
++
++xsltproc -o typesystem_core.xml --stringparam source 'typesystem_core-qtscript.xml'  merge.xsl typesystem_core-common.xml
++xsltproc -o typesystem_gui.xml --stringparam source 'typesystem_gui-qtscript.xml'  merge.xsl typesystem_gui-common.xml
++xsltproc -o typesystem_opengl.xml --stringparam source 'typesystem_opengl-qtscript.xml'  merge.xsl typesystem_opengl-common.xml
++xsltproc -o typesystem_network.xml --stringparam source 'typesystem_network-qtscript.xml'  merge.xsl typesystem_network-common.xml
++xsltproc -o typesystem_xml.xml --stringparam source 'typesystem_xml-qtscript.xml'  merge.xsl typesystem_xml-common.xml
++xsltproc -o typesystem_webkit.xml --stringparam source 'typesystem_webkit-qtscript.xml'  merge.xsl typesystem_webkit-common.xml
++xsltproc -o typesystem_sql.xml --stringparam source 'typesystem_sql-qtscript.xml'  merge.xsl typesystem_sql-common.xml
++xsltproc -o typesystem_svg.xml --stringparam source 'typesystem_svg-qtscript.xml'  merge.xsl typesystem_svg-common.xml
++xsltproc -o typesystem_xmlpatterns.xml --stringparam source 'typesystem_xmlpatterns-qtscript.xml'  merge.xsl typesystem_xmlpatterns-common.xml
+\ No newline at end of file
+diff -uprNEBZ --suppress-blank-empty a/generator/setupgenerator.cpp b/generator/setupgenerator.cpp
+--- a/generator/setupgenerator.cpp     2016-05-03 04:25:38.000000000 -0500
++++ b/generator/setupgenerator.cpp     2016-08-01 04:12:32.000000000 -0500
+@@ -105,7 +105,7 @@ static QStringList getOperatorCodes(cons
+       r.insert("PythonQt::Type_InplaceXor");\r
+     }\r
+   }\r
+-  if (cls->hasDefaultIsNull()) {\r
++  if (!cls->getDefaultNonZeroFunction().isEmpty()) {
+     r.insert("PythonQt::Type_NonZero");\r
+   }\r
+ \r
+diff -uprNEBZ --suppress-blank-empty a/generator/shellheadergenerator.cpp b/generator/shellheadergenerator.cpp
+--- a/generator/shellheadergenerator.cpp       2016-05-10 10:01:30.000000000 -0500
++++ b/generator/shellheadergenerator.cpp       2016-08-09 07:20:29.000000000 -0500
+@@ -267,7 +267,11 @@ void ShellHeaderGenerator::write(QTextSt
+   QList<FlagsTypeEntry*> flags;\r
+   foreach(AbstractMetaEnum* enum1, enums1) {\r
+     // catch gadgets and enums that are not exported on QObjects...\r
+-    if ((enum1->wasProtected() || enum1->wasPublic()) && (!meta_class->isQObject() || !enum1->hasQEnumsDeclaration())) {\r
++    // since we don't parse Q_FLAG(S), we also need to generate for Q_ENUM which might
++    // have a missing Q_FLAG(S) declaration.
++    if ((enum1->wasProtected() || enum1->wasPublic()) && 
++      (!meta_class->isQObject() || !enum1->hasQEnumsDeclaration() || enum1->typeEntry()->flags()))
++    {
+       enums << enum1;\r
+       if (enum1->typeEntry()->flags()) {\r
+         flags << enum1->typeEntry()->flags();\r
+@@ -395,8 +399,13 @@ void ShellHeaderGenerator::write(QTextSt
+   if (meta_class->hasDefaultToStringFunction() || meta_class->hasToStringCapability()) {\r
+     s << "    QString py_toString(" << meta_class->qualifiedCppName() << "*);" << endl; \r
+   }\r
+-  if (meta_class->hasDefaultIsNull()) {\r
+-    s << "    bool __nonzero__(" << meta_class->qualifiedCppName() << "* obj) { return !obj->isNull(); }" << endl; \r
++  QString nonZeroFunc = meta_class->getDefaultNonZeroFunction();
++  if (!nonZeroFunc.isEmpty()) {
++    s << "    bool __nonzero__(" << meta_class->qualifiedCppName() << "* obj) { return ";
++    if (nonZeroFunc != "isValid") {
++      s << "!";
++    }
++    s << "obj->" << nonZeroFunc << "(); }" << endl;
+   }\r
+ \r
+   AbstractMetaFieldList fields = meta_class->fields();\r
+diff -uprNEBZ --suppress-blank-empty a/generator/typesystem_core.xml b/generator/typesystem_core.xml
+--- a/generator/typesystem_core.xml    2016-05-30 07:33:59.000000000 -0500
++++ b/generator/typesystem_core.xml    2016-06-13 04:54:38.000000000 -0500
+@@ -550,6 +550,8 @@
+   <rejection class="QObject" function-name="disconnectNotify"/>\r
+   <rejection class="QObject" function-name="registerUserData"/>\r
+   <rejection class="QProcess" function-name="pid"/>\r
++  <rejection class="QProcess" function-name="setInheritHandles"/>
++  <rejection class="QProcess" function-name="inheritHandles"/>
+   <rejection class="QRegion" function-name="cleanUp"/>\r
+   <rejection class="QSettings" function-name="registerFormat"/>\r
+   <rejection class="QVector" function-name="back"/>\r
+diff -uprNEBZ --suppress-blank-empty a/generator/typesystem_gui.xml b/generator/typesystem_gui.xml
+--- a/generator/typesystem_gui.xml     2016-06-01 03:20:27.000000000 -0500
++++ b/generator/typesystem_gui.xml     2016-06-20 04:58:59.000000000 -0500
+@@ -1307,6 +1307,17 @@ PyObject* constScanLine(QImage* image, i
+   <object-type name="QWizard">\r
+     <!-- ### Requires correct class name in meta object -->\r
+     <modify-function signature="setDefaultProperty(const char *, const char *, const char *)" remove="all"/>\r
++    
++    <modify-function signature="addPage(QWizardPage*)">
++      <modify-argument index="1">
++        <define-ownership owner="c++" />
++      </modify-argument>
++    </modify-function>
++    <modify-function signature="setButton(QWizard::WizardButton, QAbstractButton*)">
++      <modify-argument index="2">
++        <define-ownership owner="c++" />
++      </modify-argument>
++    </modify-function>
+   </object-type>\r
+   <object-type name="QWizardPage">\r
+   </object-type>\r
+diff -uprNEBZ --suppress-blank-empty a/src/PythonQtConversion.cpp b/src/PythonQtConversion.cpp
+--- a/src/PythonQtConversion.cpp       2016-06-02 07:30:53.000000000 -0500
++++ b/src/PythonQtConversion.cpp       2016-07-21 08:36:40.000000000 -0500
+@@ -746,9 +746,14 @@ QString PythonQtConv::PyObjGetRepresenta
+ QString PythonQtConv::PyObjGetString(PyObject* val, bool strict, bool& ok) {\r
+   QString r;\r
+   ok = true;\r
++#ifndef PY3K
++  // in Python 3, we don't want to convert to QString, since we don't know anything about the encoding
++  // in Python 2, we assume the default for str is latin-1
+   if (val->ob_type == &PyBytes_Type) {\r
+-    r = QString(PyBytes_AS_STRING(val));\r
+-  } else if (PyUnicode_Check(val)) {\r
++    r = QString::fromLatin1(PyBytes_AS_STRING(val));
++  } else
++#endif
++  if (PyUnicode_Check(val)) {
+ #ifdef PY3K\r
+     r = QString::fromUtf8(PyUnicode_AsUTF8(val));\r
+ #else\r
+@@ -976,8 +981,15 @@ QVariant PythonQtConv::PyObjToQVariant(P
+ #endif\r
+     ) {\r
+     // no special type requested\r
+-    if (PyBytes_Check(val) || PyUnicode_Check(val)) {\r
+-      // NOTE: for compatibility reasons between Python 2/3 we don't use ByteArray for PyBytes_Type\r
++    if (PyBytes_Check(val)) {
++#ifdef PY3K
++      // In Python 3, it is a ByteArray
++      type = QVariant::ByteArray;
++#else
++      // In Python 2, we need to use String, since it might be a string
++      type = QVariant::String;
++#endif
++    } else if (PyUnicode_Check(val)) {
+       type = QVariant::String;\r
+     } else if (val == Py_False || val == Py_True) {\r
+       type = QVariant::Bool;\r
+@@ -1117,6 +1129,14 @@ QVariant PythonQtConv::PyObjToQVariant(P
+     }\r
+ \r
+   case QVariant::ByteArray:\r
++    {
++      bool ok;
++#ifdef PY3K
++      v = QVariant(PyObjGetBytes(val, false, ok));
++#else
++      v = QVariant(PyObjGetString(val, false, ok));
++#endif
++    }
+   case QVariant::String:\r
+     {\r
+       bool ok;\r
+@@ -1504,7 +1524,7 @@ QByteArray PythonQtConv::getCPPTypeName(
+ bool PythonQtConv::isStringType(PyTypeObject* type)\r
+ {\r
+ #ifdef PY3K\r
+-  return type == &PyUnicode_Type\r
++  return type == &PyUnicode_Type;
+ #else\r
+   return type == &PyUnicode_Type || type == &PyString_Type;\r
+ #endif\r
+diff -uprNEBZ --suppress-blank-empty a/src/PythonQt.cpp b/src/PythonQt.cpp
+--- a/src/PythonQt.cpp 2016-05-23 02:31:11.000000000 -0500
++++ b/src/PythonQt.cpp 2016-06-20 03:26:33.000000000 -0500
+@@ -1977,6 +1977,7 @@ void PythonQtPrivate::buildDynamicMetaOb
+   // Now look for slots: (this is a bug in QMetaObjectBuilder, all signals need to be added first)\r
+   while (PyDict_Next(dict, &pos, &key, &value)) {\r
+     if (PythonQtProperty_Check(value)) {\r
++      needsMetaObject = true;
+       PythonQtProperty* prop = (PythonQtProperty*)value;\r
+       QMetaPropertyBuilder newProp = builder.addProperty(PyString_AsString(key), prop->data->cppType);\r
+       newProp.setReadable(true);\r
+diff -uprNEBZ --suppress-blank-empty a/src/PythonQtSlotDecorator.cpp b/src/PythonQtSlotDecorator.cpp
+--- a/src/PythonQtSlotDecorator.cpp    2016-05-19 10:22:41.000000000 -0500
++++ b/src/PythonQtSlotDecorator.cpp    2016-07-21 08:36:40.000000000 -0500
+@@ -42,9 +42,9 @@ int PythonQtSlotDecorator_init(PyObject
+   char* argName = 0;\r
+   PyObject* argResult = 0;\r
+ \r
+-  static char* kwlist[] = {"name", "result", 0};\r
++  static const char* kwlist[] = {"name", "result", 0};
+   static PyObject* emptyTuple = PyTuple_New(0);\r
+-  if (!PyArg_ParseTupleAndKeywords(emptyTuple, kw, "|sO:QtCore.Slot", kwlist, &argName, &argResult)) {\r
++  if (!PyArg_ParseTupleAndKeywords(emptyTuple, kw, "|sO:QtCore.Slot", (char**) kwlist, &argName, &argResult)) {
+     return 0;\r
+   }\r
+ \r
+diff -uprNEBZ --suppress-blank-empty a/src/PythonQtStdDecorators.cpp b/src/PythonQtStdDecorators.cpp
+--- a/src/PythonQtStdDecorators.cpp    2016-06-06 06:45:45.000000000 -0500
++++ b/src/PythonQtStdDecorators.cpp    2016-06-20 03:26:33.000000000 -0500
+@@ -153,12 +153,12 @@ QVariant PythonQtStdDecorators::property
+   return o->property(name);\r
+ }\r
+ \r
+-QString PythonQtStdDecorators::tr(QObject* obj, const QByteArray& text, const QByteArray& ambig, int n)\r
++QString PythonQtStdDecorators::tr(QObject* obj, const QString& text, const QString& ambig, int n)
+ {\r
+ #if( QT_VERSION >= QT_VERSION_CHECK(5,0,0) )\r
+-  return QCoreApplication::translate(obj->metaObject()->className(), text.constData(), ambig.constData(), n);\r
++  return QCoreApplication::translate(obj->metaObject()->className(), text.toUtf8().constData(), ambig.toUtf8().constData(), n);
+ #else\r
+-  return QCoreApplication::translate(obj->metaObject()->className(), text.constData(), ambig.constData(), QCoreApplication::CodecForTr, n);\r
++  return QCoreApplication::translate(obj->metaObject()->className(), text.toUtf8().constData(), ambig.toUtf8().constData(), QCoreApplication::CodecForTr, n);
+ #endif\r
+ }\r
+ \r
+diff -uprNEBZ --suppress-blank-empty a/src/PythonQtStdDecorators.h b/src/PythonQtStdDecorators.h
+--- a/src/PythonQtStdDecorators.h      2016-06-06 06:45:45.000000000 -0500
++++ b/src/PythonQtStdDecorators.h      2016-06-20 03:26:33.000000000 -0500
+@@ -106,10 +106,10 @@ public Q_SLOTS:
+   int static_Qt_qrand() { return qrand(); }\r
+   void static_Qt_qsrand(uint a) { qsrand(a); }\r
+ \r
+-  QString tr(QObject* obj, const QByteArray& text, const QByteArray& ambig = QByteArray(), int n = -1);\r
++  QString tr(QObject* obj, const QString& text, const QString& ambig = QString(), int n = -1);
+ \r
+-  QByteArray static_Qt_SIGNAL(const QByteArray& s) { return QByteArray("2") + s; }\r
+-  QByteArray static_Qt_SLOT(const QByteArray& s) { return QByteArray("1") + s; }\r
++  QString static_Qt_SIGNAL(const QString& s) { return QString("2") + s; }
++  QString static_Qt_SLOT(const QString& s) { return QString("1") + s; }
+ \r
+   void static_QTimer_singleShot(int msec, PyObject* callable);\r
+ \r
diff --git a/dev-python/PythonQt/metadata.xml b/dev-python/PythonQt/metadata.xml
new file mode 100644 (file)
index 0000000..7176d61
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="person">
+               <email>spiderx@spiderx.dp.ua</email>
+               <name>Vladimir Pavljuchenkov</name>
+               <description>Proxied maintainer; set to assignee in all bugs</description>
+       </maintainer>
+       <maintainer type="project">
+               <email>proxy-maint@gentoo.org</email>
+               <name>Proxy Maintainers</name>
+       </maintainer>
+       <longdescription>
+PythonQt is a dynamic Python binding for the Qt framework.
+It offers an easy way to embed the Python scripting language into your C++ Qt applications.
+The focus of PythonQt is on embedding Python into an existing C++ application,
+not on writing the whole application completely in Python.
+       </longdescription>
+       <use>
+               <flag name="extensions">Install extensions</flag>
+       </use>
+       <upstream>
+               <changelog>https://sourceforge.net/p/pythonqt/news/</changelog>
+               <doc>http://pythonqt.sourceforge.net/index.html</doc>
+               <remote-id type="sourceforge">pythonqt</remote-id>
+       </upstream>
+</pkgmetadata>