* [gentoo-commits] repo/proj/guru:dev commit in: sci-electronics/dsview/, sci-electronics/dsview/files/
@ 2021-05-08 19:40 Rui Huang
0 siblings, 0 replies; 2+ messages in thread
From: Rui Huang @ 2021-05-08 19:40 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: Rui Huang <vowstar <AT> gmail <DOT> com>
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:dev commit in: sci-electronics/dsview/, sci-electronics/dsview/files/
@ 2022-06-16 9:34 Rui Huang
0 siblings, 0 replies; 2+ messages in thread
From: Rui Huang @ 2022-06-16 9:34 UTC (permalink / raw
To: gentoo-commits
commit: 9a6ea36452bbf2e44d774722000c91244eb6086c
Author: Huang Rui <vowstar <AT> gmail <DOT> com>
AuthorDate: Thu Jun 16 09:32:50 2022 +0000
Commit: Rui Huang <vowstar <AT> gmail <DOT> com>
CommitDate: Thu Jun 16 09:32:50 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9a6ea364
sci-electronics/dsview: fix version representation
Closes: https://bugs.gentoo.org/848402
Signed-off-by: Huang Rui <vowstar <AT> gmail.com>
sci-electronics/dsview/Manifest | 2 +-
...sview-1.12-r1.ebuild => dsview-1.1.2-r1.ebuild} | 16 +++--
sci-electronics/dsview/dsview-9999.ebuild | 70 ++++++----------------
.../dsview/files/dsview-1.01-viewport.patch | 10 ----
...w-1.12-cmake.patch => dsview-1.1.2-cmake.patch} | 0
...12-desktop.patch => dsview-1.1.2-desktop.patch} | 0
...ern-c.patch => dsview-1.1.2-fix-extern-c.patch} | 0
...ython3.patch => dsview-1.1.2-fix-python3.patch} | 0
...1.12-fix-qt.patch => dsview-1.1.2-fix-qt.patch} | 0
...fault.patch => dsview-1.1.2-fix-segfault.patch} | 0
sci-electronics/dsview/metadata.xml | 2 +-
11 files changed, 32 insertions(+), 68 deletions(-)
diff --git a/sci-electronics/dsview/Manifest b/sci-electronics/dsview/Manifest
index 61e0d4c87..d02f4433f 100644
--- a/sci-electronics/dsview/Manifest
+++ b/sci-electronics/dsview/Manifest
@@ -1 +1 @@
-DIST dsview-1.12.tar.gz 8150237 BLAKE2B 0f746d0691f006d368cf9f40bf0c1b91223a7f6011d0ce55bdded7924ef940ecb18eec4bfe4cf842eea7eda85e97f3516a6f07e7e361eff991191e6d8bf7628c SHA512 a0b90d654ea64121540815627e8559c147a0b3bb77d10b65d98587b1f67dc3c0ed4d1c022cd686c31aab2879ee602eade69a02f32c5c9947a3bbdf1e7ab475dd
+DIST dsview-1.1.2.tar.gz 8150237 BLAKE2B 0f746d0691f006d368cf9f40bf0c1b91223a7f6011d0ce55bdded7924ef940ecb18eec4bfe4cf842eea7eda85e97f3516a6f07e7e361eff991191e6d8bf7628c SHA512 a0b90d654ea64121540815627e8559c147a0b3bb77d10b65d98587b1f67dc3c0ed4d1c022cd686c31aab2879ee602eade69a02f32c5c9947a3bbdf1e7ab475dd
diff --git a/sci-electronics/dsview/dsview-1.12-r1.ebuild b/sci-electronics/dsview/dsview-1.1.2-r1.ebuild
similarity index 90%
rename from sci-electronics/dsview/dsview-1.12-r1.ebuild
rename to sci-electronics/dsview/dsview-1.1.2-r1.ebuild
index 19027631a..eac50f51f 100644
--- a/sci-electronics/dsview/dsview-1.12-r1.ebuild
+++ b/sci-electronics/dsview/dsview-1.1.2-r1.ebuild
@@ -1,10 +1,11 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{8,9} )
GITHUB_PN="DSView"
+MY_PV="$(ver_rs 2 '')" # 'a.b.c' -> 'a.bc'
+PYTHON_COMPAT=( python3_{8..10} )
inherit cmake python-r1 toolchain-funcs udev xdg
@@ -18,9 +19,9 @@ if [[ ${PV} == "9999" ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/DreamSourceLab/${GITHUB_PN}.git"
else
- SRC_URI="https://github.com/DreamSourceLab/${GITHUB_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ SRC_URI="https://github.com/DreamSourceLab/${GITHUB_PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
- S="${WORKDIR}/${GITHUB_PN}-${PV}"
+ S="${WORKDIR}/${GITHUB_PN}-${MY_PV}"
fi
LICENSE="GPL-3"
@@ -106,6 +107,11 @@ src_install() {
}
pkg_postinst() {
+ udev_reload
xdg_pkg_postinst
+}
+
+pkg_postrm() {
udev_reload
+ xdg_pkg_postrm
}
diff --git a/sci-electronics/dsview/dsview-9999.ebuild b/sci-electronics/dsview/dsview-9999.ebuild
index 86010bfb1..c378d35fc 100644
--- a/sci-electronics/dsview/dsview-9999.ebuild
+++ b/sci-electronics/dsview/dsview-9999.ebuild
@@ -1,12 +1,13 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-PYTHON_COMPAT=( python3_{8,9} )
GITHUB_PN="DSView"
+MY_PV="$(ver_rs 2 '')" # 'a.b.c' -> 'a.bc'
+PYTHON_COMPAT=( python3_{8..11} )
-inherit cmake python-r1 toolchain-funcs udev xdg
+inherit cmake python-r1 udev xdg
DESCRIPTION="An open source multi-function instrument"
HOMEPAGE="
@@ -18,9 +19,9 @@ if [[ ${PV} == "9999" ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/DreamSourceLab/${GITHUB_PN}.git"
else
- SRC_URI="https://github.com/DreamSourceLab/${GITHUB_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ SRC_URI="https://github.com/DreamSourceLab/${GITHUB_PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
- S="${WORKDIR}/${GITHUB_PN}-${PV}"
+ S="${WORKDIR}/${GITHUB_PN}-${MY_PV}"
fi
LICENSE="GPL-3"
@@ -46,57 +47,24 @@ DEPEND="
${RDEPEND}
"
-src_prepare() {
- export CC="$(tc-getCC)"
- export AR="$(tc-getAR)"
-
- default
-
- local LIBDIR="/usr/$(get_libdir)"
-
- grep -rl "/usr/local/lib" "${S}" | xargs sed -i "s@/usr/local/lib@${LIBDIR}@g" || die
- grep -rl "/usr/local" "${S}" | xargs sed -i "s@/usr/local@/usr@g" || die
- cd "${S}/libsigrok4DSL" || die
- sh ./autogen.sh || die
- cd "${S}/libsigrokdecode4DSL" || die
- sh ./autogen.sh || die
-}
+BDEPEND="
+ virtual/pkgconfig
+"
src_configure() {
- local LIBDIR="/usr/$(get_libdir)"
-
- cd "${S}/libsigrok4DSL" || die
- sh ./configure --libdir=${LIBDIR} --prefix=/usr || die
- cd "${S}/libsigrokdecode4DSL" || die
- sh ./configure --libdir=${LIBDIR} --prefix=/usr || die
-}
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr"
+ )
-src_compile() {
- cd "${S}/libsigrok4DSL" || die
- emake
- cd "${S}/libsigrokdecode4DSL" || die
- emake
-}
-
-src_install() {
- local LIBDIR="/usr/$(get_libdir)"
-
- cd "${S}/libsigrok4DSL" || die
- emake DESTDIR="${D}" install
- cd "${S}/libsigrokdecode4DSL" || die
- emake DESTDIR="${D}" install
- cd "${S}/DSView" || die
-
- DESTDIR="${D}" \
- PKG_CONFIG_PATH="${D}${LIBDIR}/pkgconfig" \
- CFLAGS="-I${D}/usr/include" \
- CXXFLAGS="-I${D}/usr/include" \
- LDFLAGS="-L${D}${LIBDIR}" \
- cmake -DCMAKE_INSTALL_PREFIX=/usr . || die
- emake DESTDIR="${D}" install
+ cmake_src_configure
}
pkg_postinst() {
+ udev_reload
xdg_pkg_postinst
+}
+
+pkg_postrm() {
udev_reload
+ xdg_pkg_postrm
}
diff --git a/sci-electronics/dsview/files/dsview-1.01-viewport.patch b/sci-electronics/dsview/files/dsview-1.01-viewport.patch
deleted file mode 100644
index 6f8f49d69..000000000
--- a/sci-electronics/dsview/files/dsview-1.01-viewport.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- 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-cmake.patch b/sci-electronics/dsview/files/dsview-1.1.2-cmake.patch
similarity index 100%
rename from sci-electronics/dsview/files/dsview-1.12-cmake.patch
rename to sci-electronics/dsview/files/dsview-1.1.2-cmake.patch
diff --git a/sci-electronics/dsview/files/dsview-1.12-desktop.patch b/sci-electronics/dsview/files/dsview-1.1.2-desktop.patch
similarity index 100%
rename from sci-electronics/dsview/files/dsview-1.12-desktop.patch
rename to sci-electronics/dsview/files/dsview-1.1.2-desktop.patch
diff --git a/sci-electronics/dsview/files/dsview-1.12-fix-extern-c.patch b/sci-electronics/dsview/files/dsview-1.1.2-fix-extern-c.patch
similarity index 100%
rename from sci-electronics/dsview/files/dsview-1.12-fix-extern-c.patch
rename to sci-electronics/dsview/files/dsview-1.1.2-fix-extern-c.patch
diff --git a/sci-electronics/dsview/files/dsview-1.12-fix-python3.patch b/sci-electronics/dsview/files/dsview-1.1.2-fix-python3.patch
similarity index 100%
rename from sci-electronics/dsview/files/dsview-1.12-fix-python3.patch
rename to sci-electronics/dsview/files/dsview-1.1.2-fix-python3.patch
diff --git a/sci-electronics/dsview/files/dsview-1.12-fix-qt.patch b/sci-electronics/dsview/files/dsview-1.1.2-fix-qt.patch
similarity index 100%
rename from sci-electronics/dsview/files/dsview-1.12-fix-qt.patch
rename to sci-electronics/dsview/files/dsview-1.1.2-fix-qt.patch
diff --git a/sci-electronics/dsview/files/dsview-1.12-fix-segfault.patch b/sci-electronics/dsview/files/dsview-1.1.2-fix-segfault.patch
similarity index 100%
rename from sci-electronics/dsview/files/dsview-1.12-fix-segfault.patch
rename to sci-electronics/dsview/files/dsview-1.1.2-fix-segfault.patch
diff --git a/sci-electronics/dsview/metadata.xml b/sci-electronics/dsview/metadata.xml
index c58b17b45..5e0ee4e64 100644
--- a/sci-electronics/dsview/metadata.xml
+++ b/sci-electronics/dsview/metadata.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>vowstar@gmail.com</email>
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-16 9:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-08 19:40 [gentoo-commits] repo/proj/guru:dev commit in: sci-electronics/dsview/, sci-electronics/dsview/files/ Rui Huang
-- strict thread matches above, loose matches on Subject: below --
2022-06-16 9:34 Rui Huang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox