Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/relational/, sci-mathematics/relational/files/
Date: Sun, 16 Feb 2020 22:06:35
Message-Id: 1581890755.d0dc04c20c3f6148733c46a22d19c4feeeb41994.asturm@gentoo
1 commit: d0dc04c20c3f6148733c46a22d19c4feeeb41994
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 16 22:01:46 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 16 22:05:55 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0dc04c2
7
8 sci-mathematics/relational: Drop dependency on dev-qt/PyQt5[webkit]
9
10 Package-Manager: Portage-2.3.89, Repoman-2.3.20
11 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
12
13 .../files/relational-2.5-no-qtwebkit.patch | 67 ++++++++++++++++++++++
14 .../relational/relational-2.5-r2.ebuild | 45 +++++++++++++++
15 2 files changed, 112 insertions(+)
16
17 diff --git a/sci-mathematics/relational/files/relational-2.5-no-qtwebkit.patch b/sci-mathematics/relational/files/relational-2.5-no-qtwebkit.patch
18 new file mode 100644
19 index 00000000000..092b4a58e37
20 --- /dev/null
21 +++ b/sci-mathematics/relational/files/relational-2.5-no-qtwebkit.patch
22 @@ -0,0 +1,67 @@
23 +From bcdf81cdcd7fe531e11cb1db55e63468b7d73d47 Mon Sep 17 00:00:00 2001
24 +From: Salvo 'LtWorf' Tomaselli <tiposchi@×××××××.it>
25 +Date: Sat, 26 Aug 2017 17:51:04 +0200
26 +Subject: [PATCH] Remove embedded browser with website
27 +
28 +---
29 + relational_gui/about.py | 32 --------------------------------
30 + 1 file changed, 32 deletions(-)
31 +
32 +diff --git a/relational_gui/about.py b/relational_gui/about.py
33 +index 4c03c99..55abfc9 100644
34 +--- a/relational_gui/about.py
35 ++++ b/relational_gui/about.py
36 +@@ -18,12 +18,6 @@
37 +
38 + from PyQt5 import QtCore, QtGui, QtWidgets
39 +
40 +-try: # If QtWebKit is available, uses it
41 +- from PyQt5 import QtWebKitWidgets
42 +- webk = True
43 +-except:
44 +- webk = False
45 +-
46 + version = 0
47 +
48 +
49 +@@ -85,31 +79,7 @@ def setupUi(self, Dialog):
50 + self.tab_2.setObjectName("tab_2")
51 + self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.tab_2)
52 + self.verticalLayout_7.setObjectName("verticalLayout_7")
53 +- if (webk):
54 +- self.webView = QtWebKitWidgets.QWebView(self.tab_2)
55 +- self.webView.setUrl(
56 +- QtCore.QUrl("http://ltworf.github.io/relational/allowed_expressions.html"))
57 +- self.webView.setObjectName("webView")
58 +- self.verticalLayout_7.addWidget(self.webView)
59 +- else:
60 +- self.webLink = QtWidgets.QLabel(self.groupBox)
61 +- self.webLink.setFont(font)
62 +- self.webLink.setObjectName("lblLink")
63 +- self.webLink.setText(QtWidgets.QApplication.translate(
64 +- "Dialog", "<a href=\"http://ltworf.github.io/relational/\">Relational's website</a>", None,))
65 +- self.webLink.setOpenExternalLinks(True)
66 +- self.webLink.setTextFormat(QtCore.Qt.AutoText)
67 +- self.webLink.setTextInteractionFlags(
68 +- QtCore.Qt.LinksAccessibleByKeyboard |
69 +- QtCore.Qt.LinksAccessibleByMouse |
70 +- QtCore.Qt.TextBrowserInteraction |
71 +- QtCore.Qt.TextSelectableByKeyboard |
72 +- QtCore.Qt.TextSelectableByMouse
73 +- )
74 +-
75 +- self.verticalLayout_7.addWidget(self.webLink)
76 +
77 +- self.tabWidget.addTab(self.tab_2, "")
78 + self.verticalLayout_2.addWidget(self.tabWidget)
79 + self.buttonBox = QtWidgets.QDialogButtonBox(Dialog)
80 + self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
81 +@@ -294,8 +264,6 @@ def retranslateUi(self, Dialog):
82 + "<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read &lt;http://www.gnu.org/philosophy/why-not-lgpl.html&gt;. </p></body></html>", None))
83 + self.tabWidget.setTabText(self.tabWidget.indexOf(self.License), QtWidgets.QApplication.translate(
84 + "Dialog", "License", None))
85 +- self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), QtWidgets.QApplication.translate(
86 +- "Dialog", "Docs", None))
87 +
88 +
89 + if __name__ == "__main__":
90
91 diff --git a/sci-mathematics/relational/relational-2.5-r2.ebuild b/sci-mathematics/relational/relational-2.5-r2.ebuild
92 new file mode 100644
93 index 00000000000..0e073dfe099
94 --- /dev/null
95 +++ b/sci-mathematics/relational/relational-2.5-r2.ebuild
96 @@ -0,0 +1,45 @@
97 +# Copyright 1999-2020 Gentoo Authors
98 +# Distributed under the terms of the GNU General Public License v2
99 +
100 +EAPI=7
101 +
102 +PYTHON_COMPAT=( python3_{6,7,8} )
103 +
104 +inherit python-single-r1
105 +
106 +DESCRIPTION="Educational tool for relational algebra"
107 +HOMEPAGE="https://ltworf.github.io/relational/"
108 +SRC_URI="https://github.com/ltworf/${PN}/releases/download/${PV}/${PN}_${PV}.orig.tar.gz"
109 +
110 +LICENSE="GPL-3"
111 +SLOT="0"
112 +KEYWORDS="~amd64 ~x86"
113 +IUSE=""
114 +
115 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
116 +
117 +DEPEND="${PYTHON_DEPS}
118 + $(python_gen_cond_dep '
119 + dev-python/PyQt5[gui,widgets,${PYTHON_MULTI_USEDEP}]
120 + ')
121 +"
122 +RDEPEND="${DEPEND}"
123 +
124 +S="${WORKDIR}/${PN}"
125 +
126 +PATCHES=( "${FILESDIR}/${P}-no-qtwebkit.patch" )
127 +
128 +src_prepare() {
129 + default
130 +
131 + sed -i -e '/^Terminal=/ s/0/false/' \
132 + -e '/^Keywords=/ s/$/;/' \
133 + relational.desktop || die
134 +}
135 +
136 +src_install() {
137 + emake -j1 DESTDIR="${ED}" install-{relational-cli,python3-relational,relational}
138 + python_optimize
139 +
140 + dodoc CHANGELOG complexity CREDITS README.md
141 +}