From 952820c53964a3ee6fdca94e15771eb1097c87be Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Wed, 18 Dec 2019 16:29:49 -0500 Subject: gnu: linux-libre: Update to 5.4.5. * gnu/packages/aux-files/linux-libre/5.3-arm-veyron.conf, gnu/packages/aux-files/linux-libre/5.3-arm.conf, gnu/packages/aux-files/linux-libre/5.3-arm64.conf, gnu/packages/aux-files/linux-libre/5.3-i686.conf, gnu/packages/aux-files/linux-libre/5.3-x86_64.conf: Delete files. * gnu/packages/aux-files/linux-libre/5.4-arm-veyron.conf, gnu/packages/aux-files/linux-libre/5.4-arm.conf, gnu/packages/aux-files/linux-libre/5.4-arm64.conf, gnu/packages/aux-files/linux-libre/5.4-i686.conf, gnu/packages/aux-files/linux-libre/5.4-x86_64.conf: New files. * Makefile.am (AUX_FILES): Update accordingly. * gnu/packages/patches/linux-libre-active-entropy.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/linux.scm (deblob-scripts-5.3, linux-libre-5.3-version) (linux-libre-5.3-pristine-source, linux-libre-5.3-source) (linux-libre-headers-5.3, linux-libre-5.3): Remove variables. (deblob-scripts-5.4, linux-libre-5.4-version) (linux-libre-5.4-pristine-source, linux-libre-5.4-source) (linux-libre-headers-5.4, linux-libre-5.4): New variables. (linux-libre-version, linux-libre-pristine-source) (linux-libre-source, linux-libre): Point to linux-libre-5.4*. --- 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 32b2c141fa..e83c556bd9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1104,7 +1104,6 @@ dist_patch_DATA = \ %D%/packages/patches/lierolibre-remove-arch-warning.patch \ %D%/packages/patches/lierolibre-try-building-other-arch.patch \ %D%/packages/patches/linkchecker-tests-require-network.patch \ - %D%/packages/patches/linux-libre-active-entropy.patch \ %D%/packages/patches/linux-pam-no-setfsuid.patch \ %D%/packages/patches/lirc-localstatedir.patch \ %D%/packages/patches/lirc-reproducible-build.patch \ -- cgit v1.2.3 From a21d9b8d5c15f200f3c71cfb86207dbefcff6c80 Mon Sep 17 00:00:00 2001 From: Ivan Vilata-i-Balaguer Date: Sun, 15 Dec 2019 14:22:08 -0500 Subject: gnu: mumble: Update to 1.3.0. * gnu/packages/telephony.scm (mumble): Update to 1.3.0. [source]: Remove patch. Update snippet. [build-system]: Switch to qt-build-system. [arguments]: Update custom 'configure phase. Add custom phase to disable murmur ice. [inputs]: Remove protobuf-3.5, libx11, qt-4, alsa-lib. Add protobuf, mesa, qtbase, qtsvg. [native-inputs]: Add python, qttools. [license]: Update license info. * gnu/packages/patches/mumble-1.2.19-abs.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. Signed-off-by: Efraim Flashner --- gnu/local.mk | 1 - gnu/packages/patches/mumble-1.2.19-abs.patch | 31 -------- gnu/packages/telephony.scm | 114 ++++++++++++++++----------- 3 files changed, 67 insertions(+), 79 deletions(-) delete mode 100644 gnu/packages/patches/mumble-1.2.19-abs.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index e83c556bd9..0f62c8e1d7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1157,7 +1157,6 @@ dist_patch_DATA = \ %D%/packages/patches/mrrescue-support-love-11.patch \ %D%/packages/patches/mrustc-0.8.0-fix-variable-length-integer-receiving.patch \ %D%/packages/patches/mtools-mformat-uninitialized.patch \ - %D%/packages/patches/mumble-1.2.19-abs.patch \ %D%/packages/patches/mumps-build-parallelism.patch \ %D%/packages/patches/mumps-shared-libseq.patch \ %D%/packages/patches/mumps-shared-mumps.patch \ diff --git a/gnu/packages/patches/mumble-1.2.19-abs.patch b/gnu/packages/patches/mumble-1.2.19-abs.patch deleted file mode 100644 index 683325f4bc..0000000000 --- a/gnu/packages/patches/mumble-1.2.19-abs.patch +++ /dev/null @@ -1,31 +0,0 @@ -From ea861fe86743c8402bbad77d8d1dd9de8dce447e Mon Sep 17 00:00:00 2001 -From: Mikkel Krautz -Date: Fri, 29 Dec 2017 14:47:25 +0100 -Subject: [PATCH] AudioOutput: do not use non-existant template version of - std::abs. - -This change fixes AudioOutput to use the float overload of std::abs: - - float std::abs(float); - -instead of a non-existant template version (for newer Boost 1.66). - -Fixes mumble-voip/mumble#3281 - ---- - src/mumble/AudioOutput.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/mumble/AudioOutput.cpp b/src/mumble/AudioOutput.cpp -index cbe0c0e2b..7a0a5e2ab 100644 ---- a/src/mumble/AudioOutput.cpp -+++ b/src/mumble/AudioOutput.cpp -@@ -437,7 +437,7 @@ bool AudioOutput::mix(void *outbuff, unsigned int nsamp) { - top[2] = 0.0f; - } - -- if (std::abs(front[0] * top[0] + front[1] * top[1] + front[2] * top[2]) > 0.01f) { -+ if (std::abs(front[0] * top[0] + front[1] * top[1] + front[2] * top[2]) > 0.01f) { - // Not perpendicular. Assume Y up and rotate 90 degrees. - - float azimuth = 0.0f; diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm index 5b6c578fce..0c9de8bd0c 100644 --- a/gnu/packages/telephony.scm +++ b/gnu/packages/telephony.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2018 Tim Gesthuizen ;;; Copyright © 2019 Pierre Neidhardt ;;; Copyright © 2019 Jan Wielkiewicz +;;; Copyright © 2019 Ivan Vilata i Balaguer ;;; ;;; This file is part of GNU Guix. ;;; @@ -44,6 +45,7 @@ (define-module (gnu packages telephony) #:use-module (gnu packages file) #:use-module (gnu packages protobuf) #:use-module (gnu packages gettext) + #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gnupg) @@ -77,7 +79,8 @@ (define-module (gnu packages telephony) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system cmake) - #:use-module (guix build-system gnu)) + #:use-module (guix build-system gnu) + #:use-module (guix build-system qt)) (define-public commoncpp (package @@ -379,54 +382,63 @@ (define-public seren (define-public mumble (package (name "mumble") - (version "1.2.19") + (version "1.3.0") (source (origin (method url-fetch) (uri (string-append "https://mumble.info/snapshot/" name "-" version ".tar.gz")) (sha256 (base32 - "1s60vaici3v034jzzi20x23hsj6mkjlc0glipjq4hffrg9qgnizh")) - (patches (search-patches "mumble-1.2.19-abs.patch")) + "03dqg5yf6d7ilc1wydpshnv1ndssppcbadqcq20jm5j4fdaf53cs")) (modules '((guix build utils))) (snippet `(begin - ;; Remove bundled software. - (for-each delete-file-recursively '("3rdparty" - "speex" - "speexbuild" - "opus-build" - "opus-src" - "sbcelt-helper-build" - "sbcelt-lib-build" - "sbcelt-src")) - ;; TODO: Celt is still bundled. It has been merged into Opus - ;; and will be removed after 1.3.0. - ;; https://github.com/mumble-voip/mumble/issues/1999 + ;; Remove bundled software. Keep arc4random, celt-0.7.0, + ;; celt-0.11.0, qqbonjour, rnnoise, smallft. + (for-each + delete-file-recursively + '("3rdparty/GL" ; in mesa + "3rdparty/mach-override-build" ; for macx + "3rdparty/mach-override-src" + "3rdparty/minhook-build" ; for win32 + "3rdparty/minhook-src" + "3rdparty/opus-build" ; in opus + "3rdparty/opus-src" + "3rdparty/sbcelt-helper-build" ; not enabled + "3rdparty/sbcelt-lib-build" + "3rdparty/sbcelt-src" + "3rdparty/speex-build" ; in speex + "3rdparty/speex-src" + "3rdparty/speexdsp-src" ; in speexdsp + "3rdparty/xinputcheck-build" ; for win32 + "3rdparty/xinputcheck-src")) #t)))) - (build-system gnu-build-system) + (build-system qt-build-system) (arguments `(#:tests? #f ; no "check" target #:phases (modify-phases %standard-phases (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (invoke "qmake" "main.pro" "-recursive" + (lambda* (#:key inputs outputs #:allow-other-keys) + (invoke "qmake" "main.pro" "QMAKE_LRELEASE=lrelease" + (string-append "MUMBLE_PYTHON=" + (string-append (assoc-ref inputs "python") + "/bin/python3")) (string-append "CONFIG+=" (string-join - (list "no-update" - "no-ice" + ;; Options used are listed in the same order + ;; as in the "INSTALL" file + ;; (plus the final "packaged" and "release"). + (list "no-bundled-speex" ; in speex + "no-bundled-opus" ; in opus + "no-g15" ; not packaged + "no-jackaudio" ; use pulse + "no-oss" ; use pulse + "no-alsa" ; use pulse + "no-update" "no-embed-qt-translations" - "no-bundled-speex" - "pch" - "no-bundled-opus" - "no-celt" - "no-alsa" - "no-oss" - "no-portaudio" - "speechd" - "no-g15" - "no-bonjour" + "no-ice" ; not packaged + "packaged" "release"))) (string-append "DEFINES+=" "PLUGIN_PATH=" @@ -435,7 +447,13 @@ (define-public mumble (add-before 'configure 'fix-libspeechd-include (lambda _ (substitute* "src/mumble/TextToSpeech_unix.cpp" - (("libspeechd.h") "speech-dispatcher/libspeechd.h")))) + (("libspeechd.h") "speech-dispatcher/libspeechd.h")) + #t)) + (add-before 'install 'disable-murmur-ice + (lambda _ + (substitute* "scripts/murmur.ini.system" + (("^ice=") ";ice=")) + #t)) (replace 'install ; install phase does not exist (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -466,21 +484,23 @@ (define-public mumble (find-files "release/plugins" "\\.so$")))))))) (inputs `(("avahi" ,avahi) - ("protobuf" ,protobuf-3.5) - ("openssl" ,openssl) - ("libsndfile" ,libsndfile) ("boost" ,boost) - ("opus" ,opus) - ("speex" ,speex) - ("speexdsp" ,speexdsp) - ("speech-dispatcher" ,speech-dispatcher) - ("libx11" ,libx11) + ("libsndfile" ,libsndfile) ("libxi" ,libxi) - ("qt-4" ,qt-4) - ("alsa-lib" ,alsa-lib) - ("pulseaudio" ,pulseaudio))) + ("mesa" ,mesa) ; avoid bundled + ("openssl" ,openssl) + ("opus" ,opus) ; avoid bundled + ("protobuf" ,protobuf) + ("pulseaudio" ,pulseaudio) + ("qtbase" ,qtbase) + ("qtsvg" ,qtsvg) + ("speech-dispatcher" ,speech-dispatcher) + ("speex" ,speex) ; avoid bundled + ("speexdsp" ,speexdsp))) ; avoid bundled (native-inputs - `(("pkg-config" ,pkg-config))) + `(("pkg-config" ,pkg-config) + ("python" ,python) + ("qttools" ,qttools))) (synopsis "Low-latency, high quality voice chat software") (description "Mumble is an low-latency, high quality voice chat @@ -488,9 +508,9 @@ (define-public mumble Mumble consists of two applications for separate usage: @code{mumble} for the client, and @code{murmur} for the server.") (home-page "https://wiki.mumble.info/wiki/Main_Page") - (license (list license:bsd-3 - ;; The bundled celt is bsd-2. Remove after 1.3.0. - license:bsd-2)))) + (license (list license:bsd-3 ; mumble celt-0.7.0 qqbonjour rnnoise smallft + license:bsd-2 ; celt-0.11.0 + license:isc)))) ; arc4random (define-public twinkle (package -- cgit v1.2.3 From 4b3ff36228da17db980c98fe9e1669be613a5402 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Thu, 19 Dec 2019 11:35:23 -0600 Subject: Update email for Brett Gilio. * .mailmap: Add name and email for Brett Gilio. * gnu/local.mk, gnu/packages/admin.scm, gnu/packages/audio.scm, gnu/packages/bittorrent.scm, gnu/packages/build-tools.scm, gnu/packages/cran.scm, gnu/packages/emacs-xyz.scm, gnu/packages/messaging.scm, gnu/packages/python-xyz.scm, gnu/packages/sml.scm, gnu/packages/terminals.scm, gnu/packages/wm.scm: Update email for Brett Gilio. --- .mailmap | 1 + gnu/local.mk | 2 +- gnu/packages/admin.scm | 2 +- gnu/packages/audio.scm | 2 +- gnu/packages/bittorrent.scm | 2 +- gnu/packages/build-tools.scm | 2 +- gnu/packages/cran.scm | 2 +- gnu/packages/emacs-xyz.scm | 2 +- gnu/packages/messaging.scm | 2 +- gnu/packages/python-xyz.scm | 2 +- gnu/packages/sml.scm | 2 +- gnu/packages/terminals.scm | 2 +- gnu/packages/wm.scm | 2 +- 13 files changed, 13 insertions(+), 12 deletions(-) (limited to 'gnu/local.mk') diff --git a/.mailmap b/.mailmap index d5578d10ce..daab7c91a1 100644 --- a/.mailmap +++ b/.mailmap @@ -13,6 +13,7 @@ Andy Wingo Ben Woodcroft Ben Woodcroft Ben Woodcroft +Brett Gilio Claes Wallin (韋嘉誠) Cyprien Nicolas Daniel Pimentel diff --git a/gnu/local.mk b/gnu/local.mk index 0f62c8e1d7..486f9ddc74 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -24,7 +24,7 @@ # Copyright © 2019 John Soo # Copyright © 2019 Jonathan Brielmaier # Copyright © 2019 Evan Straw -# Copyright © 2019 Brett Gilio +# Copyright © 2019 Brett Gilio # # This file is part of GNU Guix. # diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 6368289563..fa490218af 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -23,7 +23,7 @@ ;;; Copyright © 2018 Pierre-Antoine Rouby ;;; Copyright © 2018 Rutger Helling ;;; Copyright © 2018 Pierre Neidhardt -;;; Copyright © 2019 Brett Gilio +;;; Copyright © 2019 Brett Gilio ;;; Copyright © 2019 Björn Höfling ;;; Copyright © 2019 Jakob L. Kreuze ;;; Copyright © 2019 Hartmut Goebel diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index e6e89c0064..7f8ae09011 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -13,7 +13,7 @@ ;;; Copyright © 2018 okapi ;;; Copyright © 2018 Maxim Cournoyer ;;; Copyright © 2018 Clément Lassieur -;;; Copyright © 2018 Brett Gilio +;;; Copyright © 2018 Brett Gilio ;;; Copyright © 2018, 2019 Marius Bakke ;;; Copyright © 2018 Thorsten Wilms ;;; Copyright © 2018 Eric Bavier diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm index c5930fccb5..cab23b6753 100644 --- a/gnu/packages/bittorrent.scm +++ b/gnu/packages/bittorrent.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2018 Fis Trivial ;;; Copyright © 2018 Nam Nguyen ;;; Copyright © 2018 Ricardo Wurmus -;;; Copyright © 2019 Brett Gilio +;;; Copyright © 2019 Brett Gilio ;;; ;;; This file is part of GNU Guix. ;;; diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index a82b867282..342f5f59cd 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2018 Tomáš Čech ;;; Copyright © 2018 Marius Bakke ;;; Copyright © 2018 Alex Vong -;;; Copyright © 2019 Brett Gilio +;;; Copyright © 2019 Brett Gilio ;;; Copyright © 2019 Jonathan Brielmaier ;;; ;;; This file is part of GNU Guix. diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm index 040c2ead4a..ac71831879 100644 --- a/gnu/packages/cran.scm +++ b/gnu/packages/cran.scm @@ -15,7 +15,7 @@ ;;; Copyright © 2018 Leo Famulari ;;; Copyright © 2018 Marius Bakke ;;; Copyright © 2018 Eric Brown -;;; Copyright © 2018, 2019 Brett Gilio +;;; Copyright © 2018, 2019 Brett Gilio ;;; Copyright © 2019 Nicolò Balzarotti ;;; Copyright © 2019 Wiktor Żelazny ;;; diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 1fd75a8240..8ff7a23f51 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -41,7 +41,7 @@ ;;; Copyright © 2018 Alex Branham ;;; Copyright © 2018 Thorsten Wilms ;;; Copyright © 2018, 2019 Pierre Langlois -;;; Copyright © 2018, 2019 Brett Gilio +;;; Copyright © 2018, 2019 Brett Gilio ;;; Copyright © 2019 Dimakakos Dimos ;;; Copyright © 2019 Brian Leung ;;; Copyright © 2019 mikadoZero diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index 9b97d8b75c..549ee28400 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -16,7 +16,7 @@ ;;; Copyright © 2018 Leo Famulari ;;; Copyright © 2018 Pierre-Antoine Rouby ;;; Copyright © 2019 Tanguy Le Carrour -;;; Copyright © 2019 Brett Gilio +;;; Copyright © 2019 Brett Gilio ;;; Copyright © 2019 Timotej Lazar ;;; ;;; This file is part of GNU Guix. diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 951571bf2e..520de4607d 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -57,7 +57,7 @@ ;;; Copyright © 2018, 2019 Maxim Cournoyer ;;; Copyright © 2018 Luther Thompson ;;; Copyright © 2018 Vagrant Cascadian -;;; Copyright © 2019 Brett Gilio +;;; Copyright © 2019 Brett Gilio ;;; Copyright © 2019 Sam ;;; Copyright © 2019 Jack Hill ;;; Copyright © 2019 Guillaume Le Vaillant diff --git a/gnu/packages/sml.scm b/gnu/packages/sml.scm index 30ee58c498..d441dcf638 100644 --- a/gnu/packages/sml.scm +++ b/gnu/packages/sml.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2017 Andy Patterson ;;; Copyright © 2017 Tobias Geerinckx-Rice ;;; Copyright © 2018 Ricardo Wurmus -;;; Copyright © 2019 Brett Gilio +;;; Copyright © 2019 Brett Gilio ;;; ;;; This file is part of GNU Guix. ;;; diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm index a385e62630..ae015d9fe7 100644 --- a/gnu/packages/terminals.scm +++ b/gnu/packages/terminals.scm @@ -16,7 +16,7 @@ ;;; Copyright © 2018, 2019 Eric Bavier ;;; Copyright © 2019 Julien Lepiller ;;; Copyright © 2019 Pierre Langlois -;;; Copyright © 2019 Brett Gilio +;;; Copyright © 2019 Brett Gilio ;;; ;;; This file is part of GNU Guix. ;;; diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index 4bf621ee27..6c1919be56 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -28,7 +28,7 @@ ;;; Copyright © 2018, 2019 Pierre Langlois ;;; Copyright © 2016, 2017 Andy Patterson ;;; Copyright © 2019 Evan Straw -;;; Copyright © 2019 Brett Gilio +;;; Copyright © 2019 Brett Gilio ;;; Copyright © 2019 Noodles! ;;; ;;; This file is part of GNU Guix. -- cgit v1.2.3 From 1fb76dce3e2ea62bb0ba8d118a56b4476c953fb4 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 19 Dec 2019 22:59:56 +0100 Subject: gnu: Add java-piccolo2d-core. * gnu/packages/java-graphics.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/local.mk | 1 + gnu/packages/java-graphics.scm | 57 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 gnu/packages/java-graphics.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 486f9ddc74..b9d97ace27 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -271,6 +271,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/iso-codes.scm \ %D%/packages/java.scm \ %D%/packages/java-compression.scm \ + %D%/packages/java-graphics.scm \ %D%/packages/java-maths.scm \ %D%/packages/javascript.scm \ %D%/packages/jemalloc.scm \ diff --git a/gnu/packages/java-graphics.scm b/gnu/packages/java-graphics.scm new file mode 100644 index 0000000000..7c1a5f68b4 --- /dev/null +++ b/gnu/packages/java-graphics.scm @@ -0,0 +1,57 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 Ricardo Wurmus +;;; +;;; 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 java-graphics) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module (guix utils) + #:use-module (guix build-system ant) + #:use-module (gnu packages) + #:use-module (gnu packages java) + #:use-module (gnu packages xorg)) + +(define-public java-piccolo2d-core + (package + (name "java-piccolo2d-core") + (version "3.0.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/piccolo2d/piccolo2d.java") + (commit (string-append "piccolo2d-complete-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1k6gw643k83516lcw04mgac2yi75phdrng44pz9xk6hz066ip21s")))) + (build-system ant-build-system) + (arguments + `(#:jar-name "piccolo2d-core.jar" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda _ (chdir "core") #t))))) + (inputs + `(("java-junit" ,java-junit))) + (home-page "http://piccolo2d.org") + (synopsis "Structured 2D graphics framework") + (description "Piccolo2D is a framework (in the Jazz ZUI tradition) to +create robust, full-featured graphical applications in Java, with features +such as zooming and multiple representation. This package provides the core +libraries.") + (license license:bsd-3))) -- cgit v1.2.3 From b2fdd0cf4ade20b3d9bf0b249b32e06e9f8bf1b0 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Fri, 6 Dec 2019 09:56:48 +0100 Subject: gnu: Add grantleetheme. * gnu/packages/kde.scm (grantleetheme): New variable. * gnu/packages/patches/grantlee-merge-theme-dirs.patch: New file. * gnu:lokal.mk (DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/kde.scm | 36 +++++ .../patches/grantlee-merge-theme-dirs.patch | 163 +++++++++++++++++++++ 3 files changed, 200 insertions(+) create mode 100644 gnu/packages/patches/grantlee-merge-theme-dirs.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index b9d97ace27..83e899b1ab 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -939,6 +939,7 @@ dist_patch_DATA = \ %D%/packages/patches/gpm-glibc-2.26.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/groovy-add-exceptionutilsgenerator.patch \ %D%/packages/patches/grub-efi-fat-serial-number.patch \ diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm index 82116610ec..31b917d033 100644 --- a/gnu/packages/kde.scm +++ b/gnu/packages/kde.scm @@ -64,8 +64,44 @@ (define-module (gnu packages kde) #:use-module (gnu packages version-control) #:use-module (gnu packages video) #:use-module (gnu packages xdisorg) + #:use-module (gnu packages xml) #:use-module (gnu packages xorg)) +(define-public grantleetheme + (package + (name "grantleetheme") + (version "19.08.3") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://kde/stable/applications/" version + "/src/grantleetheme-" version ".tar.xz")) + (sha256 + (base32 "0j77q1yyfmggzgkqgcw2xr0v9xg3h5cdhh8jry8h2llw75ahy6xb")) + (patches (search-patches "grantlee-merge-theme-dirs.patch")))) + (build-system qt-build-system) + (native-inputs + `(("extra-cmake-modules" ,extra-cmake-modules) + ("libxml2" ,libxml2))) ;; xmllint required for tests + (inputs + `(("grantlee" ,grantlee) + ("ki18n" ,ki18n) + ("kiconthemes" ,kiconthemes) + ("knewstuff" ,knewstuff) + ("qtbase" ,qtbase))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'check-setup + (lambda _ + (setenv "QT_QPA_PLATFORM" "offscreen") + #t))))) + (home-page "https://cgit.kde.org/grantleetheme.git") + (synopsis "Library providing Grantlee theme support") + (description "This library provides Grantlee theme support.") + (license ;; LGPL for libraries, FDL for documentation + (list license:lgpl2.0+ license:fdl1.2+)))) + (define-public kdenlive (let ((version "18.08.1")) (package diff --git a/gnu/packages/patches/grantlee-merge-theme-dirs.patch b/gnu/packages/patches/grantlee-merge-theme-dirs.patch new file mode 100644 index 0000000000..96a15a387b --- /dev/null +++ b/gnu/packages/patches/grantlee-merge-theme-dirs.patch @@ -0,0 +1,163 @@ +Taken from nixpkgs, see +grantleetheme: merge themes across multiple prefixes + + + +diff --git a/src/grantleetheme.cpp b/src/grantleetheme.cpp +index 27d5bc8..8d43140 100644 +--- a/src/grantleetheme.cpp ++++ b/src/grantleetheme.cpp +@@ -46,7 +46,7 @@ ThemePrivate::ThemePrivate(const ThemePrivate &other) + , description(other.description) + , name(other.name) + , dirName(other.dirName) +- , absolutePath(other.absolutePath) ++ , absolutePaths(other.absolutePaths) + , author(other.author) + , email(other.email) + , loader(other.loader) +@@ -64,12 +64,15 @@ void ThemePrivate::setupEngine() + + void ThemePrivate::setupLoader() + { +- // Get the parent dir with themes, we set the theme directory separately +- QDir dir(absolutePath); +- dir.cdUp(); ++ QStringList templateDirs; ++ for (const QString& path : absolutePaths) { ++ QDir dir(path); ++ dir.cdUp(); ++ templateDirs << dir.absolutePath(); ++ } + + loader = QSharedPointer::create(); +- loader->setTemplateDirs({ dir.absolutePath() }); ++ loader->setTemplateDirs(templateDirs); + loader->setTheme(dirName); + + if (!sEngine) { +@@ -121,7 +124,7 @@ Theme::Theme(const QString &themePath, const QString &dirName, const QString &de + KConfigGroup group(&config, QStringLiteral("Desktop Entry")); + if (group.isValid()) { + d->dirName = dirName; +- d->absolutePath = themePath; ++ d->absolutePaths = QStringList(themePath); + d->name = group.readEntry("Name", QString()); + d->description = group.readEntry("Description", QString()); + d->themeFileName = group.readEntry("FileName", QString()); +@@ -140,7 +143,7 @@ Theme::~Theme() + + bool Theme::operator==(const Theme &other) const + { +- return isValid() && other.isValid() && d->absolutePath == other.absolutePath(); ++ return isValid() && other.isValid() && d->absolutePaths == other.absolutePaths(); + } + + Theme &Theme::operator=(const Theme &other) +@@ -184,7 +187,15 @@ QString Theme::dirName() const + + QString Theme::absolutePath() const + { +- return d->absolutePath; ++ if (! d->absolutePaths.isEmpty()) { ++ return d->absolutePaths.first(); ++ }; ++ return QString(); ++} ++ ++QStringList Theme::absolutePaths() const ++{ ++ return d->absolutePaths; + } + + QString Theme::author() const +@@ -223,6 +231,13 @@ QString Theme::render(const QString &templateName, const QVariantHash &data, con + return result; + } + ++void Theme::addThemeDir(const QString& path) ++{ ++ QDir dir(path); ++ dir.cdUp(); ++ d->absolutePaths << dir.absolutePath(); ++} ++ + void Theme::addPluginPath(const QString &path) + { + if (!ThemePrivate::sEngine) { +diff --git a/src/grantleetheme.h b/src/grantleetheme.h +index a25c27b..be38299 100644 +--- a/src/grantleetheme.h ++++ b/src/grantleetheme.h +@@ -48,11 +48,14 @@ public: + Q_REQUIRED_RESULT QStringList displayExtraVariables() const; + Q_REQUIRED_RESULT QString dirName() const; + Q_REQUIRED_RESULT QString absolutePath() const; ++ Q_REQUIRED_RESULT QStringList absolutePaths() const; + Q_REQUIRED_RESULT QString author() const; + Q_REQUIRED_RESULT QString authorEmail() const; + + Q_REQUIRED_RESULT QString render(const QString &templateName, const QVariantHash &data, const QByteArray &applicationDomain = QByteArray()); + ++ void addThemeDir(const QString&); ++ + static void addPluginPath(const QString &path); + + private: +diff --git a/src/grantleetheme_p.h b/src/grantleetheme_p.h +index eb73dcb..00510e9 100644 +--- a/src/grantleetheme_p.h ++++ b/src/grantleetheme_p.h +@@ -43,7 +43,7 @@ public: + QString description; + QString name; + QString dirName; +- QString absolutePath; ++ QStringList absolutePaths; + QString author; + QString email; + +diff --git a/src/grantleethememanager.cpp b/src/grantleethememanager.cpp +index 606d717..dc99041 100644 +--- a/src/grantleethememanager.cpp ++++ b/src/grantleethememanager.cpp +@@ -125,25 +125,18 @@ public: + + for (const QString &directory : qAsConst(themesDirectories)) { + QDirIterator dirIt(directory, QStringList(), QDir::AllDirs | QDir::NoDotAndDotDot); +- QStringList alreadyLoadedThemeName; + while (dirIt.hasNext()) { + dirIt.next(); + const QString dirName = dirIt.fileName(); + GrantleeTheme::Theme theme = q->loadTheme(dirIt.filePath(), dirName, defaultDesktopFileName); + if (theme.isValid()) { + QString themeName = theme.name(); +- if (alreadyLoadedThemeName.contains(themeName)) { +- int i = 2; +- const QString originalName(theme.name()); +- while (alreadyLoadedThemeName.contains(themeName)) { +- themeName = originalName + QStringLiteral(" (%1)").arg(i); +- ++i; +- } +- theme.d->name = themeName; ++ QMap::iterator i = themes.find(dirName); ++ if (i != themes.end()) { ++ i.value().addThemeDir(dirIt.filePath()); ++ } else { ++ themes.insert(dirName, theme); + } +- alreadyLoadedThemeName << themeName; +- themes.insert(dirName, theme); +- //qDebug()<<" theme.name()"<addDir(directory); +@@ -366,7 +359,7 @@ QString ThemeManager::pathFromThemes(const QString &themesRelativePath, const QS + GrantleeTheme::Theme theme = loadTheme(dirIt.filePath(), dirName, defaultDesktopFileName); + if (theme.isValid()) { + if (dirName == themeName) { +- return theme.absolutePath(); ++ return theme.absolutePaths().first(); + } + } + } -- cgit v1.2.3 From ce288d36878d708863628eb44837ce1221970d30 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Tue, 3 Dec 2019 23:36:12 +0100 Subject: gnu: Add kate. * gnu/packages/kde-utils.scm: New file. * gnu/local.mk (MODULES): Add it. --- gnu/local.mk | 1 + gnu/packages/kde-utils.scm | 94 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 gnu/packages/kde-utils.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 83e899b1ab..9d5ba050ce 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -283,6 +283,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/kde.scm \ %D%/packages/kde-frameworks.scm \ %D%/packages/kde-plasma.scm \ + %D%/packages/kde-utils.scm \ %D%/packages/kerberos.scm \ %D%/packages/key-mon.scm \ %D%/packages/kodi.scm \ diff --git a/gnu/packages/kde-utils.scm b/gnu/packages/kde-utils.scm new file mode 100644 index 0000000000..1ee0e503a1 --- /dev/null +++ b/gnu/packages/kde-utils.scm @@ -0,0 +1,94 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017, 2019 Hartmut Goebel +;;; +;;; 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 kde-utils) + #:use-module (guix build-system qt) + #:use-module (guix download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (gnu packages kde-frameworks) + #:use-module (gnu packages kde-plasma) + #:use-module (gnu packages qt)) + +(define-public kate + (package + (name "kate") + (version "19.08.3") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://kde/stable/applications/" version + "/src/kate-" version ".tar.xz")) + (sha256 + (base32 "0wgcw10c4grkmsyp79ashwgpy59lgrinwdib4mjclpw2grp0g7xb")))) + (properties `((tags . ("Desktop" "KDE" "Utilities")))) + (build-system qt-build-system) + (native-inputs + `(("extra-cmake-modules" ,extra-cmake-modules) + ("kdoctools" ,kdoctools))) + (inputs + `(("kactivities" ,kactivities) + ("kconfig" ,kconfig) + ("kcrash" ,kcrash) + ("kdbusaddons" ,kdbusaddons) + ("kguiaddons" ,kguiaddons) + ("ki18n" ,ki18n) + ("kiconthemes" ,kiconthemes) + ("kitemmodels" ,kitemmodels) + ("threadweaver" ,threadweaver) + ("knewstuff" ,knewstuff) + ("kio" ,kio) + ("kjobwidgets" ,kjobwidgets) + ("kparts" ,kparts) + ("ktexteditor" ,ktexteditor) + ("kwallet" ,kwallet) + ("plasma-framework" ,plasma-framework) + ("kwindowsystem" ,kwindowsystem) + ("kxmlgui" ,kxmlgui) + ("oxygen-icons" ,oxygen-icons) ;; default icon set + ("qtbase" ,qtbase) + ("qtscript" ,qtscript))) + (arguments + `(#:tests? #f ;; 2/7 tests fail + #:phases + (modify-phases %standard-phases + (add-before 'check 'check-setup + (lambda _ + ;; make Qt render "offscreen", required for tests + (setenv "QT_QPA_PLATFORM" "offscreen") + (setenv "XDG_CACHE_HOME" "/tmp/xdg-cache") + #t))))) + (home-page "https://kate-editor.org/") + (synopsis "Multi-document, multi-view text editor") + (description "Kate is a powerful text editor that can open multiple files +simultaneously. + +With a built-in terminal, syntax highlighting, and tabbed sidebar, it performs +as a lightweight but capable development environment. Kate's many tools, +plugins, and scripts make it highly customizable. + +Kate's features include: +@itemize +@item Multiple saved sessions, each with numerous files +@item Scriptable syntax highlighting, indentation, and code-folding +@item Configurable templates and text snippets +@item Symbol viewers for C, C++, and Python +@item XML completion and validation +@end itemize") + (license ;; GPL for programs, LGPL for libraries + (list license:gpl2+ license:lgpl2.0)))) -- cgit v1.2.3 From 92d2205a19e9abc040fc245859613a4a582a8dcb Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Tue, 17 Dec 2019 23:49:49 -0500 Subject: gnu: Add emacs-next. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add `emacs-next' for building latest Emacs from git. * gnu/packages/emacs.scm (emacs-next): New variable. (emacs): make the autoload deletion snippet not fail when eshell/esh-groups.el does not exist. This enables reuse of the entire snippet field of `emacs' for `emacs-next'. * gnu/packages/patches/emacs27-exec-path.patch: New file. * gnu/local.mk (dist_patch_DATA): Add the above patch file to it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/emacs.scm | 110 ++++++++++++++++++++++++++- gnu/packages/patches/emacs27-exec-path.patch | 18 +++++ 3 files changed, 127 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/emacs27-exec-path.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9d5ba050ce..3ed6808edb 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -803,6 +803,7 @@ dist_patch_DATA = \ %D%/packages/patches/elixir-path-length.patch \ %D%/packages/patches/elm-compiler-disable-reactor.patch \ %D%/packages/patches/elm-compiler-fix-map-key.patch \ + %D%/packages/patches/emacs27-exec-path.patch \ %D%/packages/patches/emacs-dired-toggle-sudo-emacs-26.patch \ %D%/packages/patches/emacs-exec-path.patch \ %D%/packages/patches/emacs-fix-scheme-indent-function.patch \ diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index eba7f88551..ebe47d7186 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -17,6 +17,9 @@ ;;; Copyright © 2018 Mathieu Othacehe ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2019 Jesse John Gildersleve +;;; Copyright © 2019 Valentin Ignatev +;;; Copyright © 2019 Leo Prikler +;;; Copyright © 2019 Amin Bandali ;;; ;;; This file is part of GNU Guix. ;;; @@ -61,6 +64,7 @@ (define-module (gnu packages emacs) #:use-module (gnu packages pkg-config) #:use-module (gnu packages texinfo) #:use-module (gnu packages tls) + #:use-module (gnu packages web) ; for jansson #:use-module (gnu packages webkit) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) @@ -83,14 +87,20 @@ (define-public emacs "emacs-source-date-epoch.patch")) (modules '((guix build utils))) (snippet - ;; Delete the bundled byte-compiled elisp files and - ;; generated autoloads. '(with-directory-excursion "lisp" + ;; Delete the bundled byte-compiled elisp files and generated + ;; autoloads. (for-each delete-file (append (find-files "." "\\.elc$") (find-files "." "loaddefs\\.el$") ;; This is the only "autoloads" file that ;; does not have "*loaddefs.el" name. + ;; TODO: Next time changing this package, + ;; replace the following with a call to + ;; `find-files', so that `delete-file' + ;; wouldn't error out when the file is + ;; missing, making the entire snippet field + ;; reusable as-is for `emacs-next' below. '("eshell/esh-groups.el"))) ;; Make sure Tramp looks for binaries in the right places on @@ -211,6 +221,102 @@ (define-public emacs languages.") (license license:gpl3+))) +(define-public emacs-next + (let ((commit "36abf6864604b3061c2e070f8997491fa2bce44c") + (revision "0") + (emacs-version "27.0.50")) + (package + (inherit emacs) + (name "emacs-next") + (version (git-version emacs-version revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.savannah.gnu.org/git/emacs.git") + (commit commit))) + (sha256 + (base32 "1ckn607p0clz0dhhlizvv7l03p4nminy48h53xrpz55w4rcrcm2l")) + (file-name (git-file-name name version)) + (patches (search-patches "emacs27-exec-path.patch" + "emacs-fix-scheme-indent-function.patch" + "emacs-source-date-epoch.patch")) + (modules (origin-modules (package-source emacs))) + ;; TODO: once the snippet for `emacs' is changed to not fail when + ;; eshell/esh-groups.el does not exist, replace this snippet with + ;; (snippet (origin-snippet (package-source emacs))))). + (snippet + '(with-directory-excursion "lisp" + ;; Make sure Tramp looks for binaries in the right places on + ;; remote Guix System machines, where 'getconf PATH' returns + ;; something bogus. + (substitute* "net/tramp-sh.el" + ;; Patch the line after "(defcustom tramp-remote-path". + (("\\(tramp-default-remote-path") + (format #f "(tramp-default-remote-path ~s ~s ~s ~s " + "~/.guix-profile/bin" "~/.guix-profile/sbin" + "/run/current-system/profile/bin" + "/run/current-system/profile/sbin"))) + + ;; Make sure Man looks for C header files in the right + ;; places. + (substitute* "man.el" + (("\"/usr/local/include\"" line) + (string-join + (list line + "\"~/.guix-profile/include\"" + "\"/var/guix/profiles/system/profile/include\"") + " "))) + #t)))) + (arguments + (substitute-keyword-arguments (package-arguments emacs) + ((#:phases phases) + `(modify-phases ,phases + ;; The 'reset-gzip-timestamps phase will throw a + ;; permission error if gzip files aren't writable then + (add-before + 'reset-gzip-timestamps + 'make-compressed-files-writable + (lambda _ + (for-each make-file-writable + (find-files %output ".*\\.t?gz$")) + #t)) + ;; restore the dump file that Emacs installs somewhere in + ;; libexec/ to its original state + (add-after 'glib-or-gtk-wrap 'restore-emacs-pdmp + (lambda* (#:key outputs target #:allow-other-keys) + (let* ((libexec (string-append (assoc-ref outputs "out") + "/libexec")) + ;; each of these find-files should return one file + (pdmp (find-files libexec "^emacs\\.pdmp$")) + (pdmp-real (find-files libexec + "^\\.emacs\\.pdmp-real$"))) + (for-each (lambda (wrapper real) + (delete-file wrapper) + (rename-file real wrapper)) + pdmp pdmp-real) + #t))))))) + (inputs + `(("jansson" ,jansson) + ,@(package-inputs emacs))) + (native-inputs + `(("autoconf" ,autoconf) ; needed when building from trunk + ,@(package-native-inputs emacs))) + + ;; TODO: consider changing `emacs' to use a more robust way of + ;; specifying version for "EMACSLOADPATH", so as to avoid having to + ;; duplicate native-search-paths here. + (native-search-paths + (list (search-path-specification + (variable "EMACSLOADPATH") + ;; The versioned entry is for the Emacs' builtin libraries. + (files + (list "share/emacs/site-lisp" + (string-append "share/emacs/" emacs-version "/lisp")))) + (search-path-specification + (variable "INFOPATH") + (files '("share/info")))))))) + (define-public emacs-minimal ;; This is the version that you should use as an input to packages that just ;; need to byte-compile .el files. diff --git a/gnu/packages/patches/emacs27-exec-path.patch b/gnu/packages/patches/emacs27-exec-path.patch new file mode 100644 index 0000000000..418aa633a1 --- /dev/null +++ b/gnu/packages/patches/emacs27-exec-path.patch @@ -0,0 +1,18 @@ +Do not capture the build-time value of $PATH in the 'emacs' executable +since this can noticeably increase the size of the closure of Emacs +with things like GCC being referenced. + +(like emacs-exec-path.patch, but for Emacs 27) + +--- a/lisp/loadup.el ++++ b/lisp/loadup.el +@@ -479,7 +479,8 @@ lost after dumping"))) + ((equal dump-mode "dump") "emacs") + ((equal dump-mode "bootstrap") "emacs") + ((equal dump-mode "pbootstrap") "bootstrap-emacs.pdmp") +- (t (error "unrecognized dump mode %s" dump-mode))))) ++ (t (error "unrecognized dump mode %s" dump-mode)))) ++ (exec-path nil)) + (message "Dumping under the name %s" output) + (condition-case () + (delete-file output) -- cgit v1.2.3 From 04c4ef351fa7d0702f09a5770e2d99544c45d205 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 24 Dec 2019 23:34:03 +0100 Subject: gnu: Add gcc-arm-none-eabi-7-2018-q2-update. * gnu/packages/embedded.scm (gcc-arm-none-eabi-7-2018-q2-update): New variable. * gnu/packages/patches/gcc-7-cross-environment-variables.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/embedded.scm | 78 ++++++++++++++++++++++ .../gcc-7-cross-environment-variables.patch | 67 +++++++++++++++++++ 3 files changed, 146 insertions(+) create mode 100644 gnu/packages/patches/gcc-7-cross-environment-variables.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 3ed6808edb..b7c2459d1f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -871,6 +871,7 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-6-source-date-epoch-1.patch \ %D%/packages/patches/gcc-6-source-date-epoch-2.patch \ %D%/packages/patches/gcc-7-cross-mingw.patch \ + %D%/packages/patches/gcc-7-cross-environment-variables.patch \ %D%/packages/patches/gcc-8-cross-environment-variables.patch \ %D%/packages/patches/gcc-8-strmov-store-file-names.patch \ %D%/packages/patches/gcc-9-asan-fix-limits-include.patch \ diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm index 4087e042c6..d2918c9263 100644 --- a/gnu/packages/embedded.scm +++ b/gnu/packages/embedded.scm @@ -207,6 +207,84 @@ (define-public newlib-nano-arm-none-eabi "--disable-nls")))) (synopsis "Newlib variant for small systems with limited memory"))) + +;;; The following definitions are for the "7-2018-q2-update" variant of the +;;; ARM cross toolchain as offered on https://developer.arm.com +(define-public gcc-arm-none-eabi-7-2018-q2-update + (let ((xgcc (cross-gcc "arm-none-eabi" + #:xgcc gcc-7 + #:xbinutils (cross-binutils "arm-none-eabi"))) + (revision "1") + (svn-revision 261907)) + (package (inherit xgcc) + (version (string-append "7-2018-q2-update-" + revision "." (number->string svn-revision))) + (source + (origin + (method svn-fetch) + (uri (svn-reference + (url "svn://gcc.gnu.org/svn/gcc/branches/ARM/embedded-7-branch/") + (revision svn-revision))) + (file-name (string-append "gcc-arm-embedded-" version "-checkout")) + (sha256 + (base32 + "192ggs63bixf3irpijgfkjks73yx1r3a4i6grk1y0i0iny76pmx5")) + (patches + (append + (origin-patches (package-source gcc-7)) + (search-patches "gcc-7-cross-environment-variables.patch"))))) + (native-inputs + `(("gcc" ,gcc-5) + ("flex" ,flex) + ("isl" ,isl-0.18) + ,@(alist-delete "isl" (package-native-inputs xgcc)))) + (arguments + (substitute-keyword-arguments (package-arguments xgcc) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'expand-version-string + (lambda _ + (make-file-writable "gcc/DEV-PHASE") + (with-output-to-file "gcc/DEV-PHASE" + (lambda () + (display "7-2018-q2-update"))) + #t)) + (add-after 'unpack 'fix-genmultilib + (lambda _ + (substitute* "gcc/genmultilib" + (("#!/bin/sh") (string-append "#!" (which "sh")))) + #t)))) + ((#:configure-flags flags) + ;; The configure flags are largely identical to the flags used by the + ;; "GCC ARM embedded" project. + `(append (list "--enable-multilib" + "--with-newlib" + "--with-multilib-list=rmprofile" + "--with-host-libstdcxx=-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm" + "--enable-plugins" + "--disable-decimal-float" + "--disable-libffi" + "--disable-libgomp" + "--disable-libmudflap" + "--disable-libquadmath" + "--disable-libssp" + "--disable-libstdcxx-pch" + "--disable-nls" + "--disable-shared" + "--disable-threads" + "--disable-tls") + (delete "--disable-multilib" ,flags))))) + (native-search-paths + (list (search-path-specification + (variable "CROSS_C_INCLUDE_PATH") + (files '("arm-none-eabi/include"))) + (search-path-specification + (variable "CROSS_CPLUS_INCLUDE_PATH") + (files '("arm-none-eabi/include"))) + (search-path-specification + (variable "CROSS_LIBRARY_PATH") + (files '("arm-none-eabi/lib")))))))) + (define (make-libstdc++-arm-none-eabi xgcc newlib) (let ((libstdc++ (make-libstdc++ xgcc))) (package (inherit libstdc++) diff --git a/gnu/packages/patches/gcc-7-cross-environment-variables.patch b/gnu/packages/patches/gcc-7-cross-environment-variables.patch new file mode 100644 index 0000000000..99ae36f103 --- /dev/null +++ b/gnu/packages/patches/gcc-7-cross-environment-variables.patch @@ -0,0 +1,67 @@ +Search path environment variables for cross-compilers. See the discussion +at . + +Note: Touch 'C_INCLUDE_PATH' et al. rather than 'CPATH', as discussed +at . + +diff --git a/gcc/gcc.c b/gcc/gcc.c +index eced0d5..08dec2b 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -4317,7 +4317,7 @@ process_command (unsigned int decoded_options_count, + } + + temp = env.get (LIBRARY_PATH_ENV); +- if (temp && *cross_compile == '0') ++ if (temp) + { + const char *startp, *endp; + char *nstore = (char *) alloca (strlen (temp) + 3); +diff --git a/gcc/incpath.c b/gcc/incpath.c +index 98fe5ec..96aff65 100644 +--- a/gcc/incpath.c ++++ b/gcc/incpath.c +@@ -461,8 +461,8 @@ register_include_chains (cpp_reader *pfile, const char *sysroot, + int stdinc, int cxx_stdinc, int verbose) + { + static const char *const lang_env_vars[] = +- { "C_INCLUDE_PATH", "CPLUS_INCLUDE_PATH", +- "OBJC_INCLUDE_PATH", "OBJCPLUS_INCLUDE_PATH" }; ++ { "CROSS_C_INCLUDE_PATH", "CROSS_CPLUS_INCLUDE_PATH", ++ "CROSS_OBJC_INCLUDE_PATH", "CROSS_OBJCPLUS_INCLUDE_PATH" }; + cpp_options *cpp_opts = cpp_get_options (pfile); + size_t idx = (cpp_opts->objc ? 2: 0); + +@@ -473,7 +473,7 @@ register_include_chains (cpp_reader *pfile, const char *sysroot, + + /* CPATH and language-dependent environment variables may add to the + include chain. */ +- add_env_var_paths ("CPATH", BRACKET); ++ add_env_var_paths ("CROSS_CPATH", BRACKET); + add_env_var_paths (lang_env_vars[idx], SYSTEM); + + target_c_incpath.extra_pre_includes (sysroot, iprefix, stdinc); +diff --git a/gcc/system.h b/gcc/system.h +index 0cbf60a..3242c68 100644 +--- a/gcc/system.h ++++ b/gcc/system.h +@@ -1169,4 +1169,6 @@ helper_const_non_const_cast (const char *p) + /* Get definitions of HOST_WIDE_INT. */ + #include "hwint.h" + ++#define LIBRARY_PATH_ENV "CROSS_LIBRARY_PATH" ++ + #endif /* ! GCC_SYSTEM_H */ +diff --git a/gcc/tlink.c b/gcc/tlink.c +index a2a7db0..2d96872 100644 +--- a/gcc/tlink.c ++++ b/gcc/tlink.c +@@ -456,7 +456,7 @@ recompile_files (void) + file *f; + + putenv (xstrdup ("COMPILER_PATH=")); +- putenv (xstrdup ("LIBRARY_PATH=")); ++ putenv (xstrdup (LIBRARY_PATH_ENV "=")); + + while ((f = file_pop ()) != NULL) + { -- cgit v1.2.3 From f9d328833fc1f5d0fb76b61b12d1a3cb013932e6 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 5 Dec 2019 01:47:47 +0530 Subject: gnu: libgeotiff: Update to 1.5.1. * gnu/packages/patches/libgeotiff-adapt-test-script-for-proj-6.2.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/geo.scm (libgeotiff): Update to 1.5.1. [inputs]: Replace proj.4 with proj. [sources]: Add libgeotiff-adapt-test-script-for-proj-6.2.patch to patches. --- gnu/local.mk | 1 + gnu/packages/geo.scm | 17 +++--- ...libgeotiff-adapt-test-script-for-proj-6.2.patch | 63 ++++++++++++++++++++++ 3 files changed, 72 insertions(+), 9 deletions(-) create mode 100644 gnu/packages/patches/libgeotiff-adapt-test-script-for-proj-6.2.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index b7c2459d1f..2f1b3c4baf 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1063,6 +1063,7 @@ dist_patch_DATA = \ %D%/packages/patches/libexif-CVE-2017-7544.patch \ %D%/packages/patches/libexif-CVE-2018-20030.patch \ %D%/packages/patches/libextractor-exiv2.patch \ + %D%/packages/patches/libgeotiff-adapt-test-script-for-proj-6.2.patch \ %D%/packages/patches/libgit2-avoid-python.patch \ %D%/packages/patches/libgit2-mtime-0.patch \ %D%/packages/patches/libgnome-encoding.patch \ diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index d4c2c3625f..ddd50457b4 100644 --- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -43,6 +43,7 @@ (define-module (gnu packages geo) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (gnu packages) #:use-module (gnu packages astronomy) #:use-module (gnu packages autotools) #:use-module (gnu packages boost) @@ -227,32 +228,30 @@ (define-public libgaiagraphics (define-public libgeotiff (package (name "libgeotiff") - (version "1.4.3") + (version "1.5.1") (source (origin (method url-fetch) (uri (string-append "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-" version ".tar.gz")) + (patches (search-patches + ;; See libgeotiff 1.5.1 issue + ;; https://github.com/OSGeo/libgeotiff/issues/22 + "libgeotiff-adapt-test-script-for-proj-6.2.patch")) (sha256 - (base32 "0rbjqixi4c8yz19larlzq6jda0px2gpmpp9c52cyhplbjsdhsldq")) + (base32 "0b31mlzcv5b1y7jdvb7p0pa3xradrg3x5g32ym911lbhq4rrgsgr")) (modules '((guix build utils))) (snippet '(begin ;; Remove .csv files, distributed from EPSG under a restricted ;; license. See LICENSE for full license text. (for-each delete-file (find-files "." "\\.csv$")) - ;; Now that we have removed the csv files, we need to modify the Makefile. - (substitute* "Makefile.in" - (("^all-am: .*$") - "all-am: Makefile $(LTLIBRARIES) $(HEADERS) geo_config.h\n") - (("^install-data-am: .*$") - "install-data-am: install-includeHEADERS")) #t)))) (build-system gnu-build-system) (inputs `(("libjpeg-turbo" ,libjpeg-turbo) ("libtiff" ,libtiff) - ("proj.4" ,proj.4) + ("proj" ,proj) ("zlib" ,zlib))) (arguments `(#:configure-flags diff --git a/gnu/packages/patches/libgeotiff-adapt-test-script-for-proj-6.2.patch b/gnu/packages/patches/libgeotiff-adapt-test-script-for-proj-6.2.patch new file mode 100644 index 0000000000..746610c095 --- /dev/null +++ b/gnu/packages/patches/libgeotiff-adapt-test-script-for-proj-6.2.patch @@ -0,0 +1,63 @@ +From 678ffd97db2d63cf6856428bea65a93e069f812f Mon Sep 17 00:00:00 2001 +From: Even Rouault +Date: Wed, 4 Sep 2019 16:11:37 +0200 +Subject: [PATCH 1/2] Adapt test script for PROJ 6.2 EPSG database (fixes #22) + +--- + libgeotiff/test/testlistgeo | 8 +++++++- + libgeotiff/test/testlistgeo_out.dist | 4 ++-- + 2 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/libgeotiff/test/testlistgeo b/libgeotiff/test/testlistgeo +index 7fb4a2f..571f5d0 100755 +--- a/test/testlistgeo ++++ b/test/testlistgeo +@@ -210,10 +210,15 @@ echo "Testing listgeo equidistant_cylindrical.tif" >> ${OUT} + $EXE ${DATA_DIR}/equidistant_cylindrical.tif >>${OUT} + echo "" >>${OUT} + ++# Normalize for results depending on the exact version of PROJ / EPSG database ++sed "s/ETRS89-extended/ETRS89/g" < ${OUT} > ${OUT}.tmp ++mv ${OUT}.tmp ${OUT} ++ ++sed "s/ETRS89-extended/ETRS89/g" < ${TEST_CLI_DIR}/testlistgeo_out.dist > testlistgeo_out.dist.tmp + + # do 'diff' with distribution results + echo "diff ${OUT} with testlistgeo_out.dist" +-diff -u ${OUT} ${TEST_CLI_DIR}/testlistgeo_out.dist ++diff -u ${OUT} testlistgeo_out.dist.tmp + if [ $? -ne 0 ] ; then + echo "" + echo "PROBLEMS HAVE OCCURRED" +@@ -224,6 +229,7 @@ else + echo "TEST OK" + echo "test file ${OUT} removed" + echo ++ rm testlistgeo_out.dist.tmp + /bin/rm -f ${OUT} + exit 0 + fi +diff --git a/libgeotiff/test/testlistgeo_out.dist b/libgeotiff/test/testlistgeo_out.dist +index 68a948c..c157f00 100644 +--- a/test/testlistgeo_out.dist ++++ b/test/testlistgeo_out.dist +@@ -1738,11 +1738,11 @@ Geotiff_Information: + Keyed_Information: + GTModelTypeGeoKey (Short,1): ModelTypeProjected + GTRasterTypeGeoKey (Short,1): RasterPixelIsArea +- ProjectedCSTypeGeoKey (Short,1): Code-3035 (ETRS89 / LAEA Europe) ++ ProjectedCSTypeGeoKey (Short,1): Code-3035 (ETRS89-extended / LAEA Europe) + End_Of_Keys. + End_Of_Geotiff. + +-PCS = 3035 (ETRS89 / LAEA Europe) ++PCS = 3035 (ETRS89-extended / LAEA Europe) + Projection = 19986 (Europe Equal Area 2001) + Projection Method: CT_LambertAzimEqualArea + ProjCenterLatGeoKey: 52.000000 ( 52d 0' 0.00"N) + +From 15af10648c4cb7b4c55cbe08caaf9884c1d156d9 Mon Sep 17 00:00:00 2001 +From: Even Rouault +Date: Wed, 4 Sep 2019 19:13:11 +0200 +Subject: [PATCH 2/2] appveyor.yml: build vcpkg from source to fix issue with + VS2015 -- cgit v1.2.3 From a8e149434eb1500026256747b4ed21b8bab95926 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Sat, 7 Dec 2019 13:22:04 +0100 Subject: gnu: Add audiofile. Patches should fix all CVEs reported by `guix lint`: CVE-2015-7747; CVE-2017-6827, CVE-2017-6828, CVE-2017-6829, CVE-2017-6830, CVE-2017-6831, CVE-2017-6832, CVE-2017-6833, CVE-2017-6834, CVE-2017-6835, CVE-2017-6836, CVE-2017-6837, CVE-2017-6838, CVE-2017-6839; CVE-2018-13440; CVE-2018-17095 Since the patches do not reference to CVEs, it's a bit hard to tell which patch actually closes which CVE. Debian reports all these to be closed by the patches below and NixPkgs provides references. * gnu/packages/audio.scm (audiofile): New variable. * gnu/packages/patches/audiofile-fix-datatypes-in-tests.patch, gnu/packages/patches/audiofile-fix-sign-conversion.patch, gnu/packages/patches/audiofile-CVE-2015-7747.patch, gnu/packages/patches/audiofile-CVE-2018-13440.patch, gnu/packages/patches/audiofile-CVE-2018-17095.patch, gnu/packages/patches/audiofile-Check-the-number-of-coefficients.patch, gnu/packages/patches/audiofile-Fail-on-error-in-parseFormat.patch, gnu/packages/patches/audiofile-Fix-index-overflow-in-IMA.cpp.patch, gnu/packages/patches/audiofile-Fix-multiply-overflow-sfconvert.patch, gnu/packages/patches/audiofile-Fix-overflow-in-MSADPCM-decodeSam.patch, gnu/packages/patches/audiofile-division-by-zero-BlockCodec-runPull.patch, gnu/packages/patches/audiofile-hurd.patch, gnu/packages/patches/audiofile-signature-of-multiplyCheckOverflow.patch: New files. * gnu/local.mk: Add them. --- gnu/local.mk | 13 + gnu/packages/audio.scm | 49 +++ gnu/packages/patches/audiofile-CVE-2015-7747.patch | 156 +++++++++ .../patches/audiofile-CVE-2018-13440.patch | 28 ++ .../patches/audiofile-CVE-2018-17095.patch | 26 ++ ...udiofile-Check-the-number-of-coefficients.patch | 30 ++ .../audiofile-Fail-on-error-in-parseFormat.patch | 36 ++ .../audiofile-Fix-index-overflow-in-IMA.cpp.patch | 33 ++ ...audiofile-Fix-multiply-overflow-sfconvert.patch | 66 ++++ ...diofile-Fix-overflow-in-MSADPCM-decodeSam.patch | 116 +++++++ ...ofile-division-by-zero-BlockCodec-runPull.patch | 21 ++ .../patches/audiofile-fix-datatypes-in-tests.patch | 54 +++ .../patches/audiofile-fix-sign-conversion.patch | 26 ++ gnu/packages/patches/audiofile-hurd.patch | 381 +++++++++++++++++++++ ...iofile-signature-of-multiplyCheckOverflow.patch | 35 ++ 15 files changed, 1070 insertions(+) create mode 100644 gnu/packages/patches/audiofile-CVE-2015-7747.patch create mode 100644 gnu/packages/patches/audiofile-CVE-2018-13440.patch create mode 100644 gnu/packages/patches/audiofile-CVE-2018-17095.patch create mode 100644 gnu/packages/patches/audiofile-Check-the-number-of-coefficients.patch create mode 100644 gnu/packages/patches/audiofile-Fail-on-error-in-parseFormat.patch create mode 100644 gnu/packages/patches/audiofile-Fix-index-overflow-in-IMA.cpp.patch create mode 100644 gnu/packages/patches/audiofile-Fix-multiply-overflow-sfconvert.patch create mode 100644 gnu/packages/patches/audiofile-Fix-overflow-in-MSADPCM-decodeSam.patch create mode 100644 gnu/packages/patches/audiofile-division-by-zero-BlockCodec-runPull.patch create mode 100644 gnu/packages/patches/audiofile-fix-datatypes-in-tests.patch create mode 100644 gnu/packages/patches/audiofile-fix-sign-conversion.patch create mode 100644 gnu/packages/patches/audiofile-hurd.patch create mode 100644 gnu/packages/patches/audiofile-signature-of-multiplyCheckOverflow.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 2f1b3c4baf..e4eaa4e848 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -714,6 +714,19 @@ 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/audiofile-fix-datatypes-in-tests.patch \ + %D%/packages/patches/audiofile-fix-sign-conversion.patch \ + %D%/packages/patches/audiofile-CVE-2015-7747.patch \ + %D%/packages/patches/audiofile-CVE-2018-13440.patch \ + %D%/packages/patches/audiofile-CVE-2018-17095.patch \ + %D%/packages/patches/audiofile-Check-the-number-of-coefficients.patch \ + %D%/packages/patches/audiofile-Fail-on-error-in-parseFormat.patch \ + %D%/packages/patches/audiofile-Fix-index-overflow-in-IMA.cpp.patch \ + %D%/packages/patches/audiofile-Fix-multiply-overflow-sfconvert.patch \ + %D%/packages/patches/audiofile-Fix-overflow-in-MSADPCM-decodeSam.patch \ + %D%/packages/patches/audiofile-division-by-zero-BlockCodec-runPull.patch \ + %D%/packages/patches/audiofile-hurd.patch \ + %D%/packages/patches/audiofile-signature-of-multiplyCheckOverflow.patch \ %D%/packages/patches/automake-skip-amhello-tests.patch \ %D%/packages/patches/avahi-CVE-2018-1000845.patch \ %D%/packages/patches/avahi-localstatedir.patch \ diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 87d6947657..76c59f33cc 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -26,6 +26,7 @@ ;;; Copyright © 2019 Alexandros Theodotou ;;; Copyright © 2019 Christopher Lemmer Webber ;;; Copyright © 2019 Jan Wielkiewicz +;;; Copyright © 2019 Hartmt Goebel ;;; ;;; This file is part of GNU Guix. ;;; @@ -467,6 +468,54 @@ (define-public audacity tools.") (license license:gpl2+))) +(define-public audiofile + (package + (name "audiofile") + (version "0.3.6") + (source + (origin + (method url-fetch) + (uri (string-append + "https://audiofile.68k.org/audiofile-" version ".tar.gz")) + (sha256 + (base32 "0rb927zknk9kmhprd8rdr4azql4gn2dp75a36iazx2xhkbqhvind")) + (patches + ;; CVE references according to nixpgs + (search-patches + "audiofile-fix-datatypes-in-tests.patch" + "audiofile-fix-sign-conversion.patch" + "audiofile-hurd.patch" + "audiofile-CVE-2015-7747.patch" + ;; CVE-2017-6829: + "audiofile-Fix-index-overflow-in-IMA.cpp.patch" + ;; CVE-2017-6827, CVE-2017-6828, CVE-2017-6832, CVE-2017-6835, + ;; CVE-2017-6837: + "audiofile-Check-the-number-of-coefficients.patch" + ;; CVE-2017-6839: + "audiofile-Fix-overflow-in-MSADPCM-decodeSam.patch" + ;; CVE-2017-6830, CVE-2017-6834, CVE-2017-6836, CVE-2017-6838: + "audiofile-Fix-multiply-overflow-sfconvert.patch" + "audiofile-signature-of-multiplyCheckOverflow.patch" + ;; CVE-2017-6831: + "audiofile-Fail-on-error-in-parseFormat.patch" + ;; CVE-2017-6833: + "audiofile-division-by-zero-BlockCodec-runPull.patch" + "audiofile-CVE-2018-13440.patch" + "audiofile-CVE-2018-17095.patch")))) + (build-system gnu-build-system) + (inputs + `(("alsa-lib" ,alsa-lib))) + (home-page "https://audiofile.68k.org/") + (synopsis "Library to handle various audio file formats") + (description "This is an open-source version of SGI's audiofile library. +It provides a uniform programming interface for processing of audio data to +and from audio files of many common formats. + +Currently supported file formats include AIFF/AIFF-C, WAVE, and NeXT/Sun +.snd/.au, BICS, and raw data. Supported compression formats are currently +G.711 mu-law and A-law.") + (license license:lgpl2.1+))) + (define-public autotalent (package (name "autotalent") diff --git a/gnu/packages/patches/audiofile-CVE-2015-7747.patch b/gnu/packages/patches/audiofile-CVE-2015-7747.patch new file mode 100644 index 0000000000..3325639591 --- /dev/null +++ b/gnu/packages/patches/audiofile-CVE-2015-7747.patch @@ -0,0 +1,156 @@ +Description: fix buffer overflow when changing both sample format and + number of channels +Origin: https://github.com/mpruett/audiofile/pull/25 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/audiofile/+bug/1502721 +Bug-Debian: https://bugs.debian.org/801102 + +--- a/libaudiofile/modules/ModuleState.cpp ++++ b/libaudiofile/modules/ModuleState.cpp +@@ -402,7 +402,7 @@ status ModuleState::arrange(AFfilehandle + addModule(new Transform(outfc, in.pcm, out.pcm)); + + if (in.channelCount != out.channelCount) +- addModule(new ApplyChannelMatrix(infc, isReading, ++ addModule(new ApplyChannelMatrix(outfc, isReading, + in.channelCount, out.channelCount, + in.pcm.minClip, in.pcm.maxClip, + track->channelMatrix)); +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -26,6 +26,7 @@ TESTS = \ + VirtualFile \ + floatto24 \ + query2 \ ++ sixteen-stereo-to-eight-mono \ + sixteen-to-eight \ + testchannelmatrix \ + testdouble \ +@@ -139,6 +140,7 @@ printmarkers_SOURCES = printmarkers.c + printmarkers_LDADD = $(LIBAUDIOFILE) -lm + + sixteen_to_eight_SOURCES = sixteen-to-eight.c TestUtilities.cpp TestUtilities.h ++sixteen_stereo_to_eight_mono_SOURCES = sixteen-stereo-to-eight-mono.c TestUtilities.cpp TestUtilities.h + + testchannelmatrix_SOURCES = testchannelmatrix.c TestUtilities.cpp TestUtilities.h + +--- /dev/null ++++ b/test/sixteen-stereo-to-eight-mono.c +@@ -0,0 +1,118 @@ ++/* ++ Audio File Library ++ ++ Copyright 2000, Silicon Graphics, Inc. ++ ++ This program 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 2 of the License, or ++ (at your option) any later version. ++ ++ This program 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 this program; if not, write to the Free Software Foundation, Inc., ++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++*/ ++ ++/* ++ sixteen-stereo-to-eight-mono.c ++ ++ This program tests the conversion from 2-channel 16-bit integers to ++ 1-channel 8-bit integers. ++*/ ++ ++#ifdef HAVE_CONFIG_H ++#include ++#endif ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "TestUtilities.h" ++ ++int main (int argc, char **argv) ++{ ++ AFfilehandle file; ++ AFfilesetup setup; ++ int16_t frames16[] = {14298, 392, 3923, -683, 958, -1921}; ++ int8_t frames8[] = {28, 6, -2}; ++ int i, frameCount = 3; ++ int8_t byte; ++ AFframecount result; ++ ++ setup = afNewFileSetup(); ++ ++ afInitFileFormat(setup, AF_FILE_WAVE); ++ ++ afInitSampleFormat(setup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16); ++ afInitChannels(setup, AF_DEFAULT_TRACK, 2); ++ ++ char *testFileName; ++ if (!createTemporaryFile("sixteen-to-eight", &testFileName)) ++ { ++ fprintf(stderr, "Could not create temporary file.\n"); ++ exit(EXIT_FAILURE); ++ } ++ ++ file = afOpenFile(testFileName, "w", setup); ++ if (file == AF_NULL_FILEHANDLE) ++ { ++ fprintf(stderr, "could not open file for writing\n"); ++ exit(EXIT_FAILURE); ++ } ++ ++ afFreeFileSetup(setup); ++ ++ afWriteFrames(file, AF_DEFAULT_TRACK, frames16, frameCount); ++ ++ afCloseFile(file); ++ ++ file = afOpenFile(testFileName, "r", AF_NULL_FILESETUP); ++ if (file == AF_NULL_FILEHANDLE) ++ { ++ fprintf(stderr, "could not open file for reading\n"); ++ exit(EXIT_FAILURE); ++ } ++ ++ afSetVirtualSampleFormat(file, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 8); ++ afSetVirtualChannels(file, AF_DEFAULT_TRACK, 1); ++ ++ for (i=0; i +Date: Thu, 27 Sep 2018 10:48:45 +0200 +Subject: [PATCH] ModuleState: handle compress/decompress init failure + +When the unit initcompress or initdecompress function fails, +m_fileModule is NULL. Return AF_FAIL in that case instead of +causing NULL pointer dereferences later. + +Fixes #49 +--- + libaudiofile/modules/ModuleState.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/libaudiofile/modules/ModuleState.cpp b/libaudiofile/modules/ModuleState.cpp +index 0c29d7a..070fd9b 100644 +--- a/libaudiofile/modules/ModuleState.cpp ++++ b/libaudiofile/modules/ModuleState.cpp +@@ -75,6 +75,9 @@ status ModuleState::initFileModule(AFfilehandle file, Track *track) + m_fileModule = unit->initcompress(track, file->m_fh, file->m_seekok, + file->m_fileFormat == AF_FILE_RAWDATA, &chunkFrames); + ++ if (!m_fileModule) ++ return AF_FAIL; ++ + if (unit->needsRebuffer) + { + assert(unit->nativeSampleFormat == AF_SAMPFMT_TWOSCOMP); diff --git a/gnu/packages/patches/audiofile-CVE-2018-17095.patch b/gnu/packages/patches/audiofile-CVE-2018-17095.patch new file mode 100644 index 0000000000..231021b9fc --- /dev/null +++ b/gnu/packages/patches/audiofile-CVE-2018-17095.patch @@ -0,0 +1,26 @@ +From 822b732fd31ffcb78f6920001e9b1fbd815fa712 Mon Sep 17 00:00:00 2001 +From: Wim Taymans +Date: Thu, 27 Sep 2018 12:11:12 +0200 +Subject: [PATCH] SimpleModule: set output chunk framecount after pull + +After pulling the data, set the output chunk to the amount of +frames we pulled so that the next module in the chain has the correct +frame count. + +Fixes #50 and #51 +--- + libaudiofile/modules/SimpleModule.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libaudiofile/modules/SimpleModule.cpp b/libaudiofile/modules/SimpleModule.cpp +index 2bae1eb..e87932c 100644 +--- a/libaudiofile/modules/SimpleModule.cpp ++++ b/libaudiofile/modules/SimpleModule.cpp +@@ -26,6 +26,7 @@ + void SimpleModule::runPull() + { + pull(m_outChunk->frameCount); ++ m_outChunk->frameCount = m_inChunk->frameCount; + run(*m_inChunk, *m_outChunk); + } + diff --git a/gnu/packages/patches/audiofile-Check-the-number-of-coefficients.patch b/gnu/packages/patches/audiofile-Check-the-number-of-coefficients.patch new file mode 100644 index 0000000000..f9427cbe61 --- /dev/null +++ b/gnu/packages/patches/audiofile-Check-the-number-of-coefficients.patch @@ -0,0 +1,30 @@ +From: Antonio Larrosa +Date: Mon, 6 Mar 2017 12:51:22 +0100 +Subject: Always check the number of coefficients + +When building the library with NDEBUG, asserts are eliminated +so it's better to always check that the number of coefficients +is inside the array range. + +This fixes the 00191-audiofile-indexoob issue in #41 +--- + libaudiofile/WAVE.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/libaudiofile/WAVE.cpp b/libaudiofile/WAVE.cpp +index 9dd8511..0fc48e8 100644 +--- a/libaudiofile/WAVE.cpp ++++ b/libaudiofile/WAVE.cpp +@@ -281,6 +281,12 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size) + + /* numCoefficients should be at least 7. */ + assert(numCoefficients >= 7 && numCoefficients <= 255); ++ if (numCoefficients < 7 || numCoefficients > 255) ++ { ++ _af_error(AF_BAD_HEADER, ++ "Bad number of coefficients"); ++ return AF_FAIL; ++ } + + m_msadpcmNumCoefficients = numCoefficients; + diff --git a/gnu/packages/patches/audiofile-Fail-on-error-in-parseFormat.patch b/gnu/packages/patches/audiofile-Fail-on-error-in-parseFormat.patch new file mode 100644 index 0000000000..50cd3dc9a3 --- /dev/null +++ b/gnu/packages/patches/audiofile-Fail-on-error-in-parseFormat.patch @@ -0,0 +1,36 @@ +From: Antonio Larrosa +Date: Mon, 6 Mar 2017 18:59:26 +0100 +Subject: Actually fail when error occurs in parseFormat + +When there's an unsupported number of bits per sample or an invalid +number of samples per block, don't only print an error message using +the error handler, but actually stop parsing the file. + +This fixes #35 (also reported at +https://bugzilla.opensuse.org/show_bug.cgi?id=1026983 and +https://blogs.gentoo.org/ago/2017/02/20/audiofile-heap-based-buffer-overflow-in-imadecodeblockwave-ima-cpp/ +) +--- + libaudiofile/WAVE.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libaudiofile/WAVE.cpp b/libaudiofile/WAVE.cpp +index 0fc48e8..d04b796 100644 +--- a/libaudiofile/WAVE.cpp ++++ b/libaudiofile/WAVE.cpp +@@ -332,6 +332,7 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size) + { + _af_error(AF_BAD_NOT_IMPLEMENTED, + "IMA ADPCM compression supports only 4 bits per sample"); ++ return AF_FAIL; + } + + int bytesPerBlock = (samplesPerBlock + 14) / 8 * 4 * channelCount; +@@ -339,6 +340,7 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size) + { + _af_error(AF_BAD_CODEC_CONFIG, + "Invalid samples per block for IMA ADPCM compression"); ++ return AF_FAIL; + } + + track->f.sampleWidth = 16; diff --git a/gnu/packages/patches/audiofile-Fix-index-overflow-in-IMA.cpp.patch b/gnu/packages/patches/audiofile-Fix-index-overflow-in-IMA.cpp.patch new file mode 100644 index 0000000000..c1047af06c --- /dev/null +++ b/gnu/packages/patches/audiofile-Fix-index-overflow-in-IMA.cpp.patch @@ -0,0 +1,33 @@ +From: Antonio Larrosa +Date: Mon, 6 Mar 2017 18:02:31 +0100 +Subject: clamp index values to fix index overflow in IMA.cpp + +This fixes #33 +(also reported at https://bugzilla.opensuse.org/show_bug.cgi?id=1026981 +and https://blogs.gentoo.org/ago/2017/02/20/audiofile-global-buffer-overflow-in-decodesample-ima-cpp/) +--- + libaudiofile/modules/IMA.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libaudiofile/modules/IMA.cpp b/libaudiofile/modules/IMA.cpp +index 7476d44..df4aad6 100644 +--- a/libaudiofile/modules/IMA.cpp ++++ b/libaudiofile/modules/IMA.cpp +@@ -169,7 +169,7 @@ int IMA::decodeBlockWAVE(const uint8_t *encoded, int16_t *decoded) + if (encoded[1] & 0x80) + m_adpcmState[c].previousValue -= 0x10000; + +- m_adpcmState[c].index = encoded[2]; ++ m_adpcmState[c].index = clamp(encoded[2], 0, 88); + + *decoded++ = m_adpcmState[c].previousValue; + +@@ -210,7 +210,7 @@ int IMA::decodeBlockQT(const uint8_t *encoded, int16_t *decoded) + predictor -= 0x10000; + + state.previousValue = clamp(predictor, MIN_INT16, MAX_INT16); +- state.index = encoded[1] & 0x7f; ++ state.index = clamp(encoded[1] & 0x7f, 0, 88); + encoded += 2; + + for (int n=0; n +Date: Mon, 6 Mar 2017 13:54:52 +0100 +Subject: Check for multiplication overflow in sfconvert + +Checks that a multiplication doesn't overflow when +calculating the buffer size, and if it overflows, +reduce the buffer size instead of failing. + +This fixes the 00192-audiofile-signintoverflow-sfconvert case +in #41 +--- + sfcommands/sfconvert.c | 34 ++++++++++++++++++++++++++++++++-- + 1 file changed, 32 insertions(+), 2 deletions(-) + +diff --git a/sfcommands/sfconvert.c b/sfcommands/sfconvert.c +index 80a1bc4..970a3e4 100644 +--- a/sfcommands/sfconvert.c ++++ b/sfcommands/sfconvert.c +@@ -45,6 +45,33 @@ void printusage (void); + void usageerror (void); + bool copyaudiodata (AFfilehandle infile, AFfilehandle outfile, int trackid); + ++int firstBitSet(int x) ++{ ++ int position=0; ++ while (x!=0) ++ { ++ x>>=1; ++ ++position; ++ } ++ return position; ++} ++ ++#ifndef __has_builtin ++#define __has_builtin(x) 0 ++#endif ++ ++int multiplyCheckOverflow(int a, int b, int *result) ++{ ++#if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) ++ return __builtin_mul_overflow(a, b, result); ++#else ++ if (firstBitSet(a)+firstBitSet(b)>31) // int is signed, so we can't use 32 bits ++ return true; ++ *result = a * b; ++ return false; ++#endif ++} ++ + int main (int argc, char **argv) + { + if (argc == 2) +@@ -323,8 +350,11 @@ bool copyaudiodata (AFfilehandle infile, AFfilehandle outfile, int trackid) + { + int frameSize = afGetVirtualFrameSize(infile, trackid, 1); + +- const int kBufferFrameCount = 65536; +- void *buffer = malloc(kBufferFrameCount * frameSize); ++ int kBufferFrameCount = 65536; ++ int bufferSize; ++ while (multiplyCheckOverflow(kBufferFrameCount, frameSize, &bufferSize)) ++ kBufferFrameCount /= 2; ++ void *buffer = malloc(bufferSize); + + AFframecount totalFrames = afGetFrameCount(infile, AF_DEFAULT_TRACK); + AFframecount totalFramesWritten = 0; diff --git a/gnu/packages/patches/audiofile-Fix-overflow-in-MSADPCM-decodeSam.patch b/gnu/packages/patches/audiofile-Fix-overflow-in-MSADPCM-decodeSam.patch new file mode 100644 index 0000000000..2be930b924 --- /dev/null +++ b/gnu/packages/patches/audiofile-Fix-overflow-in-MSADPCM-decodeSam.patch @@ -0,0 +1,116 @@ +From: Antonio Larrosa +Date: Mon, 6 Mar 2017 13:43:53 +0100 +Subject: Check for multiplication overflow in MSADPCM decodeSample + +Check for multiplication overflow (using __builtin_mul_overflow +if available) in MSADPCM.cpp decodeSample and return an empty +decoded block if an error occurs. + +This fixes the 00193-audiofile-signintoverflow-MSADPCM case of #41 +--- + libaudiofile/modules/BlockCodec.cpp | 5 ++-- + libaudiofile/modules/MSADPCM.cpp | 47 +++++++++++++++++++++++++++++++++---- + 2 files changed, 46 insertions(+), 6 deletions(-) + +diff --git a/libaudiofile/modules/BlockCodec.cpp b/libaudiofile/modules/BlockCodec.cpp +index 45925e8..4731be1 100644 +--- a/libaudiofile/modules/BlockCodec.cpp ++++ b/libaudiofile/modules/BlockCodec.cpp +@@ -52,8 +52,9 @@ void BlockCodec::runPull() + // Decompress into m_outChunk. + for (int i=0; i(m_inChunk->buffer) + i * m_bytesPerPacket, +- static_cast(m_outChunk->buffer) + i * m_framesPerPacket * m_track->f.channelCount); ++ if (decodeBlock(static_cast(m_inChunk->buffer) + i * m_bytesPerPacket, ++ static_cast(m_outChunk->buffer) + i * m_framesPerPacket * m_track->f.channelCount)==0) ++ break; + + framesRead += m_framesPerPacket; + } +diff --git a/libaudiofile/modules/MSADPCM.cpp b/libaudiofile/modules/MSADPCM.cpp +index 8ea3c85..ef9c38c 100644 +--- a/libaudiofile/modules/MSADPCM.cpp ++++ b/libaudiofile/modules/MSADPCM.cpp +@@ -101,24 +101,60 @@ static const int16_t adaptationTable[] = + 768, 614, 512, 409, 307, 230, 230, 230 + }; + ++int firstBitSet(int x) ++{ ++ int position=0; ++ while (x!=0) ++ { ++ x>>=1; ++ ++position; ++ } ++ return position; ++} ++ ++#ifndef __has_builtin ++#define __has_builtin(x) 0 ++#endif ++ ++int multiplyCheckOverflow(int a, int b, int *result) ++{ ++#if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) ++ return __builtin_mul_overflow(a, b, result); ++#else ++ if (firstBitSet(a)+firstBitSet(b)>31) // int is signed, so we can't use 32 bits ++ return true; ++ *result = a * b; ++ return false; ++#endif ++} ++ ++ + // Compute a linear PCM value from the given differential coded value. + static int16_t decodeSample(ms_adpcm_state &state, +- uint8_t code, const int16_t *coefficient) ++ uint8_t code, const int16_t *coefficient, bool *ok=NULL) + { + int linearSample = (state.sample1 * coefficient[0] + + state.sample2 * coefficient[1]) >> 8; ++ int delta; + + linearSample += ((code & 0x08) ? (code - 0x10) : code) * state.delta; + + linearSample = clamp(linearSample, MIN_INT16, MAX_INT16); + +- int delta = (state.delta * adaptationTable[code]) >> 8; ++ if (multiplyCheckOverflow(state.delta, adaptationTable[code], &delta)) ++ { ++ if (ok) *ok=false; ++ _af_error(AF_BAD_COMPRESSION, "Error decoding sample"); ++ return 0; ++ } ++ delta >>= 8; + if (delta < 16) + delta = 16; + + state.delta = delta; + state.sample2 = state.sample1; + state.sample1 = linearSample; ++ if (ok) *ok=true; + + return static_cast(linearSample); + } +@@ -212,13 +248,16 @@ int MSADPCM::decodeBlock(const uint8_t *encoded, int16_t *decoded) + { + uint8_t code; + int16_t newSample; ++ bool ok; + + code = *encoded >> 4; +- newSample = decodeSample(*state[0], code, coefficient[0]); ++ newSample = decodeSample(*state[0], code, coefficient[0], &ok); ++ if (!ok) return 0; + *decoded++ = newSample; + + code = *encoded & 0x0f; +- newSample = decodeSample(*state[1], code, coefficient[1]); ++ newSample = decodeSample(*state[1], code, coefficient[1], &ok); ++ if (!ok) return 0; + *decoded++ = newSample; + + encoded++; diff --git a/gnu/packages/patches/audiofile-division-by-zero-BlockCodec-runPull.patch b/gnu/packages/patches/audiofile-division-by-zero-BlockCodec-runPull.patch new file mode 100644 index 0000000000..e001133916 --- /dev/null +++ b/gnu/packages/patches/audiofile-division-by-zero-BlockCodec-runPull.patch @@ -0,0 +1,21 @@ +From: Antonio Larrosa +Date: Thu, 9 Mar 2017 10:21:18 +0100 +Subject: Check for division by zero in BlockCodec::runPull + +--- + libaudiofile/modules/BlockCodec.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libaudiofile/modules/BlockCodec.cpp b/libaudiofile/modules/BlockCodec.cpp +index 4731be1..eb2fb4d 100644 +--- a/libaudiofile/modules/BlockCodec.cpp ++++ b/libaudiofile/modules/BlockCodec.cpp +@@ -47,7 +47,7 @@ void BlockCodec::runPull() + + // Read the compressed data. + ssize_t bytesRead = read(m_inChunk->buffer, m_bytesPerPacket * blockCount); +- int blocksRead = bytesRead >= 0 ? bytesRead / m_bytesPerPacket : 0; ++ int blocksRead = (bytesRead >= 0 && m_bytesPerPacket > 0) ? bytesRead / m_bytesPerPacket : 0; + + // Decompress into m_outChunk. + for (int i=0; i +Date: Tue, 5 Jul 2016 23:26:16 -0500 +Subject: [PATCH] Fix type of test data arrays. + + + + +--- + ChangeLog | 6 ++++++ + test/Identify.cpp | 3 ++- + test/NeXT.cpp | 7 ++++--- + 3 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/test/NeXT.cpp b/test/NeXT.cpp +index 7e39850..29af877 100644 +--- a/test/NeXT.cpp ++++ b/test/NeXT.cpp +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -37,7 +38,7 @@ + + #include "TestUtilities.h" + +-const char kDataUnspecifiedLength[] = ++const uint8_t kDataUnspecifiedLength[] = + { + '.', 's', 'n', 'd', + 0, 0, 0, 24, // offset of 24 bytes +@@ -57,7 +58,7 @@ const char kDataUnspecifiedLength[] = + 0, 55 + }; + +-const char kDataTruncated[] = ++const uint8_t kDataTruncated[] = + { + '.', 's', 'n', 'd', + 0, 0, 0, 24, // offset of 24 bytes +@@ -152,7 +153,7 @@ TEST(NeXT, Truncated) + ASSERT_EQ(::unlink(testFileName.c_str()), 0); + } + +-const char kDataZeroChannels[] = ++const uint8_t kDataZeroChannels[] = + { + '.', 's', 'n', 'd', + 0, 0, 0, 24, // offset of 24 bytes diff --git a/gnu/packages/patches/audiofile-fix-sign-conversion.patch b/gnu/packages/patches/audiofile-fix-sign-conversion.patch new file mode 100644 index 0000000000..648161d620 --- /dev/null +++ b/gnu/packages/patches/audiofile-fix-sign-conversion.patch @@ -0,0 +1,26 @@ +Based on (hunk for changelog removed) +From b62c902dd258125cac86cd2df21fc898035a43d3 Mon Sep 17 00:00:00 2001 +From: Michael Pruett +Date: Mon, 29 Aug 2016 23:08:26 -0500 +Subject: [PATCH] Fix undefined behavior in sign conversion. + + +--- + ChangeLog | 5 +++++ + libaudiofile/modules/SimpleModule.h | 3 ++- + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/libaudiofile/modules/SimpleModule.h b/libaudiofile/modules/SimpleModule.h +index 03c6c69..bad85ad 100644 +--- a/libaudiofile/modules/SimpleModule.h ++++ b/libaudiofile/modules/SimpleModule.h +@@ -123,7 +123,8 @@ struct signConverter + typedef typename IntTypes::UnsignedType UnsignedType; + + static const int kScaleBits = (Format + 1) * CHAR_BIT - 1; +- static const int kMinSignedValue = -1 << kScaleBits; ++ static const int kMaxSignedValue = (((1 << (kScaleBits - 1)) - 1) << 1) + 1; ++ static const int kMinSignedValue = -kMaxSignedValue - 1; + + struct signedToUnsigned : public std::unary_function + { diff --git a/gnu/packages/patches/audiofile-hurd.patch b/gnu/packages/patches/audiofile-hurd.patch new file mode 100644 index 0000000000..b5941dcf44 --- /dev/null +++ b/gnu/packages/patches/audiofile-hurd.patch @@ -0,0 +1,381 @@ +Description: Remove usage of PATH_MAX in tests to fix FTBFS on Hurd. + jcowgill: Removed Changelog changes +Author: Pino Toscano +Origin: backport, https://github.com/mpruett/audiofile/commit/34c261034f1193a783196618f0052112e00fbcfe +Bug: https://github.com/mpruett/audiofile/pull/17 +Bug-Debian: https://bugs.debian.org/762595 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ + +--- a/test/TestUtilities.cpp ++++ b/test/TestUtilities.cpp +@@ -21,8 +21,8 @@ + #include "TestUtilities.h" + + #include +-#include + #include ++#include + #include + + bool createTemporaryFile(const std::string &prefix, std::string *path) +@@ -35,12 +35,12 @@ bool createTemporaryFile(const std::stri + return true; + } + +-bool createTemporaryFile(const char *prefix, char *path) ++bool createTemporaryFile(const char *prefix, char **path) + { +- snprintf(path, PATH_MAX, "/tmp/%s-XXXXXX", prefix); +- int fd = ::mkstemp(path); +- if (fd < 0) +- return false; +- ::close(fd); +- return true; ++ *path = NULL; ++ std::string pathString; ++ bool result = createTemporaryFile(prefix, &pathString); ++ if (result) ++ *path = ::strdup(pathString.c_str()); ++ return result; + } +--- a/test/TestUtilities.h ++++ b/test/TestUtilities.h +@@ -53,7 +53,7 @@ extern "C" { + + #include + +-bool createTemporaryFile(const char *prefix, char *path); ++bool createTemporaryFile(const char *prefix, char **path); + + #ifdef __cplusplus + } +--- a/test/floatto24.c ++++ b/test/floatto24.c +@@ -86,8 +86,8 @@ int main (int argc, char **argv) + afInitChannels(setup, AF_DEFAULT_TRACK, 1); + afInitSampleFormat(setup, AF_DEFAULT_TRACK, AF_SAMPFMT_FLOAT, 32); + +- char testFileName[PATH_MAX]; +- if (!createTemporaryFile("floatto24", testFileName)) ++ char *testFileName; ++ if (!createTemporaryFile("floatto24", &testFileName)) + { + fprintf(stderr, "Could not create temporary file.\n"); + exit(EXIT_FAILURE); +@@ -182,6 +182,7 @@ int main (int argc, char **argv) + } + + unlink(testFileName); ++ free(testFileName); + + exit(EXIT_SUCCESS); + } +--- a/test/sixteen-to-eight.c ++++ b/test/sixteen-to-eight.c +@@ -57,8 +57,8 @@ int main (int argc, char **argv) + afInitSampleFormat(setup, AF_DEFAULT_TRACK, AF_SAMPFMT_UNSIGNED, 8); + afInitChannels(setup, AF_DEFAULT_TRACK, 1); + +- char testFileName[PATH_MAX]; +- if (!createTemporaryFile("sixteen-to-eight", testFileName)) ++ char *testFileName; ++ if (!createTemporaryFile("sixteen-to-eight", &testFileName)) + { + fprintf(stderr, "Could not create temporary file.\n"); + exit(EXIT_FAILURE); +@@ -113,6 +113,7 @@ int main (int argc, char **argv) + + afCloseFile(file); + unlink(testFileName); ++ free(testFileName); + + exit(EXIT_SUCCESS); + } +--- a/test/testchannelmatrix.c ++++ b/test/testchannelmatrix.c +@@ -39,7 +39,7 @@ + + #include "TestUtilities.h" + +-static char sTestFileName[PATH_MAX]; ++static char *sTestFileName; + + const short samples[] = {300, -300, 515, -515, 2315, -2315, 9154, -9154}; + #define SAMPLE_COUNT (sizeof (samples) / sizeof (short)) +@@ -47,7 +47,11 @@ const short samples[] = {300, -300, 515, + + void cleanup (void) + { +- unlink(sTestFileName); ++ if (sTestFileName) ++ { ++ unlink(sTestFileName); ++ free(sTestFileName); ++ } + } + + void ensure (int condition, const char *message) +@@ -76,7 +80,7 @@ int main (void) + afInitFileFormat(setup, AF_FILE_AIFFC); + + /* Write stereo data to test file. */ +- ensure(createTemporaryFile("testchannelmatrix", sTestFileName), ++ ensure(createTemporaryFile("testchannelmatrix", &sTestFileName), + "could not create temporary file"); + file = afOpenFile(sTestFileName, "w", setup); + ensure(file != AF_NULL_FILEHANDLE, "could not open file for writing"); +--- a/test/testdouble.c ++++ b/test/testdouble.c +@@ -38,7 +38,7 @@ + + #include "TestUtilities.h" + +-static char sTestFileName[PATH_MAX]; ++static char *sTestFileName; + + const double samples[] = + {1.0, 0.6, -0.3, 0.95, 0.2, -0.6, 0.9, 0.4, -0.22, 0.125, 0.1, -0.4}; +@@ -48,7 +48,11 @@ void testdouble (int fileFormat); + + void cleanup (void) + { +- unlink(sTestFileName); ++ if (sTestFileName) ++ { ++ unlink(sTestFileName); ++ free(sTestFileName); ++ } + } + + void ensure (int condition, const char *message) +@@ -96,7 +100,7 @@ void testdouble (int fileFormat) + afInitSampleFormat(setup, AF_DEFAULT_TRACK, AF_SAMPFMT_DOUBLE, 64); + afInitChannels(setup, AF_DEFAULT_TRACK, 2); + +- ensure(createTemporaryFile("testdouble", sTestFileName), ++ ensure(createTemporaryFile("testdouble", &sTestFileName), + "could not create temporary file"); + file = afOpenFile(sTestFileName, "w", setup); + ensure(file != AF_NULL_FILEHANDLE, "could not open file for writing"); +--- a/test/testfloat.c ++++ b/test/testfloat.c +@@ -38,7 +38,7 @@ + + #include "TestUtilities.h" + +-static char sTestFileName[PATH_MAX]; ++static char *sTestFileName; + + const float samples[] = + {1.0, 0.6, -0.3, 0.95, 0.2, -0.6, 0.9, 0.4, -0.22, 0.125, 0.1, -0.4}; +@@ -48,7 +48,11 @@ void testfloat (int fileFormat); + + void cleanup (void) + { +- unlink(sTestFileName); ++ if (sTestFileName) ++ { ++ unlink(sTestFileName); ++ free(sTestFileName); ++ } + } + + void ensure (int condition, const char *message) +@@ -96,7 +100,7 @@ void testfloat (int fileFormat) + afInitSampleFormat(setup, AF_DEFAULT_TRACK, AF_SAMPFMT_FLOAT, 32); + afInitChannels(setup, AF_DEFAULT_TRACK, 2); + +- ensure(createTemporaryFile("testfloat", sTestFileName), ++ ensure(createTemporaryFile("testfloat", &sTestFileName), + "could not create temporary file"); + file = afOpenFile(sTestFileName, "w", setup); + ensure(file != AF_NULL_FILEHANDLE, "could not open file for writing"); +--- a/test/testmarkers.c ++++ b/test/testmarkers.c +@@ -32,15 +32,19 @@ + + #include "TestUtilities.h" + +-static char sTestFileName[PATH_MAX]; ++static char *sTestFileName; + + #define FRAME_COUNT 200 + + void cleanup (void) + { ++ if (sTestFileName) ++ { + #ifndef DEBUG +- unlink(sTestFileName); ++ unlink(sTestFileName); + #endif ++ free(sTestFileName); ++ } + } + + void ensure (int condition, const char *message) +@@ -127,7 +131,7 @@ int testmarkers (int fileformat) + + int main (void) + { +- ensure(createTemporaryFile("testmarkers", sTestFileName), ++ ensure(createTemporaryFile("testmarkers", &sTestFileName), + "could not create temporary file"); + + testmarkers(AF_FILE_AIFF); +--- a/test/twentyfour.c ++++ b/test/twentyfour.c +@@ -71,8 +71,8 @@ int main (int argc, char **argv) + afInitSampleFormat(setup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 24); + afInitChannels(setup, AF_DEFAULT_TRACK, 1); + +- char testFileName[PATH_MAX]; +- if (!createTemporaryFile("twentyfour", testFileName)) ++ char *testFileName; ++ if (!createTemporaryFile("twentyfour", &testFileName)) + { + fprintf(stderr, "could not create temporary file\n"); + exit(EXIT_FAILURE); +@@ -239,6 +239,7 @@ int main (int argc, char **argv) + exit(EXIT_FAILURE); + } + unlink(testFileName); ++ free(testFileName); + + exit(EXIT_SUCCESS); + } +--- a/test/twentyfour2.c ++++ b/test/twentyfour2.c +@@ -45,15 +45,19 @@ + + #include "TestUtilities.h" + +-static char sTestFileName[PATH_MAX]; ++static char *sTestFileName; + + #define FRAME_COUNT 10000 + + void cleanup (void) + { ++ if (sTestFileName) ++ { + #ifndef DEBUG +- unlink(sTestFileName); ++ unlink(sTestFileName); + #endif ++ free(sTestFileName); ++ } + } + + void ensure (int condition, const char *message) +@@ -78,7 +82,7 @@ int main (void) + afInitChannels(setup, AF_DEFAULT_TRACK, 1); + afInitSampleFormat(setup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 24); + +- ensure(createTemporaryFile("twentyfour2", sTestFileName), ++ ensure(createTemporaryFile("twentyfour2", &sTestFileName), + "could not create temporary file"); + file = afOpenFile(sTestFileName, "w", setup); + ensure(file != NULL, "could not open test file for writing"); +--- a/test/writealaw.c ++++ b/test/writealaw.c +@@ -53,7 +53,7 @@ + + #include "TestUtilities.h" + +-static char sTestFileName[PATH_MAX]; ++static char *sTestFileName; + + #define FRAME_COUNT 16 + #define SAMPLE_COUNT FRAME_COUNT +@@ -62,9 +62,13 @@ void testalaw (int fileFormat); + + void cleanup (void) + { ++ if (sTestFileName) ++ { + #ifndef DEBUG +- unlink(sTestFileName); ++ unlink(sTestFileName); + #endif ++ free(sTestFileName); ++ } + } + + void ensure (int condition, const char *message) +@@ -113,7 +117,7 @@ void testalaw (int fileFormat) + afInitFileFormat(setup, fileFormat); + afInitChannels(setup, AF_DEFAULT_TRACK, 1); + +- ensure(createTemporaryFile("writealaw", sTestFileName), ++ ensure(createTemporaryFile("writealaw", &sTestFileName), + "could not create temporary file"); + file = afOpenFile(sTestFileName, "w", setup); + afFreeFileSetup(setup); +--- a/test/writeraw.c ++++ b/test/writeraw.c +@@ -44,13 +44,17 @@ + + #include "TestUtilities.h" + +-static char sTestFileName[PATH_MAX]; ++static char *sTestFileName; + + void cleanup (void) + { ++ if (sTestFileName) ++ { + #ifndef DEBUG +- unlink(sTestFileName); ++ unlink(sTestFileName); + #endif ++ free(sTestFileName); ++ } + } + + void ensure (int condition, const char *message) +@@ -84,7 +88,7 @@ int main (int argc, char **argv) + afInitChannels(setup, AF_DEFAULT_TRACK, 1); + afInitSampleFormat(setup, AF_DEFAULT_TRACK, AF_SAMPFMT_TWOSCOMP, 16); + +- ensure(createTemporaryFile("writeraw", sTestFileName), ++ ensure(createTemporaryFile("writeraw", &sTestFileName), + "could not create temporary file"); + file = afOpenFile(sTestFileName, "w", setup); + ensure(file != AF_NULL_FILEHANDLE, "unable to open file for writing"); +--- a/test/writeulaw.c ++++ b/test/writeulaw.c +@@ -53,7 +53,7 @@ + + #include "TestUtilities.h" + +-static char sTestFileName[PATH_MAX]; ++static char *sTestFileName; + + #define FRAME_COUNT 16 + #define SAMPLE_COUNT FRAME_COUNT +@@ -62,9 +62,13 @@ void testulaw (int fileFormat); + + void cleanup (void) + { ++ if (sTestFileName) ++ { + #ifndef DEBUG +- unlink(sTestFileName); ++ unlink(sTestFileName); + #endif ++ free(sTestFileName); ++ } + } + + void ensure (int condition, const char *message) +@@ -113,7 +117,7 @@ void testulaw (int fileFormat) + afInitFileFormat(setup, fileFormat); + afInitChannels(setup, AF_DEFAULT_TRACK, 1); + +- ensure(createTemporaryFile("writeulaw", sTestFileName), ++ ensure(createTemporaryFile("writeulaw", &sTestFileName), + "could not create temporary file"); + file = afOpenFile(sTestFileName, "w", setup); + afFreeFileSetup(setup); diff --git a/gnu/packages/patches/audiofile-signature-of-multiplyCheckOverflow.patch b/gnu/packages/patches/audiofile-signature-of-multiplyCheckOverflow.patch new file mode 100644 index 0000000000..35627d3869 --- /dev/null +++ b/gnu/packages/patches/audiofile-signature-of-multiplyCheckOverflow.patch @@ -0,0 +1,35 @@ +From: Antonio Larrosa +Date: Fri, 10 Mar 2017 15:40:02 +0100 +Subject: Fix signature of multiplyCheckOverflow. It returns a bool, not an int + +--- + libaudiofile/modules/MSADPCM.cpp | 2 +- + sfcommands/sfconvert.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libaudiofile/modules/MSADPCM.cpp b/libaudiofile/modules/MSADPCM.cpp +index ef9c38c..d8c9553 100644 +--- a/libaudiofile/modules/MSADPCM.cpp ++++ b/libaudiofile/modules/MSADPCM.cpp +@@ -116,7 +116,7 @@ int firstBitSet(int x) + #define __has_builtin(x) 0 + #endif + +-int multiplyCheckOverflow(int a, int b, int *result) ++bool multiplyCheckOverflow(int a, int b, int *result) + { + #if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) + return __builtin_mul_overflow(a, b, result); +diff --git a/sfcommands/sfconvert.c b/sfcommands/sfconvert.c +index 970a3e4..367f7a5 100644 +--- a/sfcommands/sfconvert.c ++++ b/sfcommands/sfconvert.c +@@ -60,7 +60,7 @@ int firstBitSet(int x) + #define __has_builtin(x) 0 + #endif + +-int multiplyCheckOverflow(int a, int b, int *result) ++bool multiplyCheckOverflow(int a, int b, int *result) + { + #if (defined __GNUC__ && __GNUC__ >= 5) || ( __clang__ && __has_builtin(__builtin_mul_overflow)) + return __builtin_mul_overflow(a, b, result); -- cgit v1.2.3 From 22b26dd25794532b3c16761d7806ef9ba5c6c8fd Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Fri, 6 Dec 2019 20:47:47 +0100 Subject: gnu: Add dragon. * gnu/packages/kde-multimedia.scm: New file. * gnu/lokal.mk (MODULES): Add it. --- gnu/local.mk | 1 + gnu/packages/kde-multimedia.scm | 73 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 gnu/packages/kde-multimedia.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index e4eaa4e848..c351975cfe 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -282,6 +282,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/kawa.scm \ %D%/packages/kde.scm \ %D%/packages/kde-frameworks.scm \ + %D%/packages/kde-multimedia.scm \ %D%/packages/kde-plasma.scm \ %D%/packages/kde-utils.scm \ %D%/packages/kerberos.scm \ diff --git a/gnu/packages/kde-multimedia.scm b/gnu/packages/kde-multimedia.scm new file mode 100644 index 0000000000..7e6d36d204 --- /dev/null +++ b/gnu/packages/kde-multimedia.scm @@ -0,0 +1,73 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017, 2019 Hartmut Goebel +;;; +;;; 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 kde-multimedia) + #:use-module (guix build-system qt) + #:use-module (guix download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix utils) + #:use-module (gnu packages) + #:use-module (gnu packages kde-frameworks) + #:use-module (gnu packages qt)) + +(define-public dragon + (package + (name "dragon") + (version "19.08.3") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://kde/stable/applications/" version + "/src/dragon-" version ".tar.xz")) + (sha256 + (base32 "02l16k4sgrxbczxp8rlnxbylb5fmjh4zhl4xw55qxkvmvxnjy5zr")))) + (build-system qt-build-system) + (native-inputs + `(("extra-cmake-modules" ,extra-cmake-modules) + ("kdoctools" ,kdoctools))) + (inputs + `(("kconfig" ,kconfig) + ("kconfigwidgets" ,kconfigwidgets) + ("kcoreaddons" ,kcoreaddons) + ("kcrash" ,kcrash) + ("kdbusaddons" ,kdbusaddons) + ("ki18n" ,ki18n) + ("kio" ,kio) + ("kjobwidgets" ,kjobwidgets) + ("knotifications" ,knotifications) + ("kparts" ,kparts) + ("kwidgetsaddons" ,kwidgetsaddons) + ("kwindowsystem" ,kwindowsystem) + ("kxmlgui" ,kxmlgui) + ("oxygen-icons" ,oxygen-icons) ; default icon set + ("phonon" ,phonon) + ("phonon-backend-gstreamer" ,phonon-backend-gstreamer) + ("qtbase" ,qtbase) + ("solid" ,solid))) + (home-page "https://kde.org/applications/multimedia/org.kde.dragonplayer") + (synopsis "Simple video player") + (description "Dragon Player is a multimedia player where the focus is on +simplicity, instead of features. Dragon Player does one thing, and only one +thing, which is playing multimedia files. It's simple interface is designed +not to get in your way and instead empower you to simply play multimedia +files. + +This package is part of the KDE multimedia module.") + (license ;; GPL for programs, FDL for documentation + (list license:gpl2+ license:fdl1.2+)))) -- cgit v1.2.3 From 49d40e60b8d52e3f88b6cc26827f8795b5d48658 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Sun, 8 Dec 2019 18:16:40 +0100 Subject: gnu: Add kmplayer. `guix lint` reports two CVEs, both are unrelated: - CVE-2018-5200: for vendor "pandora" and some 4.2.2.x version - CVE-2019-9133: windows only (I assume it it alsow relates to the "pandora" vendor, since the version the CVE refers to as "solving the issue" does not exist at KDE.) * gnu/packages/kde-multimedia.scm (kmplayer): New variable. * gnu/packages/patches/kmplayer-aarch64.patch, gnu/packages/patches/kmplayer-upstream_Fix-build-with-Qt-5.9.patch: New files. * gnu/local.mk: Add them. --- gnu/local.mk | 2 + gnu/packages/kde-multimedia.scm | 66 ++++++++++++++++++++++ gnu/packages/patches/kmplayer-aarch64.patch | 57 +++++++++++++++++++ .../kmplayer-upstream_Fix-build-with-Qt-5.9.patch | 42 ++++++++++++++ 4 files changed, 167 insertions(+) create mode 100644 gnu/packages/patches/kmplayer-aarch64.patch create mode 100644 gnu/packages/patches/kmplayer-upstream_Fix-build-with-Qt-5.9.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index c351975cfe..61dfbb9d5b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1044,6 +1044,8 @@ dist_patch_DATA = \ %D%/packages/patches/kmod-module-directory.patch \ %D%/packages/patches/kmscon-runtime-keymap-switch.patch \ %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 \ diff --git a/gnu/packages/kde-multimedia.scm b/gnu/packages/kde-multimedia.scm index f96ef795dd..df8c051483 100644 --- a/gnu/packages/kde-multimedia.scm +++ b/gnu/packages/kde-multimedia.scm @@ -299,6 +299,72 @@ (define-public kmix (license ;; GPL for programs, LGPL for libraries, FDL for documentation (list license:gpl2+ license:lgpl2.0+ license:fdl1.2+)))) +(define-public kmplayer + (package + (name "kmplayer") + (version "0.12.0b") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://kde/stable/kmplayer/0.12" + "/kmplayer-" version ".tar.bz2")) + (sha256 + (base32 "0wzdxym4fc83wvqyhcwid65yv59a2wvp1lq303cn124mpnlwx62y")) + (patches (search-patches + "kmplayer-aarch64.patch" + "kmplayer-upstream_Fix-build-with-Qt-5.9.patch")))) + (build-system qt-build-system) + (native-inputs + `(("extra-cmake-modules" ,extra-cmake-modules) + ("pkg-config" ,pkg-config) + ("kdoctools" ,kdoctools))) + (inputs + `(("kconfig" ,kconfig) + ("kcoreaddons" ,kcoreaddons) + ("kdelibs4support" ,kdelibs4support) + ("ki18n" ,ki18n) + ("kinit" ,kinit) + ("kio" ,kio) + ("kparts" ,kparts) + ("kmediaplayer" ,kmediaplayer) + ("kwidgetsaddons" ,kwidgetsaddons) + ("libxcb" ,libxcb) ;; FIXME: why does cmake not find XEVIE and XPRINT? + ("oxygen-icons" ,oxygen-icons) ; default icon set + ("phonon" ,phonon) + ("qtbase" ,qtbase) + ("cairo" ,cairo) + ("qtsvg" ,qtsvg) + ("qtx11extras" ,qtx11extras) + ("xcb-util" ,xcb-util) + ("xcb-util-cursor" ,xcb-util-cursor) + ("xcb-util-errors" ,xcb-util-errors) + ("xcb-util-image" ,xcb-util-image) + ("xcb-util-keysyms" ,xcb-util-keysyms) + ("xcb-util-wm" ,xcb-util-wm))) + (arguments + `(#:configure-flags + (list (string-append + "-DCMAKE_CXX_FLAGS=-I" + (assoc-ref %build-inputs "qtx11extras") "/include/qt5")))) + (home-page "https://kde.org/applications/multimedia/org.kde.kmplayer") + (synopsis "Media player using mplayer/phonon as backend") + (description "Kmplayer can play all the audio/video supported by +mplayer/phonon from a local file or URL and be embedded in Konqueror and +KHTML. It also plays DVDs. + +Some features: +@itemize +@item play DVD/VCD movies (from file or url and from a video device) +@item embed inside konqueror (movie is played inside konqueror) +@item embed inside khtml (movie playback inside a html page) +@item Movie recording using mencoder (part of the mplayer package) +@item No video during recording, but you can always open a new window and play it +@item Broadcasting, http streaming, using ffserver/ffmpeg +@item For TV sources, you need v4lctl (part of the xawtv package) +@end itemize") + (license ;; GPL for programs, LGPL for libraries, FDL for documentation + (list license:gpl2+ license:lgpl2.0+ license:fdl1.2+)))) + (define-public libkcddb (package (name "libkcddb") diff --git a/gnu/packages/patches/kmplayer-aarch64.patch b/gnu/packages/patches/kmplayer-aarch64.patch new file mode 100644 index 0000000000..76f713be96 --- /dev/null +++ b/gnu/packages/patches/kmplayer-aarch64.patch @@ -0,0 +1,57 @@ +Index: b/src/moz-sdk/prcpucfg.h +=================================================================== +--- a/src/moz-sdk/prcpucfg.h ++++ b/src/moz-sdk/prcpucfg.h +@@ -288,6 +288,52 @@ + #define PR_BYTES_PER_WORD_LOG2 3 + #define PR_BYTES_PER_DWORD_LOG2 3 + ++#elif defined(__aarch64__) ++ ++#define IS_LITTLE_ENDIAN 1 ++#undef IS_BIG_ENDIAN ++#define IS_64 ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 8 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 8 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 64 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 64 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 6 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 6 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 8 ++#define PR_ALIGN_OF_INT64 8 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 8 ++#define PR_ALIGN_OF_POINTER 8 ++#define PR_ALIGN_OF_WORD 8 ++ ++#define PR_BYTES_PER_WORD_LOG2 3 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ + #elif defined(__mc68000__) + + #undef IS_LITTLE_ENDIAN diff --git a/gnu/packages/patches/kmplayer-upstream_Fix-build-with-Qt-5.9.patch b/gnu/packages/patches/kmplayer-upstream_Fix-build-with-Qt-5.9.patch new file mode 100644 index 0000000000..6a40dbe347 --- /dev/null +++ b/gnu/packages/patches/kmplayer-upstream_Fix-build-with-Qt-5.9.patch @@ -0,0 +1,42 @@ +From 3def65075c09af4961cd399e8e78ed78cca72e65 Mon Sep 17 00:00:00 2001 +From: Wolfgang Bauer +Date: Wed, 11 Oct 2017 22:16:02 +0200 +Subject: [PATCH] Fix build with Qt 5.9 + +Summary: +moc 5.9 errors out when building: +Error: Plugin Metadata file "" could not be opened: file to open is a directory + +Same issue and fix as https://phabricator.kde.org/D5392 for khtml. + +CCBUG: 377490 + +Test Plan: builds fine now with Qt 5.9.0rc and also earlier versions. + +Reviewers: vriezen, pino + +Reviewed By: pino + +Subscribers: pino + +Differential Revision: https://phabricator.kde.org/D5985 +--- + src/kmplayer_part.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/kmplayer_part.h b/src/kmplayer_part.h +index f90f85d..0fddbaa 100644 +--- a/src/kmplayer_part.h ++++ b/src/kmplayer_part.h +@@ -36,7 +36,7 @@ namespace KMPlayer { + + class KMPlayerFactory : public KPluginFactory { + Q_OBJECT +- Q_PLUGIN_METADATA(IID "org.kde.KPluginFactory" FILE "") ++ Q_PLUGIN_METADATA(IID "org.kde.KPluginFactory") + Q_INTERFACES(KPluginFactory) + public: + KMPlayerFactory(); +-- +2.14.2 + -- cgit v1.2.3 From 8e07725788bc1d06c28cf07a6a8a927c6319adf6 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sat, 28 Dec 2019 16:28:48 +0100 Subject: gnu: Add ardupilot. * gnu/local.mk (GNU_SYSTEM_MODULES): Add drones.scm. * gnu/packages/drones.scm: New file. --- gnu/local.mk | 1 + gnu/packages/drones.scm | 198 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 199 insertions(+) create mode 100644 gnu/packages/drones.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 61dfbb9d5b..9d1028a5be 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -159,6 +159,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/docbook.scm \ %D%/packages/docker.scm \ %D%/packages/documentation.scm \ + %D%/packages/drones.scm \ %D%/packages/dunst.scm \ %D%/packages/dvtm.scm \ %D%/packages/easyrpg.scm \ diff --git a/gnu/packages/drones.scm b/gnu/packages/drones.scm new file mode 100644 index 0000000000..18b2621e4a --- /dev/null +++ b/gnu/packages/drones.scm @@ -0,0 +1,198 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 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 packages drones) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (gnu packages cross-base) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) + #:use-module (gnu packages python-xyz) + #:use-module (guix download) + #:use-module (guix utils) + #:use-module (guix git-download) + #:use-module (guix build-system gnu)) + +(define (ardupilot-type->tag type) + (case type + ((copter) "Copter") + ((plane) "ArduPlane") + ((rover) "Rover") + (else #f))) + +(define (ardupilot-type->waf-cmd type) + (symbol->string type)) + +(define* (make-ardupilot-firmware #:key name version base32 type board target) + (package + (name (string-append name "-" board)) + (version version) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ArduPilot/ardupilot") + (commit (string-append + (ardupilot-type->tag type) "-" version)) + ;; XXX: Ardupilot includes several git submodules. They should be + ;; avoided but as this is not supported upstream, and not trivial + ;; to fix, keep it this way for now. + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 base32))) + + ;; Could also be waf-build-system but every phase has to be rewritten + ;; anyway. + (build-system gnu-build-system) + (arguments + `(#:imported-modules ((gnu build cross-toolchain) + ,@%gnu-build-system-modules) + #:phases + (modify-phases %standard-phases + (delete 'bootstrap) + + ;; Remove the root waf script that relies on waf git submodule. + (add-before 'configure 'setup-waf + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (let ((waf (assoc-ref (or native-inputs inputs) "waf"))) + (delete-file "waf") + (copy-file (string-append waf "/bin/waf") "waf")) + #t)) + + ;; When cross-compiling, we do not want to use the default gnu + ;; cross-compiler, so set CROSS_CPATH and CROSS_LIBRARY_PATH + ;; variables ourselves instead. + (delete 'set-cross-path) + (add-before 'configure 'set-custom-cross-cpath + (lambda* (#:key native-inputs inputs #:allow-other-keys) + ((@@ (gnu build cross-toolchain) set-cross-path) + #:inputs + `(("libc" . ,(assoc-ref (or native-inputs inputs) + "ardupilot-cross-libc")) + ("xkernel-headers" . + ,(assoc-ref (or native-inputs inputs) + "ardupilot-cross-kernel-headers")))) + ;; We need to produce a static binary, so that it can works on + ;; other systems than Guix System. Add a static version of the + ;; cross libc to CROSS_LIBRARY_PATH variable. + (setenv "CROSS_LIBRARY_PATH" + (string-append + (getenv "CROSS_LIBRARY_PATH") ":" + (assoc-ref (or native-inputs inputs) + "ardupilot-cross-libc-static") "/lib")) + #t)) + + ;; Remove dependencies to 'git'. + (add-before 'configure 'remove-git + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "wscript" + (("^.*cfg\\.load\\('git_submodule.*$") + "")) + (substitute* "Tools/ardupilotwaf/boards.py" + (("^.*GIT_VERSION.*$") + "")) + #t)) + + ;; Configure for the given BOARD, and force a static build for + ;; reasons exposed above. + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (invoke "./waf" "configure" "--board" ,board "--static") + #t)) + + (replace 'build + (lambda* (#:key outputs #:allow-other-keys) + (invoke "./waf" ,(ardupilot-type->waf-cmd type)) + #t)) + + ;; Do not run tests as we are always cross-compiling. + (delete 'check) + + ;; Install the produced firmware. + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (mkdir-p bin) + (copy-recursively + (string-append "build/" ,board "/bin") bin)) + #t))))) + (native-inputs + `(("waf" ,python-waf) + ("python" ,python) + ("python-future" ,python-future) + ("python-lxml" ,python-lxml) + + ;; Packages needed for cross-compiling the firmware. + ("ardupilot-cross-gcc" ,(cross-gcc target + #:xbinutils + (cross-binutils target) + #:libc + (cross-libc target))) + ("ardupilot-cross-libc" ,(cross-libc target)) + ("ardupilot-cross-libc-static" ,(cross-libc target) "static") + ("ardupilot-cross-kernel-headers" + ,@(assoc-ref (package-propagated-inputs + (cross-libc target)) + "kernel-headers")) + ("ardupilot-cross-binutils" ,(cross-binutils target)) + ("ardupilot-cross-pkg-config" ,(parameterize ((%current-target-system + target)) + pkg-config)))) + (home-page "https://ardupilot.org/") + (synopsis "Unmanned vehicle autopilot software suite") + (description "@code{ardupilot} is an unmanned vehicle autopilot software +suite capable of controlling autonomous: +@itemize +@item multirotor drones +@item fixed-wing and vtol aircraft +@item helicopters +@item ground rovers +@item boats +@item submarines +@item antenna trackers +@end itemize") + (license gpl3+))) + +(define (make-arducopter-firmware board target) + (make-ardupilot-firmware + #:name "arducopter" + #:version "3.6.11" + #:base32 (base32 "1zkr2nhkksmrriirs2dnp8a0gcf9rfqw1x86pzhh6w4ciqwpidqn") + #:type 'copter + #:board board + #:target target)) + +(define (make-arduplane-firmware board target) + (make-ardupilot-firmware + #:name "arduplane" + #:version "4.0.1" + #:base32 (base32 "0awafvrppg4ilwpbhw88r5xkbgqrmqypsn6lbzyi6bz0zy5cfhb5") + #:type 'plane + #:board board + #:target target)) + +(define-public arducopter-bbbmini + (make-arducopter-firmware "bbbmini" "arm-linux-gnueabihf")) + +(define-public arduplane-bbbmini + (make-arduplane-firmware "bbbmini" "arm-linux-gnueabihf")) + +;; Firmware for Bebop and Bebop2 drones. +(define-public arducopter-bebop + (make-arducopter-firmware "bebop" "arm-linux-gnueabihf")) -- cgit v1.2.3 From e9e75da6e19437ad1fc4a25a87d2e7456b51b3b1 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Thu, 12 Dec 2019 02:19:20 +0100 Subject: gnu: Add jfsutils. * gnu/packages/file-systems.scm (jfsutils): New public variable. --- gnu/local.mk | 2 ++ gnu/packages/file-systems.scm | 34 ++++++++++++++++++++++ gnu/packages/patches/jfsutils-add-sysmacros.patch | 26 +++++++++++++++++ .../patches/jfsutils-include-systypes.patch | 25 ++++++++++++++++ 4 files changed, 87 insertions(+) create mode 100644 gnu/packages/patches/jfsutils-add-sysmacros.patch create mode 100644 gnu/packages/patches/jfsutils-include-systypes.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 9d1028a5be..d6600df339 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1030,6 +1030,8 @@ dist_patch_DATA = \ %D%/packages/patches/java-xerces-build_dont_unzip.patch \ %D%/packages/patches/java-xerces-xjavac_taskdef.patch \ %D%/packages/patches/jbig2dec-ignore-testtest.patch \ + %D%/packages/patches/jfsutils-add-sysmacros.patch \ + %D%/packages/patches/jfsutils-include-systypes.patch \ %D%/packages/patches/kdbusaddons-kinit-file-name.patch \ %D%/packages/patches/libnftnl-dont-check-NFTNL_FLOWTABLE_SIZE.patch \ %D%/packages/patches/libvirt-create-machine-cgroup.patch \ diff --git a/gnu/packages/file-systems.scm b/gnu/packages/file-systems.scm index cb0a2a25bb..fbf0e2641f 100644 --- a/gnu/packages/file-systems.scm +++ b/gnu/packages/file-systems.scm @@ -111,6 +111,40 @@ (define-public httpfs2 single file can be mounted.") (license license:gpl2+))) +(define-public jfsutils + (package + (name "jfsutils") + (version "1.1.15") + (source + (origin + (method url-fetch) + (uri (string-append "http://jfs.sourceforge.net/project/pub/jfsutils-" + version ".tar.gz")) + (sha256 + (base32 "0kbsy2sk1jv4m82rxyl25gwrlkzvl3hzdga9gshkxkhm83v1aji4")) + (patches (search-patches "jfsutils-add-sysmacros.patch" + "jfsutils-include-systypes.patch")))) + (build-system gnu-build-system) + (inputs + `(("util-linux" ,util-linux))) + (home-page "http://jfs.sourceforge.net/home.html") + (synopsis "Utilities for managing JFS file systems") + (description + "The JFSutils are a collection of utilities for managing the @acronym{JFS, +Journaled File System}, a 64-bit journaling file system created by IBM and later +ported to the kernel Linux. The following commands are available: +@enumerate +@item @command{fsck.jfs}: check and repair a JFS file system or replay its +transaction log. +@item @command{logdump}: dump the JFS journal log. +@item @command{logredo}: replay the JFS journal log. +@item @command{mkfs.jfs}: create a new JFS file system. +@item @command{xchklog}: save a JFS fsck log to a file. +@item @command{xchkdmp}: dump the contents of such a log file. +@item @command{xpeek}: a JFS file system editor with a shell-like interface. +@end enumerate\n") + (license license:gpl3+))) ; no explicit version given + (define-public disorderfs (package (name "disorderfs") diff --git a/gnu/packages/patches/jfsutils-add-sysmacros.patch b/gnu/packages/patches/jfsutils-add-sysmacros.patch new file mode 100644 index 0000000000..2349e37c06 --- /dev/null +++ b/gnu/packages/patches/jfsutils-add-sysmacros.patch @@ -0,0 +1,26 @@ +From: Tobias Geerinckx-Rice +Date: Thu, 12 Dec 2019 02:15:37 +0100 +Subject: gnu: jfsutils: Include sys/sysmacros.h. + +Copied verbatim[0] from the Debian package. + +[0]: https://sources.debian.org/patches/jfsutils/1.1.15-4/add_sysmacros.patch + +Description: Include sys/sysmacros.h + Mentioned header needed for major() definition. +Author: Laszlo Boszormenyi (GCS) +Last-Update: 2018-12-11 + +--- + +--- jfsutils-1.1.15.orig/libfs/devices.c ++++ jfsutils-1.1.15/libfs/devices.c +@@ -49,6 +49,8 @@ + #include + #endif + ++#include ++ + #include "jfs_types.h" + #include "jfs_filsys.h" + #include "devices.h" diff --git a/gnu/packages/patches/jfsutils-include-systypes.patch b/gnu/packages/patches/jfsutils-include-systypes.patch new file mode 100644 index 0000000000..ef1515d02c --- /dev/null +++ b/gnu/packages/patches/jfsutils-include-systypes.patch @@ -0,0 +1,25 @@ +From: Tobias Geerinckx-Rice +Date: Thu, 12 Dec 2019 02:15:37 +0100 +Subject: gnu: jfsutils: Include sys/types.h. + +Copied verbatim[0] from the Debian package. + +[0]: https://sources.debian.org/patches/jfsutils/1.1.15-4/missing-includes.diff + +Description: Add missing include to fix FTBFS with eglibc 2.17 +Origin: vendor, http://patches.ubuntu.com/j/jfsutils/jfsutils_1.1.15-2ubuntu1.patch +Bug-Debian: http://bugs.debian.org/701433 +Last-Update: 2013-07-05 + +Index: b/fscklog/extract.c +=================================================================== +--- a/fscklog/extract.c 2006-06-05 19:31:40.000000000 +0000 ++++ b/fscklog/extract.c 2013-04-02 07:13:08.737654963 +0000 +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #include "devices.h" + #include "diskmap.h" -- cgit v1.2.3 From 9e225670771bc08345ad5e7c686348024fa43acd Mon Sep 17 00:00:00 2001 From: John Soo Date: Sun, 15 Dec 2019 11:27:39 -0800 Subject: gnu: Add ripgrep. * gnu/packages/rust-apps.scm (ripgrep): New variable. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. Signed-off-by: Efraim Flashner --- gnu/local.mk | 1 + gnu/packages/rust-apps.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 gnu/packages/rust-apps.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index d6600df339..1d265dc551 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -435,6 +435,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/ruby.scm \ %D%/packages/rush.scm \ %D%/packages/rust.scm \ + %D%/packages/rust-apps.scm \ %D%/packages/rust-cbindgen.scm \ %D%/packages/samba.scm \ %D%/packages/sagemath.scm \ diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm new file mode 100644 index 0000000000..e334e46daa --- /dev/null +++ b/gnu/packages/rust-apps.scm @@ -0,0 +1,63 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2019 John Soo +;;; +;;; 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 rust-apps) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system cargo) + #:use-module (guix download) + #:use-module (guix packages) + #:use-module (gnu packages crates-io)) + +(define-public ripgrep + (package + (name "ripgrep") + (version "11.0.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "ripgrep" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0bn40lz9n08llq615p4qqqbi24zbkf0appfx3zgxg34a86ga9zds")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("rust-bstr" ,rust-bstr-0.1) + ("rust-clap" ,rust-clap-2) + ("rust-grep" ,rust-grep-0.2) + ("rust-ignore" ,rust-ignore-0.4) + ("rust-lazy-static" ,rust-lazy-static-1.3) + ("rust-log" ,rust-log-0.4) + ("rust-num-cpus" ,rust-num-cpus-1.10) + ("rust-regex" ,rust-regex-1.1) + ("rust-serde-json" ,rust-serde-json-1.0) + ("rust-termcolor" ,rust-termcolor-1.0)) + #:cargo-development-inputs + (("rust-clap" ,rust-clap-2) + ("rust-lazy-static" ,rust-lazy-static-1.3) + ("rust-serde" ,rust-serde-1.0) + ("rust-serde-derive" ,rust-serde-derive-1.0)))) + (home-page "https://github.com/BurntSushi/ripgrep") + (synopsis "Line-oriented search tool") + (description + "ripgrep is a line-oriented search tool that recursively searches +your current directory for a regex pattern while respecting your +gitignore rules.") + (license (list license:unlicense license:expat)))) -- cgit v1.2.3 From c5c4876155350580fa205a7a560b662ece36b630 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 2 Jan 2020 15:59:52 +0200 Subject: gnu: rust-cbindgen: Move to rust-apps.scm * gnu/packages/rust-cbindgen.scm (rust-cbindgen): Move to ... * gnu/packages/rust-apps.scm: ... here. * gnu/local.mk (GNU_SYSTEM_MODULES): Remove it. --- gnu/local.mk | 1 - gnu/packages/gnuzilla.scm | 2 +- gnu/packages/rust-apps.scm | 64 +++++++++++++++++++++++++++++++ gnu/packages/rust-cbindgen.scm | 87 ------------------------------------------ 4 files changed, 65 insertions(+), 89 deletions(-) delete mode 100644 gnu/packages/rust-cbindgen.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 1d265dc551..8a21223de5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -436,7 +436,6 @@ GNU_SYSTEM_MODULES = \ %D%/packages/rush.scm \ %D%/packages/rust.scm \ %D%/packages/rust-apps.scm \ - %D%/packages/rust-cbindgen.scm \ %D%/packages/samba.scm \ %D%/packages/sagemath.scm \ %D%/packages/sawfish.scm \ diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index d5d9839e1a..a642f6a95f 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -70,7 +70,7 @@ (define-module (gnu packages gnuzilla) #:use-module (gnu packages gl) #:use-module (gnu packages assembly) #:use-module (gnu packages rust) - #:use-module (gnu packages rust-cbindgen) + #:use-module (gnu packages rust-apps) #:use-module (gnu packages llvm) #:use-module (gnu packages nss) #:use-module (gnu packages icu4c) diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index e334e46daa..0f3650f52f 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019 John Soo +;;; Copyright © 2019 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; @@ -61,3 +62,66 @@ (define-public ripgrep your current directory for a regex pattern while respecting your gitignore rules.") (license (list license:unlicense license:expat)))) + +(define-public rust-cbindgen + (package + (name "rust-cbindgen") + (version "0.9.1") + (source + (origin + (method url-fetch) + (uri (crate-uri "cbindgen" version)) + (file-name (string-append name "-" version ".crate")) + (sha256 + (base32 + "1zgamxahlxmg4warzivaa8m1f8d6b45mhznm7n6d7p5l18acdblx")))) + (build-system cargo-build-system) + (arguments + `(#:cargo-inputs + (("clap" ,rust-clap-2) + ("log" ,rust-log-0.4) + ("proc-macro2" ,rust-proc-macro2-1.0) + ("quote" ,rust-quote-1.0) + ("serde" ,rust-serde-1.0) + ("serde-json" ,rust-serde-json-1.0) + ("syn" ,rust-syn-1.0) + ("tempfile" ,rust-tempfile-3.0) + ("toml" ,rust-toml-0.5)) + #:cargo-development-inputs + (("ansi-term" ,rust-ansi-term-0.11) + ("atty" ,rust-atty-0.2) + ("autocfg" ,rust-autocfg-0.1) + ("bitflags" ,rust-bitflags-1) + ("cfg-if" ,rust-cfg-if-0.1) + ("cloudabi" ,rust-cloudabi-0.0) + ("fuchsia-cprng" ,rust-fuchsia-cprng-0.1) + ("itoa" ,rust-itoa-0.4) + ("libc" ,rust-libc-0.2) + ("numtoa" ,rust-numtoa-0.1) + ("rand" ,rust-rand-0.6) + ("rand-chacha" ,rust-rand-chacha-0.1) + ("rand-core" ,rust-rand-core-0.3) + ("rand-hc" ,rust-rand-hc-0.1) + ("rand-isaac" ,rust-rand-isaac-0.1) + ("rand-jitter" ,rust-rand-jitter-0.1) + ("rand-os" ,rust-rand-os-0.1) + ("rand-pcg" ,rust-rand-pcg-0.1) + ("rand-xorshift" ,rust-rand-xorshift-0.1) + ("rdrand" ,rust-rdrand-0.4) + ("redox-syscall" ,rust-redox-syscall-0.1) + ("redox-termios" ,rust-redox-termios-0.1) + ("remove-dir-all" ,rust-remove-dir-all-0.5) + ("ryu" ,rust-ryu-1.0) + ("serde-derive" ,rust-serde-derive-1.0) + ("strsim" ,rust-strsim-0.8) + ("termion" ,rust-termion-1.5) + ("textwrap" ,rust-textwrap-0.11) + ("unicode-width" ,rust-unicode-width-0.1) + ("unicode-xid" ,rust-unicode-xid-0.2) + ("vec-map" ,rust-vec-map-0.8) + ("winapi" ,rust-winapi-0.3)))) + (home-page "https://github.com/eqrion/cbindgen/") + (synopsis "Tool for generating C bindings to Rust code") + (description + "This package provides a tool for generating C/C++ bindings to Rust code.") + (license license:mpl2.0))) diff --git a/gnu/packages/rust-cbindgen.scm b/gnu/packages/rust-cbindgen.scm deleted file mode 100644 index 2590af913f..0000000000 --- a/gnu/packages/rust-cbindgen.scm +++ /dev/null @@ -1,87 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2019 Efraim Flashner -;;; -;;; 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 rust-cbindgen) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix packages) - #:use-module (guix download) - #:use-module (guix build-system cargo) - #:use-module (gnu packages crates-io)) - -(define-public rust-cbindgen - (package - (name "rust-cbindgen") - (version "0.9.1") - (source - (origin - (method url-fetch) - (uri (crate-uri "cbindgen" version)) - (file-name (string-append name "-" version ".crate")) - (sha256 - (base32 - "1zgamxahlxmg4warzivaa8m1f8d6b45mhznm7n6d7p5l18acdblx")))) - (build-system cargo-build-system) - (arguments - `(#:cargo-inputs - (("clap" ,rust-clap-2) - ("log" ,rust-log-0.4) - ("proc-macro2" ,rust-proc-macro2-1.0) - ("quote" ,rust-quote-1.0) - ("serde" ,rust-serde-1.0) - ("serde-json" ,rust-serde-json-1.0) - ("syn" ,rust-syn-1.0) - ("tempfile" ,rust-tempfile-3.0) - ("toml" ,rust-toml-0.5)) - #:cargo-development-inputs - (("ansi-term" ,rust-ansi-term-0.11) - ("atty" ,rust-atty-0.2) - ("autocfg" ,rust-autocfg-0.1) - ("bitflags" ,rust-bitflags-1) - ("cfg-if" ,rust-cfg-if-0.1) - ("cloudabi" ,rust-cloudabi-0.0) - ("fuchsia-cprng" ,rust-fuchsia-cprng-0.1) - ("itoa" ,rust-itoa-0.4) - ("libc" ,rust-libc-0.2) - ("numtoa" ,rust-numtoa-0.1) - ("rand" ,rust-rand-0.6) - ("rand-chacha" ,rust-rand-chacha-0.1) - ("rand-core" ,rust-rand-core-0.3) - ("rand-hc" ,rust-rand-hc-0.1) - ("rand-isaac" ,rust-rand-isaac-0.1) - ("rand-jitter" ,rust-rand-jitter-0.1) - ("rand-os" ,rust-rand-os-0.1) - ("rand-pcg" ,rust-rand-pcg-0.1) - ("rand-xorshift" ,rust-rand-xorshift-0.1) - ("rdrand" ,rust-rdrand-0.4) - ("redox-syscall" ,rust-redox-syscall-0.1) - ("redox-termios" ,rust-redox-termios-0.1) - ("remove-dir-all" ,rust-remove-dir-all-0.5) - ("ryu" ,rust-ryu-1.0) - ("serde-derive" ,rust-serde-derive-1.0) - ("strsim" ,rust-strsim-0.8) - ("termion" ,rust-termion-1.5) - ("textwrap" ,rust-textwrap-0.11) - ("unicode-width" ,rust-unicode-width-0.1) - ("unicode-xid" ,rust-unicode-xid-0.2) - ("vec-map" ,rust-vec-map-0.8) - ("winapi" ,rust-winapi-0.3)))) - (home-page "https://github.com/eqrion/cbindgen/") - (synopsis "Tool for generating C bindings to Rust code") - (description - "This package provides a tool for generating C/C++ bindings to Rust code.") - (license license:mpl2.0))) -- cgit v1.2.3 From d774fabe4b44ec652c0209f3cb474a7c94f52e07 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Fri, 3 Jan 2020 01:36:35 +0100 Subject: gnu: hexchat: Update to 2.14.3. * gnu/packages/messaging.scm (hexchat): Update to 2.14.3. [source]: Remove patch. * gnu/packages/patches/hexchat-crash-exit.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/messaging.scm | 7 +++--- gnu/packages/patches/hexchat-crash-exit.patch | 31 --------------------------- 3 files changed, 3 insertions(+), 36 deletions(-) delete mode 100644 gnu/packages/patches/hexchat-crash-exit.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 8a21223de5..c7dcc65082 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -997,7 +997,6 @@ 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/hexchat-crash-exit.patch \ %D%/packages/patches/higan-remove-march-native-flag.patch \ %D%/packages/patches/hubbub-sort-entities.patch \ %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch \ diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index 3202bd2f44..6917d23f84 100644 --- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -10,7 +10,7 @@ ;;; Copyright © 2016, 2017, 2018, 2019 Clément Lassieur ;;; Copyright © 2017 Mekeor Melire ;;; Copyright © 2017, 2018 Arun Isaac -;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice +;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2017 Theodoros Foradis ;;; Copyright © 2017, 2018, 2019 Rutger Helling ;;; Copyright © 2018 Leo Famulari @@ -263,15 +263,14 @@ (define-public bitlbee-discord (define-public hexchat (package (name "hexchat") - (version "2.14.2") + (version "2.14.3") (source (origin (method url-fetch) (uri (string-append "https://dl.hexchat.net/hexchat/hexchat-" version ".tar.xz")) (sha256 (base32 - "064nq151nzsljv97dmkifyl162d2738vbgvm1phx7yv04pjvk4kp")) - (patches (search-patches "hexchat-crash-exit.patch")))) + "10p829jm1r6kidkgf5lhqhyqc5mxdcq96q3zhadsckasvc9rs6lh")))) (build-system meson-build-system) (native-inputs `(("gettext" ,gettext-minimal) ("glib:bin" ,glib "bin") ;need glib-genmarshal diff --git a/gnu/packages/patches/hexchat-crash-exit.patch b/gnu/packages/patches/hexchat-crash-exit.patch deleted file mode 100644 index e67fef73e0..0000000000 --- a/gnu/packages/patches/hexchat-crash-exit.patch +++ /dev/null @@ -1,31 +0,0 @@ -From d9c637ae8a1137d3ca512d2c560589903a4bd79d Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Tue, 30 Apr 2019 11:16:01 -0700 -Subject: [PATCH] Python plugin: Call EndInterpreter when deinit'ing the plugin - -This fixes https://github.com/hexchat/hexchat/issues/2237 , a -commonly-encountered bug when using Hexchat 2.14 on Python 3.7. -Thanks to @ncoghlan for the fix. - -Signed-off-by: Adam Williamson ---- - plugins/python/python.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/plugins/python/python.c b/plugins/python/python.c -index 4403474d..475756ba 100644 ---- a/plugins/python/python.c -+++ b/plugins/python/python.c -@@ -2806,6 +2806,9 @@ hexchat_plugin_deinit(void) - xchatout_buffer = NULL; - - if (interp_plugin) { -+ PyThreadState *tstate = ((PluginObject*)interp_plugin)->tstate; -+ PyThreadState_Swap(tstate); -+ Py_EndInterpreter(tstate); - Py_DECREF(interp_plugin); - interp_plugin = NULL; - } --- -2.21.0 - -- cgit v1.2.3