From c389899d83ee8e43c66e6e468483389a865a716b Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sat, 2 Jan 2021 20:48:50 +0200 Subject: gnu: Register missing patch. This is a follow-up to 402e697a1144788102b16ca8c9ea74607d2c2c3c. * gnu/local.mk (dist_patch_DATA): Register rust-1.48 patch. --- gnu/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 2402b1e349..c03a8b9f51 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1595,6 +1595,7 @@ dist_patch_DATA = \ %D%/packages/patches/rust-1.19-mrustc.patch \ %D%/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch \ %D%/packages/patches/rust-1.45-linker-locale.patch \ + %D%/packages/patches/rust-1.48-linker-locale.patch \ %D%/packages/patches/rust-bootstrap-stage0-test.patch \ %D%/packages/patches/rust-coresimd-doctest.patch \ %D%/packages/patches/rust-ndarray-remove-blas-src-dep.patch \ -- cgit v1.2.3 From 89f4f0baa9ff956ba0efe9ec20e1805f01230a54 Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Sun, 29 Nov 2020 17:30:04 -0500 Subject: gnu: pidgin: Upgrade to 2.14.1. * gnu/packages/messaging.scm (pidgin) [version]: Modify. [source][sha256]: Modify base32. [patches][pidgin-libnm.patch]: Remove obsolete patch. * gnu/packages/patches/pidgin-libnm.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove entry. Signed-off-by: Danny Milosavljevic --- gnu/local.mk | 1 - gnu/packages/messaging.scm | 13 +++---- gnu/packages/patches/pidgin-libnm.patch | 60 --------------------------------- 3 files changed, 5 insertions(+), 69 deletions(-) delete mode 100644 gnu/packages/patches/pidgin-libnm.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index c03a8b9f51..0aad15740c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1471,7 +1471,6 @@ dist_patch_DATA = \ %D%/packages/patches/picard-fix-id3-rename-test.patch \ %D%/packages/patches/picprog-non-intel-support.patch \ %D%/packages/patches/pidgin-add-search-path.patch \ - %D%/packages/patches/pidgin-libnm.patch \ %D%/packages/patches/pinball-const-fix.patch \ %D%/packages/patches/pinball-cstddef.patch \ %D%/packages/patches/pinball-missing-separators.patch \ diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index bb449b5c0f..45b6c5e8d0 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -718,25 +718,22 @@ authentication.") (define-public pidgin (package (name "pidgin") - (version "2.13.0") + (version "2.14.1") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/pidgin/Pidgin/" - version "/pidgin-" version ".tar.bz2")) + version "/pidgin-" version ".tar.gz")) (sha256 - (base32 "13vdqj70315p9rzgnbxjp9c51mdzf1l4jg1kvnylc4bidw61air7")) + (base32 "1c4dzxg9c3d9zfqqa7jwijj9rv9fm6w95igmpljwy88lxq7v5w11")) (patches (search-patches - "pidgin-add-search-path.patch" - ;; Remove the snippet and bootstrapping - ;; native-inputs together with this patch. - "pidgin-libnm.patch")) + "pidgin-add-search-path.patch")) (modules '((guix build utils))) (snippet '(begin - ;; Remove stale generated file after applying pidgin-libnm.patch. + ;; Remove stale generated file after applying patches. (delete-file "configure") #t)))) (build-system glib-or-gtk-build-system) diff --git a/gnu/packages/patches/pidgin-libnm.patch b/gnu/packages/patches/pidgin-libnm.patch deleted file mode 100644 index d34af749af..0000000000 --- a/gnu/packages/patches/pidgin-libnm.patch +++ /dev/null @@ -1,60 +0,0 @@ -From: Tobias Geerinckx-Rice -Date: Sun, 24 May 2020 16:11:01 +0200 -Subject: [PATCH] gnu: pidgin: Find libnm. - -Copied verbatim from[0]. - -[0]: https://git.archlinux.org/svntogit/packages.git/plain/trunk/pidgin-nm-1.0.patch?h=packages/pidgin - -diff --git a/configure.ac b/configure.ac -index 04836fa..0a2d451 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1423,18 +1423,24 @@ fi - dnl Check for NetworkManager.h; if we don't have it, oh well - if test "x$enable_dbus" = "xyes" ; then - if test "x$enable_nm" = "xyes" ; then -- PKG_CHECK_MODULES(NETWORKMANAGER, [NetworkManager >= 0.5.0], [ -+ PKG_CHECK_MODULES(NETWORKMANAGER, [libnm], [ - AC_SUBST(NETWORKMANAGER_CFLAGS) - AC_SUBST(NETWORKMANAGER_LIBS) - AC_DEFINE(HAVE_NETWORKMANAGER, 1, [Define if we have NetworkManager.]) - ], [ -- enable_nm=no -- if test "x$force_deps" = "xyes" ; then -- AC_MSG_ERROR([ -+ PKG_CHECK_MODULES(NETWORKMANAGER, [NetworkManager >= 0.5.0], [ -+ AC_SUBST(NETWORKMANAGER_CFLAGS) -+ AC_SUBST(NETWORKMANAGER_LIBS) -+ AC_DEFINE(HAVE_NETWORKMANAGER, 1, [Define if we have NetworkManager.]) -+ ], [ -+ enable_nm=no -+ if test "x$force_deps" = "xyes" ; then -+ AC_MSG_ERROR([ - NetworkManager development headers not found. - Use --disable-nm if you do not need NetworkManager support. - ]) -- fi]) -+ fi]) -+ ]) - fi - else - enable_nm=no -diff --git a/libpurple/network.c b/libpurple/network.c -index c43e3c7..b17e439 100644 ---- a/libpurple/network.c -+++ b/libpurple/network.c -@@ -939,8 +939,13 @@ nm_update_state(NMState state) - #if NM_CHECK_VERSION(0,8,992) - case NM_STATE_DISCONNECTING: - #endif -+#if NM_CHECK_VERSION(1,0,0) -+ if (prev != NM_STATE_CONNECTED_GLOBAL && prev != NM_STATE_UNKNOWN) -+ break; -+#else - if (prev != NM_STATE_CONNECTED && prev != NM_STATE_UNKNOWN) - break; -+#endif - if (ui_ops != NULL && ui_ops->network_disconnected != NULL) - ui_ops->network_disconnected(); - break; -- cgit v1.2.3 From 3fd4477809caaeb6681999941f21baac14d87e84 Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Thu, 31 Dec 2020 00:30:09 -0500 Subject: gnu: pidgin: Enable MultiMedia and A/V support. * gnu/packages/messaging.scm (pidgin) [patches] [pidgin-vv-gst.patch]: New patch. [arguments]<#:configure-flags>[--diable-vv]: Remove flag. [--disable-gstreamer]: Remove flag. [CFLAGS]: New flag. [inputs]: Add farstream and gstreamer. Move gtk+-2 to ... [propagated-inputs]: ... here. * gnu/packages/patches/pidgin-vv-gst.patch: New file. * gnu/local.mk (dist_patch_DATA): Add entry. Signed-off-by: Danny Milosavljevic --- gnu/local.mk | 1 + gnu/packages/messaging.scm | 16 ++++++----- gnu/packages/patches/pidgin-vv-gst.patch | 48 ++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 7 deletions(-) create mode 100644 gnu/packages/patches/pidgin-vv-gst.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 0aad15740c..53a67e6ffe 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1471,6 +1471,7 @@ dist_patch_DATA = \ %D%/packages/patches/picard-fix-id3-rename-test.patch \ %D%/packages/patches/picprog-non-intel-support.patch \ %D%/packages/patches/pidgin-add-search-path.patch \ + %D%/packages/patches/pidgin-vv-gst.patch \ %D%/packages/patches/pinball-const-fix.patch \ %D%/packages/patches/pinball-cstddef.patch \ %D%/packages/patches/pinball-missing-separators.patch \ diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index 99cb3e8f1a..4a368c0be4 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -729,7 +729,8 @@ authentication.") (base32 "1c4dzxg9c3d9zfqqa7jwijj9rv9fm6w95igmpljwy88lxq7v5w11")) (patches (search-patches - "pidgin-add-search-path.patch")) + "pidgin-add-search-path.patch" + "pidgin-vv-gst.patch")) (modules '((guix build utils))) (snippet '(begin @@ -752,10 +753,9 @@ authentication.") ("dbus" ,dbus) ("dbus-glib" ,dbus-glib) ;; ("evolution-data-server" ,evolution-data-server) - ;; ("farstream" ,farstream) + ("farstream" ,farstream) ("gnutls" ,gnutls) - ;; ("gstreamer" ,gstreamer) - ("gtk+" ,gtk+-2) + ("gstreamer" ,gstreamer) ;; ("gtkspell2" ,gtkspell2) ("libgadu" ,libgadu) ("libgcrypt" ,libgcrypt) @@ -786,16 +786,18 @@ authentication.") ("tcl" ,tcl) ("tk" ,tk))) (propagated-inputs - `(("glib" ,glib))) + `(("glib" ,glib) + ("gtk+" ,gtk+-2))) (arguments `(#:configure-flags (list + (string-append "CFLAGS=-I" + (assoc-ref %build-inputs "gst-plugins-base") + "/include/gstreamer-1.0") "--disable-gtkspell" ;; "--enable-gevolution" "--enable-cap" "--enable-mono" - "--disable-vv" ; XXX remove when we have farstream and gstreamer - "--disable-gstreamer" ; XXX patches needed to support gstreamer-1.0 "--enable-cyrus-sasl" (string-append "--with-ncurses-headers=" (assoc-ref %build-inputs "ncurses") diff --git a/gnu/packages/patches/pidgin-vv-gst.patch b/gnu/packages/patches/pidgin-vv-gst.patch new file mode 100644 index 0000000000..e0553dd119 --- /dev/null +++ b/gnu/packages/patches/pidgin-vv-gst.patch @@ -0,0 +1,48 @@ +Name: Gary Kramlich +Date: 2020-07-12 +Source: https://keep.imfreedom.org/pidgin/pidgin/rev/39ac50435cfb + +diff --git a/libpurple/mediamanager.c b/libpurple/mediamanager.c +--- a/libpurple/mediamanager.c ++++ b/libpurple/mediamanager.c +@@ -2231,6 +2231,7 @@ + purple_media_manager_unregister_gst_device(PurpleMediaManager *manager, + GstDevice *device) + { ++#ifdef USE_VV + GList *i; + gchar *name; + gchar *device_class; +@@ -2277,6 +2278,7 @@ + + g_free(name); + g_free(device_class); ++#endif /* USE_VV */ + } + + static gboolean +@@ -2304,7 +2306,7 @@ + static void + purple_media_manager_init_device_monitor(PurpleMediaManager *manager) + { +-#if GST_CHECK_VERSION(1, 4, 0) ++#if GST_CHECK_VERSION(1, 4, 0) && defined(USE_VV) + GstBus *bus; + GList *i; + +@@ -2334,6 +2336,7 @@ + PurpleMediaElementType type) + { + GList *result = NULL; ++#ifdef USE_VV + GList *i; + + for (i = manager->priv->elements; i; i = i->next) { +@@ -2347,6 +2350,7 @@ + result = g_list_prepend(result, info); + } + } ++#endif /* USE_VV */ + + return result; + } -- cgit v1.2.3 From e3281657c8a97e32169fcc7e178f3fbbab7c88b7 Mon Sep 17 00:00:00 2001 From: Miguel Ángel Arruga Vivas Date: Mon, 28 Dec 2020 10:36:48 +0100 Subject: gnu: smalltalk: Fix integer multiplication overflow. * gnu/local.mk (dist_patch_DATA): Add Smalltalk patch. * gnu/packages/patches/smalltalk-multiplication-overflow.patch: Patch from upstream commit 72ada189aba0283c551ead16635c1983968080b8. * gnu/packages/smalltalk.scm (smalltalk): Use patch and link with gmp and lightning libraries instead of the included source. --- gnu/local.mk | 1 + .../smalltalk-multiplication-overflow.patch | 121 +++++++++++++++++++++ gnu/packages/smalltalk.scm | 47 +++++++- 3 files changed, 164 insertions(+), 5 deletions(-) create mode 100644 gnu/packages/patches/smalltalk-multiplication-overflow.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 53a67e6ffe..2e026cb252 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1451,6 +1451,7 @@ dist_patch_DATA = \ %D%/packages/patches/sdl-pango-header-guard.patch \ %D%/packages/patches/sdl-pango-matrix_declarations.patch \ %D%/packages/patches/sdl-pango-sans-serif.patch \ + %D%/packages/patches/smalltalk-multiplication-overflow.patch \ %D%/packages/patches/sqlite-hurd.patch \ %D%/packages/patches/sunxi-tools-remove-sys-io.patch \ %D%/packages/patches/patchutils-test-perms.patch \ diff --git a/gnu/packages/patches/smalltalk-multiplication-overflow.patch b/gnu/packages/patches/smalltalk-multiplication-overflow.patch new file mode 100644 index 0000000000..7a0b4d02f7 --- /dev/null +++ b/gnu/packages/patches/smalltalk-multiplication-overflow.patch @@ -0,0 +1,121 @@ +Extracted from this commit without the ChangeLog to avoid conflicts: +http://git.savannah.gnu.org/cgit/smalltalk.git/commit/?id=72ada189aba0283c551ead16635c1983968080b8 + +The upstream commit message is +From 72ada189aba0283c551ead16635c1983968080b8 Mon Sep 17 00:00:00 2001 +From: Holger Hans Peter Freyther +Date: Sat, 7 Nov 2015 18:09:31 +0100 +Subject: libgst: Add alternative multiplication overflow check + +Apple clang on OSX and the version on FreeBSD optimize the +multiplication check away. Clang introduced a family of +builtins to do the multiplication and check for the overflow +and GCC made the API usable. For clang we would need to know +if intptr_t is of type int, long int, long long int and +then use the smul, smull smulll. +Luckily clang is adopting the better interface and this is +what we are starting to use now. This means the new code +will be used on GCC5 (and later) and some future versions of +clang. + +2015-11-07 Holger Hans Peter Freyther + + * build-aux/overflow-builtins.m4: Add new macro. + * configure.ac: Use GST_C_OVERFLOW_BUILTINS macro. + +2015-11-07 Holger Hans Peter Freyther + + * interp.inl: Add alternative mul_with_check implementation. +--- + ChangeLog | 5 +++++ + build-aux/overflow-builtins.m4 | 23 +++++++++++++++++++++++ + configure.ac | 1 + + libgst/ChangeLog | 4 ++++ + libgst/interp.inl | 22 ++++++++++++++++++++++ + 5 files changed, 55 insertions(+) + create mode 100644 build-aux/overflow-builtins.m4 + +diff --git a/build-aux/overflow-builtins.m4 b/build-aux/overflow-builtins.m4 +new file mode 100644 +index 00000000..9d050196 +--- /dev/null ++++ b/build-aux/overflow-builtins.m4 +@@ -0,0 +1,23 @@ ++dnl Check whether the host supports synchronization builtins. ++ ++AC_DEFUN([GST_C_OVERFLOW_BUILTINS], [ ++ AC_REQUIRE([AC_CANONICAL_HOST]) ++ AC_CACHE_CHECK([whether the host supports __builtin_mul_overflow], ++ gst_cv_have_builtin_mul_overflow, [ ++ save_CFLAGS="$CFLAGS" ++ case $host in ++ i?86-apple-darwin*) ;; ++ i?86-*-*) CFLAGS="$CFLAGS -march=i486" ;; ++ esac ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[int foovar = 0;]], [[ ++if (__builtin_mul_overflow(44444, 55555, &foovar)) ++ return 23;]])], ++ [gst_cv_have_builtin_mul_overflow=yes], ++ [gst_cv_have_builtin_mul_overflow=no]) ++ CFLAGS="$save_CFLAGS" ++ ]) ++ if test $gst_cv_have_builtin_mul_overflow = yes; then ++ AC_DEFINE(HAVE_OVERFLOW_BUILTINS, 1, ++ [Define to 1 if the host supports __builtin_*_overflow builtins]) ++ fi ++]) +diff --git a/configure.ac b/configure.ac +index e789be45..0bac23ef 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -243,6 +243,7 @@ GST_C_SYNC_BUILTINS + if test $gst_cv_have_sync_fetch_and_add = no; then + AC_MSG_ERROR([Synchronization primitives not found, please use a newer compiler.]) + fi ++GST_C_OVERFLOW_BUILTINS + + GST_LOCK + AC_SYS_LARGEFILE +diff --git a/libgst/interp.inl b/libgst/interp.inl +index e18e27c7..dbc631bc 100644 +--- a/libgst/interp.inl ++++ b/libgst/interp.inl +@@ -159,6 +159,27 @@ sub_with_check (OOP op1, OOP op2, mst_Boolean *overflow) + OOP + mul_with_check (OOP op1, OOP op2, mst_Boolean *overflow) + { ++#ifdef HAVE_OVERFLOW_BUILTINS ++ intptr_t a = TO_INT (op1); ++ intptr_t b = TO_INT (op2); ++ intptr_t result; ++ ++ if (__builtin_mul_overflow(a, b, &result)) ++ { ++ *overflow = true; ++ return FROM_INT(0); ++ } ++ ++ ++ if (result < MIN_ST_INT || result > MAX_ST_INT) ++ { ++ *overflow = true; ++ return FROM_INT(0); ++ } ++ ++ *overflow = false; ++ return FROM_INT(result); ++#else + intptr_t a = TO_INT (op1); + intptr_t b = TO_INT (op2); + intmax_t result = (intmax_t)a * b; +@@ -188,6 +209,7 @@ mul_with_check (OOP op1, OOP op2, mst_Boolean *overflow) + } + + return FROM_INT (0); ++#endif + } + + /* State of the random generator. +-- +2.29.2 + diff --git a/gnu/packages/smalltalk.scm b/gnu/packages/smalltalk.scm index 5d35f563e2..742a9b89c4 100644 --- a/gnu/packages/smalltalk.scm +++ b/gnu/packages/smalltalk.scm @@ -26,6 +26,8 @@ #:use-module (guix download) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages assembly) #:use-module (gnu packages audio) #:use-module (gnu packages autotools) #:use-module (gnu packages base) @@ -36,6 +38,7 @@ #:use-module (gnu packages libffi) #:use-module (gnu packages libsigsegv) #:use-module (gnu packages linux) + #:use-module (gnu packages multiprecision) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages xorg)) @@ -51,18 +54,52 @@ version ".tar.xz")) (sha256 (base32 - "1k2ssrapfzhngc7bg1zrnd9n2vyxp9c9m70byvsma6wapbvib6l1")))) + "1k2ssrapfzhngc7bg1zrnd9n2vyxp9c9m70byvsma6wapbvib6l1")) + ;; XXX: To be removed with the next release of Smalltalk. + (patches (search-patches "smalltalk-multiplication-overflow.patch")))) (build-system gnu-build-system) (native-inputs - `(("libffi" ,libffi) + `(("pkg-config" ,pkg-config) + ;; XXX: To be removed with the next release of Smalltalk. + ("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool))) + ;; TODO: These optional dependencies raise the closure size to ~1 GiB + ;; from the current ~100 MiB, although some of them might be very + ;; useful for end users: + ;; - freeglut + ;; - glib + ;; - gobject-introspection + ;; - gtk+-2 + ;; - tcl/tk + ;; - SDL (sdl-union) + ;; - sqlite + ;; - zlib + (inputs + `(("gmp" ,gmp) + ("libffi" ,libffi) ("libltdl" ,libltdl) ("libsigsegv" ,libsigsegv) - ("pkg-config" ,pkg-config))) - (inputs - `(("zip" ,zip))) + ("lightning" ,lightning) + ("zip" ,zip))) (arguments `(#:phases (modify-phases %standard-phases + ;; XXX: To be removed with the next release of Smalltalk. + ;; The overflow patch modifies configure.ac, therefore remove + ;; old configure script and enforce an autoreconf. + (add-before 'bootstrap 'remove-unpatched-configure + (lambda _ + (delete-file "configure") + #t)) + ;; XXX: To be removed with the next release of Smalltalk. + ;; We don't want to regenerate the info files. + (add-after 'build 'keep-generated-info-manual + (lambda _ + (for-each (lambda (file) + (invoke "touch" file)) + (find-files "doc" "\\.info")) + #t)) (add-before 'configure 'fix-libc (lambda _ (let ((libc (assoc-ref %build-inputs "libc"))) -- cgit v1.2.3 From f024a7ba604fb18721a056e65777ae969d8b9681 Mon Sep 17 00:00:00 2001 From: Björn Höfling Date: Tue, 5 Jan 2021 22:54:17 +0100 Subject: gnu: gpsbabel: Update to 1.7.0. * gnu/packages/gps.scm (gpsbabel): Update to 1.7.0. [source]: Use git-fetch, remove obsolete patches. [inputs]: Add libusb. * gnu/packages/patches/gpsbabel-minizip.patch: Remove file. * gnu/packages/patches/gpsbabel-qstring.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove entries. Signed-off-by: Efraim Flashner --- gnu/local.mk | 3 +- gnu/packages/gps.scm | 27 ++++++----- gnu/packages/patches/gpsbabel-minizip.patch | 13 ------ gnu/packages/patches/gpsbabel-qstring.patch | 69 ----------------------------- 4 files changed, 14 insertions(+), 98 deletions(-) delete mode 100644 gnu/packages/patches/gpsbabel-minizip.patch delete mode 100644 gnu/packages/patches/gpsbabel-qstring.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 2e026cb252..396baae4ab 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -39,6 +39,7 @@ # Copyright © 2020 Martin Becze # Copyright © 2020 Malte Frank Gerdes # Copyright © 2020 Vinicius Monego +# Copyright © 2021 Björn Höfling # # This file is part of GNU Guix. # @@ -1113,8 +1114,6 @@ dist_patch_DATA = \ %D%/packages/patches/go-skip-gc-test.patch \ %D%/packages/patches/gpm-glibc-2.26.patch \ %D%/packages/patches/gpodder-disable-updater.patch \ - %D%/packages/patches/gpsbabel-minizip.patch \ - %D%/packages/patches/gpsbabel-qstring.patch \ %D%/packages/patches/grantlee-merge-theme-dirs.patch \ %D%/packages/patches/grep-timing-sensitive-test.patch \ %D%/packages/patches/grocsvs-dont-use-admiral.patch \ diff --git a/gnu/packages/gps.scm b/gnu/packages/gps.scm index e0f489f8de..fdb64f0902 100644 --- a/gnu/packages/gps.scm +++ b/gnu/packages/gps.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2020 Guillaume Le Vaillant ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2020 Marius Bakke +;;; Copyright © 2021 Björn Höfling ;;; ;;; This file is part of GNU Guix. ;;; @@ -51,21 +52,18 @@ (define-public gpsbabel (package (name "gpsbabel") - (version "1.5.4") + (version "1.7.0") (source (origin - (method url-fetch) - ;; XXX: Downloads from gpsbabel.org are hidden behind a POST, so - ;; get it from elsewhere. - (uri (string-append - "mirror://debian/pool/main/g/gpsbabel/gpsbabel_" - version ".orig.tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/gpsbabel/gpsbabel") + (commit (string-append + "gpsbabel_" + (string-replace-substring version "." "_"))))) + (file-name (git-file-name name version)) (sha256 (base32 - "19hykxhyl567gf8qcrl33qhv95w0g4vxw9r3h9b8d8plx9bnaf8l")) - (patches (search-patches - "gpsbabel-minizip.patch" - ;; XXX: Remove this patch on the next release. - "gpsbabel-qstring.patch")) + "010g0vd2f5knpq5p7qfnl31kv3r8m5sjdsafcinbj5gh02j2nzpy")) (modules '((guix build utils))) (snippet '(begin @@ -87,8 +85,9 @@ #:tests? #f)) (inputs `(("expat" ,expat) - ("zlib" ,zlib) - ("qtbase" ,qtbase))) + ("libusb" ,libusb) + ("qtbase" ,qtbase) + ("zlib" ,zlib))) (native-inputs `(("which" ,which) ("qttools" ,qttools) diff --git a/gnu/packages/patches/gpsbabel-minizip.patch b/gnu/packages/patches/gpsbabel-minizip.patch deleted file mode 100644 index 8f3bb36f57..0000000000 --- a/gnu/packages/patches/gpsbabel-minizip.patch +++ /dev/null @@ -1,13 +0,0 @@ -Patch taken from https://sources.debian.org/data/main/g/gpsbabel/1.5.3-2/debian/patches/use_minizip. - ---- a/Makefile.in -+++ b/Makefile.in -@@ -120,7 +120,7 @@ LIBOBJS = queue.o route.o waypt.o filter - src/core/usasciicodec.o\ - src/core/ziparchive.o \ - $(GARMIN) $(JEEPS) $(SHAPE) @ZLIB@ $(FMTS) $(FILTERS) --OBJS = main.o globals.o $(LIBOBJS) @FILEINFO@ -+OBJS = main.o globals.o $(MINIZIP) $(LIBOBJS) @FILEINFO@ - - DEPFILES = $(OBJS:.o=.d) - \ No newline at end of file diff --git a/gnu/packages/patches/gpsbabel-qstring.patch b/gnu/packages/patches/gpsbabel-qstring.patch deleted file mode 100644 index 8ba1a7213b..0000000000 --- a/gnu/packages/patches/gpsbabel-qstring.patch +++ /dev/null @@ -1,69 +0,0 @@ -Extracted from following patch of gpsbabel: -https://github.com/gpsbabel/gpsbabel/commit/604178aa8ad4d3c3ad218df24c1e9a6a1f683bb3 - -From 604178aa8ad4d3c3ad218df24c1e9a6a1f683bb3 Mon Sep 17 00:00:00 2001 -From: Harel Mazor -Date: Tue, 24 Jan 2017 00:35:04 +0200 -Subject: [PATCH] Added geojson read capablity, moved magic strings to - constants, fixed windows compilation issues. - ---- a/tef_xml.cc -+++ b/tef_xml.cc -@@ -72,11 +72,11 @@ tef_start(xg_string args, const QXmlStreamAttributes* attrv) - bool valid = false; - - foreach(QXmlStreamAttribute attr, *attrv) { -- if (attr.name().compare("Comment", Qt::CaseInsensitive) == 0) { -- if (attr.value().compare("TourExchangeFormat", Qt::CaseInsensitive) == 0) { -+ if (attr.name().compare(QString("Comment"), Qt::CaseInsensitive) == 0) { -+ if (attr.value().compare(QString("TourExchangeFormat"), Qt::CaseInsensitive) == 0) { - valid = true; - } -- } else if (attr.name().compare("Version", Qt::CaseInsensitive) == 0) { -+ } else if (attr.name().compare(QString("Version"), Qt::CaseInsensitive) == 0) { - version = attr.value().toString().toDouble(); - } - } -@@ -95,9 +95,9 @@ tef_header(xg_string args, const QXmlStreamAttributes* attrv) - { - route = route_head_alloc(); - foreach(QXmlStreamAttribute attr, *attrv) { -- if (attr.name().compare("Name", Qt::CaseInsensitive) == 0) { -+ if (attr.name().compare(QString("Name"), Qt::CaseInsensitive) == 0) { - route->rte_name = attr.value().toString().trimmed(); -- } else if (attr.name().compare("Software", Qt::CaseInsensitive) == 0) { -+ } else if (attr.name().compare(QString("Software"), Qt::CaseInsensitive) == 0) { - route->rte_desc = attr.value().toString().trimmed(); - } - } -@@ -248,20 +248,20 @@ tef_item_start(xg_string args, const QXmlStreamAttributes* attrv) - QString attrstr = attr.value().toString(); - QByteArray attrtext = attrstr.toUtf8(); - -- if (attr.name().compare("SegDescription", Qt::CaseInsensitive) == 0) { -+ if (attr.name().compare(QString("SegDescription"), Qt::CaseInsensitive) == 0) { - wpt_tmp->shortname = attrstr.trimmed(); -- } else if (attr.name().compare("PointDescription", Qt::CaseInsensitive) == 0) { -+ } else if (attr.name().compare(QString("PointDescription"), Qt::CaseInsensitive) == 0) { - wpt_tmp->description = attrstr.trimmed(); -- } else if (attr.name().compare("ViaStation", Qt::CaseInsensitive) == 0 && -- attr.value().compare("true", Qt::CaseInsensitive) == 0) { -+ } else if (attr.name().compare(QString("ViaStation"), Qt::CaseInsensitive) == 0 && -+ attr.value().compare(QString("true"), Qt::CaseInsensitive) == 0) { - wpt_tmp->wpt_flags.fmt_use = 1; /* only a flag */ - - /* new in TEF V2 */ -- } else if (attr.name().compare("Instruction", Qt::CaseInsensitive) == 0) { -+ } else if (attr.name().compare(QString("Instruction"), Qt::CaseInsensitive) == 0) { - wpt_tmp->description = attrstr.trimmed(); -- } else if (attr.name().compare("Altitude", Qt::CaseInsensitive) == 0) { -+ } else if (attr.name().compare(QString("Altitude"), Qt::CaseInsensitive) == 0) { - wpt_tmp->altitude = attrstr.toDouble(); -- } else if (attr.name().compare("TimeStamp", Qt::CaseInsensitive) == 0) { -+ } else if (attr.name().compare(QString("TimeStamp"), Qt::CaseInsensitive) == 0) { - /* nothing for the moment */ - } - } --- -2.16.1 - -- cgit v1.2.3 From 3b141f2eb9939a0140e0e1cec8ef451a81d9e2dc Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 6 Jan 2021 10:54:46 +0200 Subject: gnu: gpsbabel: Enable tests. * gnu/packages/patches/gps.scm (gpsbabel)[source]: Add patch. [arguments]: Enable tests. * gnu/packages/patches/gpsbabel-fix-i686-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/gps.scm | 9 +---- gnu/packages/patches/gpsbabel-fix-i686-test.patch | 46 +++++++++++++++++++++++ 3 files changed, 49 insertions(+), 7 deletions(-) create mode 100644 gnu/packages/patches/gpsbabel-fix-i686-test.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 396baae4ab..1151d4642e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1114,6 +1114,7 @@ dist_patch_DATA = \ %D%/packages/patches/go-skip-gc-test.patch \ %D%/packages/patches/gpm-glibc-2.26.patch \ %D%/packages/patches/gpodder-disable-updater.patch \ + %D%/packages/patches/gpsbabel-fix-i686-test.patch \ %D%/packages/patches/grantlee-merge-theme-dirs.patch \ %D%/packages/patches/grep-timing-sensitive-test.patch \ %D%/packages/patches/grocsvs-dont-use-admiral.patch \ diff --git a/gnu/packages/gps.scm b/gnu/packages/gps.scm index 7ee1fc871d..4fa3bcef19 100644 --- a/gnu/packages/gps.scm +++ b/gnu/packages/gps.scm @@ -65,6 +65,7 @@ (sha256 (base32 "010g0vd2f5knpq5p7qfnl31kv3r8m5sjdsafcinbj5gh02j2nzpy")) + (patches (search-patches "gpsbabel-fix-i686-test.patch")) (modules '((guix build utils))) (snippet '(begin @@ -80,13 +81,7 @@ ;; TODO: "make doc" requires Docbook & co. (arguments `(#:configure-flags - '("--with-zlib=system") - ;; On i686, 'raymarine.test' fails because of a rounding error: - ;; . As a workaround, disable tests - ;; on these platforms. - ;; FIXME: On x86_64 with -std=gnu++11 tests also fail due to rounding - ;; error. - #:tests? #f)) + '("--with-zlib=system"))) (inputs `(("expat" ,expat) ("libusb" ,libusb) diff --git a/gnu/packages/patches/gpsbabel-fix-i686-test.patch b/gnu/packages/patches/gpsbabel-fix-i686-test.patch new file mode 100644 index 0000000000..5ba0305113 --- /dev/null +++ b/gnu/packages/patches/gpsbabel-fix-i686-test.patch @@ -0,0 +1,46 @@ +https://github.com/gpsbabel/gpsbabel/commit/465a74194d53acea5c8d74c5cf3cb2940546ec92.patch +Can be removed next release + +From 465a74194d53acea5c8d74c5cf3cb2940546ec92 Mon Sep 17 00:00:00 2001 +From: tsteven4 <13596209+tsteven4@users.noreply.github.com> +Date: Fri, 7 Aug 2020 11:29:22 -0600 +Subject: [PATCH] fix i386 regression error with engima. (#620) + +this was motivated by the test failure seen at +https://buildd.debian.org/status/fetch.php?pkg=gpsbabel&arch=i386&ver=1.7.0%2Bds-4&stamp=1596794554&raw=0 +--- + enigma.cc | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/enigma.cc b/enigma.cc +index 850f27b4e..32fea92d6 100644 +--- a/enigma.cc ++++ b/enigma.cc +@@ -21,9 +21,16 @@ + + */ + ++#include // for fabs, lround ++#include // for int32_t, uint8_t, uint32_t ++#include // for abs ++#include // for strlen, memcpy, memset ++ ++#include // for QString ++ + #include "defs.h" +-#include +-#include ++#include "gbfile.h" // for gbfclose, gbfopen_le, gbfread, gbfwrite, gbfile ++ + + #define MYNAME "Enigma binary route and waypoint file format" + +@@ -177,7 +184,7 @@ enigma_waypt_disp(const Waypoint* wpt) + le_write32(&ewpt.longitude, decToEnigmaPosition(wpt->longitude)); + ewpt.waypoint_type = WTYPE_WAYPOINT; + if (wpt->altitude != unknown_alt) { +- le_write32(&ewpt.data.wp_altitude, METERS_TO_FEET(wpt->altitude) + 1000); ++ le_write32(&ewpt.data.wp_altitude, lround(METERS_TO_FEET(wpt->altitude)) + 1000); + } + if (wpt->shortname != nullptr) { + ewpt.shortname_len = (uint8_t) min(6, strlen(CSTRc(wpt->shortname))); -- cgit v1.2.3 From bc66d351649f39b2dd2c00a664e47e54b1d161f4 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sat, 9 Jan 2021 11:38:02 +0100 Subject: gnu: emacs-scheme-complete: Update to 0.9.9. * gnu/packages/emacs-xyz.scm (emacs-scheme-complete): Update to 0.9.9. * gnu/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch: Remove file. * gnu/local.mk: Update file. --- gnu/local.mk | 1 - gnu/packages/emacs-xyz.scm | 11 +++++------ .../patches/emacs-scheme-complete-scheme-r5rs-info.patch | 14 -------------- 3 files changed, 5 insertions(+), 21 deletions(-) delete mode 100644 gnu/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 1151d4642e..ec3d6137e7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -958,7 +958,6 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-highlight-stages-add-gexp.patch \ %D%/packages/patches/emacs-hyperbole-toggle-messaging.patch \ %D%/packages/patches/emacs-libgit-use-system-libgit2.patch \ - %D%/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch \ %D%/packages/patches/emacs-source-date-epoch.patch \ %D%/packages/patches/emacs-telega-patch-server-functions.patch \ %D%/packages/patches/emacs-telega-test-env.patch \ diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 08cbb70b0a..c86452fe2b 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -5722,10 +5722,12 @@ navigation to errors.") (license license:gpl3+))) (define-public emacs-scheme-complete - (let ((commit "9b5cf224bf2a5994bc6d5b152ff487517f1a9bb5")) + ;; Upstream does not provide tags. The commit below corresponds to the + ;; exact version update. Version is extracted from main file. + (let ((commit "5c0a16684a3be7021d67067b2955f1c3e17a320a")) (package (name "emacs-scheme-complete") - (version (string-append "20151223." (string-take commit 8))) + (version "0.9.9") (source (origin (method git-fetch) @@ -5734,10 +5736,7 @@ navigation to errors.") (commit commit))) (file-name (git-file-name name version)) (sha256 - (base32 - "141wn9l0m33w0g3dqmx8nxbfdny1r5xbr6ak61rsz21bk0qafs7x")) - (patches - (search-patches "emacs-scheme-complete-scheme-r5rs-info.patch")))) + (base32 "1smxr5bkzbfrjx21vhrj1wagmqx5yd92i997dbgs16iaqbzzr7cz")))) (build-system emacs-build-system) (home-page "https://github.com/ashinn/scheme-complete") (synopsis "Smart tab completion for Scheme in Emacs") diff --git a/gnu/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch b/gnu/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch deleted file mode 100644 index 6c49bdcdde..0000000000 --- a/gnu/packages/patches/emacs-scheme-complete-scheme-r5rs-info.patch +++ /dev/null @@ -1,14 +0,0 @@ -Fix completion for R5RS Scheme. -See https://github.com/ashinn/scheme-complete/issues/1 - ---- scheme-complete-master/scheme-complete.el.orig 2015-12-25 21:59:09.896909029 +0100 -+++ scheme-complete-master/scheme-complete.el 2015-12-25 21:59:17.924993998 +0100 -@@ -591,7 +591,7 @@ - '((exact->inexact (lambda (z) z)) - (inexact->exact (lambda (z) z))) - (mapcar #'(lambda (x) -- (list x (scheme-env-lookup *scheme-r7rs-info* x))) -+ (scheme-env-lookup *scheme-r7rs-info* x)) - *scheme-r5rs-bindings*)))) - *scheme-r5rs-info*) - -- cgit v1.2.3 From d0fff8f840afc17be40bdc49bff52ed08d5a1a7b Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 10 Jan 2021 14:23:20 +0200 Subject: gnu: pulseview: Fix qt-5.15 compatibility. * gnu/packages/electronics.scm (pulseview)[source]: Add patch. * gnu/packages/patches/pulseview-qt515-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/electronics.scm | 3 +- gnu/packages/patches/pulseview-qt515-compat.patch | 145 ++++++++++++++++++++++ 3 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/pulseview-qt515-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index ec3d6137e7..6893a54fdd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1502,6 +1502,7 @@ dist_patch_DATA = \ %D%/packages/patches/psm-repro.patch \ %D%/packages/patches/pulseaudio-fix-mult-test.patch \ %D%/packages/patches/pulseaudio-longer-test-timeout.patch \ + %D%/packages/patches/pulseview-qt515-compat.patch \ %D%/packages/patches/purescript-relax-dependencies.patch \ %D%/packages/patches/pybugz-encode-error.patch \ %D%/packages/patches/pybugz-stty.patch \ diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm index 491f9daaa0..7cf6509b7d 100644 --- a/gnu/packages/electronics.scm +++ b/gnu/packages/electronics.scm @@ -248,7 +248,8 @@ format support.") version ".tar.gz")) (sha256 (base32 - "1jxbpz1h3m1mgrxw74rnihj8vawgqdpf6c33cqqbyd8v7rxgfhph")))) + "1jxbpz1h3m1mgrxw74rnihj8vawgqdpf6c33cqqbyd8v7rxgfhph")) + (patches (search-patches "pulseview-qt515-compat.patch")))) (build-system cmake-build-system) (arguments `(#:configure-flags '("-DENABLE_TESTS=y") diff --git a/gnu/packages/patches/pulseview-qt515-compat.patch b/gnu/packages/patches/pulseview-qt515-compat.patch new file mode 100644 index 0000000000..a7156b2018 --- /dev/null +++ b/gnu/packages/patches/pulseview-qt515-compat.patch @@ -0,0 +1,145 @@ +https://sigrok.org/gitweb/?p=pulseview.git;a=patch;h=ae726b70a7ada9a4be5808e00f0c951318479684 + +From ae726b70a7ada9a4be5808e00f0c951318479684 Mon Sep 17 00:00:00 2001 +From: Valentin Ochs +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 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 + #include ++#include + + using std::string; + using std::vector; +@@ -143,6 +144,15 @@ QString format_time_minutes(const Timestamp& t, signed precision = 0, + + vector 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 + -- cgit v1.2.3