From cfdd023bed634040ab3256680aebc8e06c134bd1 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 16 May 2020 18:13:35 +0200 Subject: gnu: multipath-tools: Update to 0.8.4. * gnu/packages/patches/multipath-tools-sans-systemd.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/linux.scm (multipath-tools): Update to 0.8.4. [source](patches): New field. [arguments]: Add #:parallel-build?. Add phase to fix erroneous compiler warning. --- 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 ab2bac9bc5..025dfe114b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1275,6 +1275,7 @@ dist_patch_DATA = \ %D%/packages/patches/mozjs38-version-detection.patch \ %D%/packages/patches/mrrescue-support-love-11.patch \ %D%/packages/patches/mtools-mformat-uninitialized.patch \ + %D%/packages/patches/multipath-tools-sans-systemd.patch \ %D%/packages/patches/mumps-build-parallelism.patch \ %D%/packages/patches/mumps-shared-libseq.patch \ %D%/packages/patches/mumps-shared-mumps.patch \ -- cgit v1.2.3 From 7f4b45a320d9661881e9cd488507bee2cf84e859 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 17 May 2020 01:38:26 +0200 Subject: gnu: soundconverter: Update to 3.0.2. * gnu/packages/gnome.scm (soundconverter): Update to 3.0.2. [source]: Remove upstreamed patch. * gnu/packages/patches/soundconverter-remove-gconf-dependency.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/gnome.scm | 7 ++---- .../soundconverter-remove-gconf-dependency.patch | 29 ---------------------- 3 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 gnu/packages/patches/soundconverter-remove-gconf-dependency.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 025dfe114b..118a9e24eb 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1498,7 +1498,6 @@ dist_patch_DATA = \ %D%/packages/patches/slim-display.patch \ %D%/packages/patches/snappy-add-O2-flag-in-CmakeLists.txt.patch \ %D%/packages/patches/sooperlooper-build-with-wx-30.patch \ - %D%/packages/patches/soundconverter-remove-gconf-dependency.patch \ %D%/packages/patches/steghide-fixes.patch \ %D%/packages/patches/suitesparse-mongoose-cmake.patch \ %D%/packages/patches/superlu-dist-awpm-grid.patch \ diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index e4bb056e4c..fe874100b2 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -9198,7 +9198,7 @@ mp3, Ogg Vorbis and FLAC") (define-public soundconverter (package (name "soundconverter") - (version "3.0.1") + (version "3.0.2") (source (origin (method url-fetch) @@ -9207,10 +9207,7 @@ mp3, Ogg Vorbis and FLAC") "soundconverter-" version ".tar.xz")) (sha256 - (base32 "1d6x1yf8psqbd9zbybxivfqg55khcnngp2mn92l161dfdk9512c5")) - (patches - (search-patches - "soundconverter-remove-gconf-dependency.patch")))) + (base32 "1jv8m82hi23ilrgdznlc1jhp2jm8bw1yrw0chh3qw2l0sixvkl11")))) (build-system glib-or-gtk-build-system) (arguments `(#:imported-modules ((guix build python-build-system) diff --git a/gnu/packages/patches/soundconverter-remove-gconf-dependency.patch b/gnu/packages/patches/soundconverter-remove-gconf-dependency.patch deleted file mode 100644 index 29cdeb6e8d..0000000000 --- a/gnu/packages/patches/soundconverter-remove-gconf-dependency.patch +++ /dev/null @@ -1,29 +0,0 @@ -From: Tobias Geerinckx-Rice -Date: Tue, 19 Feb 2019 07:46:28 +0100 -Subject: [PATCH] gnu: soundconverter: Catch (and ignore) the right error. - -Without this patch and GConf: - - Traceback (most recent call last): - File "/gnu/…/bin/...soundconverter-real-real-real", line 164, in - from soundconverter.batch import cli_convert_main - File "/gnu/…/lib/soundconverter/python/soundconverter/batch.py", line 31, in - from soundconverter.gstreamer import TagReader - File "/gnu/…/lib/soundconverter/python/soundconverter/gstreamer.py", line 70, in - gi.require_version('GConf', '2.0') - File "/gnu/…/lib/python3.7/site-packages/gi/__init__.py", line 130, in require_version - raise ValueError('Namespace %s not available' % namespace) - ValueError: Namespace GConf not available ---- -diff -Naur soundconverter-3.0.1/soundconverter/gstreamer.py soundconverter-3.0.1/soundconverter/gstreamer.py ---- soundconverter-3.0.1/soundconverter/gstreamer.py 2018-11-23 20:38:46.000000000 +0100 -+++ soundconverter-3.0.1/soundconverter/gstreamer.py 2019-02-19 07:42:15.767684388 +0100 -@@ -88,7 +88,7 @@ - profile = description, extension, pipeline - audio_profiles_list.append(profile) - audio_profiles_dict[description] = profile --except ImportError: -+except ValueError: - pass - - required_elements = ('decodebin', 'fakesink', 'audioconvert', 'typefind', 'audiorate') -- cgit v1.2.3 From 5db3f6c18152f7f3a724cdbca50dcedea4389079 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 17 May 2020 19:17:19 +0200 Subject: gnu: kpmcore: Update to 4.1.0. * gnu/packages/patches/kpmcore-fix-tests.patch, gnu/packages/patches/kpmcore-remove-broken-test.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/kde.scm (kpmcore): Update to 4.1.0. [source](patches): Remove. --- gnu/local.mk | 2 - gnu/packages/kde.scm | 6 +- gnu/packages/patches/kpmcore-fix-tests.patch | 30 ----- .../patches/kpmcore-remove-broken-test.patch | 139 --------------------- 4 files changed, 2 insertions(+), 175 deletions(-) delete mode 100644 gnu/packages/patches/kpmcore-fix-tests.patch delete mode 100644 gnu/packages/patches/kpmcore-remove-broken-test.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 118a9e24eb..38b286203e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1136,8 +1136,6 @@ dist_patch_DATA = \ %D%/packages/patches/kpackage-allow-external-paths.patch \ %D%/packages/patches/kmplayer-aarch64.patch \ %D%/packages/patches/kmplayer-upstream_Fix-build-with-Qt-5.9.patch \ - %D%/packages/patches/kpmcore-fix-tests.patch \ - %D%/packages/patches/kpmcore-remove-broken-test.patch \ %D%/packages/patches/kobodeluxe-paths.patch \ %D%/packages/patches/kobodeluxe-enemies-pipe-decl.patch \ %D%/packages/patches/kobodeluxe-const-charp-conversion.patch \ diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm index 648c401ad0..4f2d2a2eba 100644 --- a/gnu/packages/kde.scm +++ b/gnu/packages/kde.scm @@ -507,7 +507,7 @@ cards.") (define-public kpmcore (package (name "kpmcore") - (version "4.0.1") + (version "4.1.0") (source (origin (method url-fetch) (uri (string-append @@ -516,9 +516,7 @@ cards.") name "-" version ".tar.xz")) (sha256 (base32 - "1sslkwcj2cyrn7bpjdjdwikp1q8wrsxpsg2sxxd8hsairgy7ygh3")) - (patches (search-patches "kpmcore-fix-tests.patch" - "kpmcore-remove-broken-test.patch")))) + "0jsig7algmab9h0fb09my0axjqzw83zgscamhzl8931lribs6idm")))) (build-system cmake-build-system) (native-inputs `(("extra-cmake-modules" ,extra-cmake-modules) diff --git a/gnu/packages/patches/kpmcore-fix-tests.patch b/gnu/packages/patches/kpmcore-fix-tests.patch deleted file mode 100644 index 12043abe72..0000000000 --- a/gnu/packages/patches/kpmcore-fix-tests.patch +++ /dev/null @@ -1,30 +0,0 @@ -Git commit c02d59aa6d314678cef9683f96b28e2a1abd82b7 by Andrius Štikonas, on behalf of Hartmut Goebel. -Committed on 07/11/2019 at 22:16. -Pushed by stikonas into branch '4.0'. - -Fix test for kpmcore: stop helper only if formerly started. - -See https://bugs.kde.org/413851 and https://phabricator.kde.org/D25161 - -diff --git a/src/util/externalcommand.cpp b/src/util/externalcommand.cpp ---- a/src/util/externalcommand.cpp -+++ b/src/util/externalcommand.cpp -@@ -433,14 +433,17 @@ - - void ExternalCommand::stopHelper() - { -+ if (!helperStarted) -+ return; - auto *interface = new org::kde::kpmcore::externalcommand(QStringLiteral("org.kde.kpmcore.externalcommand"), - QStringLiteral("/Helper"), QDBusConnection::systemBus()); - QByteArray request; - const quint64 nonce = interface->getNonce(); - request.setNum(nonce); - QByteArray hash = QCryptographicHash::hash(request, QCryptographicHash::Sha512); - interface->exit(privateKey->signMessage(hash, QCA::EMSA3_Raw), nonce); - -+ helperStarted = false; - delete privateKey; - delete init; - } - diff --git a/gnu/packages/patches/kpmcore-remove-broken-test.patch b/gnu/packages/patches/kpmcore-remove-broken-test.patch deleted file mode 100644 index d02cca7883..0000000000 --- a/gnu/packages/patches/kpmcore-remove-broken-test.patch +++ /dev/null @@ -1,139 +0,0 @@ -From c9a08a593bac8b8610a647db118fea6f2958156d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= -Date: Thu, 7 Nov 2019 22:12:00 +0000 -Subject: [PATCH] Remove broken smart unit test. - -BUG: 413853 ---- - test/CMakeLists.txt | 9 ---- - test/testsmart.cpp | 102 -------------------------------------------- - 2 files changed, 111 deletions(-) - delete mode 100644 test/testsmart.cpp - -diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt -index 67f63a2..6a300d3 100644 ---- a/test/CMakeLists.txt -+++ b/test/CMakeLists.txt -@@ -53,12 +53,3 @@ find_package (Threads) - # Execute external commands as root - kpm_test(testexternalcommand testexternalcommand.cpp) - add_test(NAME testexternalcommand COMMAND testexternalcommand ${BACKEND}) -- --# Including SMART files reference --set(SMARTPARSER ${CMAKE_SOURCE_DIR}/src/core/smartdiskinformation.cpp -- ${CMAKE_SOURCE_DIR}/src/core/smartattributeparseddata.cpp -- ${CMAKE_SOURCE_DIR}/src/core/smartparser.cpp) -- --# Test SMART support --kpm_test(testsmart testsmart.cpp ${SMARTPARSER}) --add_test(NAME testsmart COMMAND testsmart ${BACKEND}) -diff --git a/test/testsmart.cpp b/test/testsmart.cpp -deleted file mode 100644 -index 2236af7..0000000 ---- a/test/testsmart.cpp -+++ /dev/null -@@ -1,102 +0,0 @@ --#include "helpers.h" -- --#include "util/externalcommand.h" --#include "backend/corebackend.h" --#include "backend/corebackendmanager.h" --#include "core/smartstatus.h" --#include "core/smartparser.h" -- --#include --#include -- --static QString getDefaultDevicePath(); --static bool testSmartStatus(); --static bool testSmartParser(); -- --int main(int argc, char **argv) --{ -- QCoreApplication app(argc, argv); -- -- KPMCoreInitializer i; -- -- if (argc == 2) -- i = KPMCoreInitializer(argv[1]); -- -- if (!i.isValid()) -- return 1; -- -- CoreBackend *backend = CoreBackendManager::self()->backend(); -- -- if (!backend) -- { -- qWarning() << "Couldn't get backend."; -- return 1; -- } -- -- if (!testSmartStatus() || !testSmartParser()) -- return 1; -- -- return app.exec(); --} -- --static QString getDefaultDevicePath() --{ -- // Getting default home partition using 'df -P /home | awk 'END{print $1}'' command -- ExternalCommand command(QStringLiteral("df"), { QStringLiteral("-P"), QStringLiteral("/home"), QStringLiteral("|"), -- QStringLiteral("awk"), QStringLiteral("\'END{print $1}\'") }); -- -- if (command.run() && command.exitCode() == 0) { -- QString output = command.output(); -- return output; -- } -- -- return QString(); --} -- --static bool testSmartStatus() --{ -- QString devicePath = getDefaultDevicePath(); -- -- SmartStatus smart(devicePath); -- -- if (smart.devicePath() != devicePath) -- return false; -- -- if (!smart.status()) -- return false; -- -- if (smart.modelName() == QString()) -- return false; -- -- if (smart.firmware() == QString()) -- return false; -- -- if (smart.serial() == QString()) -- return false; -- -- if (smart.selfTestStatus() != SmartStatus::SelfTestStatus::Success) -- return false; -- -- if (!smart.isValid()) -- return false; -- -- return true; --} -- --static bool testSmartParser() --{ -- QString devicePath = getDefaultDevicePath(); -- -- SmartParser parser(devicePath); -- -- if (!parser.init()) -- return false; -- -- if (parser.devicePath() != devicePath) -- return false; -- -- if (!parser.diskInformation()) -- return false; -- -- return true; --} --- -2.17.1 -- cgit v1.2.3 From 9f59a9b4bc93b3ef6cd3bd1c9eed04c30ba2d2d4 Mon Sep 17 00:00:00 2001 From: Ryan Prior Date: Fri, 15 May 2020 14:24:23 -0500 Subject: gnu: Add granite. * gnu/packages/pantheon.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. Signed-off-by: Danny Milosavljevic --- gnu/local.mk | 1 + gnu/packages/pantheon.scm | 67 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 gnu/packages/pantheon.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 38b286203e..2e12c5a873 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -403,6 +403,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/orpheus.scm \ %D%/packages/ots.scm \ %D%/packages/package-management.scm \ + %D%/packages/pantheon.scm \ %D%/packages/parallel.scm \ %D%/packages/password-utils.scm \ %D%/packages/patchutils.scm \ diff --git a/gnu/packages/pantheon.scm b/gnu/packages/pantheon.scm new file mode 100644 index 0000000000..8c5c1634ee --- /dev/null +++ b/gnu/packages/pantheon.scm @@ -0,0 +1,67 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Ryan Prior +;;; +;;; 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 pantheon) + #:use-module (gnu packages gettext) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) + #:use-module (gnu packages gtk) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages) + #:use-module (guix build-system meson) + #:use-module (guix git-download) + #:use-module ((guix licenses) :prefix license:) + #:use-module (guix packages) + #:use-module (guix utils)) + +(define-public granite + (package + (name "granite") + (version "5.4.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/elementary/granite.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0acicv3f9gksb352v88lwap8ailjsxdrfknl2xql7blasbjzl2q0")))) + (build-system meson-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'disable-icon-cache + (lambda _ + (setenv "DESTDIR" "/") + #t))))) + (inputs + `(("gtk" ,gtk+))) + (native-inputs + `(("gettext" ,gettext-minimal) + ("glib" ,glib) + ("gobject-introspection" ,gobject-introspection) + ("libgee" ,libgee) + ("pkg-config" ,pkg-config) + ("vala" ,vala))) + (home-page "https://github.com/elementary/granite") + (synopsis "Library that extends GTK with common widgets and utilities") + (description "Granite is a companion library for GTK+ and GLib. Among other +things, it provides complex widgets and convenience functions designed for use +in apps built for the Pantheon desktop.") + (license license:lgpl3+))) -- cgit v1.2.3 From 5c30eb61d74034a1b7c188b8d7be7df0b926025f Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 20 May 2020 19:08:10 +0200 Subject: gnu: http-parser: Fix build [and guix pull] on armhf-linux. * gnu/packages/web.scm (http-parser)[source]: Add patch. * gnu/packages/patches/http-parser-fix-assertion-on-armhf.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + .../http-parser-fix-assertion-on-armhf.patch | 39 ++++++++++++++++++++++ gnu/packages/web.scm | 24 +++++++------ 3 files changed, 53 insertions(+), 11 deletions(-) create mode 100644 gnu/packages/patches/http-parser-fix-assertion-on-armhf.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 2e12c5a873..8d737f211e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1081,6 +1081,7 @@ dist_patch_DATA = \ %D%/packages/patches/hdf-eos5-remove-gctp.patch \ %D%/packages/patches/hdf-eos5-fix-szip.patch \ %D%/packages/patches/hdf-eos5-fortrantests.patch \ + %D%/packages/patches/http-parser-fix-assertion-on-armhf.patch \ %D%/packages/patches/hubbub-sort-entities.patch \ %D%/packages/patches/hurd-cross.patch \ %D%/packages/patches/hplip-remove-imageprocessor.patch \ diff --git a/gnu/packages/patches/http-parser-fix-assertion-on-armhf.patch b/gnu/packages/patches/http-parser-fix-assertion-on-armhf.patch new file mode 100644 index 0000000000..79bd3e8dbc --- /dev/null +++ b/gnu/packages/patches/http-parser-fix-assertion-on-armhf.patch @@ -0,0 +1,39 @@ +From: Tobias Geerinckx-Rice +Date: Wed, 20 May 2020 19:17:13 +0200 +Subject: [PATCH] gnu: http-client: Fix assertion on armhf-linux. + +Copied verbatim from [0] to fix guix pull[1] on ARM systems. + +[0]: https://github.com/nodejs/http-parser/pull/510 +[1]: https://issues.guix.gnu.org/40604 + +From 0e5868aebb9eb92b078d27bb2774c2154dc167e2 Mon Sep 17 00:00:00 2001 +From: Ben Noordhuis +Date: Thu, 30 Apr 2020 11:22:50 +0200 +Subject: [PATCH] Fix sizeof(http_parser) assert + +The result should be 32 on both 32 bits and 64 bits architectures +because of struct padding. + +Fixes: https://github.com/nodejs/http-parser/issues/507 +--- + test.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/test.c b/test.c +index 7983424..f60a84f 100644 +--- a/test.c ++++ b/test.c +@@ -4220,8 +4220,11 @@ main (void) + patch = version & 255; + printf("http_parser v%u.%u.%u (0x%06lx)\n", major, minor, patch, version); + ++ /* Should be 32 on both 32 bits and 64 bits architectures because of ++ * struct padding, see https://github.com/nodejs/http-parser/issues/507. ++ */ + printf("sizeof(http_parser) = %u\n", (unsigned int)sizeof(http_parser)); +- assert(sizeof(http_parser) == 4 + 4 + 8 + 2 + 2 + 4 + sizeof(void *)); ++ assert(sizeof(http_parser) == 32); + + //// API + test_preserve_data(); diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 285d2b3bf0..1851590628 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -5917,24 +5917,26 @@ into your tests. It automatically starts up a HTTP server in a separate thread (method git-fetch) (uri (git-reference (url home-page) (commit (string-append "v" version)))) + (sha256 + (base32 + "1vda4dp75pjf5fcph73sy0ifm3xrssrmf927qd1x8g3q46z0cv6c")) (file-name (git-file-name name version)) (patches - ;; When parsing URLs, treat an empty port (eg - ;; `http://hostname:/`) as if it were unspecified. This patch is - ;; applied to Fedora's http-parser and to libgit2's bundled version. - (list + (cons* (origin + ;; Treat an empty port (e.g. `http://hostname:/`) when parsing + ;; URLs as if no port were specified. This patch is applied + ;; to Fedora's http-parser and to libgit2's bundled version. (method url-fetch) (uri (string-append - "https://src.fedoraproject.org/rpms/http-parser/raw/" - "e89b4c4e2874c19079a5a1a2d2ccc61b551aa289/" - "f/0001-url-treat-empty-port-as-default.patch")) + "https://src.fedoraproject.org/rpms/http-parser/raw/" + "e89b4c4e2874c19079a5a1a2d2ccc61b551aa289/" + "f/0001-url-treat-empty-port-as-default.patch")) (sha256 (base32 - "0pbxf2nq9pcn299k2b2ls8ldghaqln9glnp79gi57mamx4iy0f6g"))))) - (sha256 - (base32 - "1vda4dp75pjf5fcph73sy0ifm3xrssrmf927qd1x8g3q46z0cv6c")))) + "0pbxf2nq9pcn299k2b2ls8ldghaqln9glnp79gi57mamx4iy0f6g"))) + ;; A fix for . + (search-patches "http-parser-fix-assertion-on-armhf.patch"))))) (build-system gnu-build-system) (arguments `(#:test-target "test" -- cgit v1.2.3 From 9b65cdd902ec39115dbf3e0ad34e49f544ab4267 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 19 May 2020 09:46:49 +0200 Subject: gnu: python-shouldbe: Python 3.8 compatibility. * gnu/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch: Add compatibility patch. * gnu/local.mk (dist_patch_DATA): Add new file. * gnu/packages/python-xyz.scm (python-shouldbe)[source]: Add patch. Signed-off-by: Marius Bakke --- gnu/local.mk | 1 + .../patches/python-shouldbe-0.1.2-cpy3.8.patch | 82 ++++++++++++++++++++++ gnu/packages/python-xyz.scm | 3 +- 3 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 8d737f211e..91f094ce0f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1434,6 +1434,7 @@ dist_patch_DATA = \ %D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ %D%/packages/patches/python-robotframework-honor-source-date-epoch.patch \ + %D%/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch \ %D%/packages/patches/python-slugify-depend-on-unidecode.patch \ %D%/packages/patches/python2-subprocess32-disable-input-test.patch \ %D%/packages/patches/python-unittest2-python3-compat.patch \ diff --git a/gnu/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch b/gnu/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch new file mode 100644 index 0000000000..f3b56e42d6 --- /dev/null +++ b/gnu/packages/patches/python-shouldbe-0.1.2-cpy3.8.patch @@ -0,0 +1,82 @@ +Fix compatibility with Python 3.8. + +Upstream issue: https://github.com/DirectXMan12/should_be/pull/5 + +diff -x '*.pyc' -Naur shouldbe-0.1.2/should_be/core.py shouldbe-0.1.2.patched/should_be/core.py +--- shouldbe-0.1.2/should_be/core.py 2019-03-06 07:38:22.000000000 +0100 ++++ shouldbe-0.1.2.patched/should_be/core.py 2020-05-18 08:44:24.214664704 +0200 +@@ -103,7 +103,7 @@ + return resf + + +-def buildCode(baseCode, argcount=None, kwonlyargcount=None, ++def buildCode(baseCode, argcount=None, posonlyargcount=None, kwonlyargcount=None, + nlocals=None, stacksize=None, flags=None, + code=None, consts=None, names=None, + varnames=None, filename=None, name=None, +@@ -121,6 +121,24 @@ + nlocals or baseCode.co_nlocals, + stacksize or baseCode.co_stacksize, + flags or baseCode.co_flags, ++ code or baseCode.co_code, ++ consts or baseCode.co_consts, ++ names or baseCode.co_names, ++ varnames or baseCode.co_varnames, ++ filename or baseCode.co_filename, ++ name or baseCode.co_name, ++ firstlineno or baseCode.co_firstlineno, ++ lnotab or baseCode.co_lnotab, ++ freevars or baseCode.co_freevars, ++ cellvars or baseCode.co_cellvars) ++ elif hasattr(baseCode, 'co_posonlyargcount'): ++ # Python 3.8 ++ resc = CodeType(argcount or baseCode.co_argcount, ++ posonlyargcount or baseCode.co_posonlyargcount, ++ kwonlyargcount or baseCode.co_kwonlyargcount, ++ nlocals or baseCode.co_nlocals, ++ stacksize or baseCode.co_stacksize, ++ flags or baseCode.co_flags, + code or baseCode.co_code, + consts or baseCode.co_consts, + names or baseCode.co_names, +diff -x '*.pyc' -Naur shouldbe-0.1.2/should_be/tests/test_container_mixin.py shouldbe-0.1.2.patched/should_be/tests/test_container_mixin.py +--- shouldbe-0.1.2/should_be/tests/test_container_mixin.py 2019-03-01 06:38:16.000000000 +0100 ++++ shouldbe-0.1.2.patched/should_be/tests/test_container_mixin.py 2020-05-18 09:00:51.372531064 +0200 +@@ -7,31 +7,31 @@ + self.lst = [1, 2, 3] + + def test_should_include_iter(self): +- err_msg = (r'[a-zA-Z0-9.]+ should have included \[.+?\]' ++ err_msg = (r'[a-zA-Z0-9.()]+ should have included \[.+?\]' + r', but did not have items .+') +- self.assertRaisesRegexp(AssertionError, err_msg, ++ self.assertRaisesRegex(AssertionError, err_msg, + self.lst.should_include, [4]) + + self.lst.should_include([1, 2, 3]) + + def test_should_include_item(self): +- err_msg = (r'[a-zA-Z0-9.]+ should have included .+?' ++ err_msg = (r'[a-zA-Z0-9.()]+ should have included .+?' + r', but did not') +- self.assertRaisesRegexp(AssertionError, err_msg, ++ self.assertRaisesRegex(AssertionError, err_msg, + self.lst.should_include, 4) + + self.lst.should_include(3) + + def test_shouldnt_include_iter(self): + err_msg = 'should not have included' +- self.assertRaisesRegexp(AssertionError, err_msg, ++ self.assertRaisesRegex(AssertionError, err_msg, + self.lst.shouldnt_include, [2, 3]) + + self.lst.shouldnt_include([4, 5]) + + def test_shouldnt_include_item(self): + err_msg = 'should not have included' +- self.assertRaisesRegexp(AssertionError, err_msg, ++ self.assertRaisesRegex(AssertionError, err_msg, + self.lst.shouldnt_include, 3) + + self.lst.shouldnt_include(4) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 1f96ed4391..a0f44dde8b 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -18788,7 +18788,8 @@ and cuts down boilerplate code when testing libraries for asyncio.") (uri (pypi-uri "shouldbe" version)) (sha256 (base32 - "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj")))) + "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj")) + (patches (search-patches "python-shouldbe-0.1.2-cpy3.8.patch")))) (build-system python-build-system) (propagated-inputs `(("python-forbiddenfruit" ,python-forbiddenfruit))) -- cgit v1.2.3 From cf1518f581fc9ff7dc42a07fb06ebb4273668490 Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Wed, 20 May 2020 18:18:23 +0200 Subject: gnu: Add libfreenect. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/openkinect.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. Signed-off-by: 宋文武 --- gnu/local.mk | 1 + gnu/packages/openkinect.scm | 141 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 gnu/packages/openkinect.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 91f094ce0f..1d9de9a57e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -394,6 +394,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/nvi.scm \ %D%/packages/ocaml.scm \ %D%/packages/ocr.scm \ + %D%/packages/openkinect.scm \ %D%/packages/onc-rpc.scm \ %D%/packages/opencl.scm \ %D%/packages/openbox.scm \ diff --git a/gnu/packages/openkinect.scm b/gnu/packages/openkinect.scm new file mode 100644 index 0000000000..536eb5a6fd --- /dev/null +++ b/gnu/packages/openkinect.scm @@ -0,0 +1,141 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Ekaitz Zarraga +;;; +;;; 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 openkinect) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module (guix build-system cmake) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages libusb) + #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages gl) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages image-processing)) + +(define-public libfreenect + (let ((version "0.6.1")) + (package + (name "libfreenect") + (version version) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/OpenKinect/libfreenect") + (commit (string-append "v" version)))) + (sha256 + (base32 + "0was1va167rqshmpn382h36yyprpfi9cwillb6ylppmnfdrfrhrr")))) + (build-system cmake-build-system) + (arguments + '(#:tests? #f ; package has no tests + #:configure-flags + '("-DBUILD_FAKENECT=ON" + "-DBUILD_CPP=ON" + "-DBUILD_EXAMPLES=OFF" ; available in libfreenect-examples + "-DBUILD_CV=OFF" ; available in libfreenect-cv + "-DBUILD_PYTHON=OFF" ; available in python-libfreenect + "-DBUILD_C_SYNC=ON") + #:phases + (modify-phases %standard-phases + (add-after 'install 'install-udev-rules + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (rules-out (string-append out "/lib/udev/rules.d"))) + (install-file "../source/platform/linux/udev/51-kinect.rules" + (string-append rules-out "51-kinect.rules")) + #t)))))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("libusb" ,libusb))) + (synopsis "Drivers and libraries for the Xbox Kinect device") + (description "libfreenect is a userspace driver for the Microsoft Kinect. +It supports: RGB and Depth Images, Motors, Accelerometer, LED and Audio.") + (home-page "https://openkinect.org/") + (license license:gpl2+)))) + +;; Library are already compiled in libfreenect, avoid build it again. +(define libfreenect-derived-phases + '(modify-phases %standard-phases + (add-after 'unpack 'patch-CMakeLists.txt + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "CMakeLists.txt" + ((".*libusb.*") "") + (("add_subdirectory \\(src\\)") "") + ((".*libfreenectConfig.cmake.*") "")) + #t)))) + +(define-public libfreenect-examples + (package + (inherit libfreenect) + (name "libfreenect-examples") + (inputs + `(("libfreenect" ,libfreenect) + ("glut" ,freeglut))) + (arguments + `(#:tests? #f ; package has no tests + #:configure-flags '("-DBUILD_EXAMPLES=ON" + "-DBUILD_FAKENECT=OFF" + "-DBUILD_CPP=OFF" + "-DBUILD_C_SYNC=OFF" + "-DBUILD_CV=OFF") + #:phases ,libfreenect-derived-phases)) + (synopsis "Examples for libfreenect, the Xbox Kinect device library"))) + +(define-public libfreenect-opencv + (package + (inherit libfreenect) + (name "libfreenect-opencv") + (inputs + `(("libfreenect" ,libfreenect) + ("opencv" ,opencv))) + (arguments + `(#:tests? #f ; package has no tests + #:configure-flags '("-DBUILD_EXAMPLES=OFF" + "-DBUILD_FAKENECT=OFF" + "-DBUILD_CPP=OFF" + "-DBUILD_C_SYNC=OFF" + "-DBUILD_CV=ON") + #:phases ,libfreenect-derived-phases)) + (synopsis "OpenCV wrapper for libfreenect, the Xbox Kinect device +library"))) + +(define-public python-libfreenect + (package + (inherit libfreenect) + (name "python-libfreenect") + (native-inputs + `(("python-cython" ,python-cython))) + (inputs + `(("libfreenect" ,libfreenect))) + (propagated-inputs + `(("python" ,python) + ("python-numpy" ,python-numpy))) + (arguments + `(#:tests? #f ; package has no tests + #:configure-flags '("-DBUILD_EXAMPLES=OFF" + "-DBUILD_FAKENECT=OFF" + "-DBUILD_CPP=OFF" + "-DBUILD_C_SYNC=OFF" + "-DBUILD_CV=OFF" + "-DBUILD_PYTHON3=ON") + #:phases ,libfreenect-derived-phases)) + (synopsis "Python wrapper for libfreenect, the Xbox Kinect device +library"))) -- cgit v1.2.3