From 4035c2e402eb7ff42ecceacd927f34997367cdf5 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 27 Nov 2020 17:07:06 -0500 Subject: gnu: python-cairocffi: Update to 1.2.0. * gnu/packages/python-xyz.scm (python-cairocffi): Update to 1.2.0. [source]: Fetch from Git. [patches]: Remove field. [inputs]: Remove pango. [native-inputs]: Remove pkg-config and python-docutils. Add python-numpy and python-sphinx-rtd-theme. [phases]{patch-paths}: Adjust. Fix the patching of gdk-3. {disable-linters}: New phase. {install-doc}: Adjust. The license file is now installed by a build phase. * gnu/packages/patches/python-cairocffi-dlopen-path.patch: Delete file. * gnu/local.mk (dist_patch_DATA): De-register it. --- gnu/local.mk | 1 - 1 file changed, 1 deletion(-) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 8f9ed312bb..0fd2f788c0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1513,7 +1513,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-aionotify-0.2.0-py3.8.patch \ %D%/packages/patches/python-argcomplete-1.11.1-fish31.patch \ %D%/packages/patches/python-axolotl-AES-fix.patch \ - %D%/packages/patches/python-cairocffi-dlopen-path.patch \ %D%/packages/patches/python-cross-compile.patch \ %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \ %D%/packages/patches/python-configobj-setuptools.patch \ -- cgit v1.2.3 From fc72594c288bff183df479dfa0a5caff18806871 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sat, 28 Nov 2020 03:06:24 -0500 Subject: gnu: python-tinycss2: Update to 1.1.0. * gnu/packages/patches/python-tinycss2-flake8-compat.patch: Delete file. * gnu/local.mk (dist_patch_DATA): De-register it. * gnu/packages/python-web.scm (python-tinycss2): Update to 1.1.0. [source]: Remove patch. [arguments]: Remove field, disabling tests. [native-inputs]: Remove field. --- gnu/local.mk | 1 - .../patches/python-tinycss2-flake8-compat.patch | 36 ---------------------- gnu/packages/python-web.scm | 17 ++++------ 3 files changed, 6 insertions(+), 48 deletions(-) delete mode 100644 gnu/packages/patches/python-tinycss2-flake8-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 0fd2f788c0..4ea3d506f5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1537,7 +1537,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-robotframework-source-date-epoch.patch \ %D%/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch \ %D%/packages/patches/python2-subprocess32-disable-input-test.patch \ - %D%/packages/patches/python-tinycss2-flake8-compat.patch \ %D%/packages/patches/python-unittest2-python3-compat.patch \ %D%/packages/patches/python-unittest2-remove-argparse.patch \ %D%/packages/patches/python-waitress-fix-tests.patch \ diff --git a/gnu/packages/patches/python-tinycss2-flake8-compat.patch b/gnu/packages/patches/python-tinycss2-flake8-compat.patch deleted file mode 100644 index a66eb42fa1..0000000000 --- a/gnu/packages/patches/python-tinycss2-flake8-compat.patch +++ /dev/null @@ -1,36 +0,0 @@ -Fix test failure that occurs with recent versions of Flake8. - -Taken from upstream: -https://github.com/Kozea/tinycss2/commit/6556604fb98c2153412384d6f0f705db2da1aa60 - -diff --git a/tinycss2/css-parsing-tests/make_color3_hsl.py b/tinycss2/css-parsing-tests/make_color3_hsl.py -index d1fd3a6..56fda0c 100644 ---- a/tinycss2/css-parsing-tests/make_color3_hsl.py -+++ b/tinycss2/css-parsing-tests/make_color3_hsl.py -@@ -8,16 +8,17 @@ def trim(s): - print('[') - print(',\n'.join( - '"hsl%s(%s, %s%%, %s%%%s)", [%s, %s, %s, %s]' % ( -- ('a' if a is not None else '', h, -- trim(str(s / 10.)), trim(str(l / 10.)), -- ', %s' % a if a is not None else '') + -+ ('a' if alpha is not None else '', hue, -+ trim(str(saturation / 10.)), trim(str(light / 10.)), -+ ', %s' % alpha if alpha is not None else '') + - tuple(trim(str(round(v, 10))) -- for v in colorsys.hls_to_rgb(h / 360., l / 1000., s / 1000.)) + -- (a if a is not None else 1,) -+ for v in colorsys.hls_to_rgb( -+ hue / 360., light / 1000., saturation / 1000.)) + -+ (alpha if alpha is not None else 1,) - ) -- for a in [None, 1, .2, 0] -- for l in range(0, 1001, 125) -- for s in range(0, 1001, 125) -- for h in range(0, 360, 30) -+ for alpha in [None, 1, .2, 0] -+ for light in range(0, 1001, 125) -+ for saturation in range(0, 1001, 125) -+ for hue in range(0, 360, 30) - )) - print(']') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 894bd00a34..107f579ad6 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -4433,26 +4433,21 @@ library to create slugs from unicode strings while keeping it DRY.") (define-public python-tinycss2 (package (name "python-tinycss2") - (version "1.0.2") + (version "1.1.0") (source (origin (method url-fetch) (uri (pypi-uri "tinycss2" version)) - (patches (search-patches "python-tinycss2-flake8-compat.patch")) (sha256 - (base32 "1kw84y09lggji4krkc58jyhsfj31w8npwhznr7lf19d0zbix09v4")))) + (base32 "12p16k8x8ig51gpfcwz3k3kxpxrwwkn41a1avdgvh3nn8hqarp7v")))) (build-system python-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (replace 'check - (lambda _ (invoke "pytest")))))) + ;; Test data is missing from the PyPI archive, and the build system is + ;; based on Flit, which wants an unmaintained and unpackaged + ;; python-pytoml dependency. + `(#:tests? #f)) (propagated-inputs `(("python-webencodings" ,python-webencodings))) - (native-inputs - `(("python-pytest-flake8" ,python-pytest-flake8) - ("python-pytest-isort" ,python-pytest-isort) - ("python-pytest-runner" ,python-pytest-runner))) (home-page "https://tinycss2.readthedocs.io/") (synopsis "Low-level CSS parser for Python") (description "@code{tinycss2} can parse strings, return Python objects -- cgit v1.2.3 From c601e2bf9adb05dc9dd9f3a565f693e968eb785c Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 20 Nov 2020 09:42:12 -0500 Subject: gnu: weasyprint: Update to 52.1. Fixes . * gnu/packages/patches/weasyprint-library-paths.patch: Delete. * gnu/packages/pdf.scm (weasyprint): Update to 52.1 [phases]{patch-library-paths}: Adjust. {check}: Remove. {register-dejavu-font}: New phase. [native-inputs]: Add font-dejavu. --- gnu/local.mk | 1 - .../patches/weasyprint-library-paths.patch | 43 -------------- gnu/packages/pdf.scm | 66 ++++++++++++++-------- 3 files changed, 42 insertions(+), 68 deletions(-) delete mode 100644 gnu/packages/patches/weasyprint-library-paths.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 4ea3d506f5..80f87691fe 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1695,7 +1695,6 @@ dist_patch_DATA = \ %D%/packages/patches/vte-CVE-2012-2738-pt1.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt2.patch \ %D%/packages/patches/warsow-qfusion-fix-bool-return-type.patch \ - %D%/packages/patches/weasyprint-library-paths.patch \ %D%/packages/patches/webkitgtk-share-store.patch \ %D%/packages/patches/webkitgtk-bind-all-fonts.patch \ %D%/packages/patches/websocketpp-fix-for-cmake-3.15.patch \ diff --git a/gnu/packages/patches/weasyprint-library-paths.patch b/gnu/packages/patches/weasyprint-library-paths.patch deleted file mode 100644 index 317f0c542e..0000000000 --- a/gnu/packages/patches/weasyprint-library-paths.patch +++ /dev/null @@ -1,43 +0,0 @@ -Make weasyprint load dynamic libraries from hard-coded path. - -From NixOS -pkgs/development/python-modules/weasyprint/library-paths.patch - -diff --git a/weasyprint/fonts.py b/weasyprint/fonts.py -index 377716c1..2016e01c 100644 ---- a/weasyprint/fonts.py -+++ b/weasyprint/fonts.py -@@ -48,11 +48,8 @@ else: - # with OSError: dlopen() failed to load a library: cairo / cairo-2 - # So let's hope we find the same file as cairo already did ;) - # Same applies to pangocairo requiring pangoft2 -- fontconfig = dlopen(ffi, 'fontconfig', 'libfontconfig', -- 'libfontconfig-1.dll', -- 'libfontconfig.so.1', 'libfontconfig-1.dylib') -- pangoft2 = dlopen(ffi, 'pangoft2-1.0', 'libpangoft2-1.0-0', -- 'libpangoft2-1.0.so', 'libpangoft2-1.0.dylib') -+ fontconfig = dlopen(ffi, '@fontconfig@') -+ pangoft2 = dlopen(ffi, '@pangoft2@') - - ffi.cdef(''' - // FontConfig -diff --git a/weasyprint/text.py b/weasyprint/text.py -index 035074e9..08e40395 100644 ---- a/weasyprint/text.py -+++ b/weasyprint/text.py -@@ -243,12 +243,9 @@ def dlopen(ffi, *names): - return ffi.dlopen(names[0]) # pragma: no cover - - --gobject = dlopen(ffi, 'gobject-2.0', 'libgobject-2.0-0', 'libgobject-2.0.so', -- 'libgobject-2.0.dylib') --pango = dlopen(ffi, 'pango-1.0', 'libpango-1.0-0', 'libpango-1.0.so', -- 'libpango-1.0.dylib') --pangocairo = dlopen(ffi, 'pangocairo-1.0', 'libpangocairo-1.0-0', -- 'libpangocairo-1.0.so', 'libpangocairo-1.0.dylib') -+gobject = dlopen(ffi, '@gobject@') -+pango = dlopen(ffi, '@pango@') -+pangocairo = dlopen(ffi, '@pangocairo@') - - gobject.g_type_init() - diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 879bc7f93f..a06f351aae 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2020 Nicolas Goaziou ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2020 Timotej Lazar +;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -59,6 +60,7 @@ #:use-module (gnu packages cups) #:use-module (gnu packages curl) #:use-module (gnu packages djvu) + #:use-module (gnu packages fonts) #:use-module (gnu packages fontutils) #:use-module (gnu packages game-development) #:use-module (gnu packages gcc) @@ -1428,14 +1430,17 @@ manipulating PDF documents from the command line. It supports (define-public weasyprint (package (name "weasyprint") - (version "51") + (version "52.1") (source (origin - (method url-fetch) - (uri (pypi-uri "WeasyPrint" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/FelixSchwarz/WeasyPrint") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "0skdzwq7cd715dnnds6abx0k0xmmnmsqp0vb1r1w20sg7abp3sdk")) - (patches (search-patches "weasyprint-library-paths.patch")))) + (base32 + "0rcj9yah3bp6bbvkmny3w4csx4l5v49lc7mrk29g0x77qnwswjy7")))) (build-system python-build-system) (arguments `(#:phases @@ -1447,27 +1452,39 @@ manipulating PDF documents from the command line. It supports (pango (assoc-ref inputs "pango")) (pangoft2 (assoc-ref inputs "pangoft2"))) (substitute* "weasyprint/fonts.py" - (("@fontconfig@") - (string-append fontconfig "/lib/libfontconfig.so")) - (("@pangoft2@") - (string-append pango "/lib/libpangoft2-1.0.so"))) + (("'fontconfig'") + (format #f "'~a/lib/libfontconfig.so'" fontconfig)) + (("'pangoft2-1.0'") + (format #f "'~a/lib/libpangoft2-1.0.so'" pango))) (substitute* "weasyprint/text.py" - (("@gobject@") - (string-append glib "/lib/libgobject-2.0.so")) - (("@pango@") - (string-append pango "/lib/libpango-1.0.so")) - (("@pangocairo@") - (string-append pango "/lib/libpangocairo-1.0.so")))))) - (add-after 'unpack 'remove-pytest-options + (("'gobject-2.0'") + (format #f "'~a/lib/libgobject-2.0.so'" glib)) + (("'pango-1.0'") + (format #f "'~a/lib/libpango-1.0.so'" pango)) + (("'pangocairo-1.0'") + (format #f "'~a/lib/libpangocairo-1.0.so'" pango))) + #t))) + (add-after 'unpack 'disable-linters + ;; Their check fails; none of our business. (lambda _ (substitute* "setup.cfg" - ;; flake8 and isort syntax checks fail, which is not our - ;; business. - (("addopts = --flake8 --isort") "")))) - (replace 'check - (lambda _ - ;; Run pytest, excluding one failing test. - (invoke "pytest" "-k" "not test_flex_column_wrap_reverse")))))) + ((".*pytest-flake8.*") "") + ((".*pytest-isort.*") "") + (("--flake8") "") + (("--isort") "")) + #t)) + (add-before 'check 'register-dejavu-font + (lambda* (#:key inputs #:allow-other-keys) + ;; TODO: fix FreeType so that fonts found in XDG_DATA_DIRS are + ;; honored. + (let* ((HOME "/tmp") + (dejavu (assoc-ref inputs "font-dejavu")) + (fonts-dir (string-append HOME "/.fonts"))) + (setenv "HOME" HOME) + (mkdir-p fonts-dir) + (symlink (string-append dejavu "/share/fonts/truetype") + (string-append fonts-dir "/truetype")) + (invoke "fc-cache" "-rv"))))))) (inputs `(("fontconfig" ,fontconfig) ("glib" ,glib) @@ -1482,7 +1499,8 @@ manipulating PDF documents from the command line. It supports ("python-pyphen" ,python-pyphen) ("python-tinycss2" ,python-tinycss2))) (native-inputs - `(("python-pytest-cov" ,python-pytest-cov) + `(("font-dejavu" ,font-dejavu) ;tests depend on it + ("python-pytest-cov" ,python-pytest-cov) ("python-pytest-runner" ,python-pytest-runner))) (home-page "https://weasyprint.org/") (synopsis "Document factory for creating PDF files from HTML") -- cgit v1.2.3 From 739174947ef6b3184e3c012cf41a279a13434b4f Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 30 Nov 2020 21:04:33 +0100 Subject: gnu: sudo: Update to 1.9.4. * gnu/packages/admin.scm (sudo): Update to 1.9.4. [source]: Add patch. * gnu/packages/patches/sudo-fix-build-without-sendmail.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/admin.scm | 5 ++- .../patches/sudo-fix-build-without-sendmail.patch | 45 ++++++++++++++++++++++ 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/sudo-fix-build-without-sendmail.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 80f87691fe..c4980c8fde 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1443,6 +1443,7 @@ dist_patch_DATA = \ %D%/packages/patches/sdl-pango-matrix_declarations.patch \ %D%/packages/patches/sdl-pango-sans-serif.patch \ %D%/packages/patches/sqlite-hurd.patch \ + %D%/packages/patches/sudo-fix-build-without-sendmail.patch \ %D%/packages/patches/sunxi-tools-remove-sys-io.patch \ %D%/packages/patches/patchutils-test-perms.patch \ %D%/packages/patches/patch-hurd-path-max.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 00bb0add47..96e3ff14d1 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -1397,7 +1397,7 @@ system administrator.") (define-public sudo (package (name "sudo") - (version "1.9.3p1") + (version "1.9.4") (source (origin (method url-fetch) (uri @@ -1407,7 +1407,8 @@ system administrator.") version ".tar.gz"))) (sha256 (base32 - "17mldsg5d08s23cskmjxfa81ibnqw3slgf3l4023j72ywi9xxffw")) + "1w03257akspgkkl757vmpq3p30sb2n6y61hll038mw9sqwnbv4cb")) + (patches (search-patches "sudo-fix-build-without-sendmail.patch")) (modules '((guix build utils))) (snippet '(begin diff --git a/gnu/packages/patches/sudo-fix-build-without-sendmail.patch b/gnu/packages/patches/sudo-fix-build-without-sendmail.patch new file mode 100644 index 0000000000..f40bfe445e --- /dev/null +++ b/gnu/packages/patches/sudo-fix-build-without-sendmail.patch @@ -0,0 +1,45 @@ + +# HG changeset patch +# User Todd C. Miller +# Date 1606767492 25200 +# Node ID 41db1aad85bbce444b511bcb28b9628a0a22fcd9 +# Parent 96a5cfe3c66b6ee84d7f7b6fb26d932f45a44b76 +Fix build when configured using --without-sendmail +Bug #947 + +diff -r 96a5cfe3c66b -r 41db1aad85bb lib/eventlog/eventlog.c +--- a/lib/eventlog/eventlog.c Sun Nov 29 15:11:34 2020 -0700 ++++ b/lib/eventlog/eventlog.c Mon Nov 30 13:18:12 2020 -0700 +@@ -78,7 +78,7 @@ + static FILE *eventlog_stub_open_log(int type, const char *logfile); + static void eventlog_stub_close_log(int type, FILE *fp); + +-/* Eventlog config settings */ ++/* Eventlog config settings (default values). */ + static struct eventlog_config evl_conf = { + EVLOG_NONE, /* type */ + EVLOG_SUDO, /* format */ +@@ -91,7 +91,11 @@ + false, /* omit_hostname */ + _PATH_SUDO_LOGFILE, /* logpath */ + "%h %e %T", /* time_fmt */ ++#ifdef _PATH_SUDO_SENDMAIL + _PATH_SUDO_SENDMAIL, /* mailerpath */ ++#else ++ NULL, /* mailerpath (disabled) */ ++#endif + "-t", /* mailerflags */ + NULL, /* mailfrom */ + MAILTO, /* mailto */ +@@ -1436,8 +1440,10 @@ + evl_conf.logpath = _PATH_SUDO_LOGFILE; + if (evl_conf.time_fmt == NULL) + evl_conf.time_fmt = "%h %e %T"; ++#ifdef _PATH_SUDO_SENDMAIL + if (evl_conf.mailerpath == NULL) + evl_conf.mailerpath = _PATH_SUDO_SENDMAIL; ++#endif + if (evl_conf.mailerflags == NULL) + evl_conf.mailerflags = "-t"; + if (evl_conf.mailto == NULL) + -- cgit v1.2.3 From 71b15b4874b7f9ec7001d2916a8ab27dcce6cdc0 Mon Sep 17 00:00:00 2001 From: Tanguy Le Carrour Date: Mon, 30 Nov 2020 10:48:57 +0100 Subject: gnu: python-packaging: Update to 20.4. * gnu/packages/python-xyz.scm (python-packaging): Update to 20.4. [source]: Remove patch that has been merged upstream. * gnu/packages/patches/python-packaging-test-arch.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Apply removal. Signed-off-by: Nicolas Goaziou --- gnu/local.mk | 1 - .../patches/python-packaging-test-arch.patch | 65 ---------------------- gnu/packages/python-xyz.scm | 7 +-- 3 files changed, 2 insertions(+), 71 deletions(-) delete mode 100644 gnu/packages/patches/python-packaging-test-arch.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index c4980c8fde..7777891896 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1527,7 +1527,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-mox3-python3.6-compat.patch \ %D%/packages/patches/python-testtools.patch \ %D%/packages/patches/python-onnx-use-system-googletest.patch \ - %D%/packages/patches/python-packaging-test-arch.patch \ %D%/packages/patches/python2-parameterized-docstring-test.patch \ %D%/packages/patches/python-paste-remove-timing-test.patch \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ diff --git a/gnu/packages/patches/python-packaging-test-arch.patch b/gnu/packages/patches/python-packaging-test-arch.patch deleted file mode 100644 index df80a62544..0000000000 --- a/gnu/packages/patches/python-packaging-test-arch.patch +++ /dev/null @@ -1,65 +0,0 @@ -Fix tests that are "hard coded" to expect x86_64 output by mocking the platform interface. - -Submitted upstream: -https://github.com/pypa/packaging/pull/176 - -diff --git a/tests/test_tags.py b/tests/test_tags.py -index 1eacf68..0a3f1b4 100644 ---- a/tests/test_tags.py -+++ b/tests/test_tags.py -@@ -435,37 +435,43 @@ class TestManylinuxPlatform: - linux_platform = list(tags._linux_platforms(is_32bit=False)) - assert linux_platform == ["linux_x86_64"] - -- def test_linux_platforms_manylinux1(self, monkeypatch): -+ def test_linux_platforms_manylinux1(self, is_x86, monkeypatch): - monkeypatch.setattr( - tags, "_is_manylinux_compatible", lambda name, _: name == "manylinux1" - ) -- if platform.system() != "Linux": -+ if platform.system() != "Linux" or not is_x86: - monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64") -+ monkeypatch.setattr(platform, "machine", lambda: "x86_64") - platforms = list(tags._linux_platforms(is_32bit=False)) -- assert platforms == ["manylinux1_x86_64", "linux_x86_64"] -+ arch = platform.machine() -+ assert platforms == ["manylinux1_" + arch, "linux_" + arch] - -- def test_linux_platforms_manylinux2010(self, monkeypatch): -+ def test_linux_platforms_manylinux2010(self, is_x86, monkeypatch): - monkeypatch.setattr( - tags, "_is_manylinux_compatible", lambda name, _: name == "manylinux2010" - ) -- if platform.system() != "Linux": -+ if platform.system() != "Linux" or not is_x86: - monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64") -+ monkeypatch.setattr(platform, "machine", lambda: "x86_64") - platforms = list(tags._linux_platforms(is_32bit=False)) -- expected = ["manylinux2010_x86_64", "manylinux1_x86_64", "linux_x86_64"] -+ arch = platform.machine() -+ expected = ["manylinux2010_" + arch, "manylinux1_" + arch, "linux_" + arch] - assert platforms == expected - -- def test_linux_platforms_manylinux2014(self, monkeypatch): -+ def test_linux_platforms_manylinux2014(self, is_x86, monkeypatch): - monkeypatch.setattr( - tags, "_is_manylinux_compatible", lambda name, _: name == "manylinux2014" - ) -- if platform.system() != "Linux": -+ if platform.system() != "Linux" or not is_x86: - monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64") -+ monkeypatch.setattr(platform, "machine", lambda: "x86_64") - platforms = list(tags._linux_platforms(is_32bit=False)) -+ arch = platform.machine() - expected = [ -- "manylinux2014_x86_64", -- "manylinux2010_x86_64", -- "manylinux1_x86_64", -- "linux_x86_64", -+ "manylinux2014_" + arch, -+ "manylinux2010_" + arch, -+ "manylinux1_" + arch, -+ "linux_" + arch, - ] - assert platforms == expected - diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 94fbc1f8f1..c71bc49063 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -15974,17 +15974,14 @@ several utilities, as well as an API for building localization tools.") (define-public python-packaging (package (name "python-packaging") - (version "20.0") + (version "20.4") (source (origin (method url-fetch) (uri (pypi-uri "packaging" version)) - ;; XXX: The URL in the patch file is wrong, it should be - ;; . - (patches (search-patches "python-packaging-test-arch.patch")) (sha256 (base32 - "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy")))) + "1y3rc1ams1i25calk6b9jf1gl85ix5a23a146swjvhdr8x7zfms3")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases -- cgit v1.2.3 From 0809e4a4fa84733cb8f97a8a856a2e43edeafc18 Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Tue, 1 Dec 2020 10:13:19 +0100 Subject: gnu: Add clml. * gnu/packages/lisp-xyz.scm (cl-clml, sbcl-clml): New variables. * gnu/packages/patches/sbcl-clml-fix-types.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/lisp-xyz.scm | 40 ++++ gnu/packages/patches/sbcl-clml-fix-types.patch | 280 +++++++++++++++++++++++++ 3 files changed, 321 insertions(+) create mode 100644 gnu/packages/patches/sbcl-clml-fix-types.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 7777891896..c14e2aa56d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1591,6 +1591,7 @@ dist_patch_DATA = \ %D%/packages/patches/rust-reproducible-builds.patch \ %D%/packages/patches/rust-openssl-sys-no-vendor.patch \ %D%/packages/patches/rxvt-unicode-escape-sequences.patch \ + %D%/packages/patches/sbcl-clml-fix-types.patch \ %D%/packages/patches/sbcl-geco-fix-organism-class.patch \ %D%/packages/patches/scalapack-blacs-mpi-deprecations.patch \ %D%/packages/patches/scheme48-tests.patch \ diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm index dd47659b35..d49d460db1 100644 --- a/gnu/packages/lisp-xyz.scm +++ b/gnu/packages/lisp-xyz.scm @@ -11699,3 +11699,43 @@ Common Lisp arrays and performing numerical calculations with them.") (define-public ecl-array-operations (sbcl-package->ecl-package sbcl-array-operations)) + +(define-public sbcl-clml + (let ((commit "95505b54c8c7b4b27f500c3be97fa5732f4b51a8") + (revision "0")) + (package + (name "sbcl-clml") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mmaul/clml") + (commit commit))) + (file-name (git-file-name "clml" version)) + (sha256 + (base32 "006pii59nmpc61n7p7h8ha5vjg6x0dya327i58z0rnvxs249h345")) + ;; TODO: Remove this when the patch has been merged upstream. + (patches (search-patches "sbcl-clml-fix-types.patch")))) + (build-system asdf-build-system/sbcl) + (inputs + `(("alexandia" ,sbcl-alexandria) + ("array-operations" ,sbcl-array-operations) + ("cl-fad" ,sbcl-cl-fad) + ("cl-ppcre" ,sbcl-cl-ppcre) + ("drakma" ,sbcl-drakma) + ("introspect-environment" ,sbcl-introspect-environment) + ("iterate" ,sbcl-iterate) + ("lparallel" ,sbcl-lparallel) + ("parse-number" ,sbcl-parse-number) + ("split-sequence" ,sbcl-split-sequence) + ("trivial-garbage" ,sbcl-trivial-garbage))) + (synopsis "Common Lisp machine learning library") + (description + "CLML (Common Lisp Machine Learning) is a high performance and large +scale statistical machine learning package") + (home-page "https://mmaul.github.io/clml/") + (license license:llgpl)))) + +(define-public cl-clml + (sbcl-package->cl-source-package sbcl-clml)) diff --git a/gnu/packages/patches/sbcl-clml-fix-types.patch b/gnu/packages/patches/sbcl-clml-fix-types.patch new file mode 100644 index 0000000000..689a2fbfc2 --- /dev/null +++ b/gnu/packages/patches/sbcl-clml-fix-types.patch @@ -0,0 +1,280 @@ +commit 9920bf86604b536c735b6478488a3cb89413e000 +Author: Guillaume Le Vaillant +Date: Tue Dec 1 09:38:41 2020 +0100 + + Fix some type declarations + + This allows compiling with SBCL 2.0.11 which is less tolerant with wrong type + declarations. + +diff --git a/som/src/lvq_pak.lisp b/som/src/lvq_pak.lisp +index 1a062cc..4006ed6 100644 +--- a/som/src/lvq_pak.lisp ++++ b/som/src/lvq_pak.lisp +@@ -53,7 +53,7 @@ + (current :accessor entries-current :initarg :current :initform 0 + :documentation "index of current data-entry inside data-entries") + (entries :accessor entries-entries :initarg :entries :initform nil +- :type #-ccl cons #+ccl list ++ :type #-ccl (or null cons) #+ccl list + :documentation "list of data-entries") + (num-loaded :accessor entries-num-loaded :initarg :num-loaded :initform nil + :documentation "number of lines loaded in entries list") +diff --git a/statistics/src/rand/rand.lisp b/statistics/src/rand/rand.lisp +index 3cd806a..c8f9952 100644 +--- a/statistics/src/rand/rand.lisp ++++ b/statistics/src/rand/rand.lisp +@@ -154,7 +154,7 @@ + (xn (make-array (1+ n) :element-type 'double-float))) + (declare (type double-float r v d) + (type fixnum k n n-minus-1) +- (type (vector double-float *) xn)) ++ (type (simple-array double-float (*)) xn)) + ;; build xn + (setf (aref xn n) (* v (exp (/ (* r r) 2)))) + (setf (aref xn (1- n)) r) +@@ -233,8 +233,8 @@ + (base (expt 2 (- +bit-operation-m+ k 1)))) + (declare (type double-float r v d) + (type fixnum k n n-minus-1 base) +- (type (vector double-float *) wn fn) +- (type (vector fixnum *) kn)) ++ (type (simple-array double-float (*)) wn fn) ++ (type (simple-array fixnum (*)) kn)) + ;; build arrays + (setf (aref wn (- n 1)) (/ (* v (exp (/ (* r r) 2))) base)) + (setf (aref wn (- n 2)) (/ r base)) +@@ -347,8 +347,8 @@ + (base (expt 2 (- +bit-operation-m+ k)))) + (declare (type double-float r v d) + (type fixnum k n n-minus-1 base) +- (type (vector double-float *) wn fn) +- (type (vector fixnum *) kn)) ++ (type (simple-array double-float (*)) wn fn) ++ (type (simple-array fixnum (*)) kn)) + ;; build arrays + (setf (aref wn (- n 1)) (/ (* v (exp (/ (* r r) 2))) base)) + (setf (aref wn (- n 2)) (/ r base)) +@@ -546,8 +546,8 @@ + (base (expt 2 (- +bit-operation-m+ k 1)))) + (declare (type double-float r v tr1 tr2) + (type fixnum k n n-minus-1 base) +- (type (vector double-float *) wn fn) +- (type (vector fixnum *) kn)) ++ (type (simple-array double-float (*)) wn fn) ++ (type (simple-array fixnum (*)) kn)) + ;; build arrays + (setf (aref wn (- n 1)) (/ (* v (+ 1 (* r r))) base)) + (setf (aref wn (- n 2)) (/ r base)) +@@ -663,8 +663,8 @@ + (base (expt 2 (- +bit-operation-m+ k)))) + (declare (type double-float r v) + (type fixnum k n n-minus-1 base) +- (type (vector double-float *) wn fn) +- (type (vector fixnum *) kn)) ++ (type (simple-array double-float (*)) wn fn) ++ (type (simple-array fixnum (*)) kn)) + ;; build arrays + (setf (aref wn (- n 1)) (/ (* v (exp r)) base)) + (setf (aref wn (- n 2)) (/ r base)) +@@ -804,8 +804,8 @@ + (base (expt 2 (- +bit-operation-m+ k 1)))) + (declare (type double-float r v) + (type fixnum k n n-minus-1 base) +- (type (vector double-float *) wn fn) +- (type (vector fixnum *) kn)) ++ (type (simple-array double-float (*)) wn fn) ++ (type (simple-array fixnum (*)) kn)) + ;; build arrays + (setf (aref wn (- n 1)) (/ (* v (exp r)) base)) + (setf (aref wn (- n 2)) (/ r base)) +@@ -2083,8 +2083,8 @@ + (base (expt 2 (- +bit-operation-m+ k 1)))) + (declare (type double-float r v tr) + (type fixnum k n n-minus-1 base) +- (type (vector double-float *) wn fn) +- (type (vector fixnum *) kn)) ++ (type (simple-array double-float (*)) wn fn) ++ (type (simple-array fixnum (*)) kn)) + ;; build arrays + (setf (aref wn (- n 1)) (/ (* (expt (+ 1d0 tr) 2) v) tr base)) + (setf (aref wn (- n 2)) (/ r base)) +@@ -2383,7 +2383,7 @@ + ans))) + (declare (type double-float s a d) + (type vector tix) +- (type (vector fixnum *) si)) ++ (type (simple-array fixnum (*)) si)) + (values tix si))) + + (defun binomial-table-lookup (tix si) +@@ -2415,7 +2415,7 @@ + (b (expt 2 k))) + (declare (type double-float s a) + (type fixnum nsq k b) +- (type (vector double-float *) pbins)) ++ (type (simple-array double-float (*)) pbins)) + ;; build pbins + (setf (aref pbins 0) (int-power (- 1d0 probability) size)) + (loop for i from 1 to size do +@@ -2438,7 +2438,7 @@ + do (incf j tx)) :initial-element -1 :element-type 'fixnum)) + (thetan 0d0)) + (declare (type double-float w thetan) +- (type (vector fixnum *) table)) ++ (type (simple-array fixnum (*)) table)) + (loop with j = 0 + for x from 0 + for pbin across pbins +@@ -2454,8 +2454,8 @@ + (vi (make-array nsq :element-type 'double-float + :initial-contents (loop for i from 0 to size collect (dfloat (/ (+ i 1) nsq))))) + (c (dfloat (/ nsq)))) +- (declare (type (vector fixnum *) ki) +- (type (vector double-float *) vi) ++ (declare (type (simple-array fixnum (*)) ki) ++ (type (simple-array double-float (*)) vi) + (type double-float c)) + (loop repeat size do + (let ((maxp 0) +@@ -2658,7 +2658,7 @@ + (thetan 0d0) + (sum 0d0)) + (declare (type double-float w thetan sum) +- (type (vector fixnum *) table)) ++ (type (simple-array fixnum (*)) table)) + (loop with j = 0 + for x from 0 + for pgeo across pgeos +@@ -2675,8 +2675,8 @@ + (vi (make-array nsq :element-type 'double-float + :initial-contents (loop for i from 0 below nsq collect (dfloat (/ (+ i 1) nsq))))) + (c (dfloat (/ nsq)))) +- (declare (type (vector fixnum *) ki) +- (type (vector double-float *) vi) ++ (declare (type (simple-array fixnum (*)) ki) ++ (type (simple-array double-float (*)) vi) + (type double-float c)) + (loop repeat (1- nsq) do + (let ((maxp 0) +@@ -2911,7 +2911,7 @@ + (sum 0d0)) + (declare (type double-float w thetan sum pl pu) + (type fixnum nsq d) +- (type (vector fixnum *) table)) ++ (type (simple-array fixnum (*)) table)) + (unless (= xl 0) + (setf pps (subseq pps xl))) + (loop with j = 0 +@@ -2930,8 +2930,8 @@ + (vi (make-array nsq :element-type 'double-float + :initial-contents (loop for i from 0 below nsq collect (dfloat (/ (+ i 1) nsq))))) + (c (dfloat (/ nsq)))) +- (declare (type (vector fixnum *) ki) +- (type (vector double-float *) vi) ++ (declare (type (simple-array fixnum (*)) ki) ++ (type (simple-array double-float (*)) vi) + (type double-float c)) + (loop repeat (1- nsq) do + (let ((maxp 0) +@@ -3174,7 +3174,7 @@ + (k 7) + (b (expt 2 k))) + (declare (type fixnum a1 a2 nsq k b) +- (type (vector double-float *) phs)) ++ (type (simple-array double-float (*)) phs)) + ;; build phs + (setf (aref phs 0) + (/ (dfloat (the fixnum (* (combination successes a1) (combination (- elements successes) (- samples a1))))) +@@ -3200,7 +3200,7 @@ + (table (make-array b :initial-element -1 :element-type 'fixnum)) + (thetan 0d0)) + (declare (type double-float w thetan) +- (type (vector fixnum *) table)) ++ (type (simple-array fixnum (*)) table)) + (loop with j = 0 + for x from a1 + for i from 0 +@@ -3217,8 +3217,8 @@ + (vi (make-array nsq :element-type 'double-float + :initial-contents (loop for i from 0 below nsq collect (dfloat (/ (+ i 1) nsq))))) + (c (dfloat (/ nsq)))) +- (declare (type (vector fixnum *) ki) +- (type (vector double-float *) vi) ++ (declare (type (simple-array fixnum (*)) ki) ++ (type (simple-array double-float (*)) vi) + (type double-float c)) + (loop repeat (1- nsq) do + (let ((maxp 0) +@@ -3442,7 +3442,7 @@ + (sum 0d0)) + (declare (type double-float w thetan sum pl pu) + (type fixnum nsq d) +- (type (vector fixnum *) table)) ++ (type (simple-array fixnum (*)) table)) + (unless (= xl 0) + (setf pnbs (subseq pnbs xl))) + (loop with j = 0 +@@ -3461,8 +3461,8 @@ + (vi (make-array nsq :element-type 'double-float + :initial-contents (loop for i from 0 below nsq collect (dfloat (/ (+ i 1) nsq))))) + (c (dfloat (/ nsq)))) +- (declare (type (vector fixnum *) ki) +- (type (vector double-float *) vi) ++ (declare (type (simple-array fixnum (*)) ki) ++ (type (simple-array double-float (*)) vi) + (type double-float c)) + (loop repeat (1- nsq) do + (let ((maxp 0) +diff --git a/time-series/src/ts-read-data.lisp b/time-series/src/ts-read-data.lisp +index 09ad933..a692514 100644 +--- a/time-series/src/ts-read-data.lisp ++++ b/time-series/src/ts-read-data.lisp +@@ -5,7 +5,7 @@ + ((frequency :initarg :frequency + :accessor ts-freq + :initform nil +- :type number) ++ :type (or null number)) + (start :initarg :start :accessor ts-start :initform nil) + (end :initarg :end :accessor ts-end :initform nil) + (ts-type :initarg :ts-type :accessor ts-type :initform nil) +diff --git a/time-series/src/ts-state-space-model.lisp b/time-series/src/ts-state-space-model.lisp +index 4dbf56a..ad9e5cc 100644 +--- a/time-series/src/ts-state-space-model.lisp ++++ b/time-series/src/ts-state-space-model.lisp +@@ -348,8 +348,8 @@ + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + (eval-when (:execute :compile-toplevel :load-toplevel) + (defclass trend-model (gaussian-stsp-model) +- ((diff-k :initarg :diff-k :initform nil :type integer :accessor diff-k) +- (tau^2 :initarg :tau^2 :initform nil :type number :accessor tau^2) ++ ((diff-k :initarg :diff-k :initform nil :type (or null integer) :accessor diff-k) ++ (tau^2 :initarg :tau^2 :initform nil :type (or null number) :accessor tau^2) + (aic :initarg :aic :initform +nan+ :type number)) + (:documentation "- parent: gaussian-stsp-model + - accessors: +@@ -492,9 +492,9 @@ + ; seasonal model ; + ;;;;;;;;;;;;;;;;;; + (defclass seasonal-model (gaussian-stsp-model) +- ((s-deg :initarg :s-deg :initform nil :type fixnum :accessor s-deg) +- (s-freq :initarg :s-freq :initform nil :type fixnum :accessor s-freq) +- (tau^2 :initarg :tau^2 :initform nil :type number :accessor tau^2)) ++ ((s-deg :initarg :s-deg :initform nil :type (or null fixnum) :accessor s-deg) ++ (s-freq :initarg :s-freq :initform nil :type (or null fixnum) :accessor s-freq) ++ (tau^2 :initarg :tau^2 :initform nil :type (or null number) :accessor tau^2)) + (:documentation "- parent: gaussian-stsp-model + - accessors + - s-deg : Degree for seasonal model +@@ -593,8 +593,8 @@ + ; seasonal-adjustment-model ; + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + (defclass seasonal-adjustment-model (gaussian-stsp-model) +- ((trend :initarg :trend :initform nil :type trend-model :accessor trend-model) +- (seasonal :initarg :seasonal :initform nil :type seasonal-model :accessor seasonal-model)) ++ ((trend :initarg :trend :initform nil :type (or null trend-model) :accessor trend-model) ++ (seasonal :initarg :seasonal :initform nil :type (or null seasonal-model) :accessor seasonal-model)) + (:documentation "Standard seasonal adjustment model ( Trend + Seasonal ) + - parent: gaussian-stsp-model + - accessors -- cgit v1.2.3 From 718dd9779aa74ab397ff6a69e9bf36e83c3adf5b Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Tue, 1 Dec 2020 10:17:16 +0100 Subject: gnu: clisp: Remove unused patch. This is a follow-up for 074236d19796577b2f55b3c7030c14242efa8f3f. * gnu/patches/clisp-remove-failing-test.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - .../patches/clisp-remove-failing-test.patch | 43 ---------------------- 2 files changed, 44 deletions(-) delete mode 100644 gnu/packages/patches/clisp-remove-failing-test.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index c14e2aa56d..3a3919b5d4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -887,7 +887,6 @@ dist_patch_DATA = \ %D%/packages/patches/clementine-fix-sqlite.patch \ %D%/packages/patches/clementine-remove-crypto++-dependency.patch \ %D%/packages/patches/clementine-use-openssl.patch \ - %D%/packages/patches/clisp-remove-failing-test.patch \ %D%/packages/patches/clucene-pkgconfig.patch \ %D%/packages/patches/cmake-curl-certificates.patch \ %D%/packages/patches/coda-use-system-libs.patch \ diff --git a/gnu/packages/patches/clisp-remove-failing-test.patch b/gnu/packages/patches/clisp-remove-failing-test.patch deleted file mode 100644 index e44ce80f74..0000000000 --- a/gnu/packages/patches/clisp-remove-failing-test.patch +++ /dev/null @@ -1,43 +0,0 @@ -This test doesn't ever complete or timeout - ---- - tests/socket.tst | 24 ------------------------ - 1 file changed, 24 deletions(-) - -diff --git a/tests/socket.tst b/tests/socket.tst -index 93c6310..1d976ff 100644 ---- a/tests/socket.tst -+++ b/tests/socket.tst -@@ -551,30 +551,6 @@ T - interfaces)) - ("0.0.0.0" "127.0.0.1" "0.0.0.0" "127.0.0.1") - --(multiple-value-bind (run args) (cmd-args) -- (let ((se (socket:socket-server))) -- (ext:run-program run :arguments (append args (list "-q" "-q" "-x" (format nil "(close (socket:socket-connect ~D))" (socket:socket-server-port se)))) -- :wait nil :input nil :output nil) -- (unwind-protect -- (with-open-stream (so (socket:socket-accept se)) -- (list -- (socket:socket-status so) -- (write-line "foo" so) -- (socket:socket-status so) -- #+macos (handler-case (read-char so) -- (end-of-file (c) -- (princ 'read-char) (princ-error c) t)) -- #-macos (check-os-error (read-char so) (:ECONNRESET 104)) -- (null (member (socket:socket-status so) '(:EOF :APPEND))) -- #+macos (string= (write-line "bar" so) "bar") -- #-macos (check-os-error (write-line "bar" so) (:EPIPE 32)) -- (null (member (socket:socket-status so) '(:EOF :APPEND))) -- (handler-case (read-char so) -- (end-of-file (c) -- (princ 'read-char) (princ-error c) 'end-of-file)))) -- (socket:socket-server-close se)))) --(:OUTPUT "foo" :OUTPUT T NIL T NIL END-OF-FILE) -- - ;; https://sourceforge.net/p/clisp/feature-requests/46/ - (check-os-error (socket:socket-connect 0) - #-(or win32 macos) (:ECONNREFUSED 111) --- - -- cgit v1.2.3 From 04b83678653fda3c66e600e88f54f5108290ec1c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 1 Dec 2020 23:23:10 +0100 Subject: Revert "gnu: python-packaging: Update to 20.4." This reverts commit 71b15b4874b7f9ec7001d2916a8ab27dcce6cdc0. --- gnu/local.mk | 1 + .../patches/python-packaging-test-arch.patch | 65 ++++++++++++++++++++++ gnu/packages/python-xyz.scm | 7 ++- 3 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/python-packaging-test-arch.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 3a3919b5d4..9f46ed2e0d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1526,6 +1526,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-mox3-python3.6-compat.patch \ %D%/packages/patches/python-testtools.patch \ %D%/packages/patches/python-onnx-use-system-googletest.patch \ + %D%/packages/patches/python-packaging-test-arch.patch \ %D%/packages/patches/python2-parameterized-docstring-test.patch \ %D%/packages/patches/python-paste-remove-timing-test.patch \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ diff --git a/gnu/packages/patches/python-packaging-test-arch.patch b/gnu/packages/patches/python-packaging-test-arch.patch new file mode 100644 index 0000000000..df80a62544 --- /dev/null +++ b/gnu/packages/patches/python-packaging-test-arch.patch @@ -0,0 +1,65 @@ +Fix tests that are "hard coded" to expect x86_64 output by mocking the platform interface. + +Submitted upstream: +https://github.com/pypa/packaging/pull/176 + +diff --git a/tests/test_tags.py b/tests/test_tags.py +index 1eacf68..0a3f1b4 100644 +--- a/tests/test_tags.py ++++ b/tests/test_tags.py +@@ -435,37 +435,43 @@ class TestManylinuxPlatform: + linux_platform = list(tags._linux_platforms(is_32bit=False)) + assert linux_platform == ["linux_x86_64"] + +- def test_linux_platforms_manylinux1(self, monkeypatch): ++ def test_linux_platforms_manylinux1(self, is_x86, monkeypatch): + monkeypatch.setattr( + tags, "_is_manylinux_compatible", lambda name, _: name == "manylinux1" + ) +- if platform.system() != "Linux": ++ if platform.system() != "Linux" or not is_x86: + monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64") ++ monkeypatch.setattr(platform, "machine", lambda: "x86_64") + platforms = list(tags._linux_platforms(is_32bit=False)) +- assert platforms == ["manylinux1_x86_64", "linux_x86_64"] ++ arch = platform.machine() ++ assert platforms == ["manylinux1_" + arch, "linux_" + arch] + +- def test_linux_platforms_manylinux2010(self, monkeypatch): ++ def test_linux_platforms_manylinux2010(self, is_x86, monkeypatch): + monkeypatch.setattr( + tags, "_is_manylinux_compatible", lambda name, _: name == "manylinux2010" + ) +- if platform.system() != "Linux": ++ if platform.system() != "Linux" or not is_x86: + monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64") ++ monkeypatch.setattr(platform, "machine", lambda: "x86_64") + platforms = list(tags._linux_platforms(is_32bit=False)) +- expected = ["manylinux2010_x86_64", "manylinux1_x86_64", "linux_x86_64"] ++ arch = platform.machine() ++ expected = ["manylinux2010_" + arch, "manylinux1_" + arch, "linux_" + arch] + assert platforms == expected + +- def test_linux_platforms_manylinux2014(self, monkeypatch): ++ def test_linux_platforms_manylinux2014(self, is_x86, monkeypatch): + monkeypatch.setattr( + tags, "_is_manylinux_compatible", lambda name, _: name == "manylinux2014" + ) +- if platform.system() != "Linux": ++ if platform.system() != "Linux" or not is_x86: + monkeypatch.setattr(distutils.util, "get_platform", lambda: "linux_x86_64") ++ monkeypatch.setattr(platform, "machine", lambda: "x86_64") + platforms = list(tags._linux_platforms(is_32bit=False)) ++ arch = platform.machine() + expected = [ +- "manylinux2014_x86_64", +- "manylinux2010_x86_64", +- "manylinux1_x86_64", +- "linux_x86_64", ++ "manylinux2014_" + arch, ++ "manylinux2010_" + arch, ++ "manylinux1_" + arch, ++ "linux_" + arch, + ] + assert platforms == expected + diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 1086d724f1..bffb643258 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -16003,14 +16003,17 @@ several utilities, as well as an API for building localization tools.") (define-public python-packaging (package (name "python-packaging") - (version "20.4") + (version "20.0") (source (origin (method url-fetch) (uri (pypi-uri "packaging" version)) + ;; XXX: The URL in the patch file is wrong, it should be + ;; . + (patches (search-patches "python-packaging-test-arch.patch")) (sha256 (base32 - "1y3rc1ams1i25calk6b9jf1gl85ix5a23a146swjvhdr8x7zfms3")))) + "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases -- cgit v1.2.3 From 9cf531f57786c858c34c11a08b0ad16e2f26b27b Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Thu, 3 Dec 2020 12:11:00 +0100 Subject: images: Add novena-image-type, novena-barebones-raw-image, novena-barebones-os. * gnu/system/images/novena.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/local.mk | 1 + gnu/system/images/novena.scm | 67 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 gnu/system/images/novena.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9f46ed2e0d..28ad119846 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -652,6 +652,7 @@ GNU_SYSTEM_MODULES = \ %D%/system/vm.scm \ \ %D%/system/images/hurd.scm \ + %D%/system/images/novena.scm \ %D%/system/images/pine64.scm \ %D%/system/images/pinebook-pro.scm \ \ diff --git a/gnu/system/images/novena.scm b/gnu/system/images/novena.scm new file mode 100644 index 0000000000..335074e3b7 --- /dev/null +++ b/gnu/system/images/novena.scm @@ -0,0 +1,67 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Mathieu Othacehe +;;; Copyright © 2020 Danny Milosavljevic +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu system images novena) + #:use-module (gnu bootloader) + #:use-module (gnu bootloader u-boot) + #:use-module (gnu image) + #:use-module (gnu packages linux) + #:use-module (gnu services) + #:use-module (gnu services base) + #:use-module (gnu system) + #:use-module (gnu system file-systems) + #:use-module (gnu system image) + #:use-module (srfi srfi-26) + #:export (novena-barebones-os + novena-image-type + novena-barebones-raw-image)) + +(define novena-barebones-os + (operating-system + (host-name "vignemale") + (timezone "Europe/Paris") + (locale "en_US.utf8") + (bootloader (bootloader-configuration + (bootloader u-boot-novena-bootloader) + (target "/dev/vda"))) + (initrd-modules '("sdhci-esdhc-imx" "ahci_imx")) + ;(kernel linux-libre-arm-generic) + (file-systems (cons (file-system + (device (file-system-label "my-root")) + (mount-point "/") + (type "ext4")) + %base-file-systems)) + (services (cons (service agetty-service-type + (agetty-configuration + (extra-options '("-L")) ; no carrier detect + (baud-rate "115200") + (term "vt100") + (tty "ttymxc1"))) + %base-services)))) + +(define novena-image-type + (image-type + (name 'novena-raw) + (constructor (cut image-with-os arm32-disk-image <>)))) + +(define novena-barebones-raw-image + (image + (inherit + (os->image novena-barebones-os #:type novena-image-type)) + (name 'novena-barebones-raw-image))) -- cgit v1.2.3 From 031fbebafef81244a72e584a46b3fcc219256fcb Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Thu, 3 Dec 2020 14:52:02 +0100 Subject: gnu: cl-asdf: Improve priorities of configuration file search. * gnu/packages/patches/cl-asdf-config-directories.patch: New file. * gnu/local.mk (dist_PATCH_DATA): Add it. * gnu/packages/lisp.scm (cl-asdf)[native-inputs]: Add it. [arguments]: Apply the new patch. Co-authored-by: Pierre Neidhardt --- gnu/local.mk | 1 + gnu/packages/lisp.scm | 28 ++++---------- .../patches/cl-asdf-config-directories.patch | 44 ++++++++++++++++++++++ 3 files changed, 53 insertions(+), 20 deletions(-) create mode 100644 gnu/packages/patches/cl-asdf-config-directories.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 28ad119846..f838ebe1fa 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -868,6 +868,7 @@ dist_patch_DATA = \ %D%/packages/patches/cdrtools-3.01-mkisofs-isoinfo.patch \ %D%/packages/patches/ceph-disable-cpu-optimizations.patch \ %D%/packages/patches/chmlib-inttypes.patch \ + %D%/packages/patches/cl-asdf-config-directories.patch \ %D%/packages/patches/clamav-config-llvm-libs.patch \ %D%/packages/patches/clamav-system-tomsfastmath.patch \ %D%/packages/patches/clang-3.5-libc-search-path.patch \ diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index e4c963070e..0038cb0dca 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -90,6 +90,9 @@ (sha256 (base32 "1hpx30f6yrak15nw992k7x3pn75ahvjs04n4f134k68mhgs62km2")))) (build-system trivial-build-system) + (native-inputs + `(("config-patch" ,@(search-patches "cl-asdf-config-directories.patch")) + ("patch" ,patch))) (arguments `(#:modules ((guix build utils) (guix build lisp-utils)) @@ -101,28 +104,13 @@ (asdf-install (string-append out %source-install-prefix "/source/asdf/")) (src-asdf (string-append (assoc-ref %build-inputs "source"))) - (dst-asdf (string-append asdf-install "asdf.lisp"))) + (dst-asdf (string-append asdf-install "asdf.lisp")) + (patch (string-append (assoc-ref %build-inputs "patch") + "/bin/patch")) + (config-patch (assoc-ref %build-inputs "config-patch"))) (mkdir-p asdf-install) (copy-file src-asdf dst-asdf) - ;; Patch ASDF to make it read the configuration files in all - ;; the direcories listed in '$XDG_CONFIG_DIRS' instead of just - ;; the first. - (substitute* dst-asdf - (("\\(xdg-config-pathname \\*source-registry-directory\\* direction\\)") - "`(:source-registry - ,@(loop - for dir in (xdg-config-dirs - \"common-lisp/source-registry.conf.d/\") - collect `(:include ,dir)) - :inherit-configuration)") - (("\\(xdg-config-pathname \\*output-translations-directory\\* direction\\)") - "`(:output-translations - ,@(loop - for dir in (xdg-config-dirs - \"common-lisp/asdf-output-translations.conf.d/\") - collect `(:include ,dir)) - :inherit-configuration)"))) - #t))) + (invoke patch "-p1" "-i" config-patch dst-asdf))))) (home-page "https://common-lisp.net/project/asdf/") (synopsis "Another System Definition Facility") (description diff --git a/gnu/packages/patches/cl-asdf-config-directories.patch b/gnu/packages/patches/cl-asdf-config-directories.patch new file mode 100644 index 0000000000..2b1b51932c --- /dev/null +++ b/gnu/packages/patches/cl-asdf-config-directories.patch @@ -0,0 +1,44 @@ +Search for ASDF configuration files first in user directories, and then in +Guix profiles. + +diff -ru a/asdf-3.3.4.lisp b/asdf-3.3.4.lisp +--- a/asdf-3.3.4.lisp 2020-02-14 20:16:22.000000000 +0100 ++++ b/asdf-3.3.4.lisp 2020-12-05 11:09:56.066229482 +0100 +@@ -12535,10 +12535,15 @@ + (find-preferred-file (system-config-pathnames *output-translations-file*) + :direction direction)) + (defun user-output-translations-directory-pathname (&key (direction :input)) +- (xdg-config-pathname *output-translations-directory* direction)) +- (defun system-output-translations-directory-pathname (&key (direction :input)) +- (find-preferred-file (system-config-pathnames *output-translations-directory*) ++ (find-preferred-file (list (xdg-config-home *output-translations-directory*)) + :direction direction)) ++ (defun system-output-translations-directory-pathname (&key (direction :input)) ++ `(:output-translations ++ ,@(loop :for dir :in (filter-pathname-set ++ (xdg-config-dirs ++ "common-lisp/asdf-output-translations.conf.d/")) ++ :collect `(:include ,dir)) ++ :inherit-configuration)) + (defun environment-output-translations () + (getenv "ASDF_OUTPUT_TRANSLATIONS")) + +@@ -12921,10 +12926,15 @@ + (find-preferred-file (system-config-pathnames *source-registry-file*) + :direction direction)) + (defun user-source-registry-directory (&key (direction :input)) +- (xdg-config-pathname *source-registry-directory* direction)) +- (defun system-source-registry-directory (&key (direction :input)) +- (find-preferred-file (system-config-pathnames *source-registry-directory*) ++ (find-preferred-file (list (xdg-config-home *source-registry-directory*)) + :direction direction)) ++ (defun system-source-registry-directory (&key (direction :input)) ++ `(:source-registry ++ ,@(loop :for dir :in (filter-pathname-set ++ (xdg-config-dirs ++ "common-lisp/source-registry.conf.d/")) ++ :collect `(:include ,dir)) ++ :inherit-configuration)) + (defun environment-source-registry () + (getenv "CL_SOURCE_REGISTRY")) + -- cgit v1.2.3 From 937bc5841429f40a64e6b25d5d4c2fe3276789f1 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Sat, 5 Dec 2020 21:10:59 -0600 Subject: gnu: Add libexpected. * gnu/packages/cpp.scm (libexpected): New variable. * gnu/packages/patches/libexpected-nofetch.patch: Add patch. * gnu/local.mk: Reference patch. --- gnu/local.mk | 1 + gnu/packages/cpp.scm | 38 ++++++++++++++++++++++++++ gnu/packages/patches/libexpected-nofetch.patch | 27 ++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 gnu/packages/patches/libexpected-nofetch.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f838ebe1fa..cbfefccbb9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1257,6 +1257,7 @@ dist_patch_DATA = \ %D%/packages/patches/libcanberra-sound-theme-freedesktop.patch \ %D%/packages/patches/libcanberra-wayland-crash.patch \ %D%/packages/patches/libcyaml-libyaml-compat.patch \ + %D%/packages/patches/libexpected-nofetch.patch \ %D%/packages/patches/libgeotiff-adapt-test-script-for-proj-6.2.patch \ %D%/packages/patches/libgit2-mtime-0.patch \ %D%/packages/patches/libgnome-encoding.patch \ diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index f0d8cd2a40..2591d339d6 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -731,3 +731,41 @@ of C++14 components that complements @code{std} and Boost.") ;; 32-bit is not supported: https://github.com/facebook/folly/issues/103 (supported-systems '("aarch64-linux" "x86_64-linux")) (license license:asl2.0))) + +(define-public libexpected + (package + (name "libexpected") + (version "1.0.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/TartanLlama/expected") + (commit (string-append "v" version)) + ;; NOTE: Requires TL_CMAKE from custom + ;; repository. Should not affect reproducibility. + (recursive? #t))) + (file-name (git-file-name name version)) + ;; NOTE: This patch will be unnecessary on subsequent tags. + (patches (search-patches "libexpected-nofetch.patch")) + (sha256 + (base32 "1ckzfrljzzdw9wf8hvdfjz4wjx5na57iwxc48mbv9rf5067m21a5")))) + (build-system cmake-build-system) + ;; TODO: Clean up install phase. + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "./tests")))))) + (native-inputs + `(("catch2" ,catch-framework2))) + (synopsis "C++11/14/17 std::expected with functional-style extensions") + (description "@code{std::expected} is proposed as the preferred way to +represent objects which will either have an expected value, or an unexpected +value giving information about why something failed. Unfortunately, chaining +together many computations which may fail can be verbose, as error-checking +code will be mixed in with the actual programming logic. This implementation +provides a number of utilities to make coding with expected cleaner.") + (home-page "https://tl.tartanllama.xyz/") + (license license:cc0))) diff --git a/gnu/packages/patches/libexpected-nofetch.patch b/gnu/packages/patches/libexpected-nofetch.patch new file mode 100644 index 0000000000..e1d104f6f4 --- /dev/null +++ b/gnu/packages/patches/libexpected-nofetch.patch @@ -0,0 +1,27 @@ +Description: Disable FetchContent module + No online operations are permitted during build package. +Author: Nicholas Guriev +Last-Update: Wed, 22 Jan 2020 21:51:33 +0300 + +Modified by Brett Gilio on Dec 5, 2020 + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -4,16 +4,7 @@ project(tl-expected VERSION 1.0.0 LANGUAGES CXX) + + option(EXPECTED_ENABLE_TESTS "Enable tests." ON) + +-include(FetchContent) +-FetchContent_Declare( +- tl_cmake +- GIT_REPOSITORY https://github.com/TartanLlama/tl-cmake.git +-) +-FetchContent_GetProperties(tl_cmake) +-if(NOT tl_cmake_POPULATED) +- FetchContent_Populate(tl_cmake) +- set(CMAKE_MODULE_PATH ${tl_cmake_SOURCE_DIR} ${CMAKE_MODULE_PATH}) +-endif() ++set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/tl-cmake ${CMAKE_MODULE_PATH}) + include(add-tl) + + tl_add_library(expected SOURCES -- cgit v1.2.3 From 4fcff5909135e9e7d56601f07ac612fa67b66d52 Mon Sep 17 00:00:00 2001 From: Simon South Date: Tue, 1 Dec 2020 09:45:19 -0500 Subject: gnu: knot-resolver: Update to 5.2.0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/dns.scm (knot-resolver): Update to 5.2.0. [source]: Add patch from upstream commit to fix the internal map() function on 32-bit platforms. [native-inputs]: Add texinfo to enable generating the manual in Info format. [inputs]: Add nghttp2:lib to enable the new DNS-over-HTTPS implementation. * gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: 宋文武 --- gnu/local.mk | 1 + gnu/packages/dns.scm | 13 +- .../knot-resolver-fix-map-command-on-32-bit.patch | 146 +++++++++++++++++++++ 3 files changed, 156 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index cbfefccbb9..a390f97693 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1222,6 +1222,7 @@ dist_patch_DATA = \ %D%/packages/patches/kmail-Fix-missing-link-libraries.patch \ %D%/packages/patches/kmod-module-directory.patch \ %D%/packages/patches/kmscon-runtime-keymap-switch.patch \ + %D%/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch \ %D%/packages/patches/kpackage-allow-external-paths.patch \ %D%/packages/patches/kpackage-fix-KF5PackageMacros.cmake.patch \ %D%/packages/patches/kmplayer-aarch64.patch \ diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm index 3aa3cf3e8d..85196e79c2 100644 --- a/gnu/packages/dns.scm +++ b/gnu/packages/dns.scm @@ -937,14 +937,17 @@ synthesis, and on-the-fly re-configuration.") (define-public knot-resolver (package (name "knot-resolver") - (version "5.1.3") + (version "5.2.0") (source (origin (method url-fetch) (uri (string-append "https://secure.nic.cz/files/knot-resolver/" "knot-resolver-" version ".tar.xz")) (sha256 (base32 - "12s5070nqqf599s1mb6rjas2as481rjf751qk5yrz6p34y885k90")))) + "0cwlipib3x88dr6cijqv2aps13b4ijv524wc85ns07rkldy2c948")) + (patches + (search-patches + "knot-resolver-fix-map-command-on-32-bit.patch")))) (build-system meson-build-system) (arguments '(#:configure-flags '("-Ddoc=enabled") @@ -982,7 +985,8 @@ synthesis, and on-the-fly re-configuration.") ("pkg-config" ,pkg-config) ("python-breathe" ,python-breathe) ("python-sphinx" ,python-sphinx) - ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme))) + ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme) + ("texinfo" ,texinfo))) (inputs `(("fstrm" ,fstrm) ("gnutls" ,gnutls) @@ -991,7 +995,8 @@ synthesis, and on-the-fly re-configuration.") ("lmdb" ,lmdb) ("luajit" ,luajit) ;; TODO: Add optional lua modules: basexx and psl. - ("lua-bitop" ,lua5.1-bitop))) + ("lua-bitop" ,lua5.1-bitop) + ("nghttp2" ,nghttp2 "lib"))) (home-page "https://www.knot-resolver.cz/") (synopsis "Caching validating DNS resolver") (description diff --git a/gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch b/gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch new file mode 100644 index 0000000000..02c0fbcb70 --- /dev/null +++ b/gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch @@ -0,0 +1,146 @@ +commit e01979620025666633250b3e2d545fe59c629f73 +Author: Vladimír Čunát +Date: Fri Nov 13 14:16:32 2020 +0100 + + fix map() command on 32-bit platforms; regressed in 5.2.0 + + LuaJIT FFI was using opendir() (etc.) variants with 32-bit inodes + but the C parts was using them as 64-bit inode variants. + Consequently the `struct dirent` layout didn't match and we were getting + filenames shifted by eight bytes. + + Now the whole dir-listing lua function is written in C. + +diff --git a/.luacheckrc b/.luacheckrc +index 0cf0b884..67bc18f6 100644 +--- a/.luacheckrc ++++ b/.luacheckrc +@@ -20,6 +20,7 @@ new_read_globals = { + 'user', + 'verbose', + 'worker', ++ 'kluautil_list_dir', + -- Sandbox declarations + 'kB', + 'MB', +diff --git a/NEWS b/NEWS +index 2eae3082..9d8cde99 100644 +--- a/NEWS ++++ b/NEWS +@@ -1,6 +1,10 @@ + Knot Resolver X.Y.X (yyyy-mm-dd) + ================================ + ++Bugfixes ++-------- ++- fix map() command on 32-bit platforms; regressed in 5.2.0 (!1093) ++ + + Knot Resolver 5.2.0 (2020-11-11) + ================================ +diff --git a/daemon/bindings/impl.c b/daemon/bindings/impl.c +index d10f4525..d9ad0774 100644 +--- a/daemon/bindings/impl.c ++++ b/daemon/bindings/impl.c +@@ -2,6 +2,7 @@ + * SPDX-License-Identifier: GPL-3.0-or-later + */ + ++#include + #include + #include + #include +@@ -29,6 +30,29 @@ const char * lua_table_checkindices(lua_State *L, const char *keys[]) + return NULL; + } + ++/** Return table listing filenames in a given directory (ls -A). */ ++static int kluautil_list_dir(lua_State *L) ++{ ++ lua_newtable(L); // empty table even on errors ++ ++ const char *path = lua_tolstring(L, 1, NULL); ++ if (!path) return 1; ++ DIR *dir = opendir(path); ++ if (!dir) return 1; ++ ++ struct dirent *entry; ++ int lua_i = 1; ++ while ((entry = readdir(dir)) != NULL) { ++ if (strcmp(entry->d_name, ".") && strcmp(entry->d_name, "..")) { ++ lua_pushstring(L, entry->d_name); ++ lua_rawseti(L, -2, lua_i++); ++ } ++ } ++ ++ closedir(dir); ++ return 1; ++} ++ + + /* Each of these just creates the correspondingly named lua table of functions. */ + int kr_bindings_cache (lua_State *L); /* ./cache.c */ +@@ -44,6 +68,9 @@ void kr_bindings_register(lua_State *L) + kr_bindings_modules(L); + kr_bindings_net(L); + kr_bindings_worker(L); ++ ++ /* Finally some lua utils *written in C*, not really a binding. */ ++ lua_register(L, "kluautil_list_dir", kluautil_list_dir); + } + + void lua_error_p(lua_State *L, const char *fmt, ...) +diff --git a/daemon/lua/kluautil.lua b/daemon/lua/kluautil.lua +index 57912e7b..e73e952c 100644 +--- a/daemon/lua/kluautil.lua ++++ b/daemon/lua/kluautil.lua +@@ -1,6 +1,5 @@ + -- SPDX-License-Identifier: GPL-3.0-or-later + +-local ffi = require('ffi') + local kluautil = {} + + -- Get length of table +@@ -28,14 +27,6 @@ function kluautil.kr_table_unpack(tab) + return unpack(tab, 1, tab.n) + end + +-ffi.cdef([[ +- typedef struct __dirstream DIR; +- DIR *opendir(const char *name); +- struct dirent *readdir(DIR *dirp); +- int closedir(DIR *dirp); +- char *strerror(int errnum); +-]]) +- + -- Fetch over HTTPS + function kluautil.kr_https_fetch(url, out_file, ca_file) + local http_ok, http_request = pcall(require, 'http.request') +@@ -88,26 +79,6 @@ function kluautil.kr_https_fetch(url, out_file, ca_file) + return true + end + +--- List directory +-function kluautil.list_dir (path) +- local results = {} +- local dir = ffi.C.opendir(path) +- if dir == nil then +- return results +- end +- +- local entry = ffi.C.readdir(dir) +- while entry ~= nil do +- local entry_name = ffi.string(ffi.C.kr_dirent_name(entry)) +- if entry_name ~= '.' and entry_name ~= '..' then +- table.insert(results, entry_name) +- end +- entry = ffi.C.readdir(dir) +- end +- +- ffi.C.closedir(dir) +- +- return results +-end ++kluautil.list_dir = kluautil_list_dir + + return kluautil -- cgit v1.2.3 From 6a84fddcaa9d949b01afc62f471ef16bfe361e97 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 6 Dec 2020 23:37:59 +0100 Subject: gnu: pam-mount: Update to 2.17. * gnu/packages/admin.scm (pam-mount): Update to 2.17. [source]: Remove upstreamed patch. * gnu/packages/patches/pam-mount-luks2-support.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/admin.scm | 11 ++--- gnu/packages/patches/pam-mount-luks2-support.patch | 51 ---------------------- 3 files changed, 3 insertions(+), 60 deletions(-) delete mode 100644 gnu/packages/patches/pam-mount-luks2-support.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index a390f97693..e9dafc0292 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1432,7 +1432,6 @@ dist_patch_DATA = \ %D%/packages/patches/p7zip-CVE-2017-17969.patch \ %D%/packages/patches/p7zip-remove-unused-code.patch \ %D%/packages/patches/pam-krb5-CVE-2020-10595.patch \ - %D%/packages/patches/pam-mount-luks2-support.patch \ %D%/packages/patches/pango-skip-libthai-test.patch \ %D%/packages/patches/pciutils-hurd-configure.patch \ %D%/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index d04312c9a1..b855bd15dc 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -3934,19 +3934,14 @@ tcpdump and snoop.") (define-public pam-mount (package (name "pam-mount") - (version "2.16") + (version "2.17") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/pam-mount/pam_mount/" - version "/pam_mount-" version ".tar.xz")) + "pam_mount-" version ".tar.xz")) (sha256 - (base32 - "1rvi4irb7ylsbhvx1cr6islm2xxw1a4b19q6z4a9864ndkm0f0mf")) - (patches - ;; Patch adding support for encrypted volumes in LUKS2 format. - ;; It comes from the Gentoo package definition for sys-auth/pam_mount. - (search-patches "pam-mount-luks2-support.patch")))) + (base32 "1q2n6a2ah6nghdn8i6ad2wj247njwb5nx48cggxknaa6lqxylidy")))) (build-system gnu-build-system) (native-inputs `(("perl" ,perl) diff --git a/gnu/packages/patches/pam-mount-luks2-support.patch b/gnu/packages/patches/pam-mount-luks2-support.patch deleted file mode 100644 index b59daf5ce1..0000000000 --- a/gnu/packages/patches/pam-mount-luks2-support.patch +++ /dev/null @@ -1,51 +0,0 @@ -From d4434c05e7c0cf05d87089404cfa2deedc60811a Mon Sep 17 00:00:00 2001 -From: Ingo Franzki -Date: Mon, 29 Oct 2018 16:47:40 +0100 -Subject: [PATCH] crypto: Add support for LUKS2 - -Cryptsetup version 2.0 added support for LUKS2. -This patch adds support for mounting LUKS2 volumes with -pam_mount. - -Signed-off-by: Ingo Franzki ---- - src/crypto-dmc.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/src/crypto-dmc.c b/src/crypto-dmc.c -index d0ab6ca..abd0358 100644 ---- a/src/crypto-dmc.c -+++ b/src/crypto-dmc.c -@@ -21,6 +21,12 @@ - #include "libcryptmount.h" - #include "pam_mount.h" - -+#ifndef CRYPT_LUKS -+ #define CRYPT_LUKS NULL /* Passing NULL to crypt_load will -+ default to LUKS(1) on older -+ libcryptsetup versions. */ -+#endif -+ - /** - * dmc_is_luks - check if @path points to a LUKS volume (cf. normal dm-crypt) - * @path: path to the crypto container -@@ -48,7 +54,7 @@ EXPORT_SYMBOL int ehd_is_luks(const char *path, bool blkdev) - - ret = crypt_init(&cd, device); - if (ret == 0) { -- ret = crypt_load(cd, CRYPT_LUKS1, NULL); -+ ret = crypt_load(cd, CRYPT_LUKS, NULL); - if (ret == -EINVAL) - ret = false; - else if (ret == 0) -@@ -106,7 +112,7 @@ static bool dmc_run(const struct ehd_mount_request *req, - #endif - } - -- ret = crypt_load(cd, CRYPT_LUKS1, NULL); -+ ret = crypt_load(cd, CRYPT_LUKS, NULL); - if (ret == 0) { - ret = crypt_activate_by_passphrase(cd, mt->crypto_name, - CRYPT_ANY_SLOT, req->key_data, req->key_size, flags); --- -2.21.0 -- cgit v1.2.3 From ac50633c157f8aafb2867e7e05a6568eb91aebdf Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 6 Dec 2020 23:50:00 +0100 Subject: gnu: hplip: Update to 3.20.11. * gnu/packages/cups.scm (hplip): Update to 3.20.11. [source]: Remove upstreamed patch. * gnu/packages/patches/hplip-fix-bug-1898438.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/cups.scm | 7 +++---- gnu/packages/patches/hplip-fix-bug-1898438.patch | 19 ------------------- 3 files changed, 3 insertions(+), 24 deletions(-) delete mode 100644 gnu/packages/patches/hplip-fix-bug-1898438.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index e9dafc0292..4496cf73fa 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1159,7 +1159,6 @@ dist_patch_DATA = \ %D%/packages/patches/hubbub-sort-entities.patch \ %D%/packages/patches/hurd-cross.patch \ %D%/packages/patches/hurd-xattr.patch \ - %D%/packages/patches/hplip-fix-bug-1898438.patch \ %D%/packages/patches/hplip-remove-imageprocessor.patch \ %D%/packages/patches/hydra-disable-darcs-test.patch \ %D%/packages/patches/icecat-makeicecat.patch \ diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index 6365961699..df8e440383 100644 --- a/gnu/packages/cups.scm +++ b/gnu/packages/cups.scm @@ -415,17 +415,16 @@ should only be used as part of the Guix cups-pk-helper service.") (define-public hplip (package (name "hplip") - (version "3.20.9") + (version "3.20.11") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/hplip/hplip/" version "/hplip-" version ".tar.gz")) (sha256 (base32 - "1prdbp410405xrfggjc7y34nzljg7jnbgjzalgv4khwwma4i299n")) + "04fvdyjyjbkviy3awgm7g43p3lrvrsmgaqz8bwra22g7v2rpa5hb")) (modules '((guix build utils))) - (patches (search-patches "hplip-fix-bug-1898438.patch" - "hplip-remove-imageprocessor.patch")) + (patches (search-patches "hplip-remove-imageprocessor.patch")) (snippet '(begin ;; Delete non-free blobs: .so files, pre-compiled diff --git a/gnu/packages/patches/hplip-fix-bug-1898438.patch b/gnu/packages/patches/hplip-fix-bug-1898438.patch deleted file mode 100644 index 7c095f9b2a..0000000000 --- a/gnu/packages/patches/hplip-fix-bug-1898438.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Tobias Geerinckx-Rice -Date: Sun, 04 Oct 2020 13:28:49 +0200 -Subject: [PATCH] gnu: hplip: Fix non-network builds (bug #1898438) - -Reported as . - -diff -Naur a/scan/sane/hpaio.c b/scan/sane/hpaio.c ---- a/scan/sane/hpaio.c 1970-01-01 01:00:01.000000000 +0100 -+++ b/scan/sane/hpaio.c 2020-10-04 13:26:34.665244052 +0200 -@@ -36,7 +36,9 @@ - #include - #include - #include "hpmud.h" -+#ifdef HAVE_LIBNETSNMP - #include "avahiDiscovery.h" -+#endif - #include "hp_ipp.h" - #include "soap.h" - #include "soapht.h" -- cgit v1.2.3 From 3832704aff7444e26ba7f6915bdb4f718b1bf2f4 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 7 Dec 2020 12:24:17 +0200 Subject: gnu: minimap2: Fix build on aarch64-linux. * gnu/packages/bioinformatics.scm (minimap2)[arguments]: Adjust configure-flags to be better per-architecture. [source]: Add patch. * gnu/packages/patches/minimap2-aarch64-support.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/bioinformatics.scm | 19 +++++--- .../patches/minimap2-aarch64-support.patch | 52 ++++++++++++++++++++++ 3 files changed, 65 insertions(+), 7 deletions(-) create mode 100644 gnu/packages/patches/minimap2-aarch64-support.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 4496cf73fa..f59d2543cd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1348,6 +1348,7 @@ dist_patch_DATA = \ %D%/packages/patches/mingw-w64-6.0.0-gcc.patch \ %D%/packages/patches/mingw-w64-dlltool-temp-prefix.patch \ %D%/packages/patches/mingw-w64-reproducible-gendef.patch \ + %D%/packages/patches/minimap2-aarch64-support.patch \ %D%/packages/patches/minisat-friend-declaration.patch \ %D%/packages/patches/minisat-install.patch \ %D%/packages/patches/mit-krb5-hurd.patch \ diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 312eb966e7..5efcfdea11 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -13056,7 +13056,8 @@ version does count multisplits.") "minimap2-" version ".tar.bz2")) (sha256 (base32 - "0hi7i9pzxhvjj44khzzzj1lrn5gb5837arr4wgln7k1k5n4ci2mn")))) + "0hi7i9pzxhvjj44khzzzj1lrn5gb5837arr4wgln7k1k5n4ci2mn")) + (patches (search-patches "minimap2-aarch64-support.patch")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; there are none @@ -13065,12 +13066,16 @@ version does count multisplits.") (let ((system ,(or (%current-target-system) (%current-system)))) (cond - ((string-prefix? "x86_64" system) - "all") - ((or (string-prefix? "armhf" system) - (string-prefix? "aarch64" system)) - "arm_neon=1") - (else "sse2only=1")))) + ((string-prefix? "x86_64" system) + "all") + ((or (string-prefix? "i586" system) + (string-prefix? "i686" system)) + "sse2only=1") + ((string-prefix? "armhf" system) + "arm_neon=1") + ((string-prefix? "aarch64" system) + "aarch64=1") + (else "")))) #:phases (modify-phases %standard-phases (delete 'configure) diff --git a/gnu/packages/patches/minimap2-aarch64-support.patch b/gnu/packages/patches/minimap2-aarch64-support.patch new file mode 100644 index 0000000000..95db8579d6 --- /dev/null +++ b/gnu/packages/patches/minimap2-aarch64-support.patch @@ -0,0 +1,52 @@ +This patch should be removed with the next release. There is WIP upstream +support for proper support of more architectures, including aarch64 and powerpc64le. + +diff --git a/Makefile b/Makefile +index ed341f6..94dbd85 100644 +--- a/Makefile ++++ b/Makefile +@@ -6,20 +6,18 @@ PROG= minimap2 + PROG_EXTRA= sdust minimap2-lite + LIBS= -lm -lz -lpthread + +-ifeq ($(arm_neon),) # if arm_neon is not defined +-ifeq ($(sse2only),) # if sse2only is not defined +- OBJS+=ksw2_extz2_sse41.o ksw2_extd2_sse41.o ksw2_exts2_sse41.o ksw2_extz2_sse2.o ksw2_extd2_sse2.o ksw2_exts2_sse2.o ksw2_dispatch.o +-else # if sse2only is defined +- OBJS+=ksw2_extz2_sse.o ksw2_extd2_sse.o ksw2_exts2_sse.o +-endif +-else # if arm_neon is defined ++ifneq ($(arm_neon),) # if arm_neon is defined + OBJS+=ksw2_extz2_neon.o ksw2_extd2_neon.o ksw2_exts2_neon.o +- INCLUDES+=-Isse2neon +-ifeq ($(aarch64),) #if aarch64 is not defined + CFLAGS+=-D_FILE_OFFSET_BITS=64 -mfpu=neon -fsigned-char +-else #if aarch64 is defined ++ INCLUDES+=-Isse2neon ++else ifneq ($(aarch64),) #if aarch64 is defined ++ OBJS+=ksw2_extz2_neon.o ksw2_extd2_neon.o ksw2_exts2_neon.o + CFLAGS+=-D_FILE_OFFSET_BITS=64 -fsigned-char +-endif ++ INCLUDES+=-Isse2neon ++else ifneq ($(sse2only),) # if sse2only is defined ++ OBJS+=ksw2_extz2_sse.o ksw2_extd2_sse.o ksw2_exts2_sse.o ++else # none of the above ++ OBJS+=ksw2_extz2_sse41.o ksw2_extd2_sse41.o ksw2_exts2_sse41.o ksw2_extz2_sse2.o ksw2_extd2_sse2.o ksw2_exts2_sse2.o ksw2_dispatch.o + endif + + .PHONY:all extra clean depend +@@ -46,9 +44,12 @@ sdust:sdust.c kalloc.o kalloc.h kdq.h kvec.h kseq.h ketopt.h sdust.h + + # SSE-specific targets on x86/x86_64 + +-ifeq ($(arm_neon),) # if arm_neon is defined, compile this target with the default setting (i.e. no -msse2) ++ifneq ($(arm_neon),) # if arm_neon is defined, compile this target with the default setting (i.e. no -msse2) ++ksw2_ll_sse.o:ksw2_ll_sse.c ksw2.h kalloc.h ++else ifneq ($(aarch64),) + ksw2_ll_sse.o:ksw2_ll_sse.c ksw2.h kalloc.h +- $(CC) -c $(CFLAGS) -msse2 $(CPPFLAGS) $(INCLUDES) $< -o $@ ++else ++ $(CC) -c $(CFLAGS) -msse2 $(CPPFLAGS) $(INCLUDES) $< -o $@ + endif + + ksw2_extz2_sse41.o:ksw2_extz2_sse.c ksw2.h kalloc.h -- cgit v1.2.3 From ad6cf3d4adddf39fbd8318b96756abd933ff6735 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Mon, 7 Dec 2020 22:29:58 +0800 Subject: gnu: Add xcb-imdkit. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/fcitx5.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. Signed-off-by: 宋文武 --- gnu/local.mk | 1 + gnu/packages/fcitx5.scm | 62 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 gnu/packages/fcitx5.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f59d2543cd..90df6f3966 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -205,6 +205,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/erlang.scm \ %D%/packages/fabric-management.scm \ %D%/packages/fcitx.scm \ + %D%/packages/fcitx5.scm \ %D%/packages/figlet.scm \ %D%/packages/file.scm \ %D%/packages/file-systems.scm \ diff --git a/gnu/packages/fcitx5.scm b/gnu/packages/fcitx5.scm new file mode 100644 index 0000000000..1c81e35862 --- /dev/null +++ b/gnu/packages/fcitx5.scm @@ -0,0 +1,62 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Zhu Zihao +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages fcitx5) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system cmake) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages datastructures) + #:use-module (gnu packages kde-frameworks) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages xorg)) + +(define-public xcb-imdkit + (package + (name "xcb-imdkit") + (version "1.0.1") + (source + (origin + (method url-fetch) + (uri (string-append + "https://download.fcitx-im.org/fcitx5/xcb-imdkit/xcb-imdkit-" + version ".tar.xz")) + (sha256 + (base32 "1qgbbp8y8ci7haz99vgbrgpjsbrwwyjianyhdvxcirnbm5bybvmz")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove bundled uthash. + (delete-file-recursively "uthash") + #t)))) + (build-system cmake-build-system) + (inputs + `(("uthash" ,uthash) + ("libxcb" ,libxcb) + ("xcb-util" ,xcb-util) + ("xcb-util-keysyms" ,xcb-util-keysyms))) + (native-inputs + `(("extra-cmake-modules" ,extra-cmake-modules) + ("pkg-config" ,pkg-config))) + (home-page "https://github.com/fcitx/xcb-imdkit") + (synopsis "Input method development support for XCB") + (description "Xcb-imdkit is an implementation of xim protocol in XCB, +comparing with the implementation of IMDkit with Xlib, and xim inside Xlib, it +has less memory foot print, better performance, and safer on malformed +client.") + (license license:lgpl2.1))) -- cgit v1.2.3 From 9337c16cb69fd47ca31ebe184d2a37028b978249 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 8 Dec 2020 22:18:30 +0100 Subject: gnu: ghostscript: Fix build with FreeType 2.10.4. This fixes a build failure from 79b31767d084a2feeb2edcb41ae863a0d534b847. * gnu/packages/patches/ghostscript-freetype-compat.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/ghostscript.scm (ghostscript)[source](patches): Add it. --- gnu/local.mk | 1 + gnu/packages/ghostscript.scm | 3 +- .../patches/ghostscript-freetype-compat.patch | 35 ++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ghostscript-freetype-compat.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f59d2543cd..97dd9a74d0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1055,6 +1055,7 @@ dist_patch_DATA = \ %D%/packages/patches/ghc-monad-par-fix-tests.patch \ %D%/packages/patches/ghc-pandoc-fix-html-tests.patch \ %D%/packages/patches/ghc-pandoc-fix-latex-test.patch \ + %D%/packages/patches/ghostscript-freetype-compat.patch \ %D%/packages/patches/ghostscript-no-header-id.patch \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ %D%/packages/patches/ghostscript-no-header-creationdate.patch \ diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm index 4d56f05cf2..b132fba7eb 100644 --- a/gnu/packages/ghostscript.scm +++ b/gnu/packages/ghostscript.scm @@ -170,7 +170,8 @@ printing, and psresize, for adjusting page sizes.") (sha256 (base32 "0z1w42y2jmcpl2m1l3z0sfii6zmvzcwcgzn6bydklia6ig7jli2p")) - (patches (search-patches "ghostscript-no-header-creationdate.patch" + (patches (search-patches "ghostscript-freetype-compat.patch" + "ghostscript-no-header-creationdate.patch" "ghostscript-no-header-id.patch" "ghostscript-no-header-uuid.patch")) (modules '((guix build utils))) diff --git a/gnu/packages/patches/ghostscript-freetype-compat.patch b/gnu/packages/patches/ghostscript-freetype-compat.patch new file mode 100644 index 0000000000..cc225b5ad6 --- /dev/null +++ b/gnu/packages/patches/ghostscript-freetype-compat.patch @@ -0,0 +1,35 @@ +Fix build with FreeType 2.10.3 and newer. + +Taken from upstream: +https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=41ef9a0bc36b9db7115fbe9623f989bfb47bbade + +diff --git a/base/fapi_ft.c b/base/fapi_ft.c +--- a/base/fapi_ft.c ++++ b/base/fapi_ft.c +@@ -125,7 +125,7 @@ static void + delete_inc_int_info(gs_fapi_server * a_server, + FT_IncrementalRec * a_inc_int_info); + +-FT_CALLBACK_DEF(void *) ++static void * + FF_alloc(FT_Memory memory, long size) + { + gs_memory_t *mem = (gs_memory_t *) memory->user; +@@ -133,7 +133,7 @@ FF_alloc(FT_Memory memory, long size) + return (gs_malloc(mem, size, 1, "FF_alloc")); + } + +-FT_CALLBACK_DEF(void *) ++static void * + FF_realloc(FT_Memory memory, long cur_size, long new_size, void *block) + { + gs_memory_t *mem = (gs_memory_t *) memory->user; +@@ -153,7 +153,7 @@ FT_CALLBACK_DEF(void *) + return (tmp); + } + +-FT_CALLBACK_DEF(void) ++static void + FF_free(FT_Memory memory, void *block) + { + gs_memory_t *mem = (gs_memory_t *) memory->user; -- cgit v1.2.3 From 3bd218e8d4abde56e7ce9149311df5e60db0e321 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 8 Dec 2020 21:11:19 +0100 Subject: gnu: ghostscript: Fix CVE-2020-15900. * gnu/packages/patches/ghostscript-CVE-2020-15900.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/ghostscript.scm (ghostscript)[source](patches): Add it. --- gnu/local.mk | 1 + gnu/packages/ghostscript.scm | 1 + .../patches/ghostscript-CVE-2020-15900.patch | 36 ++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 gnu/packages/patches/ghostscript-CVE-2020-15900.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 97dd9a74d0..7f0b69cacf 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1055,6 +1055,7 @@ dist_patch_DATA = \ %D%/packages/patches/ghc-monad-par-fix-tests.patch \ %D%/packages/patches/ghc-pandoc-fix-html-tests.patch \ %D%/packages/patches/ghc-pandoc-fix-latex-test.patch \ + %D%/packages/patches/ghostscript-CVE-2020-15900.patch \ %D%/packages/patches/ghostscript-freetype-compat.patch \ %D%/packages/patches/ghostscript-no-header-id.patch \ %D%/packages/patches/ghostscript-no-header-uuid.patch \ diff --git a/gnu/packages/ghostscript.scm b/gnu/packages/ghostscript.scm index b132fba7eb..03a516dc52 100644 --- a/gnu/packages/ghostscript.scm +++ b/gnu/packages/ghostscript.scm @@ -171,6 +171,7 @@ printing, and psresize, for adjusting page sizes.") (base32 "0z1w42y2jmcpl2m1l3z0sfii6zmvzcwcgzn6bydklia6ig7jli2p")) (patches (search-patches "ghostscript-freetype-compat.patch" + "ghostscript-CVE-2020-15900.patch" "ghostscript-no-header-creationdate.patch" "ghostscript-no-header-id.patch" "ghostscript-no-header-uuid.patch")) diff --git a/gnu/packages/patches/ghostscript-CVE-2020-15900.patch b/gnu/packages/patches/ghostscript-CVE-2020-15900.patch new file mode 100644 index 0000000000..b6658d7c7f --- /dev/null +++ b/gnu/packages/patches/ghostscript-CVE-2020-15900.patch @@ -0,0 +1,36 @@ +Fix CVE-2020-15900. + +https://cve.circl.lu/cve/CVE-2020-15900 +https://artifex.com/security-advisories/CVE-2020-15900 + +Taken from upstream: +https://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=5d499272b95a6b890a1397e11d20937de000d31b + +diff --git a/psi/zstring.c b/psi/zstring.c +--- a/psi/zstring.c ++++ b/psi/zstring.c +@@ -142,13 +142,18 @@ search_impl(i_ctx_t *i_ctx_p, bool forward) + return 0; + found: + op->tas.type_attrs = op1->tas.type_attrs; +- op->value.bytes = ptr; +- r_set_size(op, size); ++ op->value.bytes = ptr; /* match */ ++ op->tas.rsize = size; /* match */ + push(2); +- op[-1] = *op1; +- r_set_size(op - 1, ptr - op[-1].value.bytes); +- op1->value.bytes = ptr + size; +- r_set_size(op1, count + (!forward ? (size - 1) : 0)); ++ op[-1] = *op1; /* pre */ ++ op[-3].value.bytes = ptr + size; /* post */ ++ if (forward) { ++ op[-1].tas.rsize = ptr - op[-1].value.bytes; /* pre */ ++ op[-3].tas.rsize = count; /* post */ ++ } else { ++ op[-1].tas.rsize = count; /* pre */ ++ op[-3].tas.rsize -= count + size; /* post */ ++ } + make_true(op); + return 0; + } -- cgit v1.2.3 From f936a300b48955faecce028ac9ac509b1b83906c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 8 Dec 2020 22:48:19 +0100 Subject: gnu: Python: Fix CVE-2020-26116. * gnu/packages/patches/python-CVE-2020-26116.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/python.scm (python-3.8)[source](patches): Add it. --- gnu/local.mk | 1 + gnu/packages/patches/python-CVE-2020-26116.patch | 47 ++++++++++++++++++++++++ gnu/packages/python.scm | 1 + 3 files changed, 49 insertions(+) create mode 100644 gnu/packages/patches/python-CVE-2020-26116.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 7f0b69cacf..897de3eaf9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1515,6 +1515,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-3-fix-tests.patch \ %D%/packages/patches/python-3.8-fix-tests.patch \ %D%/packages/patches/python-CVE-2018-14647.patch \ + %D%/packages/patches/python-CVE-2020-26116.patch \ %D%/packages/patches/python-aionotify-0.2.0-py3.8.patch \ %D%/packages/patches/python-argcomplete-1.11.1-fish31.patch \ %D%/packages/patches/python-axolotl-AES-fix.patch \ diff --git a/gnu/packages/patches/python-CVE-2020-26116.patch b/gnu/packages/patches/python-CVE-2020-26116.patch new file mode 100644 index 0000000000..dc0571e964 --- /dev/null +++ b/gnu/packages/patches/python-CVE-2020-26116.patch @@ -0,0 +1,47 @@ +Fix CVE-2020-26116: + +https://cve.circl.lu/cve/CVE-2020-26116 +https://bugs.python.org/issue39603 + +Taken from upstream (sans test and NEWS update): +https://github.com/python/cpython/commit/668d321476d974c4f51476b33aaca870272523bf + +diff --git a/Lib/http/client.py b/Lib/http/client.py +--- a/Lib/http/client.py ++++ b/Lib/http/client.py +@@ -147,6 +147,10 @@ + # _is_allowed_url_pchars_re = re.compile(r"^[/!$&'()*+,;=:@%a-zA-Z0-9._~-]+$") + # We are more lenient for assumed real world compatibility purposes. + ++# These characters are not allowed within HTTP method names ++# to prevent http header injection. ++_contains_disallowed_method_pchar_re = re.compile('[\x00-\x1f]') ++ + # We always set the Content-Length header for these methods because some + # servers will otherwise respond with a 411 + _METHODS_EXPECTING_BODY = {'PATCH', 'POST', 'PUT'} +@@ -1087,6 +1091,8 @@ def putrequest(self, method, url, skip_host=False, + else: + raise CannotSendRequest(self.__state) + ++ self._validate_method(method) ++ + # Save the method for use later in the response phase + self._method = method + +@@ -1177,6 +1183,15 @@ def _encode_request(self, request): + # ASCII also helps prevent CVE-2019-9740. + return request.encode('ascii') + ++ def _validate_method(self, method): ++ """Validate a method name for putrequest.""" ++ # prevent http header injection ++ match = _contains_disallowed_method_pchar_re.search(method) ++ if match: ++ raise ValueError( ++ f"method can't contain control characters. {method!r} " ++ f"(found at least {match.group()!r})") ++ + def _validate_path(self, url): + """Validate a url for putrequest.""" + # Prevent CVE-2019-9740. diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 43704bccae..533b2bdeff 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -370,6 +370,7 @@ data types.") (uri (string-append "https://www.python.org/ftp/python/" version "/Python-" version ".tar.xz")) (patches (search-patches + "python-CVE-2020-26116.patch" "python-3-fix-tests.patch" "python-3.8-fix-tests.patch" "python-3-deterministic-build-info.patch" -- cgit v1.2.3 From f04dca8eb750e44df9cda997089ee5657ce17516 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 9 Dec 2020 09:21:27 +0200 Subject: gnu: libssh2: Fix CVE-2019-17498. * gnu/packages/patches/ssh.scm (libssh2)[source]: Add patch. * gnu/packages/patches/libssh2-CVE-2019-17498.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/patches/libssh2-CVE-2019-17498.patch | 126 ++++++++++++++++++++++ gnu/packages/ssh.scm | 5 +- 3 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/libssh2-CVE-2019-17498.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 897de3eaf9..6297c8e1d6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1283,6 +1283,7 @@ dist_patch_DATA = \ %D%/packages/patches/libmygpo-qt-missing-qt5-modules.patch \ %D%/packages/patches/libqalculate-3.8.0-libcurl-ssl-fix.patch \ %D%/packages/patches/libquicktime-ffmpeg.patch \ + %D%/packages/patches/libssh2-CVE-2019-17498.patch \ %D%/packages/patches/libtar-CVE-2013-4420.patch \ %D%/packages/patches/libtgvoip-disable-sse2.patch \ %D%/packages/patches/libtgvoip-disable-webrtc.patch \ diff --git a/gnu/packages/patches/libssh2-CVE-2019-17498.patch b/gnu/packages/patches/libssh2-CVE-2019-17498.patch new file mode 100644 index 0000000000..6f69e562e2 --- /dev/null +++ b/gnu/packages/patches/libssh2-CVE-2019-17498.patch @@ -0,0 +1,126 @@ +https://github.com/libssh2/libssh2/commit/dedcbd106f8e52d5586b0205bc7677e4c9868f9c.patch + +From dedcbd106f8e52d5586b0205bc7677e4c9868f9c Mon Sep 17 00:00:00 2001 +From: Will Cosgrove +Date: Fri, 30 Aug 2019 09:57:38 -0700 +Subject: [PATCH] packet.c: improve message parsing (#402) + +* packet.c: improve parsing of packets + +file: packet.c + +notes: +Use _libssh2_get_string API in SSH_MSG_DEBUG/SSH_MSG_DISCONNECT. Additional uint32 bounds check in SSH_MSG_GLOBAL_REQUEST. +--- + src/packet.c | 68 ++++++++++++++++++++++------------------------------ + 1 file changed, 29 insertions(+), 39 deletions(-) + +diff --git a/src/packet.c b/src/packet.c +index 38ab62944..2e01bfc5d 100644 +--- a/src/packet.c ++++ b/src/packet.c +@@ -419,8 +419,8 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, + size_t datalen, int macstate) + { + int rc = 0; +- char *message = NULL; +- char *language = NULL; ++ unsigned char *message = NULL; ++ unsigned char *language = NULL; + size_t message_len = 0; + size_t language_len = 0; + LIBSSH2_CHANNEL *channelp = NULL; +@@ -472,33 +472,23 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, + + case SSH_MSG_DISCONNECT: + if(datalen >= 5) { +- size_t reason = _libssh2_ntohu32(data + 1); ++ uint32_t reason = 0; ++ struct string_buf buf; ++ buf.data = (unsigned char *)data; ++ buf.dataptr = buf.data; ++ buf.len = datalen; ++ buf.dataptr++; /* advance past type */ + +- if(datalen >= 9) { +- message_len = _libssh2_ntohu32(data + 5); ++ _libssh2_get_u32(&buf, &reason); ++ _libssh2_get_string(&buf, &message, &message_len); ++ _libssh2_get_string(&buf, &language, &language_len); + +- if(message_len < datalen-13) { +- /* 9 = packet_type(1) + reason(4) + message_len(4) */ +- message = (char *) data + 9; +- +- language_len = +- _libssh2_ntohu32(data + 9 + message_len); +- language = (char *) data + 9 + message_len + 4; +- +- if(language_len > (datalen-13-message_len)) { +- /* bad input, clear info */ +- language = message = NULL; +- language_len = message_len = 0; +- } +- } +- else +- /* bad size, clear it */ +- message_len = 0; +- } + if(session->ssh_msg_disconnect) { +- LIBSSH2_DISCONNECT(session, reason, message, +- message_len, language, language_len); ++ LIBSSH2_DISCONNECT(session, reason, (const char *)message, ++ message_len, (const char *)language, ++ language_len); + } ++ + _libssh2_debug(session, LIBSSH2_TRACE_TRANS, + "Disconnect(%d): %s(%s)", reason, + message, language); +@@ -539,24 +529,24 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, + int always_display = data[1]; + + if(datalen >= 6) { +- message_len = _libssh2_ntohu32(data + 2); +- +- if(message_len <= (datalen - 10)) { +- /* 6 = packet_type(1) + display(1) + message_len(4) */ +- message = (char *) data + 6; +- language_len = _libssh2_ntohu32(data + 6 + +- message_len); +- +- if(language_len <= (datalen - 10 - message_len)) +- language = (char *) data + 10 + message_len; +- } ++ struct string_buf buf; ++ buf.data = (unsigned char *)data; ++ buf.dataptr = buf.data; ++ buf.len = datalen; ++ buf.dataptr += 2; /* advance past type & always display */ ++ ++ _libssh2_get_string(&buf, &message, &message_len); ++ _libssh2_get_string(&buf, &language, &language_len); + } + + if(session->ssh_msg_debug) { +- LIBSSH2_DEBUG(session, always_display, message, +- message_len, language, language_len); ++ LIBSSH2_DEBUG(session, always_display, ++ (const char *)message, ++ message_len, (const char *)language, ++ language_len); + } + } ++ + /* + * _libssh2_debug will actually truncate this for us so + * that it's not an inordinate about of data +@@ -579,7 +569,7 @@ _libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, + uint32_t len = 0; + unsigned char want_reply = 0; + len = _libssh2_ntohu32(data + 1); +- if(datalen >= (6 + len)) { ++ if((len <= (UINT_MAX - 6)) && (datalen >= (6 + len))) { + want_reply = data[5 + len]; + _libssh2_debug(session, + LIBSSH2_TRACE_CONN, diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm index 146177f7f3..0f2434d7c5 100644 --- a/gnu/packages/ssh.scm +++ b/gnu/packages/ssh.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès ;;; Copyright © 2013, 2014 Andreas Enge ;;; Copyright © 2014, 2015, 2016 Mark H Weaver -;;; Copyright © 2015, 2016, 2018, 2019 Efraim Flashner +;;; Copyright © 2015, 2016, 2018, 2019, 2020 Efraim Flashner ;;; Copyright © 2016, 2019 Leo Famulari ;;; Copyright © 2016 Nicolas Goaziou ;;; Copyright © 2016 Christopher Allan Webber @@ -165,7 +165,8 @@ applications.") version ".tar.gz")) (sha256 (base32 - "1zfsz9nldakfz61d2j70pk29zlmj7w2vv46s9l3x2prhcgaqpyym")))) + "1zfsz9nldakfz61d2j70pk29zlmj7w2vv46s9l3x2prhcgaqpyym")) + (patches (search-patches "libssh2-CVE-2019-17498.patch")))) (build-system gnu-build-system) ;; The installed libssh2.pc file does not include paths to libgcrypt and ;; zlib libraries, so we need to propagate the inputs. -- cgit v1.2.3 From 3d85c3ec652feb22824f355538b51e6955ded361 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 9 Dec 2020 13:55:46 +0100 Subject: gnu: pciutils: Fix compilation error on GNU/Hurd. * gnu/packages/patches/pciutils-hurd-fix.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/pciutils.scm (pciutils)[arguments]: Add 'apply-hurd-patch' phase when (hurd-target?) is true. [inputs]: Add "hurd-patch" entry when (hurd-target?) is true. --- gnu/local.mk | 1 + gnu/packages/patches/pciutils-hurd-fix.patch | 23 +++++++++++++++++++++++ gnu/packages/pciutils.scm | 15 +++++++++++++-- 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/pciutils-hurd-fix.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 90df6f3966..67482b8226 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1435,6 +1435,7 @@ dist_patch_DATA = \ %D%/packages/patches/pam-krb5-CVE-2020-10595.patch \ %D%/packages/patches/pango-skip-libthai-test.patch \ %D%/packages/patches/pciutils-hurd-configure.patch \ + %D%/packages/patches/pciutils-hurd-fix.patch \ %D%/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch \ %D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \ %D%/packages/patches/samba-fix-fcntl-hint-detection.patch \ diff --git a/gnu/packages/patches/pciutils-hurd-fix.patch b/gnu/packages/patches/pciutils-hurd-fix.patch new file mode 100644 index 0000000000..f1979d4352 --- /dev/null +++ b/gnu/packages/patches/pciutils-hurd-fix.patch @@ -0,0 +1,23 @@ +Fix a build error on GNU/Hurd for pciutils 3.7.0. + +commit 053cf6c8b2acafadf828912828336d90fe9b8696 +Author: Martin Mares +Date: Sun May 31 11:53:28 2020 +0200 + + HURD backend should compile again + + Fixes a bug introduced by commit 82c06b47dea5a38075ce9d56f743360bc47b4c78. + +diff --git a/lib/hurd.c b/lib/hurd.c +index 7b3b2ae..ccd92f6 100644 +--- a/lib/hurd.c ++++ b/lib/hurd.c +@@ -307,7 +307,6 @@ hurd_fill_regions(struct pci_dev *d) + d->base_addr[i] |= regions[i].is_64 << 2; + d->base_addr[i] |= regions[i].is_prefetchable << 3; + +- if (flags & PCI_FILL_SIZES) +- d->size[i] = regions[i].size; ++ d->size[i] = regions[i].size; + } + } diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm index a5ed121c85..d7d224b292 100644 --- a/gnu/packages/pciutils.scm +++ b/gnu/packages/pciutils.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015, 2017 Ludovic Courtès +;;; Copyright © 2014, 2015, 2017, 2020 Ludovic Courtès ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2019 Mathieu Othacehe @@ -92,7 +92,15 @@ (replace 'install (lambda* (#:key outputs #:allow-other-keys) ;; Install the commands, library, and .pc files. - (invoke "make" "install" "install-lib")))) + (invoke "make" "install" "install-lib"))) + + ,@(if (hurd-target?) + '((add-after 'unpack 'apply-hurd-patch + (lambda* (#:key inputs #:allow-other-keys) + (let ((patch (assoc-ref inputs "hurd-patch"))) + (invoke "patch" "-p1" "--batch" "-i" + patch))))) + '())) ;; Make sure programs have an RPATH so they can find libpciutils.so. #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" @@ -109,6 +117,9 @@ (package-supported-systems kmod)) `(("kmod" ,kmod)) '()) + ,@(if (hurd-target?) + `(("hurd-patch" ,(search-patch "pciutils-hurd-fix.patch"))) + '()) ("zlib" ,zlib))) (home-page "https://mj.ucw.cz/sw/pciutils/") (synopsis "Programs for inspecting and manipulating PCI devices") -- cgit v1.2.3 From 8f330aebee504269d4d7188daa85e95503f71888 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 11 Dec 2020 12:04:15 +0200 Subject: gnu: busybox: Update to 1.32.0. * gnu/packages/busybox.scm (busybox): Update to 1.32.0. [source]: Remove patch. * gnu/packates/patches/busybox-1.31.1-fix-build-with-glibc-2.31.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/busybox.scm | 11 ++-- .../busybox-1.31.1-fix-build-with-glibc-2.31.patch | 68 ---------------------- 3 files changed, 4 insertions(+), 76 deletions(-) delete mode 100644 gnu/packages/patches/busybox-1.31.1-fix-build-with-glibc-2.31.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 67482b8226..b32ebf4e3b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -857,7 +857,6 @@ dist_patch_DATA = \ %D%/packages/patches/blender-2.79-python-3.7-fix.patch \ %D%/packages/patches/blender-2.79-python-3.8-fix.patch \ %D%/packages/patches/bpftrace-disable-bfd-disasm.patch \ - %D%/packages/patches/busybox-1.31.1-fix-build-with-glibc-2.31.patch \ %D%/packages/patches/byobu-writable-status.patch \ %D%/packages/patches/calibre-no-updates-dialog.patch \ %D%/packages/patches/calibre-remove-test-sqlite.patch \ diff --git a/gnu/packages/busybox.scm b/gnu/packages/busybox.scm index 0a93c6475e..c931a2f2f7 100644 --- a/gnu/packages/busybox.scm +++ b/gnu/packages/busybox.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 John Darrington -;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner +;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. @@ -32,7 +32,7 @@ (define-public busybox (package (name "busybox") - (version "1.31.1") + (version "1.32.0") (source (origin (method url-fetch) (uri (string-append @@ -40,10 +40,7 @@ version ".tar.bz2")) (sha256 (base32 - "1659aabzp8w4hayr4z8kcpbk2z1q2wqhw7i1yb0l72b45ykl1yfh")) - (patches - (search-patches - "busybox-1.31.1-fix-build-with-glibc-2.31.patch")))) + "12g63zsvzfz04wbyga8riyl8ils05riw4xf26cyiaasbs3qqfpf3")))) (build-system gnu-build-system) (arguments '(#:phases @@ -90,7 +87,7 @@ ;; true in guix build environment (substitute* "testsuite/pidof.tests" (("-s init") "-s $(cat /proc/1/comm)")) - + ;; This test cannot possibly pass. ;; It is trying to test that "which ls" returns "/bin/ls" when PATH is not set. ;; However, this relies on /bin/ls existing. Which it does not in guix. diff --git a/gnu/packages/patches/busybox-1.31.1-fix-build-with-glibc-2.31.patch b/gnu/packages/patches/busybox-1.31.1-fix-build-with-glibc-2.31.patch deleted file mode 100644 index 1518df067f..0000000000 --- a/gnu/packages/patches/busybox-1.31.1-fix-build-with-glibc-2.31.patch +++ /dev/null @@ -1,68 +0,0 @@ -See: https://bugs.gentoo.org/708350 -Author: Patrick McLean -Date: 2020-02-06 23:06:22 +0000 -diff --git a/coreutils/date.c b/coreutils/date.c -index 3414d38ae..4ade6abb4 100644 ---- a/coreutils/date.c -+++ b/coreutils/date.c -@@ -279,6 +279,9 @@ int date_main(int argc UNUSED_PARAM, char **argv) - time(&ts.tv_sec); - #endif - } -+#if !ENABLE_FEATURE_DATE_NANO -+ ts.tv_nsec = 0; -+#endif - localtime_r(&ts.tv_sec, &tm_time); - - /* If date string is given, update tm_time, and maybe set date */ -@@ -301,9 +304,10 @@ int date_main(int argc UNUSED_PARAM, char **argv) - if (date_str[0] != '@') - tm_time.tm_isdst = -1; - ts.tv_sec = validate_tm_time(date_str, &tm_time); -+ ts.tv_nsec = 0; - - /* if setting time, set it */ -- if ((opt & OPT_SET) && stime(&ts.tv_sec) < 0) { -+ if ((opt & OPT_SET) && clock_settime(CLOCK_REALTIME, &ts) < 0) { - bb_perror_msg("can't set date"); - } - } -diff --git a/libbb/missing_syscalls.c b/libbb/missing_syscalls.c -index 87cf59b3d..dc40d9155 100644 ---- a/libbb/missing_syscalls.c -+++ b/libbb/missing_syscalls.c -@@ -15,14 +15,6 @@ pid_t getsid(pid_t pid) - return syscall(__NR_getsid, pid); - } - --int stime(const time_t *t) --{ -- struct timeval tv; -- tv.tv_sec = *t; -- tv.tv_usec = 0; -- return settimeofday(&tv, NULL); --} -- - int sethostname(const char *name, size_t len) - { - return syscall(__NR_sethostname, name, len); -diff --git a/util-linux/rdate.c b/util-linux/rdate.c -index 70f829e7f..878375d78 100644 ---- a/util-linux/rdate.c -+++ b/util-linux/rdate.c -@@ -95,9 +95,13 @@ int rdate_main(int argc UNUSED_PARAM, char **argv) - if (!(flags & 2)) { /* no -p (-s may be present) */ - if (time(NULL) == remote_time) - bb_error_msg("current time matches remote time"); -- else -- if (stime(&remote_time) < 0) -+ else { -+ struct timespec ts; -+ ts.tv_sec = remote_time; -+ ts.tv_nsec = 0; -+ if (clock_settime(CLOCK_REALTIME, &ts) < 0) - bb_perror_msg_and_die("can't set time of day"); -+ } - } - - if (flags != 1) /* not lone -s */ -- cgit v1.2.3 From 6e301c3a53270301bf2685f59b470a88b521105f Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Fri, 11 Dec 2020 18:08:00 +0100 Subject: gnu: sbcl-geco: Update to 2.1.1. * gnu/packages/lisp-xyz.scm (sbcl-geco): Update to 2.1.1. [source]: Fetch from Github. [home-page]: Update to author's page. * gnu/packages/patches/sbcl-geco-fix-organism-class.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/lisp-xyz.scm | 15 ++++++++------- gnu/packages/patches/sbcl-geco-fix-organism-class.patch | 13 ------------- 3 files changed, 8 insertions(+), 21 deletions(-) delete mode 100644 gnu/packages/patches/sbcl-geco-fix-organism-class.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index b32ebf4e3b..f94725b1e5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1596,7 +1596,6 @@ dist_patch_DATA = \ %D%/packages/patches/rust-openssl-sys-no-vendor.patch \ %D%/packages/patches/rxvt-unicode-escape-sequences.patch \ %D%/packages/patches/sbcl-clml-fix-types.patch \ - %D%/packages/patches/sbcl-geco-fix-organism-class.patch \ %D%/packages/patches/scalapack-blacs-mpi-deprecations.patch \ %D%/packages/patches/scheme48-tests.patch \ %D%/packages/patches/scotch-build-parallelism.patch \ diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm index 68adff3169..747617fdda 100644 --- a/gnu/packages/lisp-xyz.scm +++ b/gnu/packages/lisp-xyz.scm @@ -11234,17 +11234,18 @@ XML to Lisp structures or s-expressions and back.") (define-public sbcl-geco (package (name "sbcl-geco") - (version "2.01a") + (version "2.1.1") (source (origin - (method url-fetch) - (uri (string-append "https://common-lisp.net/project/geco/download/" - "geco-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/gpwwjr/GECO") + (commit (string-append "v" version)))) + (file-name (git-file-name "geco" version)) (sha256 - (base32 "0kk0bzr1019cfmf2b1jl1rk9shv3gx5z1znifxllg9mb98yqsgw0")) - (patches (search-patches "sbcl-geco-fix-organism-class.patch")))) + (base32 "1rc8a4mk40hjx5qy980hjylv6xxqdbq38hg8c4w30y93abfd519s")))) (build-system asdf-build-system/sbcl) - (home-page "https://common-lisp.net/project/geco/") + (home-page "http://hiwaay.net/~gpw/geco/geco.html") (synopsis "Genetic algorithm toolkit for Common Lisp") (description "GECO (Genetic Evolution through Combination of Objects) is an extensible, diff --git a/gnu/packages/patches/sbcl-geco-fix-organism-class.patch b/gnu/packages/patches/sbcl-geco-fix-organism-class.patch deleted file mode 100644 index 817596241e..0000000000 --- a/gnu/packages/patches/sbcl-geco-fix-organism-class.patch +++ /dev/null @@ -1,13 +0,0 @@ -Fix the ORGANISM class so that SBCL >= 2.0.9 can compile it without error. - ---- a/classes.lisp 2020-10-28 12:11:10.725659464 +0100 -+++ b/classes.lisp 2020-10-31 17:34:36.822752447 +0100 -@@ -148,7 +148,7 @@ - :accessor score - :initarg :score - :initform 'nil -- :type number) -+ :type (or number null)) - (NORMALIZED-SCORE - :accessor normalized-score - :initarg :normalized-score -- cgit v1.2.3 From 8361817bf693742757b096468198626f297bb09e Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Fri, 4 Dec 2020 11:33:16 +0100 Subject: install: Discover local substitute servers. * gnu/installer/substitutes.scm: New file. * gnu/installer/newt/substitutes.scm: New file. * gnu/local.mk (INSTALLER_MODULES): Add them. * po/guix/POTFILES.in: Add gnu/installer/newt/substitutes.scm. * gnu/installer/proxy.scm (with-silent-shepherd): Move to ... * gnu/installer/utils.scm: ... here. * gnu/installer/record.scm ()[substitutes-page]: New field. * gnu/installer/newt.scm (substitutes-page): New procedure, (newt-installer): register it. * gnu/installer.scm (installer-steps): Add "substitutes-page" step. * gnu/system/install.scm (%installation-services): Add avahi-service-type and enable substitute server discover in guix-service-type. []: Set it to %mdns-host-lookup-nss. --- gnu/installer.scm | 7 +++++++ gnu/installer/newt.scm | 5 +++++ gnu/installer/newt/substitutes.scm | 43 ++++++++++++++++++++++++++++++++++++++ gnu/installer/proxy.scm | 6 +----- gnu/installer/record.scm | 3 +++ gnu/installer/substitutes.scm | 41 ++++++++++++++++++++++++++++++++++++ gnu/installer/utils.scm | 11 +++++++++- gnu/local.mk | 2 ++ gnu/system/install.scm | 6 ++++++ po/guix/POTFILES.in | 1 + 10 files changed, 119 insertions(+), 6 deletions(-) create mode 100644 gnu/installer/newt/substitutes.scm create mode 100644 gnu/installer/substitutes.scm (limited to 'gnu/local.mk') diff --git a/gnu/installer.scm b/gnu/installer.scm index f401b242f8..7863edbb67 100644 --- a/gnu/installer.scm +++ b/gnu/installer.scm @@ -266,6 +266,13 @@ selected keymap." (compute (lambda _ ((installer-network-page current-installer))))) + ;; Ask whether to enable substitute server discovery. + (installer-step + (id 'substitutes) + (description (G_ "Substitute server discovery")) + (compute (lambda _ + ((installer-substitutes-page current-installer))))) + ;; Prompt for users (name, group and home directory). (installer-step (id 'user) diff --git a/gnu/installer/newt.scm b/gnu/installer/newt.scm index a1cbeca49a..4f7fc6f4dc 100644 --- a/gnu/installer/newt.scm +++ b/gnu/installer/newt.scm @@ -30,6 +30,7 @@ #:use-module (gnu installer newt page) #:use-module (gnu installer newt partition) #:use-module (gnu installer newt services) + #:use-module (gnu installer newt substitutes) #:use-module (gnu installer newt timezone) #:use-module (gnu installer newt user) #:use-module (gnu installer newt utils) @@ -101,6 +102,9 @@ problem. The backtrace is displayed below. Please report it by email to \ (define (network-page) (run-network-page)) +(define (substitutes-page) + (run-substitutes-page)) + (define (hostname-page) (run-hostname-page)) @@ -130,6 +134,7 @@ problem. The backtrace is displayed below. Please report it by email to \ (locale-page locale-page) (menu-page menu-page) (network-page network-page) + (substitutes-page substitutes-page) (timezone-page timezone-page) (hostname-page hostname-page) (user-page user-page) diff --git a/gnu/installer/newt/substitutes.scm b/gnu/installer/newt/substitutes.scm new file mode 100644 index 0000000000..938cb1a53b --- /dev/null +++ b/gnu/installer/newt/substitutes.scm @@ -0,0 +1,43 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Mathieu Othacehe +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu installer newt substitutes) + #:use-module (gnu installer substitutes) + #:use-module (gnu installer utils) + #:use-module (guix i18n) + #:use-module (newt) + #:use-module (ice-9 match) + #:export (run-substitutes-page)) + +(define* (run-substitutes-page) + (match (current-clients) + (() + (case (choice-window + (G_ "Substitute server discovery.") + (G_ "Enable") (G_ "Disable") + (G_ " By turning this option on, you allow Guix to fetch \ +substitutes (pre-built binaries) during installation from servers \ +discovered on your local area network (LAN) in addition to the official \ +server. This can increase download throughput. + + There are no security risks: only genuine substitutes may be retrieved from \ +those servers. However, eavesdroppers on your LAN may be able to see what \ +software you are installing.")) + ((1) (enable-discovery)) + ((2) (disable-discovery)))) + (_ #f))) diff --git a/gnu/installer/proxy.scm b/gnu/installer/proxy.scm index befaf3ab0a..86c827294e 100644 --- a/gnu/installer/proxy.scm +++ b/gnu/installer/proxy.scm @@ -17,15 +17,11 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu installer proxy) + #:use-module (gnu installer utils) #:use-module (gnu services herd) #:export (set-http-proxy clear-http-proxy)) -(define-syntax-rule (with-silent-shepherd exp ...) - (parameterize ((shepherd-message-port - (%make-void-port "w"))) - exp ...)) - (define (set-http-proxy proxy) (with-silent-shepherd (with-shepherd-action 'guix-daemon diff --git a/gnu/installer/record.scm b/gnu/installer/record.scm index 6ebd87f6a6..0b34318c45 100644 --- a/gnu/installer/record.scm +++ b/gnu/installer/record.scm @@ -33,6 +33,7 @@ installer-locale-page installer-menu-page installer-network-page + installer-substitutes-page installer-timezone-page installer-hostname-page installer-user-page @@ -73,6 +74,8 @@ (menu-page installer-menu-page) ;; procedure void -> void (network-page installer-network-page) + ;; procedure void -> void + (substitutes-page installer-substitutes-page) ;; procedure (zonetab) -> posix-timezone (timezone-page installer-timezone-page) ;; procedure void -> void diff --git a/gnu/installer/substitutes.scm b/gnu/installer/substitutes.scm new file mode 100644 index 0000000000..c9a7418f89 --- /dev/null +++ b/gnu/installer/substitutes.scm @@ -0,0 +1,41 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Mathieu Othacehe +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu installer substitutes) + #:use-module (gnu installer utils) + #:use-module (gnu services herd) + #:export (enable-discovery + disable-discovery)) + +(define (enable-discovery) + (with-silent-shepherd + (with-shepherd-action 'guix-daemon + ('discover "on") + result + result))) + +(define (disable-discovery) + (with-silent-shepherd + (with-shepherd-action 'guix-daemon + ('discover "off") + result + result))) + +;; Local Variables: +;; eval: (put 'with-silent-shepherd 'scheme-indent-function 0) +;; End: diff --git a/gnu/installer/utils.scm b/gnu/installer/utils.scm index a7fa66a199..bb97bc5560 100644 --- a/gnu/installer/utils.scm +++ b/gnu/installer/utils.scm @@ -18,6 +18,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu installer utils) + #:use-module (gnu services herd) #:use-module (guix utils) #:use-module (guix build utils) #:use-module (guix i18n) @@ -43,7 +44,9 @@ with-server-socket current-server-socket current-clients - send-to-clients)) + send-to-clients + + with-silent-shepherd)) (define* (read-lines #:optional (port (current-input-port))) "Read lines from PORT and return them as a list." @@ -233,3 +236,9 @@ accepting socket." (current-clients (reverse remainder)) exp) + +(define-syntax-rule (with-silent-shepherd exp ...) + "Evaluate EXP while discarding shepherd messages." + (parameterize ((shepherd-message-port + (%make-void-port "w"))) + exp ...)) diff --git a/gnu/local.mk b/gnu/local.mk index f94725b1e5..4cca7671a8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -717,6 +717,7 @@ INSTALLER_MODULES = \ %D%/installer/record.scm \ %D%/installer/services.scm \ %D%/installer/steps.scm \ + %D%/installer/substitutes.scm \ %D%/installer/tests.scm \ %D%/installer/timezone.scm \ %D%/installer/user.scm \ @@ -733,6 +734,7 @@ INSTALLER_MODULES = \ %D%/installer/newt/page.scm \ %D%/installer/newt/partition.scm \ %D%/installer/newt/services.scm \ + %D%/installer/newt/substitutes.scm \ %D%/installer/newt/timezone.scm \ %D%/installer/newt/user.scm \ %D%/installer/newt/utils.scm \ diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 7701297411..a6b9e3d952 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -34,6 +34,7 @@ #:use-module ((guix store) #:select (%store-prefix)) #:use-module (gnu installer) #:use-module (gnu system locale) + #:use-module (gnu services avahi) #:use-module (gnu services dbus) #:use-module (gnu services networking) #:use-module (gnu services shepherd) @@ -335,6 +336,10 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m ;; The usual services. (syslog-service) + ;; Use the Avahi daemon to discover substitute servers on the local + ;; network. It can be faster than fetching from remote servers. + (service avahi-service-type) + ;; The build daemon. Register the default substitute server key(s) ;; as trusted to allow the installation process to use substitutes by ;; default. @@ -435,6 +440,7 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m (host-name "gnu") (timezone "Europe/Paris") (locale "en_US.utf8") + (name-service-switch %mdns-host-lookup-nss) (bootloader (bootloader-configuration (bootloader grub-bootloader) (target "/dev/sda"))) diff --git a/po/guix/POTFILES.in b/po/guix/POTFILES.in index 5afb13ffdb..1aec3bef3c 100644 --- a/po/guix/POTFILES.in +++ b/po/guix/POTFILES.in @@ -25,6 +25,7 @@ gnu/installer/newt/network.scm gnu/installer/newt/page.scm gnu/installer/newt/partition.scm gnu/installer/newt/services.scm +gnu/installer/newt/substitutes.scm gnu/installer/newt/timezone.scm gnu/installer/newt/user.scm gnu/installer/newt/utils.scm -- cgit v1.2.3 From 7eb920351abc7757ee9711ac147e63d6936e5ee8 Mon Sep 17 00:00:00 2001 From: Simon South Date: Fri, 11 Dec 2020 15:16:47 -0500 Subject: gnu: knot-resolver: Update to 5.2.1. * gnu/packages/dns.scm (knot-resolver): Update to 5.2.1. [source]: Remove obsolete patch. * gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. Signed-off-by: Tobias Geerinckx-Rice --- gnu/local.mk | 1 - gnu/packages/dns.scm | 7 +- .../knot-resolver-fix-map-command-on-32-bit.patch | 146 --------------------- 3 files changed, 2 insertions(+), 152 deletions(-) delete mode 100644 gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 4cca7671a8..f8c615a83d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1223,7 +1223,6 @@ dist_patch_DATA = \ %D%/packages/patches/kmail-Fix-missing-link-libraries.patch \ %D%/packages/patches/kmod-module-directory.patch \ %D%/packages/patches/kmscon-runtime-keymap-switch.patch \ - %D%/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch \ %D%/packages/patches/kpackage-allow-external-paths.patch \ %D%/packages/patches/kpackage-fix-KF5PackageMacros.cmake.patch \ %D%/packages/patches/kmplayer-aarch64.patch \ diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm index d59fe57ade..403ebd3d8b 100644 --- a/gnu/packages/dns.scm +++ b/gnu/packages/dns.scm @@ -937,17 +937,14 @@ synthesis, and on-the-fly re-configuration.") (define-public knot-resolver (package (name "knot-resolver") - (version "5.2.0") + (version "5.2.1") (source (origin (method url-fetch) (uri (string-append "https://secure.nic.cz/files/knot-resolver/" "knot-resolver-" version ".tar.xz")) (sha256 (base32 - "0cwlipib3x88dr6cijqv2aps13b4ijv524wc85ns07rkldy2c948")) - (patches - (search-patches - "knot-resolver-fix-map-command-on-32-bit.patch")))) + "09jqy23q1pgj76y2qd1xfk72wwmypnyawm3span3gx00qi2bfdxa")))) (build-system meson-build-system) (outputs '("out" "doc")) (arguments diff --git a/gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch b/gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch deleted file mode 100644 index 02c0fbcb70..0000000000 --- a/gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch +++ /dev/null @@ -1,146 +0,0 @@ -commit e01979620025666633250b3e2d545fe59c629f73 -Author: Vladimír Čunát -Date: Fri Nov 13 14:16:32 2020 +0100 - - fix map() command on 32-bit platforms; regressed in 5.2.0 - - LuaJIT FFI was using opendir() (etc.) variants with 32-bit inodes - but the C parts was using them as 64-bit inode variants. - Consequently the `struct dirent` layout didn't match and we were getting - filenames shifted by eight bytes. - - Now the whole dir-listing lua function is written in C. - -diff --git a/.luacheckrc b/.luacheckrc -index 0cf0b884..67bc18f6 100644 ---- a/.luacheckrc -+++ b/.luacheckrc -@@ -20,6 +20,7 @@ new_read_globals = { - 'user', - 'verbose', - 'worker', -+ 'kluautil_list_dir', - -- Sandbox declarations - 'kB', - 'MB', -diff --git a/NEWS b/NEWS -index 2eae3082..9d8cde99 100644 ---- a/NEWS -+++ b/NEWS -@@ -1,6 +1,10 @@ - Knot Resolver X.Y.X (yyyy-mm-dd) - ================================ - -+Bugfixes -+-------- -+- fix map() command on 32-bit platforms; regressed in 5.2.0 (!1093) -+ - - Knot Resolver 5.2.0 (2020-11-11) - ================================ -diff --git a/daemon/bindings/impl.c b/daemon/bindings/impl.c -index d10f4525..d9ad0774 100644 ---- a/daemon/bindings/impl.c -+++ b/daemon/bindings/impl.c -@@ -2,6 +2,7 @@ - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -+#include - #include - #include - #include -@@ -29,6 +30,29 @@ const char * lua_table_checkindices(lua_State *L, const char *keys[]) - return NULL; - } - -+/** Return table listing filenames in a given directory (ls -A). */ -+static int kluautil_list_dir(lua_State *L) -+{ -+ lua_newtable(L); // empty table even on errors -+ -+ const char *path = lua_tolstring(L, 1, NULL); -+ if (!path) return 1; -+ DIR *dir = opendir(path); -+ if (!dir) return 1; -+ -+ struct dirent *entry; -+ int lua_i = 1; -+ while ((entry = readdir(dir)) != NULL) { -+ if (strcmp(entry->d_name, ".") && strcmp(entry->d_name, "..")) { -+ lua_pushstring(L, entry->d_name); -+ lua_rawseti(L, -2, lua_i++); -+ } -+ } -+ -+ closedir(dir); -+ return 1; -+} -+ - - /* Each of these just creates the correspondingly named lua table of functions. */ - int kr_bindings_cache (lua_State *L); /* ./cache.c */ -@@ -44,6 +68,9 @@ void kr_bindings_register(lua_State *L) - kr_bindings_modules(L); - kr_bindings_net(L); - kr_bindings_worker(L); -+ -+ /* Finally some lua utils *written in C*, not really a binding. */ -+ lua_register(L, "kluautil_list_dir", kluautil_list_dir); - } - - void lua_error_p(lua_State *L, const char *fmt, ...) -diff --git a/daemon/lua/kluautil.lua b/daemon/lua/kluautil.lua -index 57912e7b..e73e952c 100644 ---- a/daemon/lua/kluautil.lua -+++ b/daemon/lua/kluautil.lua -@@ -1,6 +1,5 @@ - -- SPDX-License-Identifier: GPL-3.0-or-later - --local ffi = require('ffi') - local kluautil = {} - - -- Get length of table -@@ -28,14 +27,6 @@ function kluautil.kr_table_unpack(tab) - return unpack(tab, 1, tab.n) - end - --ffi.cdef([[ -- typedef struct __dirstream DIR; -- DIR *opendir(const char *name); -- struct dirent *readdir(DIR *dirp); -- int closedir(DIR *dirp); -- char *strerror(int errnum); --]]) -- - -- Fetch over HTTPS - function kluautil.kr_https_fetch(url, out_file, ca_file) - local http_ok, http_request = pcall(require, 'http.request') -@@ -88,26 +79,6 @@ function kluautil.kr_https_fetch(url, out_file, ca_file) - return true - end - ---- List directory --function kluautil.list_dir (path) -- local results = {} -- local dir = ffi.C.opendir(path) -- if dir == nil then -- return results -- end -- -- local entry = ffi.C.readdir(dir) -- while entry ~= nil do -- local entry_name = ffi.string(ffi.C.kr_dirent_name(entry)) -- if entry_name ~= '.' and entry_name ~= '..' then -- table.insert(results, entry_name) -- end -- entry = ffi.C.readdir(dir) -- end -- -- ffi.C.closedir(dir) -- -- return results --end -+kluautil.list_dir = kluautil_list_dir - - return kluautil -- cgit v1.2.3 From 1592491c39af02a2f651ccd4d0d9cf97104e352f Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Thu, 10 Dec 2020 20:03:12 +0100 Subject: gnu: renpy: Use system fribidi and drop generated sources. * gnu/packages/patches/renpy-use-system-fribidi.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it here. * gnu/packages/game-development.scm (renpy)[source] Use it here. : Add (guix build utils). : Drop generated sources and fribidi sources. (arguments)[phases]: Add fix-include-paths. (inputs): Add fribidi. Signed-off-by: Nicolas Goaziou --- gnu/local.mk | 1 + gnu/packages/game-development.scm | 21 ++++++++- .../patches/renpy-use-system-fribidi.patch | 52 ++++++++++++++++++++++ 3 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/renpy-use-system-fribidi.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f8c615a83d..18a2389514 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1569,6 +1569,7 @@ dist_patch_DATA = \ %D%/packages/patches/rct-add-missing-headers.patch \ %D%/packages/patches/readline-link-ncurses.patch \ %D%/packages/patches/readline-6.2-CVE-2014-2524.patch \ + %D%/packages/patches/renpy-use-system-fribidi.patch \ %D%/packages/patches/reposurgeon-add-missing-docbook-files.patch \ %D%/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch \ %D%/packages/patches/ri-li-modernize_cpp.patch \ diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 557f02f564..21f7f7e880 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -1120,7 +1120,18 @@ developed mainly for Ren'py.") (method url-fetch) (uri (string-append "https://www.renpy.org/dl/" version "/renpy-" version "-source.tar.bz2")) - (sha256 (base32 "1anr5cfbvbsbik4v4rvrkdkciwhg700k4lydfbs4n85raimz9mw4")))) + (sha256 (base32 "1anr5cfbvbsbik4v4rvrkdkciwhg700k4lydfbs4n85raimz9mw4")) + (modules '((guix build utils))) + (patches + (search-patches + "renpy-use-system-fribidi.patch")) + (snippet + '(with-directory-excursion "module" + ;; drop generated sources + (delete-file-recursively "gen") + ;; drop fribidi sources + (delete-file-recursively "fribidi-src") + #t)))) (build-system python-build-system) (arguments `(#:tests? #f ; Ren'py doesn't seem to package tests @@ -1133,6 +1144,13 @@ developed mainly for Ren'py.") (("xdg-open") (which "xdg-open"))) #t)) + (add-after 'unpack 'fix-include-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "module/setup.py" + (("/usr/include/fribidi") + (string-append (assoc-ref inputs "fribidi") + "/include/fribidi"))) + #t)) (add-after 'set-paths 'set-build-vars (lambda* (#:key inputs #:allow-other-keys) (setenv "RENPY_CYTHON" @@ -1170,6 +1188,7 @@ developed mainly for Ren'py.") (inputs `(("ffmpeg" ,ffmpeg) ("freetype" ,freetype) + ("fribidi" ,fribidi) ("glew" ,glew) ("libpng" ,libpng) ("python2-pygame" ,python2-pygame-sdl2) diff --git a/gnu/packages/patches/renpy-use-system-fribidi.patch b/gnu/packages/patches/renpy-use-system-fribidi.patch new file mode 100644 index 0000000000..1437274bcc --- /dev/null +++ b/gnu/packages/patches/renpy-use-system-fribidi.patch @@ -0,0 +1,52 @@ +See also [Arch] and [Gentoo] for similar patches in other distros. +[Arch] https://github.com/archlinux/svntogit-community/blob/packages/renpy/trunk/renpy-system-fribidi.patch +[Gentoo] https://gitweb.gentoo.org/repo/gentoo.git/tree/games-engines/renpy/files/renpy-7.3.5-use-system-fribidi.patch + +Index: renpy-7.3.5-source/module/renpybidicore.c +=================================================================== +--- renpy-7.3.5-source.orig/module/renpybidicore.c ++++ renpy-7.3.5-source/module/renpybidicore.c +@@ -1,5 +1,5 @@ + #include +-#include ++#include + #include + + #ifndef alloca +Index: renpy-7.3.5-source/module/setup.py +=================================================================== +--- renpy-7.3.5-source.orig/module/setup.py ++++ renpy-7.3.5-source/module/setup.py +@@ -119,30 +119,13 @@ cython( + sdl + [ png, 'z', 'm' ]) + + FRIBIDI_SOURCES = """ +-fribidi-src/lib/fribidi.c +-fribidi-src/lib/fribidi-arabic.c +-fribidi-src/lib/fribidi-bidi.c +-fribidi-src/lib/fribidi-bidi-types.c +-fribidi-src/lib/fribidi-deprecated.c +-fribidi-src/lib/fribidi-joining.c +-fribidi-src/lib/fribidi-joining-types.c +-fribidi-src/lib/fribidi-mem.c +-fribidi-src/lib/fribidi-mirroring.c +-fribidi-src/lib/fribidi-run.c +-fribidi-src/lib/fribidi-shape.c + renpybidicore.c + """.split() + cython( + "_renpybidi", + FRIBIDI_SOURCES, +- includes=[ +- BASE + "/fribidi-src/", +- BASE + "/fribidi-src/lib/", +- ], +- define_macros=[ +- ("FRIBIDI_ENTRY", ""), +- ("HAVE_CONFIG_H", "1"), +- ]) ++ includes=["/usr/include/fribidi"], ++ libs=["fribidi"]) + + + cython("_renpysteam", language="c++", compile_if=steam_sdk, libs=["steam_api"]) -- cgit v1.2.3 From 18daba93d3fcec0e5fd9e54b6c4c7e5b979f1a6e Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 29 Nov 2020 20:18:44 +0100 Subject: gnu: Qt: Update to 5.15.2. * gnu/packages/qt.scm (qtbase, qtsvg, qtimageformats, qtx11extras, qtxmlpatterns, qtdeclarative, qtconnectivity, qtwebsockets, qtsensors, qtmultimedia, qtwayland, qtserialport, qtserialbus, qtwebchannel, qtwebglplugin, qtwebview, qtlocation, qttools, qtscript, qtquickcontrols, qtquickcontrols2, qtgraphicaleffects, qtgamepad, qtscxml, qtpurchasing, qtcharts, qtdatavis3d, qtnetworkauth, qtremoteobjects, qtspeech, qtwebengine): Update to 5.15.2. (qtbase)[source](patches): Remove obsolete patch. (qtwayland)[source](modules, snippet): Remove. [inputs]: Add VULKAN-HEADERS. (qtwebengine)[source](snippet): Adjust preserved files. [arguments]: Remove two obsolete phases. * gnu/packages/patches/qtbase-fix-krita-deadlock.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. --- gnu/local.mk | 1 - .../patches/qtbase-fix-krita-deadlock.patch | 110 ------------- gnu/packages/qt.scm | 183 ++++++++++----------- 3 files changed, 89 insertions(+), 205 deletions(-) delete mode 100644 gnu/packages/patches/qtbase-fix-krita-deadlock.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index ee8aecf4a1..91039ed9f8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1555,7 +1555,6 @@ dist_patch_DATA = \ %D%/packages/patches/qrcodegen-cpp-make-install.patch \ %D%/packages/patches/qt4-ldflags.patch \ %D%/packages/patches/qtbase-absolute-runpath.patch \ - %D%/packages/patches/qtbase-fix-krita-deadlock.patch \ %D%/packages/patches/qtbase-moc-ignore-gcc-macro.patch \ %D%/packages/patches/qtbase-use-TZDIR.patch \ %D%/packages/patches/qtscript-disable-tests.patch \ diff --git a/gnu/packages/patches/qtbase-fix-krita-deadlock.patch b/gnu/packages/patches/qtbase-fix-krita-deadlock.patch deleted file mode 100644 index d3554be3c9..0000000000 --- a/gnu/packages/patches/qtbase-fix-krita-deadlock.patch +++ /dev/null @@ -1,110 +0,0 @@ -Fix a deadlock in Krita: - -https://bugreports.qt.io/browse/QTBUG-83207 - -Patch copied from Qt bug tracker: - -https://codereview.qt-project.org/c/qt/qtbase/+/296034 - -From 276fa8383a7535765be7182883ef4aade17ce013 Mon Sep 17 00:00:00 2001 -From: Thiago Macieira -Date: Thu, 02 Apr 2020 12:08:41 -0300 -Subject: [PATCH] QLibrary: fix deadlock caused by fix to QTBUG-39642 - -Commit ae6f73e8566fa76470937aca737141183929a5ec inserted a mutex around -the entire load_sys(). We had reasoed that deadlocks would only occur if -the object creation in instance() recursed into its own instance(), -which was already a bug. But we had forgotten that dlopen()/ -LoadLibrary() executes initialization code from the module being loaded, -which could cause a recursion back into the same QPluginLoader or -QLibrary object. This recursion is benign because the module *is* loaded -and dlopen()/LoadLibrary() returns the same handle. - -[ChangeLog][QtCore][QLibrary and QPluginLoader] Fixed a deadlock that -would happen if the plugin or library being loaded has load-time -initialization code (C++ global variables) that recursed back into the -same QLibrary or QPluginLoader object. - -PS: QLibraryPrivate::loadPlugin() updates pluginState outside a mutex -lock, so pluginState should be made an atomic variable. Once that is -done, we'll only need locking the mutex to update errorString (no -locking before loading). - -Fixes: QTBUG-83207 -Task-number: QTBUG-39642 -Change-Id: Ibdc95e9af7bd456a94ecfffd160209304e5ab2eb -Reviewed-by: Volker Hilsheimer -Reviewed-by: David Faure ---- - -diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp -index ddb053c..be9d92b 100644 ---- a/src/corelib/plugin/qlibrary.cpp -+++ b/src/corelib/plugin/qlibrary.cpp -@@ -576,9 +576,7 @@ - - Q_TRACE(QLibraryPrivate_load_entry, fileName); - -- mutex.lock(); - bool ret = load_sys(); -- mutex.unlock(); - if (qt_debug_component()) { - if (ret) { - qDebug() << "loaded library" << fileName; -diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp -index 017aa97..a5c72f8 100644 ---- a/src/corelib/plugin/qlibrary_unix.cpp -+++ b/src/corelib/plugin/qlibrary_unix.cpp -@@ -123,6 +123,7 @@ - - bool QLibraryPrivate::load_sys() - { -+ QMutexLocker locker(&mutex); - QString attempt; - QFileSystemEntry fsEntry(fileName); - -@@ -213,6 +214,7 @@ - } - #endif - -+ locker.unlock(); - bool retry = true; - Handle hnd = nullptr; - for (int prefix = 0; retry && !hnd && prefix < prefixes.size(); prefix++) { -@@ -273,6 +275,8 @@ - } - } - #endif -+ -+ locker.relock(); - if (!hnd) { - errorString = QLibrary::tr("Cannot load library %1: %2").arg(fileName, qdlerror()); - } -diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp -index 000bf76..ef58724 100644 ---- a/src/corelib/plugin/qlibrary_win.cpp -+++ b/src/corelib/plugin/qlibrary_win.cpp -@@ -78,6 +78,7 @@ - // fileName - // - // NB If it's a plugin we do not ever try the ".dll" extension -+ QMutexLocker locker(&mutex); - QStringList attempts; - - if (pluginState != IsAPlugin) -@@ -95,6 +96,7 @@ - attempts.prepend(QDir::rootPath() + fileName); - #endif - -+ locker.unlock(); - Handle hnd = nullptr; - for (const QString &attempt : qAsConst(attempts)) { - #ifndef Q_OS_WINRT -@@ -115,6 +117,7 @@ - #ifndef Q_OS_WINRT - SetErrorMode(oldmode); - #endif -+ locker.relock(); - if (!hnd) { - errorString = QLibrary::tr("Cannot load library %1: %2").arg( - QDir::toNativeSeparators(fileName), qt_error_string()); diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 2e621e758c..09945b2ffb 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -345,7 +345,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtbase (package (name "qtbase") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -354,12 +354,11 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "12mjsahlma9rw3vz9a6b5h2s6ylg8b34hxc2vnlna5ll429fgfa8")) + "1y70libf2x52lpbqvhz10lpk7nyl1ajjwzjxly9pjdpfj4jsv7wh")) ;; Use TZDIR to avoid depending on package "tzdata". (patches (search-patches "qtbase-use-TZDIR.patch" "qtbase-moc-ignore-gcc-macro.patch" - "qtbase-absolute-runpath.patch" - "qtbase-fix-krita-deadlock.patch")) + "qtbase-absolute-runpath.patch")) (modules '((guix build utils))) (snippet ;; corelib uses bundled harfbuzz, md4, md5, sha3 @@ -607,7 +606,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtsvg (package (inherit qtbase) (name "qtsvg") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -616,7 +615,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") version ".tar.xz")) (sha256 (base32 - "18dmfc8s428fzbk7k5vl3212b25455ayrz7s716nwyiy3ahgmmy7")))) + "0pjqrdmd1991x9h4rl8sf81pkd89hfd5h1a2gp3fjw96pk0w5hwb")))) (propagated-inputs `()) (native-inputs `(("perl" ,perl))) (inputs @@ -682,7 +681,7 @@ HostData=lib/qt5 (define-public qtimageformats (package (inherit qtsvg) (name "qtimageformats") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -691,7 +690,7 @@ HostData=lib/qt5 version ".tar.xz")) (sha256 (base32 - "132g4rlm61pdcpcrclr1rwpbrxn7va4wjfb021mh8pn1cl0wlgkk")) + "1msk8a0z8rr16hkp2fnv668vf6wayiydqgc2mcklaa04rv3qb0mz")) (modules '((guix build utils))) (snippet '(begin @@ -723,7 +722,7 @@ support for MNG, TGA, TIFF and WBMP image formats."))) (define-public qtx11extras (package (inherit qtsvg) (name "qtx11extras") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -732,7 +731,7 @@ support for MNG, TGA, TIFF and WBMP image formats."))) version ".tar.xz")) (sha256 (base32 - "0njlh6d327nll7d8qaqrwr5x15m9yzgyar2j45qigs1f7ah896my")))) + "0gkfzj195v9flwljnqpdz3a532618yn4h2577nlsai56x4p7053h")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f))) ; TODO: Enable the tests @@ -747,7 +746,7 @@ from within Qt 5."))) (define-public qtxmlpatterns (package (inherit qtsvg) (name "qtxmlpatterns") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -756,7 +755,7 @@ from within Qt 5."))) version ".tar.xz")) (sha256 (base32 - "1dyg1z4349k04yyzn8xbp4f5qjgm60gz6wgzp80khpilcmk8g6i1")))) + "1ypj5jpa31rlx8yfw3y9jia212lfnxvnqkvygs6ihjf3lxi23skn")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f) ; TODO: Enable the tests @@ -778,7 +777,7 @@ xmlpatternsvalidator."))) (define-public qtdeclarative (package (inherit qtsvg) (name "qtdeclarative") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -787,7 +786,7 @@ xmlpatternsvalidator."))) version ".tar.xz")) (sha256 (base32 - "0l0nhc2si6dl9r4s1bs45z90qqigs8jnrsyjjdy38q4pvix63i53")))) + "0lancdn7y0lrlmyn5cbdm0izd5yprvd5n77nhkb7a3wl2sbx0066")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f) ;TODO: Enable the tests @@ -822,7 +821,7 @@ with JavaScript and C++."))) (define-public qtconnectivity (package (inherit qtsvg) (name "qtconnectivity") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -831,7 +830,7 @@ with JavaScript and C++."))) version ".tar.xz")) (sha256 (base32 - "0a5wzin635b926b8prdwfazgy1vhyf8m6an64wp2lpkp78z7prmb")))) + "185zci61ip1wpjrygcw2m6v55lvninc0b8y2p3jh6qgpf5w35003")))) (native-inputs `(("perl" ,perl) ("pkg-config" ,pkg-config) @@ -846,7 +845,7 @@ with Bluetooth and NFC."))) (define-public qtwebsockets (package (inherit qtsvg) (name "qtwebsockets") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -855,7 +854,7 @@ with Bluetooth and NFC."))) version ".tar.xz")) (sha256 (base32 - "116amx4mnv50k0fpswgpr5x8wjny8nbffrjmld01pzhkhfqn4vph")))) + "0gr399fn5n8j3m9d3vv01vcbr1cb7pw043j04cnnxzrlvn2jvd50")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f))) ; TODO: Enable the tests @@ -873,7 +872,7 @@ consume data received from the server, or both."))) (define-public qtsensors (package (inherit qtsvg) (name "qtsensors") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -882,7 +881,7 @@ consume data received from the server, or both."))) version ".tar.xz")) (sha256 (base32 - "0qccpgbhyg9k4x5nni7xm0pyvaqia3zrcd42cn7ksf5h21lwmkxw")))) + "0fa81r7bn1mf9ynwsx524a55dx1q0jb4vda6j48ssb4lx7wi201z")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:parallel-tests? _ #f) #f) ; can lead to race condition @@ -906,7 +905,7 @@ recognition API for devices."))) (define-public qtmultimedia (package (inherit qtsvg) (name "qtmultimedia") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -915,7 +914,7 @@ recognition API for devices."))) version ".tar.xz")) (sha256 (base32 - "1sczzcvk3c5gczz53yvp8ma6gp8aixk5pcq7wh344c9md3g8xkbs")) + "1xbd6kc7i0iablqdkvfrajpi32cbq7j6ajbfyyyalcai1s0mhdqc")) (modules '((guix build utils))) (snippet '(begin @@ -957,7 +956,7 @@ set of plugins for interacting with pulseaudio and GStreamer."))) (define-public qtwayland (package (inherit qtsvg) (name "qtwayland") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -966,13 +965,7 @@ set of plugins for interacting with pulseaudio and GStreamer."))) version ".tar.xz")) (sha256 (base32 - "0al3yypy3fin62n8d1859jh0mn0fbpa161l7f37hgd4gf75365nk")) - (modules '((guix build utils))) - (snippet - ;; The examples try to build and cause the build to fail - '(begin - (delete-file-recursively "examples") - #t)))) + "1ddfx4nak16xx0zh1kl836zxvpbixmmjyplsmfmg65pqkwi34dqr")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:phases phases) @@ -1009,6 +1002,7 @@ set of plugins for interacting with pulseaudio and GStreamer."))) ("mesa" ,mesa) ("mtdev" ,mtdev) ("qtbase" ,qtbase) + ("vulkan-headers" ,vulkan-headers) ("wayland" ,wayland))) (synopsis "Qt Wayland module") (description "The Qt Wayland module provides the QtWayland client and @@ -1017,7 +1011,7 @@ compositor libraries."))) (define-public qtserialport (package (inherit qtsvg) (name "qtserialport") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1026,7 +1020,7 @@ compositor libraries."))) version ".tar.xz")) (sha256 (base32 - "08ga9a1lwj83872nxablk602z1dq0la6jqsiicvd7m1sfbfpgnd6")))) + "17gp5qzg4wdg8qlxk2p3mh8x1vk33rf33wic3fy0cws193bmkiar")))) (native-inputs `(("perl" ,perl))) (inputs `(("qtbase" ,qtbase) @@ -1051,7 +1045,7 @@ interacting with serial ports from within Qt."))) (define-public qtserialbus (package (inherit qtsvg) (name "qtserialbus") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1060,7 +1054,7 @@ interacting with serial ports from within Qt."))) version ".tar.xz")) (sha256 (base32 - "14bahg82jciciqkl74q9hvf3a8kp3pk5v731vp2416k4b8bn4xqb")))) + "125x6756fjpldqy6wbw6cg7ngjh2016aiq92bchh719z1mf7xsxf")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:phases phases '%standard-phases) @@ -1086,7 +1080,7 @@ and others."))) (define-public qtwebchannel (package (inherit qtsvg) (name "qtwebchannel") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1095,7 +1089,7 @@ and others."))) version ".tar.xz")) (sha256 (base32 - "0x7q66994pw6cd0f505bmirw1sssqs740zaw8lyqqqr32m2ch7bx")))) + "1h9y634phvvk557mhmf9z4lmxr41rl8x9mqy2lzp31mk8ffffzqj")))) (native-inputs `(("perl" ,perl) ("qtdeclarative" ,qtdeclarative) @@ -1110,7 +1104,7 @@ popular web engines, Qt WebKit 2 and Qt WebEngine."))) (define-public qtwebglplugin (package (inherit qtsvg) (name "qtwebglplugin") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1119,7 +1113,7 @@ popular web engines, Qt WebKit 2 and Qt WebEngine."))) version ".tar.xz")) (sha256 (base32 - "05rl657848fsprsnabdqb5z363c6drjc32k59223vl351f8ihhgb")))) + "0ihlnhv8ldkqz82v3j7j22lrhk17b6ghra8sx85y2agd2ysq5rw1")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:phases phases) @@ -1146,7 +1140,7 @@ OpenGL ES 2.0 and can be used in HTML5 canvas elements"))) (define-public qtwebview (package (inherit qtsvg) (name "qtwebview") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1155,7 +1149,7 @@ OpenGL ES 2.0 and can be used in HTML5 canvas elements"))) version ".tar.xz")) (sha256 (base32 - "0jzzcm7z5njkddzfhmyjz4dbbzq8h93980cci4479zc4xq9r47y6")))) + "1rw1wibmbxlj6xc86qs3y8h42al1vczqiksyxzaylxs9gqb4d7xy")))) (native-inputs `(("perl" ,perl))) (inputs @@ -1169,7 +1163,7 @@ native APIs where it makes sense."))) (define-public qtlocation (package (inherit qtsvg) (name "qtlocation") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1178,7 +1172,7 @@ native APIs where it makes sense."))) version ".tar.xz")) (sha256 (base32 - "1k3m8zhbv04yrqvj7jlnh8f9xczdsmla59j9gcwsqvbg76y0hxy3")))) + "184jychnlfhplpwc5cdcsapwljgwvzk5qpf3val4kpq8w44wnkwq")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f))) ; TODO: Enable the tests @@ -1199,7 +1193,7 @@ positioning and geolocation plugins."))) (define-public qttools (package (inherit qtsvg) (name "qttools") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1208,7 +1202,7 @@ positioning and geolocation plugins."))) version ".tar.xz")) (sha256 (base32 - "1iakl3hlyg51ri1czmis8mmb257b0y1zk2a2knybd3mq69wczc2v")))) + "1k618f7v6jaj0ygy8d7jvgb8zjr47sn55kiskbdkkizp3z7d12f1")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f))) ; TODO: Enable the tests @@ -1227,7 +1221,7 @@ that helps in Qt development."))) (define-public qtscript (package (inherit qtsvg) (name "qtscript") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1236,7 +1230,7 @@ that helps in Qt development."))) version ".tar.xz")) (sha256 (base32 - "1zlvg3hc6h70d789g3kv6dxbwswzkskkm00bdgl01grwrdy4izg9")) + "0gk74hk488k9ldacxbxcranr3arf8ifqg8kz9nm1rgdgd59p36d2")) (patches (search-patches "qtscript-disable-tests.patch")))) (native-inputs `(("perl" ,perl) @@ -1251,7 +1245,7 @@ ECMAScript and Qt."))) (define-public qtquickcontrols (package (inherit qtsvg) (name "qtquickcontrols") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1260,7 +1254,7 @@ ECMAScript and Qt."))) version ".tar.xz")) (sha256 (base32 - "0qa4dlhn3iv9yvaic8hw86v6h8rn9sgq8xjfdaym04pfshfyypfm")))) + "1dczakl868mg0lnwpf082jjc5976ycn879li1vqlgw5ihirzp4y3")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f))) ; TODO: Enable the tests @@ -1275,7 +1269,7 @@ can be used to build complete interfaces in Qt Quick."))) (define-public qtquickcontrols2 (package (inherit qtsvg) (name "qtquickcontrols2") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1284,7 +1278,7 @@ can be used to build complete interfaces in Qt Quick."))) version ".tar.xz")) (sha256 (base32 - "0q0mk2mjlf9ll0gdrdzxy8096s6g9draaqiwrlvdpa7lv14x7xzs")))) + "06c9vrwvbjmzapmfa25y34lgjkzg57xxbm92nr6wkv5qykjnq6v7")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f))) ; TODO: Enable the tests @@ -1300,7 +1294,7 @@ not available."))) (define-public qtgraphicaleffects (package (inherit qtsvg) (name "qtgraphicaleffects") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1309,7 +1303,7 @@ not available."))) version ".tar.xz")) (sha256 (base32 - "03xmwhapv0b2qj661iaqqrvhxc7qiid0acrp6rj85824ha2pyyj8")))) + "1r6zfc0qga2ax155js7c8y5rx6vgayf582s921j09mb797v6g3gc")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f))) ; TODO: Enable the tests @@ -1327,7 +1321,7 @@ coloring, and many more."))) (define-public qtgamepad (package (inherit qtsvg) (name "qtgamepad") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1336,7 +1330,7 @@ coloring, and many more."))) version ".tar.xz")) (sha256 (base32 - "00wd3h465waxdghg2vdhs5pkj0xikwjn88l12477dksm8zdslzgp")))) + "0p07bg93fdfn4gr2kv38qgnws5znhswajrxdfs8xc9l3i7vi2xn7")))) (native-inputs `(("perl" ,perl) ("pkg-config" ,pkg-config))) @@ -1357,7 +1351,7 @@ and mobile applications targeting TV-like form factors."))) (define-public qtscxml (package (inherit qtsvg) (name "qtscxml") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1366,7 +1360,7 @@ and mobile applications targeting TV-like form factors."))) version ".tar.xz")) (sha256 (base32 - "141pfschv6zmcvvn3pi7f5vb4nf96zpngy80f9bly1sn58syl303")) + "1p5771b9hnpchfcdgy0zkhwg09a6xq88934aggp0rij1k85mkfb0")) (modules '((guix build utils))) (snippet '(begin @@ -1388,7 +1382,7 @@ also contains functionality to support data models and executable content."))) (define-public qtpurchasing (package (inherit qtsvg) (name "qtpurchasing") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1397,7 +1391,7 @@ also contains functionality to support data models and executable content."))) version ".tar.xz")) (sha256 (base32 - "0lg8x7g7dkf95xwxq8b4yw4ypdz68igkscya96xwbklg3q08gc39")))) + "09rjx53519dfk4qj2gbn3vlxyriasyb747wpg1p11y7jkwqhs4l7")))) (inputs `(("qtbase" ,qtbase) ("qtdeclarative" ,qtdeclarative))) @@ -1408,7 +1402,7 @@ purchasing goods and services."))) (define-public qtcharts (package (inherit qtsvg) (name "qtcharts") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1417,7 +1411,7 @@ purchasing goods and services."))) version ".tar.xz")) (sha256 (base32 - "1drvm15i6n10b6a1acgarig120ppvqh3r6fqqdn8i3blx81m5cmd")))) + "049x7z8zcp9jixmdv2fjscy2ggpd6za9hkdbb2bqp2mxjm0hwxg0")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f))) ; TODO: Enable the tests @@ -1435,7 +1429,7 @@ selecting one of the charts themes.") (define-public qtdatavis3d (package (inherit qtsvg) (name "qtdatavis3d") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1444,7 +1438,7 @@ selecting one of the charts themes.") version ".tar.xz")) (sha256 (base32 - "080fkpxg70m3c697wfnkjhca58b7r1xsqd559jzb21985pdh6g3j")))) + "1zdn3vm0nfy9ny7c783aabp3mhlnqhi9fw2rljn7ibbksmsnasi2")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:tests? _ #f) #f))) ; TODO: Enable the tests @@ -1462,7 +1456,7 @@ customized by using themes or by adding custom items and labels to them.") (define-public qtnetworkauth (package (inherit qtsvg) (name "qtnetworkauth") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1471,7 +1465,7 @@ customized by using themes or by adding custom items and labels to them.") version ".tar.xz")) (sha256 (base32 - "0pi6p7bq54kzij2p69cgib7n55k69jsq0yqq09yli645s4ym202g")))) + "11fdgacv4syr8bff2vdw7rb0dg1gcqpdf37hm3pn31d6z91frhpw")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:phases phases) @@ -1491,7 +1485,7 @@ implementation of OAuth and OAuth2 authenticathon methods for Qt."))) (define-public qtremoteobjects (package (inherit qtsvg) (name "qtremoteobjects") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1500,7 +1494,7 @@ implementation of OAuth and OAuth2 authenticathon methods for Qt."))) version ".tar.xz")) (sha256 (base32 - "1mhlws5w0igf5hw0l90p6dz6k7w16dqfbnk2li0zxdmayk2039m6")))) + "1hngbp0vkr35rpsrac7b9vx6f360v8v2g0fffzm590l8j2ybd0b7")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) ((#:phases phases) @@ -1528,7 +1522,7 @@ processes or computers."))) (define-public qtspeech (package (inherit qtsvg) (name "qtspeech") - (version "5.14.2") + (version "5.15.2") (source (origin (method url-fetch) (uri (string-append "https://download.qt.io/official_releases/qt/" @@ -1537,7 +1531,7 @@ processes or computers."))) version ".tar.xz")) (sha256 (base32 - "1nn6kspbp8hfkz1jhzc1qx1m9z7r1bgkdqgi9n4vl1q25yk8x7jy")))) + "1xc3x3ghnhgchsg1kgj156yg69wn4rwjx8r28i1jd05hxjggn468")))) (arguments (substitute-keyword-arguments (package-arguments qtsvg) @@ -1602,7 +1596,7 @@ using the Enchant spell-checking library.") version ".tar.xz")) (sha256 (base32 - "0iy9lsl6zxlkca6x2p1506hbj3wmhnaipg23z027wfccbnkxcsg1")) + "1q4idxdm81sx102xc12ixj0xpfx52d6vwvs3jpapnkyq8c7cmby8")) (modules '((ice-9 ftw) (ice-9 match) (srfi srfi-1) @@ -1611,8 +1605,9 @@ using the Enchant spell-checking library.") (snippet '(begin (let ((preserved-third-party-files - '("base/third_party/cityhash" - "base/third_party/dmg_fp" + '("base/third_party/double_conversion" + "base/third_party/cityhash" + "base/third_party/cityhash_v103" "base/third_party/dynamic_annotations" "base/third_party/icu" "base/third_party/libevent" @@ -1635,19 +1630,26 @@ using the Enchant spell-checking library.") "third_party/blink" "third_party/boringssl" "third_party/boringssl/src/third_party/fiat" - "third_party/boringssl/src/third_party/sike" - "third_party/boringssl/linux-x86_64/crypto/third_party/sike" - "third_party/boringssl/linux-aarch64/crypto/third_party/sike" "third_party/breakpad" "third_party/brotli" "third_party/ced" "third_party/cld_3" + "third_party/closure_compiler" + "third_party/crashpad" + "third_party/crashpad/crashpad/third_party/lss" + "third_party/crashpad/crashpad/third_party/zlib" "third_party/crc32c" "third_party/dav1d" "third_party/dawn" + "third_party/devtools-frontend" + "third_party/devtools-frontend/src/front_end/third_party/fabricjs" + "third_party/devtools-frontend/src/front_end/third_party/lighthouse" + "third_party/devtools-frontend/src/front_end/third_party/wasmparser" + "third_party/devtools-frontend/src/third_party/axe-core" "third_party/emoji-segmenter" "third_party/ffmpeg" "third_party/googletest" + "third_party/harfbuzz-ng/utils" "third_party/hunspell" "third_party/iccjpeg" "third_party/icu" @@ -1658,8 +1660,9 @@ using the Enchant spell-checking library.") "third_party/khronos" "third_party/leveldatabase" "third_party/libaddressinput" + "third_party/libgifcodec" "third_party/libjingle_xmpp" - "third_party/libjpeg" + "third_party/libjpeg_turbo" "third_party/libpng" "third_party/libsrtp" "third_party/libsync" @@ -1671,6 +1674,7 @@ using the Enchant spell-checking library.") "third_party/libxslt" "third_party/libyuv" "third_party/lss" + "third_party/mako" "third_party/markupsafe" "third_party/mesa_headers" "third_party/metrics_proto" @@ -1679,18 +1683,25 @@ using the Enchant spell-checking library.") "third_party/one_euro_filter" "third_party/opus" "third_party/ots" + "third_party/pdfium" + "third_party/pdfium/third_party/agg23" + "third_party/pdfium/third_party/base" + "third_party/pdfium/third_party/freetype" + "third_party/pdfium/third_party/lcms" + "third_party/pdfium/third_party/libopenjpeg20" + "third_party/pdfium/third_party/skia_shared" "third_party/perfetto" "third_party/pffft" "third_party/ply" "third_party/polymer" "third_party/protobuf" + "third_party/protobuf/third_party/six" "third_party/pyjson5" "third_party/re2" "third_party/rnnoise" "third_party/skia" "third_party/skia/include/third_party/skcms/skcms.h" "third_party/skia/include/third_party/vulkan" - "third_party/skia/third_party/gif" "third_party/skia/third_party/skcms" "third_party/skia/third_party/vulkanmemoryallocator" "third_party/smhasher" @@ -1791,7 +1802,7 @@ using the Enchant spell-checking library.") (("third_party/curl") "curl")) (substitute* '("components/viz/common/gpu/vulkan_context_provider.h" - "components/viz/common/resources/resource_format_utils.h" + "components/viz/common/resources/resource_format_utils_vulkan.h" "gpu/config/gpu_util.cc") (("third_party/vulkan/include/") "")) @@ -1817,6 +1828,7 @@ using the Enchant spell-checking library.") ("perl" ,perl) ("pkg-config" ,pkg-config) ("python-2" ,python-2) + ("python-six" ,python2-six) ("ruby" ,ruby))) (inputs `(("alsa-lib" ,alsa-lib) @@ -1871,23 +1883,6 @@ using the Enchant spell-checking library.") (substitute-keyword-arguments (package-arguments qtsvg) ((#:phases phases) `(modify-phases ,phases - (add-after 'unpack 'fix-build-with-newer-re2 - (lambda _ - ;; Adjust for API change in re2, taken from - ;; https://chromium-review.googlesource.com/c/chromium/src/+/2145261 - (substitute* "src/3rdparty/chromium/components/autofill/core\ -/browser/address_rewriter.cc" - (("options\\.set_utf8\\(true\\)") - "options.set_encoding(RE2::Options::EncodingUTF8)")) - #t)) - (add-after 'unpack 'patch-ninja-version-check - (lambda _ - ;; The build system assumes the system Ninja is too old because - ;; it only checks for versions 1.7 through 1.9. We have 1.10. - (substitute* "configure.pri" - (("1\\.\\[7-9\\]\\.\\*") - "1.([7-9]|1[0-9]).*")) - #t)) (add-before 'configure 'substitute-source (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) -- cgit v1.2.3 From 9f3cb56038392e76c001d3da4176d5363186871a Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 14 Dec 2020 09:41:36 +0100 Subject: gnu: alsa-modular-synth: Update to 2.2.0. * gnu/packages/audio.scm (alsa-modular-synth): Update to 2.2.0. [arguments]: Remove them all. [source]: Remove patch. [native-inputs]: Remove gcc@5. * gnu/packages/patches/alsa-modular-synth-fix-vocoder.patch: Remove it. * gnu/local.mk (dist_patch_DATA): Remove patch. --- gnu/local.mk | 1 - gnu/packages/audio.scm | 33 +- .../patches/alsa-modular-synth-fix-vocoder.patch | 522 --------------------- 3 files changed, 3 insertions(+), 553 deletions(-) delete mode 100644 gnu/packages/patches/alsa-modular-synth-fix-vocoder.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 18a2389514..7d0458ca05 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -791,7 +791,6 @@ dist_patch_DATA = \ %D%/packages/patches/akonadi-not-relocatable.patch \ %D%/packages/patches/akonadi-timestamps.patch \ %D%/packages/patches/allegro-mesa-18.2.5-and-later.patch \ - %D%/packages/patches/alsa-modular-synth-fix-vocoder.patch \ %D%/packages/patches/amule-crypto-6.patch \ %D%/packages/patches/anki-mpv-args.patch \ %D%/packages/patches/antiword-CVE-2014-8123.patch \ diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 7a5dfe0223..4acc345c3e 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -476,41 +476,15 @@ implementation of Adaptive Multi Rate Narrowband and Wideband (define-public alsa-modular-synth (package (name "alsa-modular-synth") - (version "2.1.2") + (version "2.2.0") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/alsamodular/alsamodular" "/" version "/ams-" version ".tar.bz2")) (sha256 (base32 - "1azbrhpfk4nnybr7kgmc7w6al6xnzppg853vas8gmkh185kk11l0")) - (patches - (search-patches "alsa-modular-synth-fix-vocoder.patch")))) + "056dn6b9c5nsw2jdww7z1kxrjqqfvxjzxhsd5x9gi4wkwyiv21nz")))) (build-system gnu-build-system) - (arguments - `(#:configure-flags - '("--enable-qt5" - "CXXFLAGS=-std=gnu++11") - #:phases - (modify-phases %standard-phases - (add-after 'set-paths 'hide-default-gcc - (lambda* (#:key inputs #:allow-other-keys) - (let ((gcc (assoc-ref inputs "gcc"))) - ;; Remove the default GCC from CPLUS_INCLUDE_PATH to prevent - ;; conflicts with the GCC 5 input. - (setenv "CPLUS_INCLUDE_PATH" - (string-join - (delete (string-append gcc "/include/c++") - (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) - ":")) - #t))) - ;; Insert an extra space between linker flags. - (add-before 'configure 'add-missing-space - (lambda _ - (substitute* "configure" - (("LIBS\\+=\\$LIBSsave") "LIBS+=\" $LIBSsave\"") - (("CFLAGS\\+=\\$CFLAGSsave") "CFLAGS+=\" $CFLAGSsave\"")) - #t))))) (inputs `(("alsa-lib" ,alsa-lib) ;; We cannot use zita-alsa-pcmi (the successor of clalsadrv) due to @@ -523,8 +497,7 @@ implementation of Adaptive Multi Rate Narrowband and Wideband ("qtbase" ,qtbase))) (native-inputs `(("pkg-config" ,pkg-config) - ("qttools" ,qttools) - ("gcc@5" ,gcc-5))) + ("qttools" ,qttools))) (home-page "http://alsamodular.sourceforge.net/") (synopsis "Realtime modular synthesizer and effect processor") (description diff --git a/gnu/packages/patches/alsa-modular-synth-fix-vocoder.patch b/gnu/packages/patches/alsa-modular-synth-fix-vocoder.patch deleted file mode 100644 index 33a68a1dd8..0000000000 --- a/gnu/packages/patches/alsa-modular-synth-fix-vocoder.patch +++ /dev/null @@ -1,522 +0,0 @@ -This patch was taken from Debian. -https://salsa.debian.org/multimedia-team/ams/-/raw/master/debian/patches/0007-Make-vocoder-module-compatible-to-C-11.patch - -From: Guido Scholz -Date: Tue, 6 Nov 2018 21:55:38 +0100 -Subject: Make vocoder module compatible to C++11 - ---- - src/m_vocoder.cpp | 218 +++++++++++++++++++++++++++--------------------------- - src/m_vocoder.h | 31 ++++---- - 2 files changed, 124 insertions(+), 125 deletions(-) - -diff --git a/src/m_vocoder.cpp b/src/m_vocoder.cpp -index 572cf65..371e2cf 100644 ---- a/src/m_vocoder.cpp -+++ b/src/m_vocoder.cpp -@@ -18,10 +18,6 @@ - along with ams. If not, see . - */ - --#include --#include --#include --#include - #include - #include - #include -@@ -36,16 +32,13 @@ - #include "synthdata.h" - #include "midicheckbox.h" - #include "midislider.h" --// For FFTW to be happy we must include complex.h before fftw3.h --#include --#include - #include "port.h" - #include "m_vocoder.h" - - // Window function - One way to make the FFT behave - // and give more continuous results over edge steps. - --float M_vocoder::windowcurve (int windowfunc, int len, int elem, float alpha) -+float M_vocoder::windowcurve (int windowfunc, unsigned int len, int elem, float alpha) - { - float out; - out = 1.0; -@@ -98,6 +91,7 @@ float M_vocoder::windowcurve (int windowfunc, int len, int elem, float alpha) - return (out); - } - -+ - M_vocoder::M_vocoder(QWidget* parent, int id) - : Module(M_type_vocoder, id, 5, parent, tr("FFT Vocoder")) - { -@@ -160,6 +154,7 @@ M_vocoder::M_vocoder(QWidget* parent, int id) - modbuf[l1] = (float *)malloc( fftsize * sizeof(float)); - memset( modbuf[l1], 0, fftsize * sizeof(float)); - } -+ - carrbuf = (float **)malloc(synthdata->poly * sizeof(float *)); - for (l1 = 0; l1 < synthdata->poly; l1++) { - carrbuf[l1] = (float *)malloc( fftsize * sizeof(float)); -@@ -175,38 +170,48 @@ M_vocoder::M_vocoder(QWidget* parent, int id) - window[l2] = windowcurve (whichwin, fftsize, l2, 0.25); - - // FFTW setup stuff -- carrinforward = (fftw_complex *) fftw_malloc (sizeof (fftw_complex) -- * fftsize); -- carrinbackward = (fftw_complex *) fftw_malloc (sizeof (fftw_complex) -- * fftsize); -- carroutforward = (fftw_complex *) fftw_malloc (sizeof (fftw_complex) -- * fftsize); -- carroutbackward = (fftw_complex *) fftw_malloc (sizeof (fftw_complex) -- * fftsize); -- modinforward = (fftw_complex *) fftw_malloc (sizeof (fftw_complex) -- * fftsize); -- modinbackward = (fftw_complex *) fftw_malloc (sizeof (fftw_complex) -- * fftsize); -- modoutforward = (fftw_complex *) fftw_malloc (sizeof (fftw_complex) -- * fftsize); -- modoutbackward = (fftw_complex *) fftw_malloc (sizeof (fftw_complex) -- * fftsize); -- fftw_set_timelimit (5.0); -- planmodforward = fftw_plan_dft_1d (fftsize, modinforward, -- modoutforward, FFTW_FORWARD, FFTW_MEASURE); -- planmodbackward = fftw_plan_dft_1d (fftsize, modinbackward, -- modoutbackward, FFTW_BACKWARD, FFTW_MEASURE); -- plancarrforward = fftw_plan_dft_1d (fftsize, carrinforward, -- carroutforward, FFTW_FORWARD, FFTW_MEASURE); -- plancarrbackward = fftw_plan_dft_1d (fftsize, carrinbackward, -- carroutbackward, FFTW_BACKWARD, FFTW_MEASURE); -+ carrinforward.reserve(fftsize); -+ carrinbackward.reserve(fftsize); -+ carroutforward.reserve(fftsize); -+ carroutbackward.reserve(fftsize); -+ modinforward.reserve(fftsize); -+ modinbackward.reserve(fftsize); -+ modoutforward.reserve(fftsize); -+ modoutbackward.reserve(fftsize); -+ -+ fftw_set_timelimit(5.0); -+ -+ planmodforward = fftw_plan_dft_1d(fftsize, -+ reinterpret_cast (modinforward.data()), -+ reinterpret_cast (modoutforward.data()), -+ FFTW_FORWARD, FFTW_MEASURE); -+ -+ planmodbackward = fftw_plan_dft_1d(fftsize, -+ reinterpret_cast (modinbackward.data()), -+ reinterpret_cast (modoutbackward.data()), -+ FFTW_BACKWARD, FFTW_MEASURE); -+ -+ plancarrforward = fftw_plan_dft_1d(fftsize, -+ reinterpret_cast (carrinforward.data()), -+ reinterpret_cast (carroutforward.data()), -+ FFTW_FORWARD, FFTW_MEASURE); -+ -+ plancarrbackward = fftw_plan_dft_1d(fftsize, -+ reinterpret_cast (carrinbackward.data()), -+ reinterpret_cast (carroutbackward.data()), -+ FFTW_BACKWARD, FFTW_MEASURE); - } - -+ - M_vocoder::~M_vocoder() { - -- int l1; -+ // Clean up FFTW stuff. -+ fftw_destroy_plan (plancarrforward); -+ fftw_destroy_plan (plancarrbackward); -+ fftw_destroy_plan (planmodforward); -+ fftw_destroy_plan (planmodbackward); - -- for (l1 = 0; l1 < synthdata->poly; l1++) { -+ for (int l1 = 0; l1 < synthdata->poly; l1++) { - free(modbuf[l1]); - free(carrbuf[l1]); - } -@@ -215,29 +220,14 @@ M_vocoder::~M_vocoder() { - free (window); - free (modmap); - free (armodmap); -- -- //#define FFTW_CLEANUP --#ifdef FFTW_CLEANUP -- // Clean up FFTW stuff. -- fftw_destroy_plan (plancarrforward); -- fftw_destroy_plan (plancarrbackward); -- fftw_destroy_plan (planmodforward); -- fftw_destroy_plan (planmodbackward); -- fftw_free (carrinforward); -- fftw_free (carrinbackward); -- fftw_free (carroutforward); -- fftw_free (carroutbackward); -- fftw_free (modinforward); -- fftw_free (modinbackward); -- fftw_free (modoutforward); -- fftw_free (modoutbackward); --#endif - } - -+ - void M_vocoder::generateCycle() { - - int l1; // l1 indexes along polyphony. - unsigned int l2; // l2 indexes along the cycle -+ const std::complex I(0.0, 1.0); - - inModulator = port_M_modulator->getinputdata(); - inPitchShift = port_M_pitchshift->getinputdata(); -@@ -272,7 +262,7 @@ void M_vocoder::generateCycle() { - // Did the user change the FFT windowing function? - if (myFFTWindowFunc != whichwin) { - whichwin = myFFTWindowFunc; -- for (l2 = 0; l2 < (unsigned int) fftsize; l2++) -+ for (l2 = 0; l2 < fftsize; l2++) - window[l2] = windowcurve (whichwin, fftsize, l2, 0.25); - } - -@@ -294,7 +284,7 @@ void M_vocoder::generateCycle() { - } - - // window the input buffer to modinforward -- for (l2 = 0; l2 < (unsigned int)fftsize ; l2++) { -+ for (l2 = 0; l2 < fftsize ; l2++) { - modinforward[l2] = modbuf[l1][l2] * window[l2]; - } - -@@ -310,17 +300,18 @@ void M_vocoder::generateCycle() { - fftw_execute (planmodforward); - - // copy the FFT of the modulator to modinbackward. -- for (l2 = 0; l2 < (unsigned int)fftsize; l2++) -- modinbackward[l2] = modoutforward[l2]; -+ //for (l2 = 0; l2 < fftsize; l2++) -+ // modinbackward[l2] = modoutforward[l2]; -+ modinbackward = modoutforward; - - // Send the FFT of the modulator to the output for giggles - // and get an approximation of the first harmonic too. - float firstharmonicval; - int firstharmonicindex; - firstharmonicval = 0.0; -- firstharmonicindex = 1.0; -+ firstharmonicindex = 1; - for (l2 = 1; l2 < (unsigned int) synthdata->cyclesize; l2++) { -- data[2][l1][l2] = logf(fabs (creal (modoutforward[l2])) + 1.0); -+ data[2][l1][l2] = logf(fabs(modoutforward[l2].real()) + 1.0); - if (data[2][l1][l2] > firstharmonicval) { - firstharmonicindex = l2; - firstharmonicval = data[2][l1][l2] ; -@@ -333,35 +324,38 @@ void M_vocoder::generateCycle() { - - // intermediate frequency-domain munging of modulator - // Frequency (additive, Bode-style) shifting first -- for (l2 = 0; l2 < (unsigned int)fftsize; l2++) -- modinbackward[l2] = 0; -+ for (l2 = 0; l2 < fftsize; l2++) -+ modinbackward[l2] = 0.0; -+ - int lclfrq; -- for (l2 = 0; l2 < (unsigned int)fftsize/2; l2++) { -+ for (l2 = 0; l2 < fftsize/2; l2++) { - // positive frequencies (first half) of the FFT result - lclfrq = l2 + (int)freqshift + vcfreqshift * inFreqShift[l1][0]; - lclfrq = lclfrq > 0 ? lclfrq : 0; -- lclfrq = lclfrq < ((fftsize/2)-1) ? lclfrq : (fftsize/2)-1; -+ lclfrq = lclfrq < (int)((fftsize/2)-1) ? lclfrq : (fftsize/2)-1; - modinbackward [lclfrq] = modoutforward [l2]; - // Negative frequencies (second half of the fft result) -- modinbackward [fftsize - lclfrq] = modoutforward [ fftsize - l2]; -+ modinbackward [fftsize - lclfrq] = modoutforward [fftsize - l2]; - } - -- // Pitchshifting (multiplicative, harmonic-retaining) shifting. -- // Note that we reuse the modoutforward as working space -- for (l2 = 0; l2 < (unsigned int) fftsize; l2++) { -- modoutforward[l2] = modinbackward[l2]; -- }; -- for (l2 = 0; l2 < (unsigned int)fftsize; l2++) -- modinbackward[l2] = 0; -+ // Pitchshifting (multiplicative, harmonic-retaining) shifting. -+ // Note that we reuse the modoutforward as working space -+ //for (l2 = 0; l2 < fftsize; l2++) { -+ // modoutforward[l2] = modinbackward[l2]; -+ //}; -+ modoutforward = modinbackward; -+ -+ for (l2 = 0; l2 < fftsize; l2++) -+ modinbackward[l2] = 0.0; - - float psmod, psfactor; - psmod = (pitchshift + vcpitch * inPitchShift[l1][0]); - psfactor = pow (2.0, psmod); -- for (l2 = 0; l2 < (unsigned int)fftsize/2; l2++) { -+ for (l2 = 0; l2 < fftsize/2; l2++) { - // positive frequencies (first half) of the FFT result - lclfrq = l2 * psfactor; - lclfrq = lclfrq > 0 ? lclfrq : 0; -- lclfrq = lclfrq < ((fftsize/2)-1) ? lclfrq : (fftsize/2)-1; -+ lclfrq = lclfrq < (int)((fftsize/2)-1) ? lclfrq : (fftsize/2)-1; - // Old way to pitch shift: just move the bucket. But this puts - // nulls wherever the energy is split between two buckets with - // a 180 degree phase difference. -@@ -375,12 +369,12 @@ void M_vocoder::generateCycle() { - // Better way: move freq. bin, multiply angle by octave motion. - // - modinbackward[lclfrq] += -- cabs (modoutforward [l2]) -- * cexp (I * ( carg (modoutforward [l2]) -+ std::abs(modoutforward[l2]) -+ * std::exp (I * ( std::arg (modoutforward [l2]) - + (l2 * phaseshift * psfactor))); - modinbackward[fftsize - lclfrq] += -- cabs (modoutforward [ fftsize - l2]) -- * cexp (I * ( carg (modoutforward [ fftsize - l2]) -+ std::abs (modoutforward [ fftsize - l2]) -+ * std::exp (I * ( std::arg (modoutforward [ fftsize - l2]) - + (l2 * phaseshift * psfactor))); - }; - } -@@ -389,9 +383,9 @@ void M_vocoder::generateCycle() { - fftw_execute (planmodbackward); - - // renormalize the time-domain modulator output -- for (l2 = 0; l2 < (unsigned)fftsize; l2++) { -- modoutbackward [l2] = modoutbackward[l2] / float (fftsize) ; -- modoutbackward [l2] = modoutbackward[l2] / window[l2]; -+ for (l2 = 0; l2 < fftsize; l2++) { -+ modoutbackward [l2] = modoutbackward[l2] / (double) fftsize; -+ modoutbackward [l2] = modoutbackward[l2] / (double) window[l2]; - } - - unsigned int i; -@@ -400,13 +394,11 @@ void M_vocoder::generateCycle() { - - - // Splicing the new output to the results -- if (dynsplice == 0.0) -- { -+ if (dynsplice == 0.0) { - // output it as the altered modulator. - for (l2 = 0; l2 < synthdata->cyclesize; l2++) { -- data[0][l1][l2] = creal ( modoutbackward [l2 + -- fftsize/2 - -- synthdata->cyclesize/2 ]); -+ data[0][l1][l2] = -+ modoutbackward[l2 + fftsize/2 - synthdata->cyclesize/2].real(); - } - clomatch_index = fftsize - synthdata->cyclesize; - } -@@ -421,18 +413,21 @@ void M_vocoder::generateCycle() { - float tval, dtval; - int searchstart; - float spliceval, dspliceval; -- searchstart = fftsize/2 - synthdata->cyclesize; -- if (searchstart < 1) searchstart = 1; -- clomatch_index = searchstart; -+ -+ searchstart = fftsize/2 - synthdata->cyclesize; -+ if (searchstart < 1) -+ searchstart = 1; -+ -+ clomatch_index = searchstart; - spliceval = data[0][l1][synthdata->cyclesize - 1]; - dspliceval = spliceval - data[0][l1][synthdata->cyclesize - 2]; -- clov_sofar= fabs(creal(modoutbackward[clomatch_index])-spliceval ); -+ clov_sofar= fabs(modoutbackward[clomatch_index].real()-spliceval); - for (l2 = searchstart; - l2 < (searchstart + synthdata->cyclesize); - l2++) - { -- tval = creal (modoutbackward[l2]); -- dtval = tval - creal (modoutbackward [l2-1]); -+ tval = modoutbackward[l2].real(); -+ dtval = tval - modoutbackward [l2-1].real(); - if ( - ((fabs (tval - spliceval )) < clov_sofar ) - && ((dtval * dspliceval ) >= 0) -@@ -445,15 +440,15 @@ void M_vocoder::generateCycle() { - }; - // fprintf (stderr, "%d %f %f ", - // clomatch_index, clov_sofar, clodv_sofar); -- -+ - // What's our residual error, so that we can splice this - // with minimal "click"? -- residual = + spliceval - creal( modoutbackward[clomatch_index]); -+ residual = + spliceval - modoutbackward[clomatch_index].real(); - - // Move our wave, with the best match so far established, to - // the output buffer area. - for (l2 = 0; l2 < synthdata->cyclesize; l2++) { -- data[0][l1][l2] = creal ( modoutbackward [ clomatch_index + l2]) -+ data[0][l1][l2] = modoutbackward[clomatch_index + l2].real() - + ((1.0 - (float(l2) / float(synthdata->cyclesize))) * residual); - }; - -@@ -466,17 +461,18 @@ void M_vocoder::generateCycle() { - for (l2 = 0; l2 < fftsize - synthdata->cyclesize; l2++) { - carrbuf [l1][l2] = carrbuf [l1][l2 + synthdata->cyclesize]; - } -+ - for (l2 = 0; l2 < synthdata->cyclesize; l2++) { - carrbuf [l1][l2 + fftsize - synthdata->cyclesize] = inCarrier[l1][l2]; - } - -- for (l2 = 0; l2 < unsigned (fftsize); l2++) { -+ for (l2 = 0; l2 < fftsize; l2++) { - carrinforward [l2] = carrbuf [l1][l2] * window[l2]; - } - - fftw_execute (plancarrforward); - -- for (l2 = 0; l2 < (unsigned) fftsize; l2++) { -+ for (l2 = 0; l2 < fftsize; l2++) { - carrinbackward[l2] = carroutforward[l2]; - }; - -@@ -486,34 +482,37 @@ void M_vocoder::generateCycle() { - // Group the modulator into channels, and multipy the channels - // over the carrier. - -- int localchannels; -- localchannels = channels + vcchannels * inChannels[l1][0]; -- if (localchannels < 1) localchannels = 1; -- if (localchannels > fftsize - 1) localchannels = fftsize - 1; -- for (l2 = 0; l2 < (unsigned) fftsize; l2++) { -+ unsigned int localchannels = channels + vcchannels * inChannels[l1][0]; -+ if (localchannels < 1) -+ localchannels = 1; -+ -+ if (localchannels > fftsize - 1) -+ localchannels = fftsize - 1; -+ -+ for (l2 = 0; l2 < fftsize; l2++) { - modmap[l2] = 0; - // initial conditions... - if (l2 == 0) - for (i = 0; i < channels; i++) -- modmap[l2] += cabs (modoutforward[l2 + i]); -+ modmap[l2] += std::abs(modoutforward[l2 + i]); - else - modmap [l2] = modmap[l2 - 1]; - - // add the heads, subtract the tails - i = l2 + channels; -- if (l2 < (unsigned)fftsize - 2) -- modmap[l2] += cabs( modoutforward [i] ); -+ if (l2 < fftsize - 2) -+ modmap[l2] += std::abs(modoutforward[i]); - i = l2 - channels; - if (l2 >= channels) -- modmap[l2] -= cabs( modoutforward [i] ); -+ modmap[l2] -= std::abs(modoutforward[i]); - } - - // Normalize the modmap -- for (l2 = 0; l2 < (unsigned) fftsize; l2++) -+ for (l2 = 0; l2 < fftsize; l2++) - modmap[l2] = modmap[l2] / localchannels; - - // Do attack/release -- for (l2 = 0; l2 < (unsigned) fftsize; l2++) { -+ for (l2 = 0; l2 < fftsize; l2++) { - if (modmap [l2] > armodmap[l2]) - armodmap [l2] += (1 - attack) * (modmap[l2] - armodmap[l2]); - if (modmap [l2] < armodmap[l2]) -@@ -521,8 +520,8 @@ void M_vocoder::generateCycle() { - } - - // multiply the carrier by the modulation map. -- for (l2 = 0; l2 < (unsigned) fftsize; l2++) { -- carrinbackward[l2] = carroutforward[l2] * armodmap[l2]; -+ for (l2 = 0; l2 < fftsize; l2++) { -+ carrinbackward[l2] = carroutforward[l2] * (double) armodmap[l2]; - } - - // reverse transform to final output, and renormalize by 1/fftsize. -@@ -532,8 +531,7 @@ void M_vocoder::generateCycle() { - for (l2 = 0; l2 < synthdata->cyclesize; l2++) { - offset = l2 + (fftsize/2) - (synthdata->cyclesize / 2); - data[1][l1][l2]= -- (creal(carroutbackward[offset]/window[offset])) / (fftsize * 100); -+ (carroutbackward[offset].real()/window[offset]) / (fftsize * 100); - }; - }; - } -- -diff --git a/src/m_vocoder.h b/src/m_vocoder.h -index 38eac58..32c8521 100644 ---- a/src/m_vocoder.h -+++ b/src/m_vocoder.h -@@ -1,4 +1,4 @@ --/* -+/* - Vocoder - derived from m_delay.cpp - - Copyright (C) 2011 Bill Yerazunis -@@ -22,7 +22,9 @@ - #define M_VOCODER_H - - #include "module.h" --#include -+ -+#include -+#include - #include - - #define MODULE_VOCODER_WIDTH 105 -@@ -30,7 +32,7 @@ - - class M_vocoder : public Module - { -- Q_OBJECT -+ Q_OBJECT - - float channels, vcchannels; - float attack, release; -@@ -42,21 +44,20 @@ class M_vocoder : public Module - - Port *port_M_modulator, *port_M_pitchshift, *port_M_freqshift, - *port_M_channels, *port_M_carrier; -+ - Port *port_modfft_out, *port_firstharmonic_out, -- *port_altmodulator_out, -- *port_vocoder_out; -+ *port_altmodulator_out, *port_vocoder_out; - -- fftw_plan planmodforward, planmodbackward, -+ fftw_plan planmodforward, planmodbackward, - plancarrforward, plancarrbackward; - -- fftw_complex *carrinforward, *carroutforward, -- *carrinbackward, *carroutbackward, -- *modinforward, *modoutforward, -- *modinbackward, *modoutbackward; -+ std::vector> carrinforward, carroutforward, -+ carrinbackward, carroutbackward, -+ modinforward, modoutforward, -+ modinbackward, modoutbackward; - -- public: -- int fftsize; -- float **inModulator, **inPitchShift, **inFreqShift, -+ unsigned int fftsize; -+ float **inModulator, **inPitchShift, **inFreqShift, - **inChannels, **inCarrier; - // the previous time-based samples, for overlapping - float **modbuf, **carrbuf; -@@ -68,10 +69,10 @@ class M_vocoder : public Module - float *armodmap; - - public: -- float windowcurve (int windowfunc, int len, int elem, float alpha ); -+ float windowcurve (int windowfunc, unsigned int len, int elem, float alpha ); - M_vocoder(QWidget* parent=0, int id = 0); - ~M_vocoder(); - void generateCycle(); - }; -- -+ - #endif -- cgit v1.2.3 From 5fe87ef51c0b6c41ad8f53579f0fd515f0ab059e Mon Sep 17 00:00:00 2001 From: Tanguy Le Carrour Date: Mon, 14 Dec 2020 09:42:40 +0100 Subject: gnu: Add python-3.9. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python.scm (python-3.9): New variable. * gnu/packages/patches/python-3.9-fix-tests.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/patches/python-3.9-fix-tests.patch | 370 ++++++++++++++++++++++++ gnu/packages/python.scm | 25 ++ 3 files changed, 396 insertions(+) create mode 100644 gnu/packages/patches/python-3.9-fix-tests.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 7d0458ca05..0b4cf23838 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1513,6 +1513,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-3-search-paths.patch \ %D%/packages/patches/python-3-fix-tests.patch \ %D%/packages/patches/python-3.8-fix-tests.patch \ + %D%/packages/patches/python-3.9-fix-tests.patch \ %D%/packages/patches/python-CVE-2018-14647.patch \ %D%/packages/patches/python-aionotify-0.2.0-py3.8.patch \ %D%/packages/patches/python-argcomplete-1.11.1-fish31.patch \ diff --git a/gnu/packages/patches/python-3.9-fix-tests.patch b/gnu/packages/patches/python-3.9-fix-tests.patch new file mode 100644 index 0000000000..dc6b8c4cc8 --- /dev/null +++ b/gnu/packages/patches/python-3.9-fix-tests.patch @@ -0,0 +1,370 @@ +See the discussion about the issues fixed here at: +http://bugs.python.org/issue20868 . + +diff --git a/Lib/ctypes/test/test_callbacks.py b/Lib/ctypes/test/test_callbacks.py +--- a/Lib/ctypes/test/test_callbacks.py ++++ b/Lib/ctypes/test/test_callbacks.py +@@ -3,6 +3,7 @@ import unittest + from ctypes import * + from ctypes.test import need_symbol + import _ctypes_test ++import platform + + class Callbacks(unittest.TestCase): + functype = CFUNCTYPE +@@ -176,6 +177,8 @@ class SampleCallbacksTestCase(unittest.TestCase): + + self.assertLess(diff, 0.01, "%s not less than 0.01" % diff) + ++ @unittest.skipIf(platform.machine() in ['mips64'], ++ "This test fails on this platform") + def test_issue_8959_a(self): + from ctypes.util import find_library + libc_path = find_library("c") +diff --git a/Lib/ctypes/test/test_libc.py b/Lib/ctypes/test/test_libc.py +--- a/Lib/ctypes/test/test_libc.py ++++ b/Lib/ctypes/test/test_libc.py +@@ -2,6 +2,7 @@ import unittest + + from ctypes import * + import _ctypes_test ++import platform + + lib = CDLL(_ctypes_test.__file__) + +@@ -17,6 +18,8 @@ class LibTest(unittest.TestCase): + import math + self.assertEqual(lib.my_sqrt(2.0), math.sqrt(2.0)) + ++ @unittest.skipIf(platform.machine() in ['mips64'], ++ "This test fails on this platform") + def test_qsort(self): + comparefunc = CFUNCTYPE(c_int, POINTER(c_char), POINTER(c_char)) + lib.my_qsort.argtypes = c_void_p, c_size_t, c_size_t, comparefunc +diff --git a/Lib/distutils/tests/test_archive_util.py b/Lib/distutils/tests/test_archive_util.py +--- a/Lib/distutils/tests/test_archive_util.py ++++ b/Lib/distutils/tests/test_archive_util.py +@@ -333,6 +333,7 @@ class ArchiveUtilTestCase(support.TempdirManager, + self.assertEqual(os.path.basename(res), 'archive.tar.xz') + self.assertEqual(self._tarinfo(res), self._created_files) + ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + def test_make_archive_owner_group(self): + # testing make_archive with owner and group, with various combinations + # this works even if there's not gid/uid support +@@ -362,6 +363,7 @@ class ArchiveUtilTestCase(support.TempdirManager, + + @unittest.skipUnless(ZLIB_SUPPORT, "Requires zlib") + @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + def test_tarfile_root_owner(self): + tmpdir = self._create_files() + base_name = os.path.join(self.mkdtemp(), 'archive') +diff --git a/Lib/distutils/tests/test_sdist.py b/Lib/distutils/tests/test_sdist.py +--- a/Lib/distutils/tests/test_sdist.py ++++ b/Lib/distutils/tests/test_sdist.py +@@ -443,6 +443,7 @@ class SDistTestCase(BasePyPIRCCommandTestCase): + "The tar command is not found") + @unittest.skipIf(find_executable('gzip') is None, + "The gzip command is not found") ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + def test_make_distribution_owner_group(self): + # now building a sdist + dist, cmd = self.get_cmd() +diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py +--- a/Lib/test/_test_multiprocessing.py ++++ b/Lib/test/_test_multiprocessing.py +@@ -1473,6 +1473,7 @@ class _TestCondition(BaseTestCase): + if pid is not None: + os.kill(pid, signal.SIGINT) + ++ @unittest.skipIf(True, "This fails for unknown reasons on Guix") + def test_wait_result(self): + if isinstance(self, ProcessesMixin) and sys.platform != 'win32': + pid = os.getpid() +diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py +--- a/Lib/test/test_asyncio/test_base_events.py ++++ b/Lib/test/test_asyncio/test_base_events.py +@@ -1323,6 +1323,8 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase): + self._test_create_connection_ip_addr(m_socket, False) + + @patch_socket ++ @unittest.skipUnless(support.is_resource_enabled('network'), ++ 'network is not enabled') + def test_create_connection_service_name(self, m_socket): + m_socket.getaddrinfo = socket.getaddrinfo + sock = m_socket.socket.return_value +diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py +--- a/Lib/test/test_generators.py ++++ b/Lib/test/test_generators.py +@@ -34,6 +34,7 @@ class SignalAndYieldFromTest(unittest.TestCase): + else: + return "FAILED" + ++ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment') + def test_raise_and_yield_from(self): + gen = self.generator1() + gen.send(None) +diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py +--- a/Lib/test/test_pathlib.py ++++ b/Lib/test/test_pathlib.py +@@ -2134,8 +2134,7 @@ class PosixPathTest(_BasePathTest, unittest.TestCase): + self.assertEqual(given, expect) + self.assertEqual(set(p.rglob("FILEd*")), set()) + +- @unittest.skipUnless(hasattr(pwd, 'getpwall'), +- 'pwd module does not expose getpwall()') ++ @unittest.skipIf(True, "Guix builder home is '/' which causes trouble for these tests") + def test_expanduser(self): + P = self.cls + support.import_module('pwd') +diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py +--- a/Lib/test/test_pdb.py ++++ b/Lib/test/test_pdb.py +@@ -1150,11 +1150,11 @@ def test_pdb_issue_20766(): + > (6)test_function() + -> print('pdb %d: %s' % (i, sess._previous_sigint_handler)) + (Pdb) continue +- pdb 1: ++ pdb 1: Handlers.SIG_IGN + > (5)test_function() + -> sess.set_trace(sys._getframe()) + (Pdb) continue +- pdb 2: ++ pdb 2: Handlers.SIG_IGN + """ + + +diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py +--- a/Lib/test/test_regrtest.py ++++ b/Lib/test/test_regrtest.py +@@ -762,6 +762,7 @@ class ArgsTestCase(BaseTestCase): + output = self.run_tests('--fromfile', filename) + self.check_executed_tests(output, tests) + ++ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment.') + def test_interrupted(self): + code = TEST_INTERRUPTED + test = self.create_test('sigint', code=code) +@@ -779,6 +780,7 @@ class ArgsTestCase(BaseTestCase): + % (self.TESTNAME_REGEX, len(tests))) + self.check_line(output, regex) + ++ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build environment.') + def test_slowest_interrupted(self): + # Issue #25373: test --slowest with an interrupted test + code = TEST_INTERRUPTED +diff --git a/Lib/test/test_resource.py b/Lib/test/test_resource.py +--- a/Lib/test/test_resource.py ++++ b/Lib/test/test_resource.py +@@ -145,6 +145,7 @@ class ResourceTest(unittest.TestCase): + + @unittest.skipUnless(hasattr(resource, 'prlimit'), 'no prlimit') + @support.requires_linux_version(2, 6, 36) ++ @unittest.skipIf(True, "Bug: the PermissionError is not raised") + def test_prlimit(self): + self.assertRaises(TypeError, resource.prlimit) + self.assertRaises(ProcessLookupError, resource.prlimit, +diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py +--- a/Lib/test/test_shutil.py ++++ b/Lib/test/test_shutil.py +@@ -1428,6 +1428,7 @@ class TestArchives(BaseTest, unittest.TestCase): + self.assertRaises(ValueError, make_archive, base_name, 'xxx') + + @support.requires_zlib() ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + def test_make_archive_owner_group(self): + # testing make_archive with owner and group, with various combinations + # this works even if there's not gid/uid support +@@ -1456,6 +1457,7 @@ class TestArchives(BaseTest, unittest.TestCase): + + + @support.requires_zlib() ++ @unittest.skipIf(True, "getgrgid(0)[0] raises a KeyError on Guix") + @unittest.skipUnless(UID_GID_SUPPORT, "Requires grp and pwd support") + def test_tarfile_root_owner(self): + root_dir, base_dir = self._create_files() +diff --git a/Lib/test/test_unicodedata.py b/Lib/test/test_unicodedata.py +--- a/Lib/test/test_unicodedata.py ++++ b/Lib/test/test_unicodedata.py +@@ -320,6 +320,7 @@ class NormalizationTest(unittest.TestCase): + data = [int(x, 16) for x in data.split(" ")] + return "".join([chr(x) for x in data]) + ++ @unittest.skipIf(True, 'Network is not available in the Guix build environment') + def test_normalization(self): + TESTDATAFILE = "NormalizationTest.txt" + TESTDATAURL = f"http://www.pythontest.net/unicode/{unicodedata.unidata_version}/{TESTDATAFILE}" +diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py +--- a/Lib/test/test_socket.py ++++ b/Lib/test/test_socket.py +@@ -875,6 +875,8 @@ class GeneralModuleTests(unittest.TestCase): + if not fqhn in all_host_names: + self.fail("Error testing host resolution mechanisms. (fqdn: %s, all: %s)" % (fqhn, repr(all_host_names))) + ++ @unittest.skipUnless(support.is_resource_enabled('network'), ++ 'network is not enabled') + def test_host_resolution(self): + for addr in [support.HOSTv4, '10.0.0.1', '255.255.255.255']: + self.assertEqual(socket.gethostbyname(addr), addr) +@@ -1004,6 +1006,8 @@ class GeneralModuleTests(unittest.TestCase): + self.assertWarns(DeprecationWarning, socket.ntohs, k) + self.assertWarns(DeprecationWarning, socket.htons, k) + ++ @unittest.skipUnless(os.path.exists("/etc/services"), ++ "getservbyname uses /etc/services, which is not in the chroot") + def testGetServBy(self): + eq = self.assertEqual + # Find one service that exists, then check all the related interfaces. +@@ -1358,6 +1362,8 @@ class GeneralModuleTests(unittest.TestCase): + raise + self.assertRaises(TypeError, s.ioctl, socket.SIO_LOOPBACK_FAST_PATH, None) + ++ @unittest.skipUnless(os.path.exists("/etc/gai.conf"), ++ "getaddrinfo() will fail") + def testGetaddrinfo(self): + try: + socket.getaddrinfo('localhost', 80) +@@ -1440,6 +1446,8 @@ class GeneralModuleTests(unittest.TestCase): + # only IP addresses are allowed + self.assertRaises(OSError, socket.getnameinfo, ('mail.python.org',0), 0) + ++ @unittest.skipUnless(os.path.exists("/etc/gai.conf"), ++ "getaddrinfo() will fail") + @unittest.skipUnless(support.is_resource_enabled('network'), + 'network is not enabled') + def test_idna(self): +diff --git a/Lib/test/test_spwd.py b/Lib/test/test_spwd.py +--- a/Lib/test/test_spwd.py ++++ b/Lib/test/test_spwd.py +@@ -5,8 +5,7 @@ from test import support + spwd = support.import_module('spwd') + + +-@unittest.skipUnless(hasattr(os, 'geteuid') and os.geteuid() == 0, +- 'root privileges required') ++@unittest.skipUnless(os.path.exists("/etc/shadow"), 'spwd tests require /etc/shadow') + class TestSpwdRoot(unittest.TestCase): + + def test_getspall(self): +@@ -56,8 +55,7 @@ class TestSpwdRoot(unittest.TestCase): + self.assertRaises(TypeError, spwd.getspnam, bytes_name) + + +-@unittest.skipUnless(hasattr(os, 'geteuid') and os.geteuid() != 0, +- 'non-root user required') ++@unittest.skipUnless(os.path.exists("/etc/shadow"), 'spwd tests require /etc/shadow') + class TestSpwdNonRoot(unittest.TestCase): + + def test_getspnam_exception(self): +diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py +--- a/Lib/test/test_tarfile.py ++++ b/Lib/test/test_tarfile.py +@@ -2509,9 +2509,12 @@ def root_is_uid_gid_0(): + import pwd, grp + except ImportError: + return False +- if pwd.getpwuid(0)[0] != 'root': +- return False +- if grp.getgrgid(0)[0] != 'root': ++ try: ++ if pwd.getpwuid(0)[0] != 'root': ++ return False ++ if grp.getgrgid(0)[0] != 'root': ++ return False ++ except KeyError: + return False + return True + +diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py +--- a/Lib/test/test_threading.py ++++ b/Lib/test/test_threading.py +@@ -1249,6 +1249,7 @@ class MiscTestCase(unittest.TestCase): + + + class InterruptMainTests(unittest.TestCase): ++ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build container.') + def test_interrupt_main_subthread(self): + # Calling start_new_thread with a function that executes interrupt_main + # should raise KeyboardInterrupt upon completion. +@@ -1260,6 +1261,8 @@ class InterruptMainTests(unittest.TestCase): + t.join() + t.join() + ++ ++ @unittest.skipIf(True, 'Keyboard interrupts do not work in the Guix build container.') + def test_interrupt_main_mainthread(self): + # Make sure that if interrupt_main is called in main thread that + # KeyboardInterrupt is raised instantly. +diff --git a/Tools/scripts/run_tests.py b/Tools/scripts/run_tests.py +--- a/Tools/scripts/run_tests.py ++++ b/Tools/scripts/run_tests.py +@@ -39,7 +39,7 @@ def main(regrtest_args): + if not any(is_multiprocess_flag(arg) for arg in regrtest_args): + args.extend(['-j', '0']) # Use all CPU cores + if not any(is_resource_use_flag(arg) for arg in regrtest_args): +- args.extend(['-u', 'all,-largefile,-audio,-gui']) ++ args.extend(['-u', 'all,-largefile,-audio,-gui,-network']) + args.extend(regrtest_args) + print(' '.join(args)) + if sys.platform == 'win32': +diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py +index 1474624..887f8ee 100644 +--- a/Lib/test/_test_multiprocessing.py ++++ b/Lib/test/_test_multiprocessing.py +@@ -3801,6 +3801,7 @@ class _TestSharedMemory(BaseTestCase): + sms.close() + + @unittest.skipIf(os.name != "posix", "not feasible in non-posix platforms") ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_shared_memory_SharedMemoryServer_ignores_sigint(self): + # bpo-36368: protect SharedMemoryManager server process from + # KeyboardInterrupt signals. +diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py +index d41e94b..a1c15e7 100644 +--- a/Lib/test/test_signal.py ++++ b/Lib/test/test_signal.py +@@ -78,6 +78,7 @@ class PosixTests(unittest.TestCase): + self.assertLess(len(s), signal.NSIG) + + @unittest.skipUnless(sys.executable, "sys.executable required.") ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_keyboard_interrupt_exit_code(self): + """KeyboardInterrupt triggers exit via SIGINT.""" + process = subprocess.run( +@@ -128,6 +129,7 @@ class WindowsSignalTests(unittest.TestCase): + signal.signal(7, handler) + + @unittest.skipUnless(sys.executable, "sys.executable required.") ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_keyboard_interrupt_exit_code(self): + """KeyboardInterrupt triggers an exit using STATUS_CONTROL_C_EXIT.""" + # We don't test via os.kill(os.getpid(), signal.CTRL_C_EVENT) here +@@ -1245,6 +1247,7 @@ class StressTest(unittest.TestCase): + + class RaiseSignalTest(unittest.TestCase): + ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_sigint(self): + with self.assertRaises(KeyboardInterrupt): + signal.raise_signal(signal.SIGINT) +@@ -1279,6 +1279,7 @@ class PidfdSignalTest(unittest.TestCase): + hasattr(signal, "pidfd_send_signal"), + "pidfd support not built in", + ) ++ @unittest.skipUnless(sys.stdin.isatty(), "KeyboardInterrupts require a TTY device") + def test_pidfd_send_signal(self): + with self.assertRaises(OSError) as cm: + signal.pidfd_send_signal(0, signal.SIGINT) +diff --git a/Lib/ctypes/test/test_find.py b/Lib/ctypes/test/test_find.py +index 92ac184..49eec2c 100644 +--- a/Lib/ctypes/test/test_find.py ++++ b/Lib/ctypes/test/test_find.py +@@ -116,6 +116,7 @@ class FindLibraryLinux(unittest.TestCase): + with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None): + self.assertNotEqual(find_library('c'), None) + ++ @unittest.skipIf(True, "This fails for unknown reasons on Guix") + def test_find_library_with_ld(self): + with unittest.mock.patch("ctypes.util._findSoname_ldconfig", lambda *args: None), \ + unittest.mock.patch("ctypes.util._findLib_gcc", lambda *args: None): diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 43704bccae..fa9bf10e07 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -520,6 +520,31 @@ data types.") (version-major+minor version) "/site-packages")))))))) +(define-public python-3.9 + (package (inherit python-3.8) + (name "python-next") + (version "3.9.1") + (source (origin + (method url-fetch) + (uri (string-append "https://www.python.org/ftp/python/" + version "/Python-" version ".tar.xz")) + (patches (search-patches + "python-3.9-fix-tests.patch" + "python-3-deterministic-build-info.patch" + "python-3-search-paths.patch")) + (sha256 + (base32 + "1zq3k4ymify5ig739zyvx9s2ainvchxb1zpy139z74krr653y74r")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Delete the bundled copy of libexpat. + (delete-file-recursively "Modules/expat") + (substitute* "Modules/Setup" + ;; Link Expat instead of embedding the bundled one. + (("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n")) + #t)))))) + ;; Current 3.x version. (define-public python-3 python-3.8) -- cgit v1.2.3 From 7d9d474dd292884eb628231dbe34b743e6f9bd39 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 15 Dec 2020 10:20:16 +0200 Subject: gnu: Add rust-ndarray-0.12. * gnu/packages/crates-io.scm (rust-ndarray-0.12): New variable. * gnu/packages/patches/rust-ndarray-remove-blas-src-dep.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/crates-io.scm | 33 ++++++++++++++++++++ .../patches/rust-ndarray-remove-blas-src-dep.patch | 36 ++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 gnu/packages/patches/rust-ndarray-remove-blas-src-dep.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 0b4cf23838..59ef362a16 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1592,6 +1592,7 @@ dist_patch_DATA = \ %D%/packages/patches/rust-1.45-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 \ %D%/packages/patches/rust-nettle-disable-vendor.patch \ %D%/packages/patches/rust-nettle-sys-disable-vendor.patch \ %D%/packages/patches/rust-reproducible-builds.patch \ diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 49f865c841..385160dd90 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -16874,6 +16874,39 @@ IO of Windows's named pipes.") "This package provides a crate to perform natural ordering for Rust.") (license license:expat))) +(define-public rust-ndarray-0.12 + (package + (name "rust-ndarray") + (version "0.12.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "ndarray" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0a5rfwcbqnvbwi3nw5sfz6kf0flhmjxs64s0b4kxc6lhmyl81wvw")) + (patches (search-patches "rust-ndarray-remove-blas-src-dep.patch")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-itertools" ,rust-itertools-0.7) + ("rust-matrixmultiply" ,rust-matrixmultiply-0.1) + ("rust-num-complex" ,rust-num-complex-0.2) + ("rust-cblas-sys" ,rust-cblas-sys-0.1) + ("rust-rustc-serialize" ,rust-rustc-serialize-0.3) + ("rust-serde" ,rust-serde-1)) + #:cargo-development-inputs + (("rust-defmac" ,rust-defmac-0.1) + ("rust-quickcheck" ,rust-quickcheck-0.7) + ("rust-rawpointer" ,rust-rawpointer-0.1)))) + (home-page "https://github.com/rust-ndarray/ndarray") + (synopsis "N-dimensional container for general elements and for numerics") + (description "@code{ndarray} implements an n-dimensional container for +general elements and for numerics.") + (license (list license:asl2.0 + license:expat)))) + (define-public rust-net2-0.2 (package (name "rust-net2") diff --git a/gnu/packages/patches/rust-ndarray-remove-blas-src-dep.patch b/gnu/packages/patches/rust-ndarray-remove-blas-src-dep.patch new file mode 100644 index 0000000000..7221fdd608 --- /dev/null +++ b/gnu/packages/patches/rust-ndarray-remove-blas-src-dep.patch @@ -0,0 +1,36 @@ +From ed09f3c91e915c3b436854a7936566edceb3e8de Mon Sep 17 00:00:00 2001 +From: Efraim Flashner +Date: Tue, 15 Dec 2020 10:09:45 +0200 +Subject: [PATCH] remove blas-src dependency + +--- + Cargo.toml | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/Cargo.toml b/Cargo.toml +index 1f3e1b6..36bc816 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -37,10 +37,6 @@ debug = true + name = "ndarray" + test = true + bench = false +-[dependencies.blas-src] +-version = "0.2.0" +-optional = true +-default-features = false + + [dependencies.cblas-sys] + version = "0.1.4" +@@ -78,7 +74,7 @@ default-features = false + version = "0.1" + + [features] +-blas = ["cblas-sys", "blas-src"] ++blas = ["cblas-sys"] + docs = ["rustc-serialize", "serde-1"] + serde-1 = ["serde"] + test = ["test-blas-openblas-sys"] +-- +2.29.2 + -- cgit v1.2.3 From 0510ca15aa395ddd3daf0720b541662671bf14c3 Mon Sep 17 00:00:00 2001 From: Hendursaga Date: Sat, 15 Aug 2020 17:05:57 +0000 Subject: gnu: Add cfunge. * gnu/packages/esolangs.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. Signed-off-by: Leo Famulari --- gnu/local.mk | 1 + gnu/packages/esolangs.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 gnu/packages/esolangs.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 59ef362a16..2f267e8aee 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -203,6 +203,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/enlightenment.scm \ %D%/packages/entr.scm \ %D%/packages/erlang.scm \ + %D%/packages/esolangs.scm \ %D%/packages/fabric-management.scm \ %D%/packages/fcitx.scm \ %D%/packages/fcitx5.scm \ diff --git a/gnu/packages/esolangs.scm b/gnu/packages/esolangs.scm new file mode 100644 index 0000000000..3986562d57 --- /dev/null +++ b/gnu/packages/esolangs.scm @@ -0,0 +1,51 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Hendursaga +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages esolangs) + #:use-module (gnu packages ncurses) + #:use-module (guix build-system cmake) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages)) + +(define-public cfunge + (package + (name "cfunge") + (version "0.9.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/VorpalBlade/cfunge") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "18ir0h10vxdb5jb57w5hjbgi8spjxg9x2148agadhhmbhsja02m7")))) + (build-system cmake-build-system) + (arguments + ;; The tests are not designed to be run and evaluated automatically. + '(#:tests? #f)) + (inputs + `(("ncurses" ,ncurses))) + (home-page "https://github.com/VorpalBlade/cfunge") + (synopsis "Fast conforming Befunge93/98/109 interpreter in C") + (description "@command{cfunge} is a fast conforming Befunge93/98/109 interpreter +written in C. It supports several @dfn{fingerprints} (opt-in language extensions +identified by unique ID codes).") + (license license:gpl3))) -- cgit v1.2.3 From 4c66a8deb5f51fd4f944fb62c43aa1e2a477711c Mon Sep 17 00:00:00 2001 From: Greg Hogan Date: Sat, 10 Oct 2020 17:41:08 +0000 Subject: gnu: Add aws-checksums. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/c.scm (aws-checksums): New variable. * gnu/packages/patches/aws-checksums-cmake-prefix.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/c.scm | 25 ++++++++++++++++++++++ .../patches/aws-checksums-cmake-prefix.patch | 13 +++++++++++ 3 files changed, 39 insertions(+) create mode 100644 gnu/packages/patches/aws-checksums-cmake-prefix.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 2f267e8aee..0daac5746b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -823,6 +823,7 @@ dist_patch_DATA = \ %D%/packages/patches/avogadro-python-eigen-lib.patch \ %D%/packages/patches/avidemux-install-to-lib.patch \ %D%/packages/patches/awesome-reproducible-png.patch \ + %D%/packages/patches/aws-checksums-cmake-prefix.patch \ %D%/packages/patches/azr3.patch \ %D%/packages/patches/bash-reproducible-linux-pgrp-pipe.patch \ %D%/packages/patches/bash-completion-directories.patch \ diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index 628e8c0dad..bb3d90e1cd 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -36,6 +36,7 @@ #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) + #:use-module (gnu packages) #:use-module (gnu packages bootstrap) #:use-module (gnu packages bison) #:use-module (gnu packages check) @@ -559,3 +560,27 @@ portability.") structures, and error handling for the @acronym{AWS,Amazon Web Services} SDK.") (home-page "https://github.com/awslabs/aws-c-common") (license license:asl2.0))) + +(define-public aws-checksums + (package + (name "aws-checksums") + (version "0.1.10") + (source (origin + (method git-fetch) + (uri (git-reference + (url (string-append "https://github.com/awslabs/" name)) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1f9scl5734pgjlsixspwljrrlndzhllwlfygdcr1gx5p0za08zjb")) + (patches (search-patches "aws-checksums-cmake-prefix.patch")))) + (build-system cmake-build-system) + (inputs + `(("aws-c-common" ,aws-c-common))) + (synopsis "Amazon Web Services checksum library") + (description + "This library provides cross-Platform hardware accelerated CRC32c and CRC32 +with fallback to efficient C99 software implementations.") + (home-page "https://github.com/awslabs/aws-checksums") + (license license:asl2.0))) diff --git a/gnu/packages/patches/aws-checksums-cmake-prefix.patch b/gnu/packages/patches/aws-checksums-cmake-prefix.patch new file mode 100644 index 0000000000..f6a5c9ad9c --- /dev/null +++ b/gnu/packages/patches/aws-checksums-cmake-prefix.patch @@ -0,0 +1,13 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,6 +8,10 @@ + cmake_policy(SET CMP0069 NEW) # Enable LTO/IPO if available in the compiler, see AwsCFlags + endif() + ++if (DEFINED ENV{CMAKE_PREFIX_PATH}) ++ set(CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH}) ++endif() ++ + if (DEFINED CMAKE_PREFIX_PATH) + file(TO_CMAKE_PATH "${CMAKE_PREFIX_PATH}" CMAKE_PREFIX_PATH) + endif() -- cgit v1.2.3 From ddab5244dfa85e5ad73da80c3169fe790387743b Mon Sep 17 00:00:00 2001 From: Greg Hogan Date: Sat, 10 Oct 2020 17:47:45 +0000 Subject: gnu: Add aws-c-event-stream. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/c.scm (aws-c-event-stream): New variable. * gnu/packages/patches/aws-c-event-stream-cmake-prefix.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/c.scm | 27 ++++++++++++++++++++++ .../patches/aws-c-event-stream-cmake-prefix.patch | 13 +++++++++++ 3 files changed, 41 insertions(+) create mode 100644 gnu/packages/patches/aws-c-event-stream-cmake-prefix.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 0daac5746b..aef413abdf 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -823,6 +823,7 @@ dist_patch_DATA = \ %D%/packages/patches/avogadro-python-eigen-lib.patch \ %D%/packages/patches/avidemux-install-to-lib.patch \ %D%/packages/patches/awesome-reproducible-png.patch \ + %D%/packages/patches/aws-c-event-stream-cmake-prefix.patch \ %D%/packages/patches/aws-checksums-cmake-prefix.patch \ %D%/packages/patches/azr3.patch \ %D%/packages/patches/bash-reproducible-linux-pgrp-pipe.patch \ diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index bb3d90e1cd..2ea9c2ac51 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -584,3 +584,30 @@ portability.") with fallback to efficient C99 software implementations.") (home-page "https://github.com/awslabs/aws-checksums") (license license:asl2.0))) + +(define-public aws-c-event-stream + (package + (name "aws-c-event-stream") + (version "0.1.6") + (source (origin + (method git-fetch) + (uri (git-reference + (url (string-append "https://github.com/awslabs/" name)) + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1vl9ainc4klv0g9gk1iv4833bsllni6jxn6mwb0fnv2dnlz7zv9q")) + (patches (search-patches "aws-c-event-stream-cmake-prefix.patch")))) + (build-system cmake-build-system) + (propagated-inputs + `(("aws-c-common" ,aws-c-common))) + (inputs + `(("aws-checksums" ,aws-checksums))) + (synopsis "Amazon Web Services client-server message format library") + (description + "This library is a C99 implementation for @acronym{AWS,Amazon Web Services} +event stream encoding, a binary format for bidirectional client-server +communication.") + (home-page "https://github.com/awslabs/aws-c-event-stream") + (license license:asl2.0))) diff --git a/gnu/packages/patches/aws-c-event-stream-cmake-prefix.patch b/gnu/packages/patches/aws-c-event-stream-cmake-prefix.patch new file mode 100644 index 0000000000..79655a910b --- /dev/null +++ b/gnu/packages/patches/aws-c-event-stream-cmake-prefix.patch @@ -0,0 +1,13 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -3,6 +3,10 @@ + cmake_minimum_required (VERSION 3.1) + project (aws-c-event-stream C) + ++if (DEFINED ENV{CMAKE_PREFIX_PATH}) ++ set(CMAKE_PREFIX_PATH $ENV{CMAKE_PREFIX_PATH}) ++endif() ++ + if (DEFINED CMAKE_PREFIX_PATH) + file(TO_CMAKE_PATH "${CMAKE_PREFIX_PATH}" CMAKE_PREFIX_PATH) + endif() -- cgit v1.2.3 From fcf1702196bc7203a15998fb152d7ccadfe3b7ce Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Thu, 17 Dec 2020 23:10:15 +0100 Subject: gnu: sudo: Update to 1.9.4p1. * gnu/packages/admin.scm (sudo): Update to 1.9.4p1. [source]: Remove patch. * gnu/packages/patches/sudo-fix-build-without-sendmail.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/admin.scm | 5 +-- .../patches/sudo-fix-build-without-sendmail.patch | 45 ---------------------- 3 files changed, 2 insertions(+), 49 deletions(-) delete mode 100644 gnu/packages/patches/sudo-fix-build-without-sendmail.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index aef413abdf..98590ae8eb 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1449,7 +1449,6 @@ dist_patch_DATA = \ %D%/packages/patches/sdl-pango-matrix_declarations.patch \ %D%/packages/patches/sdl-pango-sans-serif.patch \ %D%/packages/patches/sqlite-hurd.patch \ - %D%/packages/patches/sudo-fix-build-without-sendmail.patch \ %D%/packages/patches/sunxi-tools-remove-sys-io.patch \ %D%/packages/patches/patchutils-test-perms.patch \ %D%/packages/patches/patch-hurd-path-max.patch \ diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 90b09f752d..8f377ea72c 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -1398,7 +1398,7 @@ system administrator.") (define-public sudo (package (name "sudo") - (version "1.9.4") + (version "1.9.4p1") (source (origin (method url-fetch) (uri @@ -1408,8 +1408,7 @@ system administrator.") version ".tar.gz"))) (sha256 (base32 - "1w03257akspgkkl757vmpq3p30sb2n6y61hll038mw9sqwnbv4cb")) - (patches (search-patches "sudo-fix-build-without-sendmail.patch")) + "0xyn5z4npg6nmjmgglp7db9sn82rkx52fg1sw6bs8byxzjfhjwhi")) (modules '((guix build utils))) (snippet '(begin diff --git a/gnu/packages/patches/sudo-fix-build-without-sendmail.patch b/gnu/packages/patches/sudo-fix-build-without-sendmail.patch deleted file mode 100644 index f40bfe445e..0000000000 --- a/gnu/packages/patches/sudo-fix-build-without-sendmail.patch +++ /dev/null @@ -1,45 +0,0 @@ - -# HG changeset patch -# User Todd C. Miller -# Date 1606767492 25200 -# Node ID 41db1aad85bbce444b511bcb28b9628a0a22fcd9 -# Parent 96a5cfe3c66b6ee84d7f7b6fb26d932f45a44b76 -Fix build when configured using --without-sendmail -Bug #947 - -diff -r 96a5cfe3c66b -r 41db1aad85bb lib/eventlog/eventlog.c ---- a/lib/eventlog/eventlog.c Sun Nov 29 15:11:34 2020 -0700 -+++ b/lib/eventlog/eventlog.c Mon Nov 30 13:18:12 2020 -0700 -@@ -78,7 +78,7 @@ - static FILE *eventlog_stub_open_log(int type, const char *logfile); - static void eventlog_stub_close_log(int type, FILE *fp); - --/* Eventlog config settings */ -+/* Eventlog config settings (default values). */ - static struct eventlog_config evl_conf = { - EVLOG_NONE, /* type */ - EVLOG_SUDO, /* format */ -@@ -91,7 +91,11 @@ - false, /* omit_hostname */ - _PATH_SUDO_LOGFILE, /* logpath */ - "%h %e %T", /* time_fmt */ -+#ifdef _PATH_SUDO_SENDMAIL - _PATH_SUDO_SENDMAIL, /* mailerpath */ -+#else -+ NULL, /* mailerpath (disabled) */ -+#endif - "-t", /* mailerflags */ - NULL, /* mailfrom */ - MAILTO, /* mailto */ -@@ -1436,8 +1440,10 @@ - evl_conf.logpath = _PATH_SUDO_LOGFILE; - if (evl_conf.time_fmt == NULL) - evl_conf.time_fmt = "%h %e %T"; -+#ifdef _PATH_SUDO_SENDMAIL - if (evl_conf.mailerpath == NULL) - evl_conf.mailerpath = _PATH_SUDO_SENDMAIL; -+#endif - if (evl_conf.mailerflags == NULL) - evl_conf.mailerflags = "-t"; - if (evl_conf.mailto == NULL) - -- cgit v1.2.3 From f6f6e1efeecd553c3af4c31695b17fb69849967b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 19 Dec 2020 21:59:03 +0100 Subject: gnu: serf: Build with Python 3. * gnu/packages/patches/serf-python3.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/web.scm (serf)[source](patches): New field. [arguments]: Remove #:scons. --- gnu/local.mk | 1 + gnu/packages/patches/serf-python3.patch | 29 +++++++++++++++++++++++++++++ gnu/packages/web.scm | 4 ++-- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/serf-python3.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 98590ae8eb..11cb580b92 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1609,6 +1609,7 @@ dist_patch_DATA = \ %D%/packages/patches/sdl-libx11-1.6.patch \ %D%/packages/patches/seed-webkit.patch \ %D%/packages/patches/seq24-rename-mutex.patch \ + %D%/packages/patches/serf-python3.patch \ %D%/packages/patches/sharutils-CVE-2018-1000097.patch \ %D%/packages/patches/shadow-hurd-pctrl.patch \ %D%/packages/patches/shishi-fix-libgcrypt-detection.patch \ diff --git a/gnu/packages/patches/serf-python3.patch b/gnu/packages/patches/serf-python3.patch new file mode 100644 index 0000000000..636f51ed1e --- /dev/null +++ b/gnu/packages/patches/serf-python3.patch @@ -0,0 +1,29 @@ +Fix build with Python 3 scons. + +Patch taken from Arch Linux: +https://github.com/archlinux/svntogit-packages/blob/packages/serf/trunk/scons-python3.patch + +--- serf-1.3.9/SConstruct.orig 2019-07-26 17:49:30.910189251 +0000 ++++ serf-1.3.9/SConstruct 2019-07-26 17:49:54.073821735 +0000 +@@ -163,9 +163,9 @@ + suffix='.def', src_suffix='.h') + }) + +-match = re.search('SERF_MAJOR_VERSION ([0-9]+).*' +- 'SERF_MINOR_VERSION ([0-9]+).*' +- 'SERF_PATCH_VERSION ([0-9]+)', ++match = re.search(b'SERF_MAJOR_VERSION ([0-9]+).*' ++ b'SERF_MINOR_VERSION ([0-9]+).*' ++ b'SERF_PATCH_VERSION ([0-9]+)', + env.File('serf.h').get_contents(), + re.DOTALL) + MAJOR, MINOR, PATCH = [int(x) for x in match.groups()] +@@ -183,7 +183,7 @@ + + unknown = opts.UnknownVariables() + if unknown: +- print 'Warning: Used unknown variables:', ', '.join(unknown.keys()) ++ print ('Warning: Used unknown variables:', ', '.join(unknown.keys())) + + apr = str(env['APR']) + apu = str(env['APU']) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 39820f7572..584003a1cf 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -1792,6 +1792,7 @@ from streaming URLs. It is a command-line wrapper for the libquvi library.") (method url-fetch) (uri (string-append "mirror://apache/serf/serf-" version ".tar.bz2")) + (patches (search-patches "serf-python3.patch")) (sha256 (base32 "1k47gbgpp52049andr28y28nbwh9m36bbb0g8p0aka3pqlhjv72l")))) (build-system scons-build-system) @@ -1804,8 +1805,7 @@ from streaming URLs. It is a command-line wrapper for the libquvi library.") ;;("gss" ,gss) ("zlib" ,zlib))) (arguments - `(#:scons ,scons-python2 - #:scons-flags (list (string-append "APR=" (assoc-ref %build-inputs "apr")) + `(#:scons-flags (list (string-append "APR=" (assoc-ref %build-inputs "apr")) (string-append "APU=" (assoc-ref %build-inputs "apr-util")) (string-append "OPENSSL=" (assoc-ref %build-inputs "openssl")) ;; (string-append "GSSAPI=" (assoc-ref %build-inputs "gss")) -- cgit v1.2.3 From b6d96be80c6bc8b11eccbd68ff0824ccaf03f4e5 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Sun, 20 Dec 2020 14:57:37 -0600 Subject: gnu: bear: Update to 3.0.4. * gnu/local.mk (bear-disable-preinstall-tests.patch): Add patch. * gnu/packages/build-tools.scm (bear): Reference patch, and update. --- gnu/local.mk | 1 + gnu/packages/build-tools.scm | 44 ++++++++++++++++++++-- .../patches/bear-disable-preinstall-tests.patch | 40 ++++++++++++++++++++ 3 files changed, 81 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/bear-disable-preinstall-tests.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 11cb580b92..d1c8b63fff 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -832,6 +832,7 @@ dist_patch_DATA = \ %D%/packages/patches/bastet-change-source-of-unordered_set.patch \ %D%/packages/patches/bazaar-CVE-2017-14176.patch \ %D%/packages/patches/bc-fix-cross-compilation.patch \ + %D%/packages/patches/bear-disable-preinstall-tests.patch \ %D%/packages/patches/bsd-games-2.17-64bit.patch \ %D%/packages/patches/bsd-games-add-configure-config.patch \ %D%/packages/patches/bsd-games-add-wrapper.patch \ diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index 3f140efdb3..63417e5b81 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2018 Tomáš Čech ;;; Copyright © 2018, 2020 Marius Bakke ;;; Copyright © 2018 Alex Vong -;;; Copyright © 2019 Brett Gilio +;;; Copyright © 2019, 2020 Brett Gilio ;;; Copyright © 2019 Jonathan Brielmaier ;;; Copyright © 2020 Leo Prikler ;;; Copyright © 2020 Yuval Kogman @@ -36,18 +36,27 @@ #:use-module (guix git-download) #:use-module (guix build-system cmake) #:use-module (gnu packages) + #:use-module (gnu packages adns) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages cpp) + #:use-module (gnu packages gcc) #:use-module (gnu packages linux) + #:use-module (gnu packages logging) #:use-module (gnu packages lua) #:use-module (gnu packages package-management) #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages pretty-print) + #:use-module (gnu packages protobuf) #:use-module (gnu packages python) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) + #:use-module (gnu packages regex) + #:use-module (gnu packages rpc) #:use-module (gnu packages sqlite) + #:use-module (gnu packages tls) #:use-module (gnu packages ninja) #:use-module (guix build-system gnu) #:use-module (guix build-system python)) @@ -90,19 +99,46 @@ makes a few sacrifices to acquire fast full and incremental build times.") (define-public bear (package (name "bear") - (version "2.4.4") + (version "3.0.4") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/rizsotto/Bear") (commit version))) (file-name (git-file-name name version)) + (patches (search-patches + "bear-disable-preinstall-tests.patch")) (sha256 (base32 - "184dqjcpxiwcfziyi67zzran2c4fal1r3j8nhjdjadcmfxf4389d")))) + "15r22sbk5bibrhf54lf0shiqw1gnsik24fr5as96w3hnj6iahgwn")))) (build-system cmake-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-before 'check 'set-build-environment + (lambda _ + (setenv "CC" "gcc") + #t)) + ;; TODO: Test Configuration is Incomplete + (replace 'check + (lambda _ + (invoke "ctest")))))) (inputs - `(("python" ,python-wrapper))) + `(("c-ares" ,c-ares) + ("fmt" ,fmt) + ("grpc" ,grpc) + ("json-modern-cxx" ,json-modern-cxx) + ("protobuf" ,protobuf) + ("python" ,python-wrapper) + ("re2" ,re2) + ("spdlog" ,spdlog))) + (native-inputs + `(("abseil-cpp" ,abseil-cpp) + ("gcc-9" ,gcc-9) ; for , #44896 + ("googletest" ,googletest) + ("openssl" ,openssl) + ("pkg-config" ,pkg-config) + ("python-lit" ,python-lit) + ("zlib" ,zlib))) (home-page "https://github.com/rizsotto/Bear") (synopsis "Tool for generating a compilation database") (description "A JSON compilation database is used in the Clang project to diff --git a/gnu/packages/patches/bear-disable-preinstall-tests.patch b/gnu/packages/patches/bear-disable-preinstall-tests.patch new file mode 100644 index 0000000000..c65095405f --- /dev/null +++ b/gnu/packages/patches/bear-disable-preinstall-tests.patch @@ -0,0 +1,40 @@ +From d7d0cdd48017679e8529f8475d1b9902944cf243 Mon Sep 17 00:00:00 2001 +From: Brett Gilio +Date: Sun, 20 Dec 2020 14:43:30 -0600 +Subject: [PATCH] Disallow Pre-install Checks + +--- + CMakeLists.txt | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 45c6d27..73b4ace 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -58,10 +58,6 @@ ExternalProject_Add(BearSource + -DROOT_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DENABLE_UNIT_TESTS:BOOL=${ENABLE_UNIT_TESTS} +- TEST_BEFORE_INSTALL +- 1 +- TEST_COMMAND +- ctest # or `ctest -T memcheck` + ) + + # Run the functional tests +@@ -73,12 +69,8 @@ if (ENABLE_FUNC_TESTS) + BearSource + CMAKE_CACHE_ARGS + -DSTAGED_INSTALL_PREFIX:PATH=${STAGED_INSTALL_PREFIX} +- TEST_BEFORE_INSTALL +- 1 + INSTALL_COMMAND + "" +- TEST_COMMAND +- ctest --verbose + ) + endif () + +-- +2.29.2 + -- cgit v1.2.3 From 7eaa2f24ea77cddbb4bbc2d6a6905673a36f8f99 Mon Sep 17 00:00:00 2001 From: John Doe Date: Tue, 15 Dec 2020 10:24:11 +0100 Subject: gnu: libffi: Add unreleased patch to fix float128 on powerpc64le. Fixes . * gnu/packages/patches/libffi-float128-powerpc64le.patch: Import patch file from . * gnu/packages/libffi.scm (libffi)[arguments]: Apply patch conditionally for powerpc64le-* systems in a phase. [inputs]: Add patch as input conditionally for powerpc64le-* systems. * gnu/local.mk (dist_patch_DATA): Add patch file to build system. Signed-off-by: Chris Marusich --- gnu/local.mk | 1 + gnu/packages/libffi.scm | 26 ++++++++-- .../patches/libffi-float128-powerpc64le.patch | 58 ++++++++++++++++++++++ 3 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 gnu/packages/patches/libffi-float128-powerpc64le.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index d1c8b63fff..541fb596f3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1212,6 +1212,7 @@ dist_patch_DATA = \ %D%/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch \ %D%/packages/patches/kdbusaddons-kinit-file-name.patch \ %D%/packages/patches/libffi-3.3-powerpc-fixes.patch \ + %D%/packages/patches/libffi-float128-powerpc64le.patch \ %D%/packages/patches/libvirt-create-machine-cgroup.patch \ %D%/packages/patches/libziparchive-add-includes.patch \ %D%/packages/patches/localed-xorg-keyboard.patch \ diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm index d324892330..66239e0363 100644 --- a/gnu/packages/libffi.scm +++ b/gnu/packages/libffi.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2017, 2019, 2020 Marius Bakke ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2019 Maxim Cournoyer +;;; Copyright © 2020 John Doe ;;; ;;; This file is part of GNU Guix. ;;; @@ -57,7 +58,7 @@ ;; compiler. See "ax_cc_maxopt.m4" and "ax_gcc_archflag.m4". #:configure-flags '("--enable-portable-binary" "--without-gcc-arch") - ;; TODO: Inline patch on next rebuild cycle. + ;; TODO: Inline patches on next rebuild cycle. ,@(if (string-prefix? "powerpc-" (or (%current-target-system) (%current-system))) '(#:phases (modify-phases %standard-phases @@ -67,13 +68,28 @@ "powerpc-patch"))) (invoke "patch" "--batch" "-p1" "-i" patch)))))) + '()) + ,@(if (string-prefix? "powerpc64le-" (or (%current-target-system) + (%current-system))) + '(#:phases (modify-phases %standard-phases + (add-after 'unpack 'apply-patch2 + (lambda* (#:key inputs #:allow-other-keys) + (let ((patch (assoc-ref inputs + "powerpc64le-patch"))) + (invoke "patch" "--batch" "-p1" + "-i" patch)))))) '()))) (inputs - (if (string-prefix? "powerpc-" (or (%current-target-system) + (cond + ((string-prefix? "powerpc-" (or (%current-target-system) (%current-system))) - `(("powerpc-patch" ,@(search-patches - "libffi-3.3-powerpc-fixes.patch"))) - '())) + `(("powerpc-patch" ,@(search-patches + "libffi-3.3-powerpc-fixes.patch")))) + ((string-prefix? "powerpc64le-" (or (%current-target-system) + (%current-system))) + `(("powerpc64le-patch" ,@(search-patches + "libffi-float128-powerpc64le.patch")))) + (else '()))) (outputs '("out" "debug")) (synopsis "Foreign function call interface library") (description diff --git a/gnu/packages/patches/libffi-float128-powerpc64le.patch b/gnu/packages/patches/libffi-float128-powerpc64le.patch new file mode 100644 index 0000000000..4fd32b0102 --- /dev/null +++ b/gnu/packages/patches/libffi-float128-powerpc64le.patch @@ -0,0 +1,58 @@ +From de93adfb6f48100946bba2c3abad2a77a0cfde0b Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sun, 24 Nov 2019 09:52:01 +0100 +Subject: [PATCH] ffi_powerpc.h: fix build failure with powerpc7 + +This is a patch pulled down from the following: +https://github.com/buildroot/buildroot/blob/78926f610b1411b03464152472fd430012deb9ac/package/libffi/0004-ffi_powerpc.h-fix-build-failure-with-powerpc7.patch + +This issue is being hit on OpenBMC code when pulling the latest +libffi tag and building on a P8 ppc64le machine. I verified this +patch fixes the issue we are seeing. + +Below is the original commit message: + +Sicne commit 73dd43afc8a447ba98ea02e9aad4c6898dc77fb0, build on powerpc7 +fails on: + +In file included from ../src/powerpc/ffi.c:33:0: +../src/powerpc/ffi_powerpc.h:61:9: error: '_Float128' is not supported on this target + typedef _Float128 float128; + ^~~~~~~~~ + +Fix this build failure by checking for __HAVE_FLOAT128 before using +_Float128, as _Float128 is enabled only on specific conditions, see +output/host/powerpc64-buildroot-linux-gnu/sysroot/usr/include/bits/floatn.h: + + /* Defined to 1 if the current compiler invocation provides a + floating-point type with the IEEE 754 binary128 format, and this glibc + includes corresponding *f128 interfaces for it. */ + #if defined _ARCH_PWR8 && defined __LITTLE_ENDIAN__ && (_CALL_ELF == 2) \ + && defined __FLOAT128__ && !defined __NO_LONG_DOUBLE_MATH + # define __HAVE_FLOAT128 1 + #else + # define __HAVE_FLOAT128 0 + #endif + +Fixes: + - http://autobuild.buildroot.org/results/5c9dd8fb3b6a128882b6250f197c80232d8a3b53 + +Signed-off-by: Fabrice Fontaine +Signed-off-by: Andrew Geissler +--- + src/powerpc/ffi_powerpc.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/powerpc/ffi_powerpc.h b/src/powerpc/ffi_powerpc.h +index 8e2f2f0e..960a5c42 100644 +--- a/src/powerpc/ffi_powerpc.h ++++ b/src/powerpc/ffi_powerpc.h +@@ -57,7 +57,7 @@ typedef union + double d; + } ffi_dblfl; + +-#if defined(__FLOAT128_TYPE__) ++#if defined(__FLOAT128_TYPE__) && defined(__HAVE_FLOAT128) + typedef _Float128 float128; + #elif defined(__FLOAT128__) + typedef __float128 float128; -- cgit v1.2.3 From c626e281b4c7b522da6962bc045fe6372b18ac10 Mon Sep 17 00:00:00 2001 From: Simon South Date: Mon, 14 Dec 2020 13:06:44 -0500 Subject: gnu: sdcc: Move to embedded.scm. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/embedded.scm: Add sdcc from sdcc.scm. * gnu/packages/electronics.scm: Update #:use-module directive. * gnu/packages/sdcc.scm: Delete file. * gnu/local.mk: Remove it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 - gnu/packages/electronics.scm | 4 +-- gnu/packages/embedded.scm | 51 ++++++++++++++++++++++++++++ gnu/packages/sdcc.scm | 80 -------------------------------------------- 4 files changed, 53 insertions(+), 83 deletions(-) delete mode 100644 gnu/packages/sdcc.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 541fb596f3..e649594017 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -495,7 +495,6 @@ GNU_SYSTEM_MODULES = \ %D%/packages/screen.scm \ %D%/packages/scribus.scm \ %D%/packages/scsi.scm \ - %D%/packages/sdcc.scm \ %D%/packages/sdl.scm \ %D%/packages/search.scm \ %D%/packages/security-token.scm \ diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm index 3f9ca33ede..01796bb91c 100644 --- a/gnu/packages/electronics.scm +++ b/gnu/packages/electronics.scm @@ -32,6 +32,7 @@ #:use-module (gnu packages check) #:use-module (gnu packages compression) #:use-module (gnu packages documentation) + #:use-module (gnu packages embedded) #:use-module (gnu packages gawk) #:use-module (gnu packages glib) #:use-module (gnu packages graphviz) @@ -39,8 +40,7 @@ #:use-module (gnu packages libusb) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) - #:use-module (gnu packages qt) - #:use-module (gnu packages sdcc)) + #:use-module (gnu packages qt)) (define-public libserialport (package diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index dd48fe317e..2d822cecf3 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm @@ -40,6 +40,7 @@ #:use-module (gnu packages autotools) #:use-module ((gnu packages base) #:prefix base:) #:use-module (gnu packages bison) + #:use-module (gnu packages boost) #:use-module (gnu packages cross-base) #:use-module (gnu packages dejagnu) #:use-module (gnu packages flex) @@ -1461,3 +1462,53 @@ microcontrollers in the Atmel AVR; Intel MCS-51 (8051); Motorola 68HC08 and 6809; P1516; Padauk PDK13, PDK14 and PDK15; STMicroelectronics ST7 and STM8; and Zilog Z80 families, plus many of their variants.") (license license:gpl2+))) + +(define-public sdcc + (package + (name "sdcc") + (version "3.7.0") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/sdcc/sdcc" + "/" version "/sdcc-src-" version ".tar.bz2")) + (sha256 + (base32 + "13llvx0j3v5qa7qd4fh7nix4j3alpd3ccprxvx163c4q8q4lfkc5")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Remove non-free source files + (delete-file-recursively "device/non-free") + ;; Remove bundled μCsim source + (delete-file-recursively "sim") + #t)) + (patches (search-patches "sdcc-disable-non-free-code.patch")))) + (build-system gnu-build-system) + (native-inputs + `(("bison" ,bison) + ("boost" ,boost) + ("flex" ,flex) + ("python-2" ,python-2) + ("texinfo" ,texinfo))) + (arguments + `(;; gputils is required for PIC ports + #:configure-flags + '("--disable-pic14-port" "--disable-pic16-port" "--disable-ucsim") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-makefile + (lambda _ + (substitute* (find-files "." "(\\.mk$|\\.in$)") + (("/bin/sh") (which "sh"))) + #t))))) + (home-page "http://sdcc.sourceforge.net") + (synopsis "Small devices C compiler") + (description "SDCC is a retargetable, optimizing Standard C compiler suite +that targets the Intel MCS51-based microprocessors (8031, 8032, 8051, 8052, ...), +Maxim (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola) +HC08-based (hc08, s08), Zilog Z80-based MCUs (z80, z180, gbz80, Rabbit +2000/3000, Rabbit 3000A, TLCS-90) and STMicroelectronics STM8. +Work is in progress on supporting the Microchip PIC16 and PIC18 targets. +It can be retargeted for other microprocessors.") + (license license:gpl2+))) diff --git a/gnu/packages/sdcc.scm b/gnu/packages/sdcc.scm deleted file mode 100644 index 0ce71ed955..0000000000 --- a/gnu/packages/sdcc.scm +++ /dev/null @@ -1,80 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016 David Craven -;;; Copyright © 2018 Tobias Geerinckx-Rice -;;; -;;; This file is part of GNU Guix. -;;; -;;; GNU Guix is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Guix is distributed in the hope that it will be useful, but -;;; WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Guix. If not, see . - -(define-module (gnu packages sdcc) - #:use-module (gnu packages) - #:use-module (gnu packages bison) - #:use-module (gnu packages boost) - #:use-module (gnu packages flex) - #:use-module (gnu packages python) - #:use-module (gnu packages texinfo) - #:use-module (guix build-system gnu) - #:use-module (guix download) - #:use-module (guix packages) - #:use-module ((guix licenses) #:prefix license:)) - -(define-public sdcc - (package - (name "sdcc") - (version "3.7.0") - (source (origin - (method url-fetch) - (uri (string-append - "mirror://sourceforge/sdcc/sdcc" - "/" version "/sdcc-src-" version ".tar.bz2")) - (sha256 - (base32 - "13llvx0j3v5qa7qd4fh7nix4j3alpd3ccprxvx163c4q8q4lfkc5")) - (modules '((guix build utils))) - (snippet - '(begin - ;; Remove non-free source files - (delete-file-recursively "device/non-free") - ;; Remove bundled μCsim source - (delete-file-recursively "sim") - #t)) - (patches (search-patches "sdcc-disable-non-free-code.patch")))) - (build-system gnu-build-system) - (native-inputs - `(("bison" ,bison) - ("boost" ,boost) - ("flex" ,flex) - ("python-2" ,python-2) - ("texinfo" ,texinfo))) - (arguments - `(;; gputils is required for PIC ports - #:configure-flags - '("--disable-pic14-port" "--disable-pic16-port" "--disable-ucsim") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-makefile - (lambda _ - (substitute* (find-files "." "(\\.mk$|\\.in$)") - (("/bin/sh") (which "sh"))) - #t))))) - (home-page "http://sdcc.sourceforge.net") - (synopsis "Small devices C compiler") - (description "SDCC is a retargetable, optimizing Standard C compiler suite -that targets the Intel MCS51-based microprocessors (8031, 8032, 8051, 8052, ...), -Maxim (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola) -HC08-based (hc08, s08), Zilog Z80-based MCUs (z80, z180, gbz80, Rabbit -2000/3000, Rabbit 3000A, TLCS-90) and STMicroelectronics STM8. -Work is in progress on supporting the Microchip PIC16 and PIC18 targets. -It can be retargeted for other microprocessors.") - (license license:gpl2+))) -- cgit v1.2.3 From 85ba5e9335207beef9a650e96d5d64787beb9256 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 21 Dec 2020 23:38:22 +0100 Subject: gnu: sbc: Fix build on non-x86 architectures. * gnu/packages/patches/sbc-fix-build-non-x86.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/linux.scm (sbc)[source](patches): New field. --- gnu/local.mk | 1 + gnu/packages/linux.scm | 1 + gnu/packages/patches/sbc-fix-build-non-x86.patch | 17 +++++++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 gnu/packages/patches/sbc-fix-build-non-x86.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 91039ed9f8..36b0895ce2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1600,6 +1600,7 @@ dist_patch_DATA = \ %D%/packages/patches/rust-reproducible-builds.patch \ %D%/packages/patches/rust-openssl-sys-no-vendor.patch \ %D%/packages/patches/rxvt-unicode-escape-sequences.patch \ + %D%/packages/patches/sbc-fix-build-non-x86.patch \ %D%/packages/patches/sbcl-clml-fix-types.patch \ %D%/packages/patches/scalapack-blacs-mpi-deprecations.patch \ %D%/packages/patches/scheme48-tests.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 6a7ce7fa68..09bc56df3e 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -4654,6 +4654,7 @@ event traces from the kernel (via the relaying through the debug file system).") (method url-fetch) (uri (string-append "mirror://kernel.org/linux/bluetooth/sbc-" version ".tar.xz")) + (patches (search-patches "sbc-fix-build-non-x86.patch")) (sha256 (base32 "1liig5856crb331dps18mp0s13zbkv7yh007zqhq97m94fcddfhc")))) diff --git a/gnu/packages/patches/sbc-fix-build-non-x86.patch b/gnu/packages/patches/sbc-fix-build-non-x86.patch new file mode 100644 index 0000000000..56ea916d42 --- /dev/null +++ b/gnu/packages/patches/sbc-fix-build-non-x86.patch @@ -0,0 +1,17 @@ +Don't refer to x86-specific function on other architectures to avoid linker error. + +Submitted upstream at + +diff --git a/sbc/sbc_primitives.c b/sbc/sbc_primitives.c +--- a/sbc/sbc_primitives.c ++++ b/sbc/sbc_primitives.c +@@ -593,7 +593,9 @@ static int sbc_calc_scalefactors_j( + + static void sbc_init_primitives_x86(struct sbc_encoder_state *state) + { ++#if defined(__x86_64__) || defined(__i386__) + __builtin_cpu_init(); ++#endif + + #ifdef SBC_BUILD_WITH_MMX_SUPPORT + if (__builtin_cpu_supports("mmx")) -- cgit v1.2.3 From e8d4c6deaac8f2d81f63b092b6496f0c235c9389 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 23 Dec 2020 17:29:03 -0500 Subject: gnu: VLC: Fix build with Qt 5.15. * gnu/packages/patches/vlc-qt-5.15.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/video.scm (vlc)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/patches/vlc-qt-5.15.patch | 56 ++++++++++++++++++++++++++++++++++ gnu/packages/video.scm | 1 + 3 files changed, 58 insertions(+) create mode 100644 gnu/packages/patches/vlc-qt-5.15.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 4f8bd8de69..89e97e0ffe 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1699,6 +1699,7 @@ dist_patch_DATA = \ %D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \ %D%/packages/patches/vboot-utils-skip-test-workbuf.patch \ %D%/packages/patches/vcflib-use-shared-libraries.patch \ + %D%/packages/patches/vlc-qt-5.15.patch \ %D%/packages/patches/vigra-python-compat.patch \ %D%/packages/patches/vinagre-newer-freerdp.patch \ %D%/packages/patches/vinagre-newer-rdp-parameters.patch \ diff --git a/gnu/packages/patches/vlc-qt-5.15.patch b/gnu/packages/patches/vlc-qt-5.15.patch new file mode 100644 index 0000000000..e986a99861 --- /dev/null +++ b/gnu/packages/patches/vlc-qt-5.15.patch @@ -0,0 +1,56 @@ +Fix build of VLC with Qt 5.15. Otherwise it fails like this: + +------ +In file included from gui/qt/util/timetooltip.moc.cpp:10:0: +gui/qt/util/timetooltip.hpp:49:18: error: field ‘mPainterPath’ has incomplete type ‘QPainterPath’ + QPainterPath mPainterPath; + ^~~~~~~~~~~~ +In file included from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtGui/qbrush.h:49:0, + from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtGui/qpalette.h:46, + from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtWidgets/qwidget.h:48, + from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtWidgets/QWidget:1, + from gui/qt/util/timetooltip.hpp:27, + from gui/qt/util/timetooltip.moc.cpp:10: +/gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtGui/qmatrix.h:54:7: note: forward declaration of ‘class QPainterPath’ + class QPainterPath; + ^~~~~~~~~~~~ +make[4]: *** [Makefile:25852: gui/qt/util/libqt_plugin_la-timetooltip.moc.lo] Error 1 +------ + +diff --git a/modules/gui/qt/components/playlist/views.cpp b/modules/gui/qt/components/playlist/views.cpp +index 24db9d9..73c1779 100644 +--- a/modules/gui/qt/components/playlist/views.cpp ++++ b/modules/gui/qt/components/playlist/views.cpp +@@ -27,6 +27,7 @@ + #include "input_manager.hpp" /* THEMIM */ + + #include ++#include + #include + #include + #include +diff --git a/modules/gui/qt/dialogs/plugins.cpp b/modules/gui/qt/dialogs/plugins.cpp +index d233382..69728eb 100644 +--- a/modules/gui/qt/dialogs/plugins.cpp ++++ b/modules/gui/qt/dialogs/plugins.cpp +@@ -53,6 +53,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/modules/gui/qt/util/timetooltip.hpp b/modules/gui/qt/util/timetooltip.hpp +index 6a1329e..9f50b18 100644 +--- a/modules/gui/qt/util/timetooltip.hpp ++++ b/modules/gui/qt/util/timetooltip.hpp +@@ -25,6 +25,7 @@ + #include "qt.hpp" + + #include ++#include + + class TimeTooltip : public QWidget + { + diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 0740abe040..2813bf0570 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -1772,6 +1772,7 @@ videoformats depend on the configuration flags of ffmpeg.") "https://download.videolan.org/pub/videolan/vlc/" (car (string-split version #\-)) "/vlc-" version ".tar.xz")) + (patches (search-patches "vlc-qt-5.15.patch")) (sha256 (base32 "1f46h0hv7fk35zg4iczlp7ib7h2jmh8m4r5klw3g2558ib9134qq")))) -- cgit v1.2.3 From 4688c9f52d0f998add29049606db5e7b0655c8eb Mon Sep 17 00:00:00 2001 From: Giacomo Leidi Date: Thu, 5 Nov 2020 02:04:20 +0100 Subject: gnu: Add hunspell-dict-it-it. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/hunspell.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/hunspell.scm | 81 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 gnu/packages/hunspell.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index e649594017..f0a07bf6ed 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -277,6 +277,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/heads.scm \ %D%/packages/hexedit.scm \ %D%/packages/hugs.scm \ + %D%/packages/hunspell.scm \ %D%/packages/hurd.scm \ %D%/packages/hyperledger.scm \ %D%/packages/i2p.scm \ diff --git a/gnu/packages/hunspell.scm b/gnu/packages/hunspell.scm new file mode 100644 index 0000000000..ab808901f6 --- /dev/null +++ b/gnu/packages/hunspell.scm @@ -0,0 +1,81 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Giacomo Leidi +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages hunspell) + #:use-module (guix build-system trivial) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (ice-9 match) + #:use-module (gnu packages libreoffice)) + +(define* (hunspell-dictionary dict-name full-name #:key synopsis home-page license) + (package + (name (string-append + "hunspell-dict-" + ;; Downcase and replace underscore in package names + ;; to follow Guix naming conventions. + (string-map (match-lambda + (#\_ #\-) + (chr chr)) + (string-downcase dict-name)))) + (version (package-version libreoffice)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url (string-append "https://anongit.freedesktop.org/git/" + "libreoffice/dictionaries.git/")) + (commit + (string-append "libreoffice-" version)))) + (file-name (git-file-name "libreoffice-dictionaries" version)) + (sha256 + (base32 "0vvxnjpm1322ahf9q8bqs1yhkn7krglw8c6yazcf7a3jljykd9k9")))) + (build-system trivial-build-system) + (native-inputs + `(("source" ,source))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let* ((dictionary + (string-append (assoc-ref %build-inputs "source") + "/" ,dict-name + "/" ,dict-name)) + (hunspell (string-append %output "/share/hunspell/")) + (myspell (string-append %output "/share/myspell"))) + (for-each + (lambda (ext) + (install-file (string-append dictionary ext) + hunspell)) + '(".aff" ".dic")) + (symlink hunspell myspell) + #t)))) + (synopsis synopsis) + (description "This package provides a dictionary for the Hunspell +spell-checking library.") + (license license) + (home-page home-page))) + +(define-public hunspell-dict-it-it + (let ((synopsis identity)) + (hunspell-dictionary "it_IT" "Italian" + #:synopsis (synopsis "Hunspell dictionary for Italian") + #:home-page "https://www.libreitalia.org/" + #:license license:gpl3))) -- cgit v1.2.3 From 3e6c114241725a22e4d190c3f9ee15c3c701461a Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Wed, 9 Dec 2020 16:54:26 -0500 Subject: gnu: audacity: Update to 2.4.2. * gnu/packages/audio.scm (audacity): Update to 2.4.2. [source]: Add patch. Don't delete portaudio-v19, since only the bundled copy can be built. [build-system]: Switch to cmake-build-system. [inputs]: Remove portaudio. [arguments]: Adjust configure flags for CMake. Remove 'fix-sbsms-check phase. Add 'comment-out-revision-ident phase. * gnu/local.mk (dist_patch_DATA): Register patch. * gnu/packages/patches/audacity-add-include.patch: New file. --- gnu/local.mk | 1 + gnu/packages/audio.scm | 75 +++++++------------------ gnu/packages/patches/audacity-add-include.patch | 15 +++++ 3 files changed, 36 insertions(+), 55 deletions(-) create mode 100644 gnu/packages/patches/audacity-add-include.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f0a07bf6ed..204850c4e6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -803,6 +803,7 @@ dist_patch_DATA = \ %D%/packages/patches/ath9k-htc-firmware-gcc.patch \ %D%/packages/patches/ath9k-htc-firmware-objcopy.patch \ %D%/packages/patches/audacity-build-with-system-portaudio.patch \ + %D%/packages/patches/audacity-add-include.patch \ %D%/packages/patches/audiofile-fix-datatypes-in-tests.patch \ %D%/packages/patches/audiofile-fix-sign-conversion.patch \ %D%/packages/patches/audiofile-CVE-2015-7747.patch \ diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 1d2943fb41..4ac70d7b24 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -676,7 +676,7 @@ engineers, musicians, soundtrack editors and composers.") (define-public audacity (package (name "audacity") - (version "2.4.1") + (version "2.4.2") (source (origin (method git-fetch) @@ -686,8 +686,9 @@ engineers, musicians, soundtrack editors and composers.") (file-name (git-file-name name version)) (sha256 (base32 - "1xk0piv72d2xd3p7igr916fhcbrm76fhjr418k1rlqdzzg1hfljn")) - (patches (search-patches "audacity-build-with-system-portaudio.patch")) + "0lklcvqkxrr2gkb9gh3422iadzl2rv9v0a8s76rwq43lj2im7546")) + (patches (search-patches "audacity-build-with-system-portaudio.patch" + "audacity-add-include.patch")) (modules '((guix build utils))) (snippet ;; Remove bundled libraries. @@ -697,7 +698,7 @@ engineers, musicians, soundtrack editors and composers.") (delete-file-recursively (string-append "lib-src/" dir))) '("expat" "ffmpeg" "lame" "libflac" "libid3tag" "libmad" "libogg" "libsndfile" "libsoxr" "libvamp" "libvorbis" "lv2" - "portaudio-v19" "portmidi" "soundtouch" "twolame" + "portmidi" "soundtouch" "twolame" ;; FIXME: these libraries have not been packaged yet: ;; "libnyquist" ;; "libscorealign" @@ -711,7 +712,7 @@ engineers, musicians, soundtrack editors and composers.") ;; "sbsms" )) #t)))) - (build-system glib-or-gtk-build-system) + (build-system cmake-build-system) (inputs `(("wxwidgets" ,wxwidgets) ("gtk+" ,gtk+) @@ -733,7 +734,6 @@ engineers, musicians, soundtrack editors and composers.") ("lv2" ,lv2) ("lilv" ,lilv) ;for lv2 ("suil" ,suil) ;for lv2 - ("portaudio" ,portaudio) ("portmidi" ,portmidi))) (native-inputs `(("autoconf" ,autoconf) @@ -745,52 +745,18 @@ engineers, musicians, soundtrack editors and composers.") ("which" ,which))) (arguments `(#:configure-flags - (let ((libid3tag (assoc-ref %build-inputs "libid3tag")) - (libmad (assoc-ref %build-inputs "libmad")) - (portmidi (assoc-ref %build-inputs "portmidi"))) - (list - ;; Loading FFmpeg dynamically is problematic. - "--disable-dynamic-loading" - ;; SSE instructions are available on Intel systems only. - ,@(if (any (cute string-prefix? <> (or (%current-target-system) - (%current-system))) - '("x86_64" "i686")) - '() - '("--enable-sse=no")) - ;; portmidi, libid3tag and libmad provide no .pc files, so - ;; pkg-config fails to find them. Force their inclusion. - (string-append "ID3TAG_CFLAGS=-I" libid3tag "/include") - (string-append "ID3TAG_LIBS=-L" libid3tag "/lib -lid3tag -lz") - (string-append "LIBMAD_CFLAGS=-I" libmad "/include") - (string-append "LIBMAD_LIBS=-L" libmad "/lib -lmad") - (string-append "PORTMIDI_CFLAGS=-I" portmidi "/include") - (string-append "PORTMIDI_LIBS=-L" portmidi "/lib -lportmidi") - "EXPAT_USE_SYSTEM=yes" - "FFMPEG_USE_SYSTEM=yes" - "LAME_USE_SYSTEM=yes" - "LIBFLAC_USE_SYSTEM=yes" - "LIBID3TAG_USE_SYSTEM=yes" - "LIBMAD_USE_SYSTEM=yes" - "USE_LOCAL_LIBNYQUIST=" ;not packaged yet - ;;"LIBSBSMS_USE_SYSTEM=yes" ;bundled version is patched - "LIBSNDFILE_USE_SYSTEM=yes" - "LIBSOUNDTOUCH_USE_SYSTEM=yes" - "LIBSOXR_USE_SYSTEM=yes" - "LIBTWOLAME_USE_SYSTEM=yes" - "LIBVAMP_USE_SYSTEM=yes" - "LIBVORBIS_USE_SYSTEM=yes" - "LV2_USE_SYSTEM=yes" - "PORTAUDIO_USE_SYSTEM=yes")) + (list + ;; Loading FFmpeg dynamically is problematic. + "-Daudacity_use_ffmpeg=linked" + "-Daudacity_use_lame=system" + "-Daudacity_use_portsmf=system") #:phases (modify-phases %standard-phases - (add-after 'unpack 'fix-sbsms-check + (add-after 'unpack 'comment-out-revision-ident (lambda _ - ;; This check is wrong: there is no 2.2.0 release; not even the - ;; bundled sources match this release string. - (substitute* '("m4/audacity_checklib_libsbsms.m4" - "configure") - (("sbsms >= 2.2.0") "sbsms >= 2.0.0")) - #t)) + (substitute* "src/AboutDialog.cpp" + (("(.*RevisionIdent\\.h.*)" include-line) + (string-append "// " include-line))))) (add-after 'unpack 'use-upstream-headers (lambda* (#:key inputs #:allow-other-keys) (substitute* '("src/NoteTrack.cpp" @@ -800,12 +766,11 @@ engineers, musicians, soundtrack editors and composers.") (("../lib-src/portmidi/pm_common/portmidi.h") "portmidi.h") (("../lib-src/portmidi/porttime/porttime.h") "porttime.h")) (substitute* "src/prefs/MidiIOPrefs.cpp" - (("../../lib-src/portmidi/pm_common/portmidi.h") "portmidi.h")) - #t))) - ;; The test suite is not "well exercised" according to the developers, - ;; and fails with various errors. See - ;; . - #:tests? #f)) + (("../../lib-src/portmidi/pm_common/portmidi.h") "portmidi.h"))))) + ;; The test suite is not "well exercised" according to the developers, + ;; and fails with various errors. See + ;; . + #:tests? #f)) (home-page "https://www.audacityteam.org/") (synopsis "Software for recording and editing sounds") (description diff --git a/gnu/packages/patches/audacity-add-include.patch b/gnu/packages/patches/audacity-add-include.patch new file mode 100644 index 0000000000..a7f27918e7 --- /dev/null +++ b/gnu/packages/patches/audacity-add-include.patch @@ -0,0 +1,15 @@ +Without , gettimeofday is undefined. + +diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp +index 0187e3962..e15d55f4c 100644 +--- a/src/AudioIO.cpp ++++ b/src/AudioIO.cpp +@@ -479,6 +479,8 @@ time warp info and AudioIOListener and whether the playback is looped. + #include "../lib-src/portmidi/porttime/porttime.h" + #include "../lib-src/header-substitutes/allegro.h" + ++#include ++ + #define MIDI_SLEEP 10 /* milliseconds */ + // how long do we think the thread that fills MIDI buffers, + // if it is separate from the portaudio thread, -- cgit v1.2.3 From 142f8713ab647ecb8833dcf9eb98e3bdc62cd44a Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Wed, 16 Dec 2020 18:50:00 +0100 Subject: gnu: Add shakespeare-spl. * gnu/packages/patches/shakespeare-spl-fix-grammar.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it here. * gnu/packages/esolangs.scm (shakespeare-spl): New variable. --- gnu/local.mk | 1 + gnu/packages/esolangs.scm | 45 ++++++++++++++++++++++ .../patches/shakespeare-spl-fix-grammar.patch | 16 ++++++++ 3 files changed, 62 insertions(+) create mode 100644 gnu/packages/patches/shakespeare-spl-fix-grammar.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 204850c4e6..2402b1e349 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1613,6 +1613,7 @@ dist_patch_DATA = \ %D%/packages/patches/seed-webkit.patch \ %D%/packages/patches/seq24-rename-mutex.patch \ %D%/packages/patches/serf-python3.patch \ + %D%/packages/patches/shakespeare-spl-fix-grammar.patch \ %D%/packages/patches/sharutils-CVE-2018-1000097.patch \ %D%/packages/patches/shadow-hurd-pctrl.patch \ %D%/packages/patches/shishi-fix-libgcrypt-detection.patch \ diff --git a/gnu/packages/esolangs.scm b/gnu/packages/esolangs.scm index 3986562d57..676b355e65 100644 --- a/gnu/packages/esolangs.scm +++ b/gnu/packages/esolangs.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 Hendursaga +;;; Copyright © 2020 Leo Prikler ;;; ;;; This file is part of GNU Guix. ;;; @@ -17,8 +18,13 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages esolangs) + #:use-module (gnu packages) + #:use-module (gnu packages bison) + #:use-module (gnu packages flex) #:use-module (gnu packages ncurses) #:use-module (guix build-system cmake) + #:use-module (guix build-system copy) + #:use-module (guix build-system gnu) #:use-module (guix download) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) @@ -49,3 +55,42 @@ written in C. It supports several @dfn{fingerprints} (opt-in language extensions identified by unique ID codes).") (license license:gpl3))) + +(define-public shakespeare-spl + (package + (name "shakespeare-spl") + (version "1.2.1") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/shakespearelang/spl-" + version ".tar.gz")) + (sha256 + (base32 + "1lxpfhv01kcwy4l4xgx7j765g8g0v74jns0cr908nfw55h5fy1hj")) + (patches + (search-patches + "shakespeare-spl-fix-grammar.patch")))) + (build-system copy-build-system) + (arguments + `(#:imported-modules (,@%gnu-build-system-modules + (guix build copy-build-system)) + #:modules ((guix build copy-build-system) + ((guix build gnu-build-system) #:prefix gnu:) + (guix build utils)) + #:install-plan '(("spl/bin" "bin") + ("spl/lib" "lib") + ("spl/include" "include")) + #:phases + (modify-phases %standard-phases + (add-before 'install 'build + (assoc-ref gnu:%standard-phases 'build))))) + (native-inputs + `(("bison" ,bison) + ("flex" ,flex))) + (home-page "http://shakespearelang.sourceforge.net/") + (synopsis "Write programs like Shakespearean plays") + (description "Shakespeare is a programming language with the design goal +of making programs read like plays. The characters in the play are variables. +If you want to assign a character, let's say Juliet, a positive value, you put +her and another character on the stage and let that character praise Juliet.") + (license license:gpl2+))) diff --git a/gnu/packages/patches/shakespeare-spl-fix-grammar.patch b/gnu/packages/patches/shakespeare-spl-fix-grammar.patch new file mode 100644 index 0000000000..737c0eb8c1 --- /dev/null +++ b/gnu/packages/patches/shakespeare-spl-fix-grammar.patch @@ -0,0 +1,16 @@ +ROMAN_HUNDREDS, ROMAN_TENS and ROMAN_ONES seem to use syntax, that is not +recognized (any longer?) by flex, so let's expand their definitions. + +Index: spl-1.2.1/include/roman_numbers.metaflex +=================================================================== +--- spl-1.2.1.orig/include/roman_numbers.metaflex ++++ spl-1.2.1/include/roman_numbers.metaflex +@@ -1,5 +1,5 @@ + ROMAN_THOUSANDS m+ +-ROMAN_HUNDREDS (c(d|m)|dc{0,3}|c{1,3}) +-ROMAN_TENS (x(l|c)|lx{0,3}|x{1,3}) +-ROMAN_ONES (i(v|x)|vi{0,3}|i{1,3}) ++ROMAN_HUNDREDS (c(d|m|c?c?)|dc?c?c?) ++ROMAN_TENS (x(l|c|x?x?)|lx?x?x?) ++ROMAN_ONES (i(v|x|i?i?)|vi?i?i?) + ROMAN_NUMBER {ROMAN_ONES}|{ROMAN_TENS}{ROMAN_ONES}?|{ROMAN_HUNDREDS}{ROMAN_TENS}?{ROMAN_ONES}?|{ROMAN_THOUSANDS}{ROMAN_HUNDREDS}?{ROMAN_TENS}?{ROMAN_ONES}? -- cgit v1.2.3 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