aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2019-02-14 12:42:52 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2019-02-14 12:42:52 +0000
commit022fc53172ffd278a45b388863b00864c6d9a614 (patch)
treeb93af1e847e2c6383cea6f065b6f8026cd069d4a
parentf86e5779d390fafe851452121c4616b38ccae0d4 (diff)
community/gns3-gui: fixed sip-qt5 error dependency
This problem has been introduced with Qt5 upgrade from 5.10 to 5.1x. SIP now is shipped separately. This fix has been cherry-picked from edge. Patch has been provided by GNS3 developers: https://github.com/GNS3/gns3-gui/issues/2709
-rw-r--r--community/gns3-gui/APKBUILD12
-rw-r--r--community/gns3-gui/fix-qt5-sip.patch200
2 files changed, 207 insertions, 5 deletions
diff --git a/community/gns3-gui/APKBUILD b/community/gns3-gui/APKBUILD
index 97006e9dcd8..53db2f66ee0 100644
--- a/community/gns3-gui/APKBUILD
+++ b/community/gns3-gui/APKBUILD
@@ -2,16 +2,17 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=gns3-gui
pkgver=2.1.11
-pkgrel=0
+pkgrel=1
pkgdesc="GNS3 network simulator. Graphical user interface package."
url="https://github.com/GNS3/gns3-gui"
arch="noarch"
license="GPL-3.0"
-depends="python3 py3-paramiko gns3-converter py3-psutil py3-jsonschema
- py3-raven py3-qt5 qt5-qtsvg"
+depends="python3 py3-paramiko py3-psutil py3-jsonschema
+ py3-raven py3-qt5 qt5-qtsvg py3-sip"
makedepends="python3-dev py-setuptools"
subpackages="$pkgname-doc"
-source="${pkgname}-${pkgver}.tar.gz::https://github.com/GNS3/${pkgname}/archive/v${pkgver}.tar.gz"
+source="${pkgname}-${pkgver}.tar.gz::https://github.com/GNS3/${pkgname}/archive/v${pkgver}.tar.gz
+fix-qt5-sip.patch"
builddir="$srcdir"/$pkgname-$pkgver
build() {
@@ -31,4 +32,5 @@ package() {
install -Dm644 ${srcdir}/${pkgname}-${pkgver}/LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}
-sha512sums="328d12b761df8811d2aef93f62b0e681e1122ba71fb9fbd004b1fd0c23c7e5f8526a60b45c6adede19ac775a64b584f73806cf12298d9be6bdd4038ec3cbac55 gns3-gui-2.1.11.tar.gz"
+sha512sums="328d12b761df8811d2aef93f62b0e681e1122ba71fb9fbd004b1fd0c23c7e5f8526a60b45c6adede19ac775a64b584f73806cf12298d9be6bdd4038ec3cbac55 gns3-gui-2.1.11.tar.gz
+a38f3b2c6864ccc3fe78422a92b9a83ea1fa04c15e26131d74e6303dcc6671148d2860dc129483bac53f699dd25cbdfae20ac63ab170891fd4640c739d4bfc6c fix-qt5-sip.patch"
diff --git a/community/gns3-gui/fix-qt5-sip.patch b/community/gns3-gui/fix-qt5-sip.patch
new file mode 100644
index 00000000000..0712fc4497f
--- /dev/null
+++ b/community/gns3-gui/fix-qt5-sip.patch
@@ -0,0 +1,200 @@
+diff --git a/gns3/console_cmd.py b/gns3/console_cmd.py
+index 5e630f43..b1d0673a 100644
+--- a/gns3/console_cmd.py
++++ b/gns3/console_cmd.py
+@@ -22,7 +22,7 @@ Handles commands typed in the GNS3 console.
+ import sys
+ import cmd
+ import struct
+-import sip
++from .qt import sip
+ import json
+
+ from .node import Node
+diff --git a/gns3/console_view.py b/gns3/console_view.py
+index 10edb860..365f7bc1 100644
+--- a/gns3/console_view.py
++++ b/gns3/console_view.py
+@@ -16,7 +16,7 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ import sys
+-import sip
++from .qt import sip
+ import struct
+ import inspect
+ import datetime
+diff --git a/gns3/crash_report.py b/gns3/crash_report.py
+index bc37d061..a9379e16 100644
+--- a/gns3/crash_report.py
++++ b/gns3/crash_report.py
+@@ -132,7 +132,7 @@ class CrashReport:
+ def _add_qt_information(self, context):
+ try:
+ from .qt import QtCore
+- import sip
++ from .qt import sip
+ except ImportError:
+ return context
+ context["psutil:version"] = psutil.__version__
+diff --git a/gns3/dialogs/appliance_wizard.py b/gns3/dialogs/appliance_wizard.py
+index 06f2bf2a..8ab386b4 100644
+--- a/gns3/dialogs/appliance_wizard.py
++++ b/gns3/dialogs/appliance_wizard.py
+@@ -16,7 +16,7 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ import os
+-import sip
++from ..qt import sip
+ import shutil
+
+ from ..qt import QtWidgets, QtCore, QtGui, qpartial, qslot
+diff --git a/gns3/graphics_view.py b/gns3/graphics_view.py
+index 517bfaaf..da058385 100644
+--- a/gns3/graphics_view.py
++++ b/gns3/graphics_view.py
+@@ -21,7 +21,7 @@ Graphical view on the scene where items are drawn.
+
+ import logging
+ import os
+-import sip
++from .qt import sip
+ import sys
+
+ from .qt import QtCore, QtGui, QtNetwork, QtWidgets, qpartial, qslot
+diff --git a/gns3/http_client.py b/gns3/http_client.py
+index c0ceca69..6993bf58 100644
+--- a/gns3/http_client.py
++++ b/gns3/http_client.py
+@@ -15,7 +15,7 @@
+ # You should have received a copy of the GNU General Public License
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-import sip
++from .qt import sip
+ import json
+ import copy
+ import http
+diff --git a/gns3/items/node_item.py b/gns3/items/node_item.py
+index cac82e70..b4ec7930 100644
+--- a/gns3/items/node_item.py
++++ b/gns3/items/node_item.py
+@@ -19,7 +19,7 @@
+ Graphical representation of a node on the QGraphicsScene.
+ """
+
+-import sip
++from ..qt import sip
+
+ from ..qt import QtCore, QtGui, QtWidgets, QtSvg, qslot
+ from ..qt.qimage_svg_renderer import QImageSvgRenderer
+diff --git a/gns3/link.py b/gns3/link.py
+index 1cd634c0..323823b1 100644
+--- a/gns3/link.py
++++ b/gns3/link.py
+@@ -21,7 +21,7 @@ Manages and stores everything needed for a connection between 2 devices.
+
+ import os
+ import re
+-import sip
++from .qt import sip
+ import uuid
+
+ from .qt import QtCore, QtWidgets
+diff --git a/gns3/nodes_view.py b/gns3/nodes_view.py
+index 463a63fe..16f51ed4 100644
+--- a/gns3/nodes_view.py
++++ b/gns3/nodes_view.py
+@@ -22,7 +22,7 @@ on the QGraphics scene.
+
+ import tempfile
+ import json
+-import sip
++from .qt import sip
+
+ from .qt import QtCore, QtGui, QtWidgets, qpartial
+ from .modules import MODULES
+diff --git a/gns3/ports/port.py b/gns3/ports/port.py
+index 66776a33..3425df0a 100644
+--- a/gns3/ports/port.py
++++ b/gns3/ports/port.py
+@@ -19,7 +19,7 @@
+ Base class for port objects.
+ """
+
+-import sip
++from ..qt import sip
+
+ from ..qt import qslot
+
+diff --git a/gns3/progress.py b/gns3/progress.py
+index 4f167bbd..33135513 100644
+--- a/gns3/progress.py
++++ b/gns3/progress.py
+@@ -15,7 +15,7 @@
+ # You should have received a copy of the GNU General Public License
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-import sip
++from .qt import sip
+ import time
+ from contextlib import contextmanager
+
+diff --git a/gns3/qt/__init__.py b/gns3/qt/__init__.py
+index b8d9550e..ae88c4bf 100644
+--- a/gns3/qt/__init__.py
++++ b/gns3/qt/__init__.py
+@@ -24,7 +24,6 @@ Compatibility layer for Qt bindings, so it is easier to switch to PySide if need
+
+
+ import sys
+-import sip
+ import os
+ import re
+ import inspect
+@@ -33,12 +32,17 @@ import functools
+ import logging
+ log = logging.getLogger("qt/__init__.py")
+
++try:
++ import sip
++except ImportError:
++ from PyQt5 import sip
+ from PyQt5 import QtCore, QtGui, QtNetwork, QtWidgets, Qt
+ sys.modules[__name__ + '.QtCore'] = QtCore
+ sys.modules[__name__ + '.QtGui'] = QtGui
+ sys.modules[__name__ + '.QtNetwork'] = QtNetwork
+ sys.modules[__name__ + '.QtWidgets'] = QtWidgets
+ sys.modules[__name__ + '.Qt'] = Qt
++sys.modules[__name__ + '.sip'] = sip
+
+ try:
+ from PyQt5 import QtSvg
+diff --git a/gns3/utils/progress_dialog.py b/gns3/utils/progress_dialog.py
+index b6a84af9..9742e1b3 100644
+--- a/gns3/utils/progress_dialog.py
++++ b/gns3/utils/progress_dialog.py
+@@ -19,7 +19,7 @@
+ Progress dialog that blocking tasks (file operations, network connections etc.)
+ """
+
+-import sip
++from ..qt import sip
+ from gns3.version import __version__
+ from ..qt import QtWidgets, QtCore, qslot
+
+diff --git a/gns3/utils/wait_for_lambda_worker.py b/gns3/utils/wait_for_lambda_worker.py
+index 78a5207a..d24a3cb0 100644
+--- a/gns3/utils/wait_for_lambda_worker.py
++++ b/gns3/utils/wait_for_lambda_worker.py
+@@ -19,7 +19,7 @@
+ Thread showing a progress dialog and running the code from a lambda
+ """
+
+-import sip
++from ..qt import sip
+
+ from ..qt import QtCore
+
+