summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Bos2017-08-23 00:21:54 +0000
committerCharles Bos2017-08-23 00:21:54 +0000
commitc9b5b25bdc280ca8e5e2738ed64c279e0dc70b8a (patch)
tree989f3e31f65c3c340d7da256f69acdf26fc0863b
downloadaur-c9b5b25bdc280ca8e5e2738ed64c279e0dc70b8a.tar.gz
Initial commit
-rw-r--r--.SRCINFO42
-rw-r--r--PKGBUILD93
-rw-r--r--no-qtwebkit.patch11
-rw-r--r--no-webview.patch144
4 files changed, 290 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..9284f60921f4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,42 @@
+# Generated by mksrcinfo v8
+# Wed Aug 23 00:21:18 UTC 2017
+pkgbase = kdebindings-python
+ pkgver = 4.14.2
+ pkgrel = 1
+ url = https://projects.kde.org/projects/kde/kdebindings/python/pykde4/repository
+ arch = i686
+ arch = x86_64
+ license = GPL
+ license = LGPL
+ license = FDL
+ makedepends = automoc4
+ makedepends = boost
+ makedepends = cmake
+ makedepends = kdepimlibs4
+ makedepends = python-pyqt4
+ makedepends = python2-pyqt4
+ makedepends = python-sip
+ makedepends = python2-sip
+ makedepends = qscintilla
+ source = https://download.kde.org/Attic/stable/4.14.2/src/pykde4-4.14.2.tar.xz
+ source = no-qtwebkit.patch
+ source = no-webview.patch
+ md5sums = b34e92677ffc8c74220d4c32a89ec57d
+ md5sums = b20320e79db1a41d480ac47e47901586
+ md5sums = 8f7f6da4bf4730003319d71382460775
+
+pkgname = kdebindings-python
+ pkgdesc = A set of Python 3.x bindings for KDE.
+ depends = kdebindings-python-common
+ depends = kdepimlibs4
+ depends = python-pyqt4
+
+pkgname = kdebindings-python2
+ pkgdesc = A set of Python 2.x bindings for KDE.
+ depends = kdebindings-python-common
+ depends = kdepimlibs4
+ depends = python2-pyqt4
+
+pkgname = kdebindings-python-common
+ pkgdesc = Common files shared between python2 and python3 kdebindings.
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..8302d1299538
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,93 @@
+# Contributor: Charles Bos <charlesbos1 AT gmail>
+# Contributor: maz-1
+
+pkgbase=kdebindings-python
+pkgname=('kdebindings-python'
+ 'kdebindings-python2'
+ 'kdebindings-python-common')
+_srcname=pykde4
+pkgver=4.14.2
+pkgrel=1
+url='https://projects.kde.org/projects/kde/kdebindings/python/pykde4/repository'
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+makedepends=('automoc4'
+ 'boost'
+ 'cmake'
+ 'kdepimlibs4'
+ 'python-pyqt4'
+ 'python2-pyqt4'
+ 'python-sip'
+ 'python2-sip'
+ 'qscintilla')
+source=("https://download.kde.org/Attic/stable/${pkgver}/src/${_srcname}-${pkgver}.tar.xz"
+ "no-qtwebkit.patch"
+ "no-webview.patch")
+
+prepare() {
+ mkdir -p build-python{,2}
+ cd ${_srcname}-${pkgver}
+
+ # Removes dependency on qtwebkit
+ patch -p1 -i ${srcdir}/no-qtwebkit.patch
+
+ # The arch version of kdelibs no longer provides kdewebkit
+ # This patch is a crude attempt to get this to build without it
+ patch -p1 -i ${srcdir}/no-webview.patch
+}
+
+build() {
+ export PYTHONDONTWRITEBYTECODE="TRUE"
+
+ cd build-python
+ cmake ../${_srcname}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DPYTHON_EXECUTABLE=/usr/bin/python3 \
+ -DBUILD_TESTING=OFF
+ make
+ cd ..
+
+ cd build-python2
+ cmake ../${_srcname}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DPYTHON_EXECUTABLE=/usr/bin/python2 \
+ -DBUILD_TESTING=OFF
+ make
+}
+
+package_kdebindings-python() {
+ pkgdesc="A set of Python 3.x bindings for KDE."
+ depends=('kdebindings-python-common'
+ 'kdepimlibs4'
+ 'python-pyqt4')
+
+ make -C build-python DESTDIR="${pkgdir}" install
+
+ rm -r "${pkgdir}/usr/share"
+}
+
+package_kdebindings-python2() {
+ pkgdesc="A set of Python 2.x bindings for KDE."
+ depends=('kdebindings-python-common'
+ 'kdepimlibs4'
+ 'python2-pyqt4')
+
+ make -C build-python2 DESTDIR="${pkgdir}" install
+
+ rm -r "${pkgdir}/usr/share" "${pkgdir}/usr/bin/pykdeuic4"
+
+ find "${pkgdir}" -name '*.py' | xargs sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|'
+}
+
+package_kdebindings-python-common() {
+ pkgdesc="Common files shared between python2 and python3 kdebindings."
+
+ make -C build-python DESTDIR="${pkgdir}" install
+
+ rm -r "${pkgdir}/usr/lib" "${pkgdir}/usr/bin"
+}
+md5sums=('b34e92677ffc8c74220d4c32a89ec57d'
+ 'b20320e79db1a41d480ac47e47901586'
+ '8f7f6da4bf4730003319d71382460775')
diff --git a/no-qtwebkit.patch b/no-qtwebkit.patch
new file mode 100644
index 000000000000..2e5b548dc0a9
--- /dev/null
+++ b/no-qtwebkit.patch
@@ -0,0 +1,11 @@
+diff -Nur original/CMakeLists.txt modified/CMakeLists.txt
+--- original/CMakeLists.txt 2014-08-14 20:17:11.000000000 +0000
++++ modified/CMakeLists.txt 2017-08-22 16:07:59.029025174 +0000
+@@ -87,7 +87,6 @@
+ ${QT_QTSQL_INCLUDE_DIR}
+ ${QT_QTXML_INCLUDE_DIR}
+ ${QT_QTSVG_INCLUDE_DIR}
+- ${QT_QTWEBKIT_INCLUDE_DIR}
+ ${KDE4_INCLUDE_DIR}
+ ${KDE4_INCLUDE_DIR}/solid
+ ${KDE4_INCLUDE_DIR}/kio
diff --git a/no-webview.patch b/no-webview.patch
new file mode 100644
index 000000000000..c743014d84d6
--- /dev/null
+++ b/no-webview.patch
@@ -0,0 +1,144 @@
+diff -Nur original/sip/plasma/abstractrunner.sip modified/sip/plasma/abstractrunner.sip
+--- original/sip/plasma/abstractrunner.sip 2014-08-14 20:17:11.000000000 +0000
++++ modified/sip/plasma/abstractrunner.sip 2017-08-22 16:13:26.419025177 +0000
+@@ -94,7 +94,6 @@
+ #include <plasma/view.h>
+ #include <plasma/wallpaper.h>
+ #include <plasma/scripting/wallpaperscript.h>
+-#include <plasma/widgets/webview.h>
+ %End
+
+ namespace Plasma
+@@ -288,8 +287,6 @@
+ sipType = sipType_Plasma_SvgWidget;
+ else if (dynamic_cast<Plasma::TabBar*>(sipCpp))
+ sipType = sipType_Plasma_TabBar;
+- else if (dynamic_cast<Plasma::WebView*>(sipCpp))
+- sipType = sipType_Plasma_WebView;
+ else if (dynamic_cast<Plasma::CheckBox*>(sipCpp))
+ sipType = sipType_Plasma_CheckBox;
+ else if (dynamic_cast<Plasma::ComboBox*>(sipCpp))
+diff -Nur original/sip/plasma/animation.sip modified/sip/plasma/animation.sip
+--- original/sip/plasma/animation.sip 2014-08-14 20:17:11.000000000 +0000
++++ modified/sip/plasma/animation.sip 2017-08-22 16:11:16.075691840 +0000
+@@ -163,8 +163,6 @@
+ sipType = sipType_Plasma_SvgWidget;
+ else if (dynamic_cast<Plasma::TabBar*>(sipCpp))
+ sipType = sipType_Plasma_TabBar;
+- else if (dynamic_cast<Plasma::WebView*>(sipCpp))
+- sipType = sipType_Plasma_WebView;
+ else if (dynamic_cast<Plasma::CheckBox*>(sipCpp))
+ sipType = sipType_Plasma_CheckBox;
+ else if (dynamic_cast<Plasma::ComboBox*>(sipCpp))
+@@ -292,5 +290,4 @@
+ #include <plasma/view.h>
+ #include <plasma/wallpaper.h>
+ #include <plasma/scripting/wallpaperscript.h>
+-#include <plasma/widgets/webview.h>
+ %End
+diff -Nur original/sip/plasma/plasmamod.sip modified/sip/plasma/plasmamod.sip
+--- original/sip/plasma/plasmamod.sip 2014-08-14 20:17:11.000000000 +0000
++++ modified/sip/plasma/plasmamod.sip 2017-08-22 16:12:55.289025177 +0000
+@@ -116,5 +116,4 @@
+ %Include toolbutton.sip
+ %Include treeview.sip
+ %Include videowidget.sip
+-%Include webview.sip
+ %Include windoweffects.sip
+diff -Nur original/sip/plasma/webview.sip modified/sip/plasma/webview.sip
+--- original/sip/plasma/webview.sip 2014-08-14 20:17:11.000000000 +0000
++++ modified/sip/plasma/webview.sip 1970-01-01 00:00:00.000000000 +0000
+@@ -1,93 +0,0 @@
+-// Copyright 2008 Simon Edwards <simon@simonzone.com>
+-
+-// Generated by twine
+-
+-// This program is free software; you can redistribute it and/or modify
+-// it under the terms of the GNU Library General Public License as
+-// published by the Free Software Foundation; either version 2, or
+-// (at your option) any later version.
+-
+-// This program is distributed in the hope that it will be useful,
+-// but WITHOUT ANY WARRANTY; without even the implied warranty of
+-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-// GNU General Public License for more details
+-
+-// You should have received a copy of the GNU Library General Public
+-// License along with this program; if not, write to the
+-// Free Software Foundation, Inc.,
+-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+-
+-
+-namespace Plasma
+-{
+-
+-class WebView : QGraphicsWidget
+-{
+-%TypeHeaderCode
+-#include <plasma/widgets/webview.h>
+-%End
+-
+-
+-public:
+- explicit WebView (QGraphicsItem* parent = 0);
+- void setUrl (const KUrl& url);
+- KUrl url () const;
+-//ig void setHtml (const QByteArray& html, const KUrl& baseUrl = KUrl());
+- QString html () const;
+- void setHtml (const QString& html, const KUrl& baseUrl = KUrl());
+- QRectF geometry () const;
+- void setPage (QWebPage* page);
+- QWebPage* page () const;
+- QWebFrame* mainFrame () const;
+- void setDragToScroll (bool drag);
+- bool dragToScroll ();
+- void setGeometry (const QRectF& geometry);
+-
+-signals:
+- void loadProgress (int percent);
+- void loadFinished (bool success);
+-
+-protected:
+- void paint (QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0);
+- void mouseMoveEvent (QGraphicsSceneMouseEvent* event);
+- void hoverMoveEvent (QGraphicsSceneHoverEvent* event);
+- void mousePressEvent (QGraphicsSceneMouseEvent* event);
+- void mouseDoubleClickEvent (QGraphicsSceneMouseEvent* event);
+- void mouseReleaseEvent (QGraphicsSceneMouseEvent* event);
+- void contextMenuEvent (QGraphicsSceneContextMenuEvent* event);
+- void wheelEvent (QGraphicsSceneWheelEvent* event);
+- void keyPressEvent (QKeyEvent* event);
+- void keyReleaseEvent (QKeyEvent* event);
+- void focusInEvent (QFocusEvent* event);
+- void focusOutEvent (QFocusEvent* event);
+- void dragEnterEvent (QGraphicsSceneDragDropEvent* event);
+- void dragLeaveEvent (QGraphicsSceneDragDropEvent* event);
+- void dragMoveEvent (QGraphicsSceneDragDropEvent* event);
+- void dropEvent (QGraphicsSceneDragDropEvent* event);
+-public:
+- ~WebView ();
+- QSizeF contentsSize () const;
+- void setScrollPosition (const QPointF& position);
+- QPointF scrollPosition () const;
+- QRectF viewportGeometry () const;
+-protected:
+- QSizeF sizeHint (Qt::SizeHint which, const QSizeF& constraint) const;
+-public:
+- qreal zoomFactor () const;
+- void setZoomFactor (const qreal zoom);
+-protected:
+- QVariant itemChange (QGraphicsItem::GraphicsItemChange change, const QVariant& value);
+-public:
+- void back ();
+- void forward ();
+- void reload ();
+- void stop ();
+-signals:
+- void urlChanged (const QUrl& url);
+-};
+-// WebView
+-
+-};
+-// Plasma
+-
+-