* [gentoo-commits] repo/proj/guru:master commit in: sci-electronics/dsview/, sci-electronics/dsview/files/
@ 2021-05-09 18:13 Andrew Ammerlaan
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Ammerlaan @ 2021-05-09 18:13 UTC (permalink / raw
To: gentoo-commits
commit: b26e5a664b0300b7c50b259849b5946fa78a4ec5
Author: Huang Rui <vowstar <AT> gmail <DOT> com>
AuthorDate: Sat May 8 19:40:22 2021 +0000
Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
CommitDate: Sat May 8 19:40:22 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b26e5a66
sci-electronics/dsview: fix gcc-11 compile
* fix extern-c error when compile
* fix qt compile error
* fix segfault
* remove useless patches
Closes: https://bugs.gentoo.org/787674
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Huang Rui <vowstar <AT> gmail.com>
sci-electronics/dsview/dsview-1.12.ebuild | 13 +++----
sci-electronics/dsview/dsview-9999.ebuild | 11 ++----
.../dsview/files/dsview-1.12-fix-extern-c.patch | 42 ++++++++++++++++++++++
.../dsview/files/dsview-1.12-fix-qt.patch | 13 +++++++
.../dsview/files/dsview-1.12-fix-segfault.patch | 22 ++++++++++++
5 files changed, 86 insertions(+), 15 deletions(-)
diff --git a/sci-electronics/dsview/dsview-1.12.ebuild b/sci-electronics/dsview/dsview-1.12.ebuild
index ad5e51153..dbcb96bbc 100644
--- a/sci-electronics/dsview/dsview-1.12.ebuild
+++ b/sci-electronics/dsview/dsview-1.12.ebuild
@@ -47,9 +47,11 @@ DEPEND="
"
PATCHES=(
- "${FILESDIR}"/${PN}-1.01-viewport.patch
- "${FILESDIR}"/${PN}-1.12-desktop.patch
- "${FILESDIR}"/${PN}-1.12-cmake.patch
+ "${FILESDIR}"/${P}-desktop.patch
+ "${FILESDIR}"/${P}-cmake.patch
+ "${FILESDIR}"/${P}-fix-qt.patch
+ "${FILESDIR}"/${P}-fix-segfault.patch
+ "${FILESDIR}"/${P}-fix-extern-c.patch
)
src_prepare() {
@@ -79,10 +81,9 @@ src_configure() {
src_compile() {
cd "${S}/libsigrok4DSL" || die
- emake DESTDIR="${D}"
+ emake
cd "${S}/libsigrokdecode4DSL" || die
- emake DESTDIR="${D}"
- cd "${S}"
+ emake
}
src_install() {
diff --git a/sci-electronics/dsview/dsview-9999.ebuild b/sci-electronics/dsview/dsview-9999.ebuild
index ad5e51153..98b14e640 100644
--- a/sci-electronics/dsview/dsview-9999.ebuild
+++ b/sci-electronics/dsview/dsview-9999.ebuild
@@ -46,12 +46,6 @@ DEPEND="
${RDEPEND}
"
-PATCHES=(
- "${FILESDIR}"/${PN}-1.01-viewport.patch
- "${FILESDIR}"/${PN}-1.12-desktop.patch
- "${FILESDIR}"/${PN}-1.12-cmake.patch
-)
-
src_prepare() {
export CC="$(tc-getCC)"
export AR="$(tc-getAR)"
@@ -79,10 +73,9 @@ src_configure() {
src_compile() {
cd "${S}/libsigrok4DSL" || die
- emake DESTDIR="${D}"
+ emake
cd "${S}/libsigrokdecode4DSL" || die
- emake DESTDIR="${D}"
- cd "${S}"
+ emake
}
src_install() {
diff --git a/sci-electronics/dsview/files/dsview-1.12-fix-extern-c.patch b/sci-electronics/dsview/files/dsview-1.12-fix-extern-c.patch
new file mode 100644
index 000000000..f3e537c87
--- /dev/null
+++ b/sci-electronics/dsview/files/dsview-1.12-fix-extern-c.patch
@@ -0,0 +1,42 @@
+diff --git a/DSView/pv/data/decode/annotation.cpp b/DSView/pv/data/decode/annotation.cpp
+index c433a28..7f23e36 100755
+--- a/DSView/pv/data/decode/annotation.cpp
++++ b/DSView/pv/data/decode/annotation.cpp
+@@ -19,9 +19,7 @@
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+-extern "C" {
+ #include <libsigrokdecode4DSL/libsigrokdecode.h>
+-}
+
+ #include <vector>
+ #include <assert.h>
+diff --git a/DSView/pv/view/decodetrace.cpp b/DSView/pv/view/decodetrace.cpp
+index ad943ac..733497f 100755
+--- a/DSView/pv/view/decodetrace.cpp
++++ b/DSView/pv/view/decodetrace.cpp
+@@ -19,9 +19,7 @@
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+-extern "C" {
+ #include <libsigrokdecode4DSL/libsigrokdecode.h>
+-}
+
+ #include <extdef.h>
+
+diff --git a/DSView/pv/widgets/decodergroupbox.cpp b/DSView/pv/widgets/decodergroupbox.cpp
+index 79d3cd8..80c4c44 100755
+--- a/DSView/pv/widgets/decodergroupbox.cpp
++++ b/DSView/pv/widgets/decodergroupbox.cpp
+@@ -18,9 +18,7 @@
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+-extern "C" {
+ #include <libsigrokdecode4DSL/libsigrokdecode.h>
+-}
+
+ #include "decodergroupbox.h"
+ #include "../data/decoderstack.h"
diff --git a/sci-electronics/dsview/files/dsview-1.12-fix-qt.patch b/sci-electronics/dsview/files/dsview-1.12-fix-qt.patch
new file mode 100644
index 000000000..bebf8c84a
--- /dev/null
+++ b/sci-electronics/dsview/files/dsview-1.12-fix-qt.patch
@@ -0,0 +1,13 @@
+diff --git a/DSView/pv/view/viewport.cpp b/DSView/pv/view/viewport.cpp
+index 921d3db..16cdce9 100755
+--- a/DSView/pv/view/viewport.cpp
++++ b/DSView/pv/view/viewport.cpp
+@@ -37,7 +37,7 @@
+
+ #include <QMouseEvent>
+ #include <QStyleOption>
+-
++#include <QPainterPath>
+
+ #include <math.h>
+
diff --git a/sci-electronics/dsview/files/dsview-1.12-fix-segfault.patch b/sci-electronics/dsview/files/dsview-1.12-fix-segfault.patch
new file mode 100644
index 000000000..353d234f5
--- /dev/null
+++ b/sci-electronics/dsview/files/dsview-1.12-fix-segfault.patch
@@ -0,0 +1,22 @@
+diff --git a/libsigrokdecode4DSL/instance.c b/libsigrokdecode4DSL/instance.c
+index 5ede710..5d96701 100755
+--- a/libsigrokdecode4DSL/instance.c
++++ b/libsigrokdecode4DSL/instance.c
+@@ -370,6 +370,8 @@ SRD_API struct srd_decoder_inst *srd_inst_new(struct srd_session *sess,
+ }
+ }
+
++ gstate = PyGILState_Ensure();
++
+ /*
+ * Prepare a default channel map, where samples come in the
+ * order in which the decoder class defined them.
+@@ -389,8 +391,6 @@ SRD_API struct srd_decoder_inst *srd_inst_new(struct srd_session *sess,
+ /* Default to the initial pins being the same as in sample 0. */
+ oldpins_array_seed(di);
+
+- gstate = PyGILState_Ensure();
+-
+ /* Create a new instance of this decoder class. */
+ if (!(di->py_inst = PyObject_CallObject(dec->py_dec, NULL))) {
+ if (PyErr_Occurred())
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/proj/guru:master commit in: sci-electronics/dsview/, sci-electronics/dsview/files/
@ 2021-06-06 8:14 Jian Lin
0 siblings, 0 replies; 2+ messages in thread
From: Jian Lin @ 2021-06-06 8:14 UTC (permalink / raw
To: gentoo-commits
commit: 48cc6e06c7b52a6392a09a71677199eb62dd3fc9
Author: Huang Rui <vowstar <AT> gmail <DOT> com>
AuthorDate: Fri Jun 4 18:05:19 2021 +0000
Commit: Jian Lin <jlin.gentoo <AT> outlook <DOT> com>
CommitDate: Fri Jun 4 18:06:06 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=48cc6e06
sci-electronics/dsview: fix build problem with python 3.9
Package-Manager: Portage-3.0.19, Repoman-3.0.3
Signed-off-by: Huang Rui <vowstar <AT> gmail.com>
.../dsview/{dsview-1.12.ebuild => dsview-1.12-r1.ebuild} | 1 +
sci-electronics/dsview/files/dsview-1.12-fix-python3.patch | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/sci-electronics/dsview/dsview-1.12.ebuild b/sci-electronics/dsview/dsview-1.12-r1.ebuild
similarity index 98%
rename from sci-electronics/dsview/dsview-1.12.ebuild
rename to sci-electronics/dsview/dsview-1.12-r1.ebuild
index dbcb96bbc..f2fffbf41 100644
--- a/sci-electronics/dsview/dsview-1.12.ebuild
+++ b/sci-electronics/dsview/dsview-1.12-r1.ebuild
@@ -52,6 +52,7 @@ PATCHES=(
"${FILESDIR}"/${P}-fix-qt.patch
"${FILESDIR}"/${P}-fix-segfault.patch
"${FILESDIR}"/${P}-fix-extern-c.patch
+ "${FILESDIR}"/${P}-fix-python3.patch
)
src_prepare() {
diff --git a/sci-electronics/dsview/files/dsview-1.12-fix-python3.patch b/sci-electronics/dsview/files/dsview-1.12-fix-python3.patch
new file mode 100644
index 000000000..252eb8d49
--- /dev/null
+++ b/sci-electronics/dsview/files/dsview-1.12-fix-python3.patch
@@ -0,0 +1,11 @@
+--- a/libsigrokdecode4DSL/configure.ac 2020-05-11 21:07:38.000000000 +0800
++++ b/libsigrokdecode4DSL/configure.ac 2021-06-05 01:54:35.937525565 +0800
+@@ -90,7 +90,7 @@
+
+ # Python 3 is always needed.
+ SR_PKG_CHECK([python3], [SRD_PKGLIBS],
+- [python3 >= 3.2], [python-3.7 >= 3.7], [python-3.6 >= 3.6], [python-3.5 >= 3.5], [python-3.4 >= 3.4], [python-3.3 >= 3.3], [python-3.2 >= 3.2])
++ [python3 >= 3.2], [python-3.10 >= 3.10], [python-3.9 >= 3.9], [python-3.8 >= 3.8], [python-3.7 >= 3.7], [python-3.6 >= 3.6], [python-3.5 >= 3.5], [python-3.4 >= 3.4], [python-3.3 >= 3.3], [python-3.2 >= 3.2])
+ AS_IF([test "x$sr_have_python3" = xno],
+ [AC_MSG_ERROR([Cannot find Python 3 development headers.])])
+
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-06 8:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-06 8:14 [gentoo-commits] repo/proj/guru:master commit in: sci-electronics/dsview/, sci-electronics/dsview/files/ Jian Lin
-- strict thread matches above, loose matches on Subject: below --
2021-05-09 18:13 Andrew Ammerlaan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox