public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/pulseview/, sci-electronics/pulseview/files/
@ 2017-05-01 21:17 Patrice Clement
  0 siblings, 0 replies; 3+ messages in thread
From: Patrice Clement @ 2017-05-01 21:17 UTC (permalink / raw
  To: gentoo-commits

commit:     2b9c8fffe7725da40293a51002016eda9277208e
Author:     vitalogy <vitalogy_github <AT> milaw <DOT> biz>
AuthorDate: Mon Feb 20 10:07:45 2017 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Mon May  1 21:12:52 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b9c8fff

sci-electronics/pulseview: add a .desktop file and use the sigrok icon.

Closes: https://github.com/gentoo/gentoo/pull/4044

 sci-electronics/pulseview/files/pulseview.desktop | 10 ++++++++++
 sci-electronics/pulseview/pulseview-0.3.0.ebuild  |  6 ++++++
 2 files changed, 16 insertions(+)

diff --git a/sci-electronics/pulseview/files/pulseview.desktop b/sci-electronics/pulseview/files/pulseview.desktop
new file mode 100644
index 00000000000..aa0e9312eb5
--- /dev/null
+++ b/sci-electronics/pulseview/files/pulseview.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Name=Pulseview
+GenericName=Pulseview
+Comment=Qt based logic analyzer GUI for sigrok
+Exec=pulseview
+Icon=pulseview
+Terminal=false
+Type=Application
+Categories=Development;Electronics;

diff --git a/sci-electronics/pulseview/pulseview-0.3.0.ebuild b/sci-electronics/pulseview/pulseview-0.3.0.ebuild
index 8b4a6b2c36a..16f8ee75d76 100644
--- a/sci-electronics/pulseview/pulseview-0.3.0.ebuild
+++ b/sci-electronics/pulseview/pulseview-0.3.0.ebuild
@@ -57,3 +57,9 @@ src_configure() {
 	)
 	cmake-utils_src_configure
 }
+
+src_install() {
+	cmake-utils_src_install
+	newicon "${S}"/icons/sigrok-logo-notext.png ${PN}.png
+	domenu "${FILESDIR}"/${PN}.desktop
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/pulseview/, sci-electronics/pulseview/files/
@ 2020-07-06 18:16 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2020-07-06 18:16 UTC (permalink / raw
  To: gentoo-commits

commit:     960e9cf1f2e3bdf0aa85fc14fdeaa57543a2a680
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  2 23:20:02 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Jul  6 18:15:27 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=960e9cf1

sci-electronics/pulseview: Fix build with Qt 5.15

Closes: https://bugs.gentoo.org/730452
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../pulseview/files/pulseview-0.4.2-qt-5.15.patch  | 142 +++++++++++++++++++++
 sci-electronics/pulseview/pulseview-0.4.2.ebuild   |   2 +
 2 files changed, 144 insertions(+)

diff --git a/sci-electronics/pulseview/files/pulseview-0.4.2-qt-5.15.patch b/sci-electronics/pulseview/files/pulseview-0.4.2-qt-5.15.patch
new file mode 100644
index 00000000000..df55954f3c8
--- /dev/null
+++ b/sci-electronics/pulseview/files/pulseview-0.4.2-qt-5.15.patch
@@ -0,0 +1,142 @@
+From ae726b70a7ada9a4be5808e00f0c951318479684 Mon Sep 17 00:00:00 2001
+From: Valentin Ochs <a@0au.de>
+Date: Sat, 20 Jun 2020 16:01:27 +0200
+Subject: [PATCH] Replace obsolete/deprecated Qt methods
+
+---
+ pv/subwindows/decoder_selector/subwindow.cpp |  2 +-
+ pv/util.cpp                                  | 21 ++++++++++++++++++--
+ pv/util.hpp                                  | 10 ++++++++++
+ pv/views/trace/decodetrace.cpp               |  3 ++-
+ pv/views/trace/ruler.cpp                     |  2 +-
+ pv/widgets/timestampspinbox.cpp              |  2 +-
+ 6 files changed, 34 insertions(+), 6 deletions(-)
+
+diff --git a/pv/subwindows/decoder_selector/subwindow.cpp b/pv/subwindows/decoder_selector/subwindow.cpp
+index 94ed6f4b..2c65dcf2 100644
+--- a/pv/subwindows/decoder_selector/subwindow.cpp
++++ b/pv/subwindows/decoder_selector/subwindow.cpp
+@@ -185,7 +185,7 @@ QToolBar* SubWindow::create_toolbar(QWidget *parent) const
+ int SubWindow::minimum_width() const
+ {
+ 	QFontMetrics m(info_label_body_->font());
+-	const int label_width = m.width(QString(tr(initial_notice)));
++	const int label_width = util::text_width(m, tr(initial_notice));
+ 
+ 	return label_width + min_width_margin;
+ }
+diff --git a/pv/util.cpp b/pv/util.cpp
+index 897254e1..dfb8c72b 100644
+--- a/pv/util.cpp
++++ b/pv/util.cpp
+@@ -143,7 +143,7 @@ QString format_time_si(const Timestamp& v, SIPrefix prefix,
+ 	QString s;
+ 	QTextStream ts(&s);
+ 	if (sign && !v.is_zero())
+-		ts << forcesign;
++		ts.setNumberFlags(ts.numberFlags() | QTextStream::ForceSign);
+ 	ts << qSetRealNumberPrecision(precision) << (v * multiplier);
+ 	ts << ' ' << prefix << unit;
+ 
+@@ -169,7 +169,7 @@ QString format_value_si(double v, SIPrefix prefix, unsigned precision,
+ 	QString s;
+ 	QTextStream ts(&s);
+ 	if (sign && (v != 0))
+-		ts << forcesign;
++		ts.setNumberFlags(ts.numberFlags() | QTextStream::ForceSign);
+ 	ts.setRealNumberNotation(QTextStream::FixedNotation);
+ 	ts.setRealNumberPrecision(precision);
+ 	ts << (v * multiplier) << ' ' << prefix << unit;
+@@ -279,5 +279,22 @@ vector<string> split_string(string text, string separator)
+ 	return result;
+ }
+ 
++/**
++ * Return the width of a string in a given font.
++ *
++ * @param[in] metric metrics of the font
++ * @param[in] string the string whose width should be determined
++ *
++ * @return width of the string in pixels
++ */
++std::streamsize text_width(const QFontMetrics &metric, const QString &string)
++{
++#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
++	return metric.horizontalAdvance(string);
++#else
++	return metric.width(string);
++#endif
++}
++
+ } // namespace util
+ } // namespace pv
+diff --git a/pv/util.hpp b/pv/util.hpp
+index fab29a14..49ae04b2 100644
+--- a/pv/util.hpp
++++ b/pv/util.hpp
+@@ -30,6 +30,7 @@
+ 
+ #include <QMetaType>
+ #include <QString>
++#include <QFontMetrics>
+ 
+ using std::string;
+ using std::vector;
+@@ -143,6 +144,15 @@ QString format_time_minutes(const Timestamp& t, signed precision = 0,
+ 
+ vector<string> split_string(string text, string separator);
+ 
++/**
++ * Return the width of a string in a given font.
++ * @param[in] metric metrics of the font
++ * @param[in] string the string whose width should be determined
++ *
++ * @return width of the string in pixels
++ */
++std::streamsize text_width(const QFontMetrics &metric, const QString &string);
++
+ } // namespace util
+ } // namespace pv
+ 
+diff --git a/pv/views/trace/decodetrace.cpp b/pv/views/trace/decodetrace.cpp
+index 67c9b1c4..93c7c5a9 100644
+--- a/pv/views/trace/decodetrace.cpp
++++ b/pv/views/trace/decodetrace.cpp
+@@ -161,7 +161,8 @@ DecodeTrace::DecodeTrace(pv::Session &session,
+ 
+ 	// Determine shortest string we want to see displayed in full
+ 	QFontMetrics m(QApplication::font());
+-	min_useful_label_width_ = m.width("XX"); // e.g. two hex characters
++	// e.g. two hex characters
++	min_useful_label_width_ = util::text_width(m, "XX");
+ 
+ 	default_row_height_ = (ViewItemPaintParams::text_height() * 6) / 4;
+ 	annotation_height_ = (ViewItemPaintParams::text_height() * 5) / 4;
+diff --git a/pv/views/trace/ruler.cpp b/pv/views/trace/ruler.cpp
+index 555794fc..83ffed28 100644
+--- a/pv/views/trace/ruler.cpp
++++ b/pv/views/trace/ruler.cpp
+@@ -283,7 +283,7 @@ void Ruler::paintEvent(QPaintEvent*)
+ 		const int rightedge = width();
+ 		const int x_tick = tick.first;
+ 		if ((x_tick > leftedge) && (x_tick < rightedge)) {
+-			const int x_left_bound = QFontMetrics(font()).width(tick.second) / 2;
++			const int x_left_bound = util::text_width(QFontMetrics(font()), tick.second) / 2;
+ 			const int x_right_bound = rightedge - x_left_bound;
+ 			const int x_legend = min(max(x_tick, x_left_bound), x_right_bound);
+ 			p.drawText(x_legend, ValueMargin, 0, text_height,
+diff --git a/pv/widgets/timestampspinbox.cpp b/pv/widgets/timestampspinbox.cpp
+index fea8175e..01424a5b 100644
+--- a/pv/widgets/timestampspinbox.cpp
++++ b/pv/widgets/timestampspinbox.cpp
+@@ -76,7 +76,7 @@ QSize TimestampSpinBox::minimumSizeHint() const
+ {
+ 	const QFontMetrics fm(fontMetrics());
+ 	const int l = round(value_).str().size() + precision_ + 10;
+-	const int w = fm.width(QString(l, '0'));
++	const int w = util::text_width(fm, QString(l, '0'));
+ 	const int h = lineEdit()->minimumSizeHint().height();
+ 	return QSize(w, h);
+ }
+-- 
+2.24.0.rc2

diff --git a/sci-electronics/pulseview/pulseview-0.4.2.ebuild b/sci-electronics/pulseview/pulseview-0.4.2.ebuild
index 33c5fe3766d..6efa4b2168a 100644
--- a/sci-electronics/pulseview/pulseview-0.4.2.ebuild
+++ b/sci-electronics/pulseview/pulseview-0.4.2.ebuild
@@ -45,6 +45,8 @@ DEPEND="${RDEPEND}"
 
 DOCS=( HACKING NEWS README )
 
+PATCHES=( "${FILESDIR}/${P}-qt-5.15.patch" )
+
 pkg_setup() {
 	use decode && python_setup
 }


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sci-electronics/pulseview/, sci-electronics/pulseview/files/
@ 2025-01-13 17:17 Andreas Sturmlechner
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2025-01-13 17:17 UTC (permalink / raw
  To: gentoo-commits

commit:     7800a7313078655324196395106967fa23932d4f
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 13 16:06:44 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Jan 13 17:15:48 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7800a731

sci-electronics/pulseview: Port to Qt6

Build failure is the same regardless of Qt5 or Qt6, so might as well port it.

Bug: https://bugs.gentoo.org/948044
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../pulseview-0.5.0-glibmm-2.68-required.patch      | 18 ++++++++++++++++++
 sci-electronics/pulseview/pulseview-9999.ebuild     | 21 +++++++++++----------
 2 files changed, 29 insertions(+), 10 deletions(-)

diff --git a/sci-electronics/pulseview/files/pulseview-0.5.0-glibmm-2.68-required.patch b/sci-electronics/pulseview/files/pulseview-0.5.0-glibmm-2.68-required.patch
new file mode 100644
index 000000000000..46309724517a
--- /dev/null
+++ b/sci-electronics/pulseview/files/pulseview-0.5.0-glibmm-2.68-required.patch
@@ -0,0 +1,18 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -120,14 +120,7 @@
+ 
+ list(APPEND PKGDEPS glib-2.0>=2.28.0)
+ 
+-# Try to find the prefered glibmm-2.4. If not found then add glibmm-2.68
+-# to the dependency list.
+-pkg_check_modules(GLIBMM_2_4 glibmm-2.4>=2.28.0)
+-if(GLIBMM_2_4_FOUND)
+-	list(APPEND PKGDEPS glibmm-2.4>=2.28.0)
+-else()
+-	list(APPEND PKGDEPS glibmm-2.68>=2.68.0)
+-endif()
++list(APPEND PKGDEPS glibmm-2.68>=2.68.0)
+ 
+ if(ENABLE_FLOW)
+ 	list(APPEND PKGDEPS gstreamermm-1.0>=1.8.0)

diff --git a/sci-electronics/pulseview/pulseview-9999.ebuild b/sci-electronics/pulseview/pulseview-9999.ebuild
index f6e44dc48a2f..848be745da93 100644
--- a/sci-electronics/pulseview/pulseview-9999.ebuild
+++ b/sci-electronics/pulseview/pulseview-9999.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="8"
+EAPI=8
 
 inherit cmake xdg-utils
 
@@ -20,25 +20,25 @@ LICENSE="GPL-3"
 SLOT="0"
 IUSE="+decode static"
 
-BDEPEND="
-	dev-qt/linguist-tools:5
-	virtual/pkgconfig
-"
 RDEPEND="
 	>=dev-cpp/glibmm-2.28.0:2
 	dev-libs/boost:=
 	>=dev-libs/glib-2.28.0:2
-	dev-qt/qtcore:5
-	dev-qt/qtgui:5
-	dev-qt/qtsvg:5
-	dev-qt/qtwidgets:5
+	dev-qt/qtbase:6[gui,widgets]
+	dev-qt/qtsvg:6
 	>=sci-libs/libsigrok-0.6.0:=[cxx]
 	decode? ( >=sci-libs/libsigrokdecode-0.6.0:= )
 "
 DEPEND="${RDEPEND}"
+BDEPEND="
+	dev-qt/qttools:6[linguist]
+	virtual/pkgconfig
+"
 
 DOCS=( HACKING NEWS README )
 
+PATCHES=( "${FILESDIR}/${PN}-0.5.0-glibmm-2.68-required.patch" )
+
 src_prepare() {
 	cmake_src_prepare
 	cmake_comment_add_subdirectory manual
@@ -47,6 +47,7 @@ src_prepare() {
 src_configure() {
 	local mycmakeargs=(
 		-DDISABLE_WERROR=TRUE
+		-DCMAKE_DISABLE_FIND_PACKAGE_Qt5=ON
 		-DENABLE_DECODE=$(usex decode)
 		-DSTATIC_PKGDEPS_LIBS=$(usex static)
 	)


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-13 17:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-13 17:17 [gentoo-commits] repo/gentoo:master commit in: sci-electronics/pulseview/, sci-electronics/pulseview/files/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2020-07-06 18:16 Andreas Sturmlechner
2017-05-01 21:17 Patrice Clement

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox