diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-08-25 10:45:55 +0100 |
commit | 3cf7c3ef441822c889356fd1812ebf2944a59851 (patch) | |
tree | c513fe68548b40365c1c2ebfe35c58ad431cdd77 /sci-electronics/pulseview | |
parent | 05b8b0e0af1d72e51a3ee61522941bf7605cd01c (diff) |
gentoo resync : 25.08.2020
Diffstat (limited to 'sci-electronics/pulseview')
-rw-r--r-- | sci-electronics/pulseview/Manifest | 7 | ||||
-rw-r--r-- | sci-electronics/pulseview/files/pulseview-0.4.2-qt-5.15.patch | 142 | ||||
-rw-r--r-- | sci-electronics/pulseview/pulseview-0.4.2.ebuild (renamed from sci-electronics/pulseview/pulseview-0.4.1-r1.ebuild) | 43 | ||||
-rw-r--r-- | sci-electronics/pulseview/pulseview-9999.ebuild | 41 |
4 files changed, 202 insertions, 31 deletions
diff --git a/sci-electronics/pulseview/Manifest b/sci-electronics/pulseview/Manifest index 60299ff1b4bc..aa474a11cf9e 100644 --- a/sci-electronics/pulseview/Manifest +++ b/sci-electronics/pulseview/Manifest @@ -1,4 +1,5 @@ -DIST pulseview-0.4.1.tar.gz 1342532 BLAKE2B 759779d4024df8f972fbed515764f17557014972abcb39d3942b411bfa78c6f97a89ee98b706adb51d240bdb738925546cec073f98ba829f1e325acaac892c01 SHA512 0bae4357be312bf6e997885270887a5bcc0a8dfb6914e63bb0d5abb35389b6681748e0e4667556ad432c5432c861185bcdd8da7815fb570fc8a2fbbf5eed3801 -EBUILD pulseview-0.4.1-r1.ebuild 1261 BLAKE2B 7e354b705e0c0ee70426273123888e2c7bd1a6c4d5d297d73221b7b0ea3014a4994f6f964b02029acc1f77e640332e010b7e0740b9fce594710717e0fa26f32e SHA512 0d380dbceb3563c6104f04b7f1039f70cd16ae46c20acdb8b6effdca6142e1f78791330b72d42c61c569d241aa69b40188884197d65093e17c2b6b2fa9473440 -EBUILD pulseview-9999.ebuild 1261 BLAKE2B 0bed74537ba8677c03935cc841e97523a56f2d041dcfa76fcc084381b4079c02c56f50df63b40ab9325b98e64d3e2dff28781b68f89dbbb05cd1ec50b7967a0a SHA512 3501cb8e38c660d238e0b6781e24d0442367738e45cc9fa7d417206541ff19bd1e5bc009215e8a0f23426d4ccbc6a63f795584a8cbf4efb787e6d217bd2b3ac3 +AUX pulseview-0.4.2-qt-5.15.patch 5193 BLAKE2B ea81ba54ca1a8b9d76d2e7751940d7b4e509adb75f903e5e85be49976106eefe1745908fe55d2aa206402494cd636879c71fe811e7dde874ebc40174ea8727cd SHA512 66c1e00f9470d4384bfa5dda2db7ada9d1e86cee2b2cd2a8517b44c1d6ee310d2f9a930033a7c93a30e006675c738b7cf75d6ee22ee09c7b8b52e831ca6571d0 +DIST pulseview-0.4.2.tar.gz 1399718 BLAKE2B ebbefefa55bb7ce9d1bbdfa8ea44d9536fa4f9ca9f6f13175a5bb6122dcb431ddad7c668e631128ca57fd2231021f8ce1c686fac9fa746ace24cf69ef3d71e71 SHA512 79f653c9faad021c03b59b4a519b594190d5558dfb9be60cabcc2a35e991e66b733b337fec58a9248699e7aef0df3be1472c81f93274b25cec1fc6b73f8f033b +EBUILD pulseview-0.4.2.ebuild 1438 BLAKE2B b69e35f0d08be8c6c5e48b06040912c03622efa63ab096e6efe163c5ea5d3d438176635a7ee3843aa137cecaf61dcfa4cc9aaa205192bfa66e9ef6c92d5a6b03 SHA512 f4646adb593564b3c5334150dfe9b88f7247a8e614072ccb74b1cfda7c757811189cf57bc8c0af652bea3723a8b785bb113ebbb2c594343b0d0cf21b354d7967 +EBUILD pulseview-9999.ebuild 1392 BLAKE2B ea4369f14836df68488ad9bd3c4b9ee961bcfc20ea2e5cf7b1f666445945109dd54bac3f1ae0ce8e7eb923c49ba03cb8397a73bf0625321fc3a255f0298cf920 SHA512 cf0d8b405189b56f14a93436719052f2855c84e64db4800b52bb0bee3488c29a68d65e30d25a4b6affaa1dae203d91013461f96c0b03cb10b3a432937b5590e4 MISC metadata.xml 333 BLAKE2B b4981e29ae436b82875daf955c31085e4bade0ce53b9de677c68f4fed6ef63cd8610ae995989eb659f1d205a072d3f87c8aac02b422b3e30a3baac9eda92dfa2 SHA512 f7f0484072e7c2486a176c29814d7a390d8e44d01593d75ed51231e5c67e7226e576da17410da01281b16ed31361c1724e60026d7df06b580e29901a3f89d2dd 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 000000000000..df55954f3c8c --- /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.1-r1.ebuild b/sci-electronics/pulseview/pulseview-0.4.2.ebuild index 909877319c9b..b4e924d82834 100644 --- a/sci-electronics/pulseview/pulseview-0.4.1-r1.ebuild +++ b/sci-electronics/pulseview/pulseview-0.4.2.ebuild @@ -1,13 +1,13 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI=7 -PYTHON_COMPAT=( python3_{6,7} ) +PYTHON_COMPAT=( python3_{6,7,8,9} ) -inherit cmake-utils gnome2-utils python-single-r1 xdg-utils +inherit cmake python-single-r1 xdg-utils -if [[ ${PV} == "9999" ]]; then +if [[ ${PV} == *9999* ]]; then EGIT_REPO_URI="git://sigrok.org/${PN}" inherit git-r3 else @@ -23,39 +23,54 @@ SLOT="0" IUSE="+decode static" REQUIRED_USE="decode? ( ${PYTHON_REQUIRED_USE} )" +BDEPEND=" + dev-qt/linguist-tools:5 + virtual/pkgconfig +" RDEPEND=" + >=dev-cpp/glibmm-2.28.0:2 >=dev-libs/boost-1.55:= >=dev-libs/glib-2.28.0:2 - >=dev-cpp/glibmm-2.28.0:2 - >=sci-libs/libsigrok-0.5.1:=[cxx] dev-qt/qtcore:5 dev-qt/qtgui:5 - dev-qt/qtwidgets:5 dev-qt/qtsvg:5 + dev-qt/qtwidgets:5 + >=sci-libs/libsigrok-0.5.1:=[cxx] decode? ( - >=sci-libs/libsigrokdecode-0.5.2:=[${PYTHON_SINGLE_USEDEP}] ${PYTHON_DEPS} - )" -DEPEND="${RDEPEND} - virtual/pkgconfig" + >=sci-libs/libsigrokdecode-0.5.2:=[${PYTHON_SINGLE_USEDEP}] + ) +" +DEPEND="${RDEPEND}" DOCS=( HACKING NEWS README ) +PATCHES=( "${FILESDIR}/${P}-qt-5.15.patch" ) + +pkg_setup() { + use decode && python_setup +} + +src_prepare() { + cmake_src_prepare + cmake_comment_add_subdirectory manual +} + src_configure() { local mycmakeargs=( -DDISABLE_WERROR=TRUE -DENABLE_DECODE=$(usex decode) -DSTATIC_PKGDEPS_LIBS=$(usex static) ) - cmake-utils_src_configure + cmake_src_configure } pkg_postinst() { - gnome2_icon_cache_update + xdg_icon_cache_update xdg_desktop_database_update } pkg_postrm() { - gnome2_icon_cache_update + xdg_icon_cache_update xdg_desktop_database_update } diff --git a/sci-electronics/pulseview/pulseview-9999.ebuild b/sci-electronics/pulseview/pulseview-9999.ebuild index 570474071f06..e67387d52ebe 100644 --- a/sci-electronics/pulseview/pulseview-9999.ebuild +++ b/sci-electronics/pulseview/pulseview-9999.ebuild @@ -1,13 +1,13 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI=7 -PYTHON_COMPAT=( python3_{6,7} ) +PYTHON_COMPAT=( python3_{6,7,8,9} ) -inherit cmake-utils gnome2-utils python-single-r1 xdg-utils +inherit cmake python-single-r1 xdg-utils -if [[ ${PV} == "9999" ]]; then +if [[ ${PV} == *9999* ]]; then EGIT_REPO_URI="git://sigrok.org/${PN}" inherit git-r3 else @@ -23,39 +23,52 @@ SLOT="0" IUSE="+decode static" REQUIRED_USE="decode? ( ${PYTHON_REQUIRED_USE} )" +BDEPEND=" + dev-qt/linguist-tools:5 + virtual/pkgconfig +" RDEPEND=" + >=dev-cpp/glibmm-2.28.0:2 >=dev-libs/boost-1.55:= >=dev-libs/glib-2.28.0:2 - >=dev-cpp/glibmm-2.28.0:2 - >=sci-libs/libsigrok-0.6.0:=[cxx] dev-qt/qtcore:5 dev-qt/qtgui:5 - dev-qt/qtwidgets:5 dev-qt/qtsvg:5 + dev-qt/qtwidgets:5 + >=sci-libs/libsigrok-0.6.0:=[cxx] decode? ( - >=sci-libs/libsigrokdecode-0.6.0:=[${PYTHON_SINGLE_USEDEP}] ${PYTHON_DEPS} - )" -DEPEND="${RDEPEND} - virtual/pkgconfig" + >=sci-libs/libsigrokdecode-0.6.0:=[${PYTHON_SINGLE_USEDEP}] + ) +" +DEPEND="${RDEPEND}" DOCS=( HACKING NEWS README ) +pkg_setup() { + use decode && python_setup +} + +src_prepare() { + cmake_src_prepare + cmake_comment_add_subdirectory manual +} + src_configure() { local mycmakeargs=( -DDISABLE_WERROR=TRUE -DENABLE_DECODE=$(usex decode) -DSTATIC_PKGDEPS_LIBS=$(usex static) ) - cmake-utils_src_configure + cmake_src_configure } pkg_postinst() { - gnome2_icon_cache_update + xdg_icon_cache_update xdg_desktop_database_update } pkg_postrm() { - gnome2_icon_cache_update + xdg_icon_cache_update xdg_desktop_database_update } |