From 808e4c141ef270cf0787690fbfff906f36f164cc Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 10 Jan 2021 15:10:26 +0200 Subject: gnu: tipp10: Build with qt-5. * gnu/packages/education.scm (tipp10)[source]: Add new patches. [inputs]: Remove qt-4, sqlite. Add qtbase, qtmultimedia. * gnu/packages/patches/tipp10-disable-downloader.patch, gnu/packages/patches/tipp10-qt5.patch: New files. * gnu/local.mk (dist_patch_DATA): Register them. --- gnu/local.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 6893a54fdd..dea7b3a906 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -10,7 +10,7 @@ # Copyright © 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus # Copyright © 2016 Ben Woodcroft # Copyright © 2016, 2017, 2018, 2019 Alex Vong -# Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner +# Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner # Copyright © 2016, 2017, 2018, 2019, 2020 Jan (janneke) Nieuwenhuizen # Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice # Copyright © 2017, 2018 Clément Lassieur @@ -1663,8 +1663,10 @@ dist_patch_DATA = \ %D%/packages/patches/thefuck-test-environ.patch \ %D%/packages/patches/tidy-CVE-2015-5522+5523.patch \ %D%/packages/patches/tinyxml-use-stl.patch \ + %D%/packages/patches/tipp10-disable-downloader.patch \ %D%/packages/patches/tipp10-fix-compiling.patch \ %D%/packages/patches/tipp10-remove-license-code.patch \ + %D%/packages/patches/tipp10-qt5.patch \ %D%/packages/patches/tk-find-library.patch \ %D%/packages/patches/transcode-ffmpeg.patch \ %D%/packages/patches/transmission-honor-localedir.patch \ -- cgit v1.2.3 From 21cf0d36db9f02b3da976088b5ab466822d16625 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Mon, 11 Jan 2021 11:29:00 +0100 Subject: gnu: guile: Fix tests on emulated architectures. The stack overflow test limits the virtual memory size using setrlimit with RLIMIT_AS argument. This is ignored when using QEMU transparent emulation, causing the test to crash. * gnu/packages/patches/guile-2.2-skip-so-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/guile.scm (guile-3.0-latest): Add it. --- gnu/local.mk | 1 + gnu/packages/guile.scm | 23 +++++++++++++---------- gnu/packages/patches/guile-2.2-skip-so-test.patch | 23 +++++++++++++++++++++++ 3 files changed, 37 insertions(+), 10 deletions(-) create mode 100644 gnu/packages/patches/guile-2.2-skip-so-test.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index dea7b3a906..a41795d8aa 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1126,6 +1126,7 @@ dist_patch_DATA = \ %D%/packages/patches/gspell-dash-test.patch \ %D%/packages/patches/guile-1.8-cpp-4.5.patch \ %D%/packages/patches/guile-2.2-skip-oom-test.patch \ + %D%/packages/patches/guile-2.2-skip-so-test.patch \ %D%/packages/patches/guile-default-utf8.patch \ %D%/packages/patches/guile-2.2-default-utf8.patch \ %D%/packages/patches/guile-relocatable.patch \ diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index 1c983e50eb..dfba797b79 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -310,16 +310,19 @@ without requiring the source code to be rewritten.") (define-public guile-3.0-latest ;; TODO: Make this 'guile-3.0' on the next rebuild cycle. - (package - (inherit guile-3.0) - (version "3.0.5") - (source (origin - (inherit (package-source guile-3.0)) - (uri (string-append "mirror://gnu/guile/guile-" - version ".tar.xz")) - (sha256 - (base32 - "1wah6fq1h8vmbpdadjych1mq8hyqkd7p015cbxm14ri37l1gnxid")))))) + (package-with-extra-patches + (package + (inherit guile-3.0) + (version "3.0.5") + (source (origin + (inherit (package-source guile-3.0)) + (uri (string-append "mirror://gnu/guile/guile-" + version ".tar.xz")) + (sha256 + (base32 + "1wah6fq1h8vmbpdadjych1mq8hyqkd7p015cbxm14ri37l1gnxid"))))) + ;; Remove on the next rebuild cycle. + (search-patches "guile-2.2-skip-so-test.patch"))) (define-public guile-next (deprecated-package "guile-next" guile-3.0)) diff --git a/gnu/packages/patches/guile-2.2-skip-so-test.patch b/gnu/packages/patches/guile-2.2-skip-so-test.patch new file mode 100644 index 0000000000..e7c2594e91 --- /dev/null +++ b/gnu/packages/patches/guile-2.2-skip-so-test.patch @@ -0,0 +1,23 @@ +Skip 'test-stack-overflow' that crashes when using QEMU transparent emulation. + +--- a/test-suite/standalone/Makefile.in 1970-01-01 01:00:01.000000000 +0100 ++++ b/test-suite/standalone/Makefile.in 2021-01-11 10:59:31.606269449 +0100 +@@ -102,8 +102,7 @@ + test-scm-to-latin1-string$(EXEEXT) test-scm-values$(EXEEXT) \ + test-scm-c-bind-keyword-arguments$(EXEEXT) \ + test-srfi-4$(EXEEXT) $(am__append_6) $(am__EXEEXT_1) \ +- test-smob-mark$(EXEEXT) test-smob-mark-race$(EXEEXT) \ +- test-stack-overflow ++ test-smob-mark$(EXEEXT) test-smob-mark-race$(EXEEXT) + check_PROGRAMS = test-num2integral$(EXEEXT) test-round$(EXEEXT) \ + test-foreign-object-c$(EXEEXT) test-list$(EXEEXT) \ + test-unwind$(EXEEXT) test-conversion$(EXEEXT) \ +@@ -1938,7 +1937,7 @@ + test-command-line-encoding test-command-line-encoding2 \ + test-language test-guild-compile $(am__append_3) \ + test-foreign-object-scm test-fast-slot-ref test-mb-regexp \ +- test-use-srfi $(am__append_5) test-stack-overflow ++ test-use-srfi $(am__append_5) + BUILT_SOURCES = $(am__append_2) + EXTRA_DIST = test-import-order-a.scm test-import-order-b.scm \ + test-import-order-c.scm test-import-order-d.scm \ -- cgit v1.2.3 From df50d2a02d1fb574b13a3f89eaf061e102ceb424 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Mon, 11 Jan 2021 22:25:08 +0100 Subject: gnu: podofo: Update to 0.9.7. * gnu/packages/pdf.scm (podofo): Update to 0.9.7. [source]: Remove patch. * gnu/packages/patches/podofo-cmake-3.12.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/patches/podofo-cmake-3.12.patch | 19 ------------------- gnu/packages/pdf.scm | 7 +++---- 3 files changed, 3 insertions(+), 24 deletions(-) delete mode 100644 gnu/packages/patches/podofo-cmake-3.12.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index a41795d8aa..65fbbe8dc5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1489,7 +1489,6 @@ dist_patch_DATA = \ %D%/packages/patches/plib-CVE-2011-4620.patch \ %D%/packages/patches/plib-CVE-2012-4552.patch \ %D%/packages/patches/plotutils-spline-test.patch \ - %D%/packages/patches/podofo-cmake-3.12.patch \ %D%/packages/patches/portaudio-audacity-compat.patch \ %D%/packages/patches/portmidi-modular-build.patch \ %D%/packages/patches/postgresql-disable-resolve_symlinks.patch \ diff --git a/gnu/packages/patches/podofo-cmake-3.12.patch b/gnu/packages/patches/podofo-cmake-3.12.patch deleted file mode 100644 index 0a3c19b21a..0000000000 --- a/gnu/packages/patches/podofo-cmake-3.12.patch +++ /dev/null @@ -1,19 +0,0 @@ -The build fails with cmake 3.12.0. This patch will be obsolete with the next -release. - -https://sourceforge.net/p/podofo/tickets/24/attachment/podofo-cmake-3.12.patch - - ---- a/test/TokenizerTest/CMakeLists.txt 2018-07-20 18:26:02.921494293 +0200 -+++ b/test/TokenizerTest/CMakeLists.txt 2018-07-20 18:34:53.727136443 +0200 -@@ -2,10 +2,3 @@ - TARGET_LINK_LIBRARIES(TokenizerTest ${PODOFO_LIB} ${PODOFO_LIB_DEPENDS}) - SET_TARGET_PROPERTIES(TokenizerTest PROPERTIES COMPILE_FLAGS "${PODOFO_CFLAGS}") - ADD_DEPENDENCIES(TokenizerTest ${PODOFO_DEPEND_TARGET}) -- --# Copy the test samples over to the build tree --ADD_CUSTOM_COMMAND( -- TARGET TokenizerTest -- POST_BUILD -- COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/objects" "${CMAKE_CURRENT_BINARY_DIR}/objects" -- ) diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 224bd792bd..48c2158e7a 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -13,7 +13,7 @@ ;;; Copyright © 2017, 2018 Leo Famulari ;;; Copyright © 2017 Alex Vong ;;; Copyright © 2017, 2018 Rene Saavedra -;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice +;;; Copyright © 2017–2021 Tobias Geerinckx-Rice ;;; Copyright © 2019 Alex Griffin ;;; Copyright © 2019 Ben Sturmfels ;;; Copyright © 2019,2020 Hartmut Goebel @@ -648,15 +648,14 @@ interaction.") (define-public podofo (package (name "podofo") - (version "0.9.6") + (version "0.9.7") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/podofo/podofo/" version "/podofo-" version ".tar.gz")) (sha256 (base32 - "0wj0y4zcmj4q79wrn3vv3xq4bb0vhhxs8yifafwy9f2sjm83c5p9")) - (patches (search-patches "podofo-cmake-3.12.patch")))) + "1f0yvkx6nf99fp741w2y706d8bs9824x1z2gqm3rdy5fv8bfgwkw")))) (build-system cmake-build-system) (native-inputs `(("cppunit" ,cppunit) -- cgit v1.2.3 From 79ba12a1dbb3e40b623dd0945a277f8720d9780a Mon Sep 17 00:00:00 2001 From: Oleg Pykhalov Date: Fri, 1 Jan 2021 13:37:37 +0300 Subject: services: Add syncthing service. * gnu/services/syncthing.scm: New file. * gnu/local.mk: Add this. * doc/guix.texi: Document this. --- doc/guix.texi | 49 +++++++++++++++++++++++++ gnu/local.mk | 3 +- gnu/services/syncthing.scm | 89 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 gnu/services/syncthing.scm (limited to 'gnu/local.mk') diff --git a/doc/guix.texi b/doc/guix.texi index d0a1ab7693..c752815975 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -16507,6 +16507,55 @@ Group name or group ID that will be used when accessing the module. @end table @end deftp +The @code{(gnu services syncthing)} module provides the following services: +@cindex syncthing + +You might want a syncthing daemon if you have files between two or more +computers and want to sync them in real time, safely protected from +prying eyes. + +@deffn {Scheme Variable} syncthing-service-type +This is the service type for the @uref{https://syncthing.net/, +syncthing} daemon, The value for this service type is a +@command{syncthing-configuration} record as in this example: + +@lisp +(service syncthing-service-type + (syncthing-configuration (user "alice"))) +@end lisp + +See below for details about @code{syncthing-configuration}. + +@deftp {Data Type} syncthing-configuration +Data type representing the configuration for @code{syncthing-service-type}. + +@table @asis +@item @code{syncthing} (default: @var{syncthing}) +@code{syncthing} package to use. + +@item @code{arguments} (default: @var{'()}) +List of command-line arguments passing to @code{syncthing} binary. + +@item @code{logflags} (default: @var{0}) +Sum of loging flags, see +@uref{https://docs.syncthing.net/users/syncthing.html#cmdoption-logflags, Syncthing documentation logflags}. + +@item @code{user} (default: @var{#f}) +The user as which the Syncthing service is to be run. +This assumes that the specified user exists. + +@item @code{group} (default: @var{"users"}) +The group as which the Syncthing service is to be run. +This assumes that the specified group exists. + +@item @code{home} (default: @var{#f}) +Common configuration and data directory. The default configuration +directory is @file{$HOME} of the specified Syncthing @code{user}. + +@end table +@end deftp +@end deffn + Furthermore, @code{(gnu services ssh)} provides the following services. @cindex SSH @cindex SSH server diff --git a/gnu/local.mk b/gnu/local.mk index 65fbbe8dc5..bcf7ee0245 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -17,7 +17,7 @@ # Copyright © 2017, 2020 Mathieu Othacehe # Copyright © 2017, 2018, 2019 Gábor Boskovits # Copyright © 2018 Amirouche Boubekki -# Copyright © 2018, 2019, 2020 Oleg Pykhalov +# Copyright © 2018, 2019, 2020, 2021 Oleg Pykhalov # Copyright © 2018 Stefan Stefanović # Copyright © 2018, 2020 Maxim Cournoyer # Copyright © 2019, 2020 Guillaume Le Vaillant @@ -630,6 +630,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/sddm.scm \ %D%/services/spice.scm \ %D%/services/ssh.scm \ + %D%/services/syncthing.scm \ %D%/services/sysctl.scm \ %D%/services/telephony.scm \ %D%/services/version-control.scm \ diff --git a/gnu/services/syncthing.scm b/gnu/services/syncthing.scm new file mode 100644 index 0000000000..12ebe7c107 --- /dev/null +++ b/gnu/services/syncthing.scm @@ -0,0 +1,89 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Oleg Pykhalov +;;; +;;; 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 services syncthing) + #:use-module (gnu packages syncthing) + #:use-module (gnu services) + #:use-module (gnu services shepherd) + #:use-module (guix gexp) + #:use-module (guix records) + #:use-module (ice-9 match) + #:use-module (srfi srfi-1) + #:export (syncthing-configuration + syncthing-configuration? + syncthing-service-type)) + +;;; Commentary: +;;; +;;; This module provides a service definition for the syncthing service. +;;; +;;; Code: + +(define-record-type* + syncthing-configuration make-syncthing-configuration + syncthing-configuration? + (syncthing syncthing-configuration-syncthing ; + (default syncthing)) + (arguments syncthing-configuration-arguments ;list of strings + (default '())) + (logflags syncthing-configuration-logflags ;number + (default 0)) + (user syncthing-configuration-user ;string + (default #f)) + (group syncthing-configuration-group ;string + (default "users")) + (home syncthing-configuration-home ;string + (default #f))) + +(define syncthing-shepherd-service + (match-lambda + (($ syncthing arguments logflags user group home) + (list + (shepherd-service + (provision (list (string->symbol (string-append "syncthing-" user)))) + (documentation "Run syncthing.") + (requirement '(loopback)) + (start #~(make-forkexec-constructor + (append (list (string-append #$syncthing "/bin/syncthing") + "-no-browser" + "-no-restart" + (string-append "-logflags=" (number->string #$logflags))) + '#$arguments) + #:user #$user + #:group #$group + #:environment-variables + (append (list (string-append "HOME=" (or #$home (passwd:dir (getpw #$user)))) + "SSL_CERT_DIR=/etc/ssl/certs" + "SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt") + (remove (lambda (str) + (or (string-prefix? "HOME=" str) + (string-prefix? "SSL_CERT_DIR=" str) + (string-prefix? "SSL_CERT_FILE=" str))) + (environ))))) + (respawn? #f) + (stop #~(make-kill-destructor))))))) + +(define syncthing-service-type + (service-type (name 'syncthing) + (extensions (list (service-extension shepherd-root-service-type + syncthing-shepherd-service))) + (description + "Run @uref{https://github.com/syncthing/syncthing, Syncthing} +decentralized continuous file system synchronization."))) + +;;; syncthing.scm ends here -- cgit v1.2.3 From aeed7218a933054806edd246548346e9edc327c4 Mon Sep 17 00:00:00 2001 From: Vincent Legoll Date: Tue, 12 Jan 2021 22:44:18 +0100 Subject: gnu: Add ipxe. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/bootloaders.scm (ipxe): New variable. * gnu/packages/patches/ipxe-reproducible-geniso.patch: New file … * gnu/local.mk (dist_patch_DATA): … add it. Co-authored-by: Tobias Geerinckx-Rice Co-authored-by: Brice Waegeneire Signed-off-by: Danny Milosavljevic --- gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 125 ++++++++++++++++++++- .../patches/ipxe-reproducible-geniso.patch | 77 +++++++++++++ 3 files changed, 202 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ipxe-reproducible-geniso.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index bcf7ee0245..eb28104add 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1184,6 +1184,7 @@ dist_patch_DATA = \ %D%/packages/patches/intel-xed-fix-nondeterminism.patch \ %D%/packages/patches/intltool-perl-compatibility.patch \ %D%/packages/patches/iputils-libcap-compat.patch \ + %D%/packages/patches/ipxe-reproducible-geniso.patch \ %D%/packages/patches/irrlicht-use-system-libs.patch \ %D%/packages/patches/isl-0.11.1-aarch64-support.patch \ %D%/packages/patches/json-c-CVE-2020-12762.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index 9ca574a151..38dba4cebd 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -7,12 +7,14 @@ ;;; Copyright © 2016, 2017 Danny Milosavljevic ;;; Copyright © 2016, 2017 David Craven ;;; Copyright © 2017, 2018, 2020 Efraim Flashner -;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice +;;; Copyright © 2018, 2019, 2020, 2021 Tobias Geerinckx-Rice ;;; Copyright © 2019 nee ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2020 Björn Höfling ;;; Copyright © 2018, 2019, 2020 Vagrant Cascadian ;;; Copyright © 2020 Pierre Langlois +;;; Copyright © 2021 Vincent Legoll +;;; Copyright © 2021 Brice Waegeneire ;;; ;;; This file is part of GNU Guix. ;;; @@ -1095,3 +1097,124 @@ systems so that they can be added to the bootloader. It also works out how to boot existing GNU/Linux systems and detects what distribution is installed in order to add a suitable bootloader menu entry.") (license license:gpl2+))) + +(define-public ipxe + ;; XXX: 'BUILD_TIMESTAMP' is used to automatically select the newest version + ;; of iPXE if multiple iPXE drivers are loaded concurrently in a UEFI system. + ;; + ;; TODO: Bump this timestamp at each modifications of the package (not only + ;; for updates) by running: date +%s. + (let ((timestamp "1591706427")) + (package + (name "ipxe") + (version "1.20.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ipxe/ipxe") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (patches (search-patches "ipxe-reproducible-geniso.patch")) + (sha256 + (base32 + "0w7h7y97gj9nqvbmsg1zp6zj5mpbbpckqbbx7bpp6k3ahy5fk8zp")))) + (build-system gnu-build-system) + (arguments + `(#:modules ((guix build utils) + (guix build gnu-build-system) + (guix base32) + (ice-9 string-fun) + (ice-9 regex) + (rnrs bytevectors)) + #:imported-modules ((guix base32) + ,@%gnu-build-system-modules) + #:make-flags + ;; XXX: 'BUILD_ID' is used to determine when another ROM in the + ;; system contains identical code in order to save space within the + ;; legacy BIOS option ROM area, which is extremely limited in size. + ;; It is supposed to be collision-free across all ROMs, to do so we + ;; use the truncated output hash of the package. + (let ((build-id + (lambda (out) + (let* ((nix-store (string-append + (or (getenv "NIX_STORE") "/gnu/store") + "/")) + (filename + (string-replace-substring out nix-store "")) + (hash (match:substring (string-match "[0-9a-z]{32}" + filename))) + (bv (nix-base32-string->bytevector hash))) + (format #f "0x~x" + (bytevector-u32-ref bv 0 (endianness big)))))) + (out (assoc-ref %outputs "out")) + (syslinux (assoc-ref %build-inputs "syslinux"))) + (list "ECHO_E_BIN_ECHO=echo" + "ECHO_E_BIN_ECHO_E=echo -e" + + ;; cdrtools' mkisofs will silently ignore a missing isolinux.bin! + ;; Luckily xorriso is more strict. + (string-append "ISOLINUX_BIN=" syslinux + "/share/syslinux/isolinux.bin") + (string-append "SYSLINUX_MBR_DISK_PATH=" syslinux + "/share/syslinux/isohdpfx.bin") + + ;; Build reproducibly. + (string-append "BUILD_ID_CMD=echo -n " (build-id out)) + (string-append "BUILD_TIMESTAMP=" ,timestamp) + "everything")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'enter-source-directory + (lambda _ (chdir "src") #t)) + (add-after 'enter-source-directory 'set-options + (lambda _ + (substitute* "config/general.h" + (("^//(#define PING_CMD.*)" _ uncommented) uncommented) + (("^//(#define IMAGE_TRUST_CMD.*)" _ uncommented) + uncommented) + (("^#undef.*(DOWNLOAD_PROTO_HTTPS.*)" _ option) + (string-append "#define " option)) + (("^#undef.*(DOWNLOAD_PROTO_NFS.*)" _ option) + (string-append "#define " option))) + #t)) + (delete 'configure) ; no configure script + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (ipxe (string-append out "/lib/ipxe")) + (exts-re + "\\.(efi|efirom|iso|kkpxe|kpxe|lkrn|mrom|pxe|rom|usb)$") + (dirs '("bin" "bin-i386-linux" "bin-x86_64-pcbios" + "bin-x86_64-efi" "bin-x86_64-linux" "bin-i386-efi")) + (files (apply append + (map (lambda (dir) + (find-files dir exts-re)) dirs)))) + (for-each (lambda (file) + (let* ((subdir (dirname file)) + (fn (basename file)) + (tgtsubdir (cond + ((string=? "bin" subdir) "") + ((string-prefix? "bin-" subdir) + (string-drop subdir 4))))) + (install-file file + (string-append ipxe "/" tgtsubdir)))) + files)) + #t)) + (add-after 'install 'leave-source-directory + (lambda _ (chdir "..") #t))) + #:tests? #f)) ; no test suite + (native-inputs + `(("perl" ,perl) + ("syslinux" ,syslinux) + ("xorriso" ,xorriso))) + (home-page "https://ipxe.org") + (synopsis "PXE-compliant network boot firmware") + (description "iPXE is a network boot firmware. It provides a full PXE +implementation enhanced with additional features such as booting from: a web +server via HTTP, an iSCSI SAN, a Fibre Channel SAN via FCoE, an AoE SAN, a +wireless network, a wide-area network, an Infiniband network. It allows to +control the boot process with a script. You can use iPXE to replace the +existing PXE ROM on your network card, or you can chainload into iPXE to obtain +the features of iPXE without the hassle of reflashing.") + (license license:gpl2+)))) + diff --git a/gnu/packages/patches/ipxe-reproducible-geniso.patch b/gnu/packages/patches/ipxe-reproducible-geniso.patch new file mode 100644 index 0000000000..ff6aa1da94 --- /dev/null +++ b/gnu/packages/patches/ipxe-reproducible-geniso.patch @@ -0,0 +1,77 @@ +From 052d24d8217c51c572c2f6cbb4a687be2e8ba52d Mon Sep 17 00:00:00 2001 +From: Brice Waegeneire +Date: Fri, 5 Jun 2020 14:38:43 +0200 +Subject: [PATCH] [geniso] Make it reproducible + +Some timestamps get embedded in the generated ISO, making it +unreproducible so we overwrite those timestamps to be at the UNIX epoch. +--- + src/util/geniso | 24 +++++++++++++++++++++--- + 1 file changed, 21 insertions(+), 3 deletions(-) + +diff --git a/src/util/geniso b/src/util/geniso +index ff090d4a..e032ffb0 100755 +--- a/src/util/geniso ++++ b/src/util/geniso +@@ -11,6 +11,13 @@ function help() { + echo " -o FILE save iso image to file" + } + ++function reset_timestamp() { ++ for f in "$1"/*; do ++ touch -t 197001010100 "$f" ++ done ++ touch -t 197001010100 "$1" ++} ++ + LEGACY=0 + FIRST="" + +@@ -37,8 +44,9 @@ if [ -z "${OUT}" ]; then + exit 1 + fi + +-# There should either be mkisofs or the compatible genisoimage program +-for command in genisoimage mkisofs; do ++# There should either be mkisofs, xorriso or the compatible genisoimage ++# program ++for command in xorriso genisoimage mkisofs; do + if ${command} --version >/dev/null 2>/dev/null; then + mkisofs=(${command}) + break +@@ -46,8 +54,10 @@ for command in genisoimage mkisofs; do + done + + if [ -z "${mkisofs}" ]; then +- echo "${0}: mkisofs or genisoimage not found, please install or set PATH" >&2 ++ echo "${0}: mkisofs, xorriso or genisoimage not found, please install or set PATH" >&2 + exit 1 ++elif [ "$mkisofs" = "xorriso" ]; then ++ mkisofs+=(-as mkisofs) + fi + + dir=$(mktemp -d bin/iso.dir.XXXXXX) +@@ -115,6 +125,8 @@ case "${LEGACY}" in + exit 1 + fi + ++ reset_timestamp "$dir" ++ + # generate the iso image + "${mkisofs[@]}" -b boot.img -output ${OUT} ${dir} + ;; +@@ -127,6 +139,12 @@ case "${LEGACY}" in + cp ${LDLINUX_C32} ${dir} + fi + ++ reset_timestamp "$dir" ++ ++ if [ "${mkisofs[0]}" = "xorriso" ]; then ++ mkisofs+=(-isohybrid-mbr "$SYSLINUX_MBR_DISK_PATH") ++ fi ++ + # generate the iso image + "${mkisofs[@]}" -b isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -output ${OUT} ${dir} + +-- +2.26.2 -- cgit v1.2.3 From 93309e25c7c3da5744b0a3304b89effed949f844 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 14 Jan 2021 20:38:10 +0200 Subject: gnu: vcflib: Update to 1.0.2. * gnu/packages/bioinformatics.scm (vcflib): Update to 1.0.2. [source]: Download using git-fetch. Remove patch. Update snippet to use packaged libraries. [build-system]: Switch to cmake-build-system. [inputs]: Add bzip2. [native-inputs]: Add package-source of fsom. [arguments]: Delete custom 'set-flags, 'install phases. Don't delete 'configure phase. Adjust 'unpack-submodule-sources phase. * gnu/packages/patches/vcflib-use-shared-libraries.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/bioinformatics.scm | 84 +++++-------- .../patches/vcflib-use-shared-libraries.patch | 135 --------------------- 3 files changed, 29 insertions(+), 191 deletions(-) delete mode 100644 gnu/packages/patches/vcflib-use-shared-libraries.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index eb28104add..77f1d4a096 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1703,7 +1703,6 @@ dist_patch_DATA = \ %D%/packages/patches/vboot-utils-fix-format-load-address.patch \ %D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \ %D%/packages/patches/vboot-utils-skip-test-workbuf.patch \ - %D%/packages/patches/vcflib-use-shared-libraries.patch \ %D%/packages/patches/vigra-python-compat.patch \ %D%/packages/patches/vinagre-newer-freerdp.patch \ %D%/packages/patches/vinagre-newer-rdp-parameters.patch \ diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 77150e0dce..bb97b2d313 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -14923,32 +14923,44 @@ library automatically handles index file generation and use.") (define-public vcflib (package (name "vcflib") - (version "1.0.1") + (version "1.0.2") (source (origin - (method url-fetch) - (uri (string-append "https://github.com/vcflib/vcflib/releases/" - "download/v" version - "/vcflib-" version "-src.tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/vcflib/vcflib") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "14zzrg8hg8cq9cvq2wdvp21j7nmxxkjrbagw2apd2yqv2kyx42lm")) - (patches (search-patches "vcflib-use-shared-libraries.patch")) + (base32 "1k1z3876kbzifj1sqfzsf3lgb4rw779hvkg6ryxbyq5bc2paj9kh")) (modules '((guix build utils))) (snippet - `(begin + '(begin + (substitute* "CMakeLists.txt" + ((".*fastahack.*") "") + ((".*smithwaterman.*") "") + (("(pkg_check_modules\\(TABIXPP)" text) + (string-append + "pkg_check_modules(FASTAHACK REQUIRED fastahack)\n" + "pkg_check_modules(SMITHWATERMAN REQUIRED smithwaterman)\n" + text)) + (("\\$\\{TABIXPP_LIBRARIES\\}" text) + (string-append "${FASTAHACK_LIBRARIES} " + "${SMITHWATERMAN_LIBRARIES} " + text))) (substitute* (find-files "." "\\.(h|c)(pp)?$") (("\"SmithWatermanGotoh.h\"") "") (("\"convert.h\"") "") (("\"disorder.h\"") "") - (("\"tabix.hpp\"") "") - (("\"Fasta.h\"") "")) + (("Fasta.h") "fastahack/Fasta.h")) (for-each delete-file-recursively '("fastahack" "filevercmp" "fsom" "googletest" "intervaltree" - "libVCFH" "multichoose" "smithwaterman" "tabixpp")) + "libVCFH" "multichoose" "smithwaterman")) #t)))) - (build-system gnu-build-system) + (build-system cmake-build-system) (inputs - `(("htslib" ,htslib) + `(("bzip2" ,bzip2) + ("htslib" ,htslib) ("fastahack" ,fastahack) ("perl" ,perl) ("python" ,python) @@ -14961,22 +14973,13 @@ library automatically handles index file generation and use.") ;; Submodules. ;; This package builds against the .o files so we need to extract the source. ("filevercmp-src" ,(package-source filevercmp)) + ("fsom-src" ,(package-source fsom)) ("intervaltree-src" ,(package-source intervaltree)) ("multichoose-src" ,(package-source multichoose)))) (arguments `(#:tests? #f ; no tests #:phases (modify-phases %standard-phases - (add-after 'unpack 'set-flags - (lambda* (#:key outputs #:allow-other-keys) - (substitute* "Makefile" - (("LDFLAGS =") - (string-append "LDFLAGS = -Wl,-rpath=" - (assoc-ref outputs "out") "/lib "))) - (substitute* "filevercmp/Makefile" - (("-c") "-c -fPIC")) - #t)) - (delete 'configure) (add-after 'unpack 'unpack-submodule-sources (lambda* (#:key inputs #:allow-other-keys) (let ((unpack (lambda (source target) @@ -14989,39 +14992,10 @@ library automatically handles index file generation and use.") "--strip-components=1")))))) (and (unpack "filevercmp-src" "filevercmp") + (unpack "fsom-src" "fsom") (unpack "intervaltree-src" "intervaltree") - (unpack "multichoose-src" "multichoose"))))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (bin (string-append out "/bin")) - (lib (string-append out "/lib"))) - (for-each (lambda (file) - (install-file file bin)) - (find-files "bin" ".*")) - (install-file "libvcflib.so" lib) - (install-file "libvcflib.a" lib) - (for-each - (lambda (file) - (install-file file (string-append out "/include"))) - (find-files "include" "\\.h(pp)?$")) - (mkdir-p (string-append lib "/pkgconfig")) - (with-output-to-file (string-append lib "/pkgconfig/vcflib.pc") - (lambda _ - (format #t "prefix=~a~@ - exec_prefix=${prefix}~@ - libdir=${exec_prefix}/lib~@ - includedir=${prefix}/include~@ - ~@ - ~@ - Name: libvcflib~@ - Version: ~a~@ - Requires: smithwaterman, fastahack~@ - Description: C++ library for parsing and manipulating VCF files~@ - Libs: -L${libdir} -lvcflib~@ - Cflags: -I${includedir}~%" - out ,version)))) - #t))))) + (unpack "multichoose-src" "multichoose")) + #t)))))) (home-page "https://github.com/vcflib/vcflib/") (synopsis "Library for parsing and manipulating VCF files") (description "Vcflib provides methods to manipulate and interpret diff --git a/gnu/packages/patches/vcflib-use-shared-libraries.patch b/gnu/packages/patches/vcflib-use-shared-libraries.patch deleted file mode 100644 index e198ec663c..0000000000 --- a/gnu/packages/patches/vcflib-use-shared-libraries.patch +++ /dev/null @@ -1,135 +0,0 @@ -This patch is a combination of many of the patches from Debian: -https://sources.debian.org/src/libvcflib/1.0.1+dfsg-3/debian/patches/ - ---- - Makefile | 63 +++++++++++--------------------------------------------- - 1 file changed, 12 insertions(+), 51 deletions(-) - -diff --git a/Makefile b/Makefile -index 6b13350..be85f22 100644 ---- a/Makefile -+++ b/Makefile -@@ -114,43 +114,25 @@ BIN_SOURCES = src/vcfecho.cpp \ - src/vcfnull2ref.cpp \ - src/vcfinfosummarize.cpp - --# when we can figure out how to build on mac --# src/vcfsom.cpp -- - #BINS = $(BIN_SOURCES:.cpp=) - BINS = $(addprefix $(BIN_DIR)/,$(notdir $(BIN_SOURCES:.cpp=))) - SHORTBINS = $(notdir $(BIN_SOURCES:.cpp=)) - --TABIX = tabixpp/tabix.o --FASTAHACK = fastahack/Fasta.o --SMITHWATERMAN = smithwaterman/SmithWatermanGotoh.o --REPEATS = smithwaterman/Repeats.o --INDELALLELE = smithwaterman/IndelAllele.o --DISORDER = smithwaterman/disorder.o --LEFTALIGN = smithwaterman/LeftAlign.o --FSOM = fsom/fsom.o - FILEVERCMP = filevercmp/filevercmp.o - --# Work out how to find htslib --# Use the one we ship in tabixpp unless told otherwise by the environment --HTS_LIB ?= $(VCF_LIB_LOCAL)/tabixpp/htslib/libhts.a --HTS_INCLUDES ?= -I$(VCF_LIB_LOCAL)/tabixpp/htslib --HTS_LDFLAGS ?= -L$(VCF_LIB_LOCAL)/tabixpp/htslib -lhts -lbz2 -lm -lz -llzma -pthread -- -- --INCLUDES = $(HTS_INCLUDES) -I$(INC_DIR) --LDFLAGS = -L$(LIB_DIR) -lvcflib $(HTS_LDFLAGS) -lpthread -lz -lm -llzma -lbz2 -+INCLUDES = -I$(INC_DIR) $(shell pkg-config --cflags htslib fastahack smithwaterman tabixpp) -+LDFLAGS = -L$(LIB_DIR) -lvcflib -lpthread -lz -lstdc++ -lm -llzma -lbz2 $(shell pkg-config --libs htslib fastahack smithwaterman tabixpp) - - - --all: $(OBJECTS) $(BINS) scriptToBin -+all: $(OBJECTS) $(BINS) scriptToBin libvcflib.a - - scriptToBin: $(BINS) - $(CP) scripts/* $(BIN_DIR) - - GIT_VERSION += $(shell git describe --abbrev=4 --dirty --always) - --CXXFLAGS = -Ofast -D_FILE_OFFSET_BITS=64 -std=c++0x -+CXXFLAGS = -Ofast -D_FILE_OFFSET_BITS=64 -std=c++0x -fPIC - #CXXFLAGS = -O2 - #CXXFLAGS = -pedantic -Wall -Wshadow -Wpointer-arith -Wcast-qual - -@@ -168,7 +150,7 @@ profiling: - gprof: - $(MAKE) CXXFLAGS="$(CXXFLAGS) -pg" all - --$(OBJECTS): $(SOURCES) $(HEADERS) $(TABIX) multichoose pre $(SMITHWATERMAN) $(FILEVERCMP) $(FASTAHACK) -+$(OBJECTS): $(SOURCES) $(HEADERS) multichoose pre $(FILEVERCMP) - $(CXX) -c -o $@ src/$(*F).cpp $(INCLUDES) $(LDFLAGS) $(CXXFLAGS) && $(CP) src/*.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ - - multichoose: pre -@@ -177,39 +159,22 @@ multichoose: pre - intervaltree: pre - cd intervaltree && $(MAKE) && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ - --$(TABIX): pre -- cd tabixpp && INCLUDES="$(HTS_INCLUDES)" LIBPATH="-L. $(HTS_LDFLAGS)" HTSLIB="$(HTS_LIB)" $(MAKE) && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ -- --$(SMITHWATERMAN): pre -- cd smithwaterman && $(MAKE) && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ && $(CP) *.o $(VCF_LIB_LOCAL)/$(OBJ_DIR)/ -- --$(DISORDER): $(SMITHWATERMAN) -- --$(REPEATS): $(SMITHWATERMAN) -- --$(LEFTALIGN): $(SMITHWATERMAN) -- --$(INDELALLELE): $(SMITHWATERMAN) -- --$(FASTAHACK): pre -- cd fastahack && $(MAKE) && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ && $(CP) Fasta.o $(VCF_LIB_LOCAL)/$(OBJ_DIR)/ -- --#$(FSOM): --# cd fsom && $(CXX) $(CXXFLAGS) -c fsom.c -lm -- - $(FILEVERCMP): pre - cd filevercmp && make && $(CP) *.h* $(VCF_LIB_LOCAL)/$(INC_DIR)/ && $(CP) *.o $(VCF_LIB_LOCAL)/$(INC_DIR)/ - - $(SHORTBINS): pre - $(MAKE) $(BIN_DIR)/$@ - --$(BINS): $(BIN_SOURCES) libvcflib.a $(OBJECTS) $(SMITHWATERMAN) $(FASTAHACK) $(DISORDER) $(LEFTALIGN) $(INDELALLELE) $(SSW) $(FILEVERCMP) pre intervaltree -+$(BINS): $(BIN_SOURCES) libvcflib.so $(OBJECTS) $(SSW) $(FILEVERCMP) pre intervaltree - $(CXX) src/$(notdir $@).cpp -o $@ $(INCLUDES) $(LDFLAGS) $(CXXFLAGS) -DVERSION=\"$(GIT_VERSION)\" - --libvcflib.a: $(OBJECTS) $(SMITHWATERMAN) $(REPEATS) $(FASTAHACK) $(DISORDER) $(LEFTALIGN) $(INDELALLELE) $(SSW) $(FILEVERCMP) $(TABIX) pre -- ar rs libvcflib.a $(OBJECTS) smithwaterman/sw.o $(FASTAHACK) $(SSW) $(FILEVERCMP) $(TABIX) -+libvcflib.a: $(OBJECTS) $(SSW) $(FILEVERCMP) pre -+ ar rs libvcflib.a $(OBJECTS) $(SSW) $(FILEVERCMP) - $(CP) libvcflib.a $(LIB_DIR) - -+libvcflib.so: $(OBJECTS) $(SSW) $(FILEVERCMP) pre -+ $(CXX) -shared -o libvcflib.so $(OBJECTS) $(SSW) $(FILEVERCMP) -+ $(CP) libvcflib.so $(LIB_DIR) - - test: $(BINS) - @prove -Itests/lib -w tests/*.t -@@ -230,16 +195,12 @@ clean: - $(RM) $(BINS) $(OBJECTS) - $(RM) ssw_cpp.o ssw.o - $(RM) libvcflib.a -+ $(RM) libvcflib.so - $(RM) -r $(BIN_DIR) - $(RM) -r $(LIB_DIR) - $(RM) -r $(INC_DIR) - $(RM) -r $(OBJ_DIR) -- $(MAKE) clean -C tabixpp -- $(MAKE) clean -C smithwaterman -- $(MAKE) clean -C fastahack - $(MAKE) clean -C multichoose -- $(MAKE) clean -C fsom -- $(MAKE) clean -C libVCFH - $(MAKE) clean -C test - $(MAKE) clean -C filevercmp - $(MAKE) clean -C intervaltree --- -2.28.0 - -- cgit v1.2.3 From fc9fd5496f33f697f4dc1e0dc1f20ba62c15726a Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 17 Jan 2021 15:31:21 +0200 Subject: gnu: freebayes: Update to 1.3.3. * gnu/packages/bioinformatics.scm (freebayes): Update to 1.3.3. [source]: Add patch. Add snippet to remove vendored library. [build-system]: Switch to meson-build-system. [inputs]: Remove bamtools. Add fastahack, smithwaterman, tabixpp. [native-inputs]: Remove procps, python-2, tabixpp source, smithwaterman source, multichoose source, fsom source, filevercmp source, fastahack source, bash-tap source. Add bash-tap, grep, pkg-config, simde, vcflib. [arguments]: Drop make-flags. Don't delete 'configure phase. Delete custom 'fix-tests, 'build-tabixpp-and-vcflib, 'fix-makefiles, 'install phases. Adjust 'unpack-submodule-sources phase to changed native-inputs. Add new 'patch-source phase. --- gnu/local.mk | 1 + gnu/packages/bioinformatics.scm | 203 +++++++++------------ gnu/packages/patches/freebayes-devendor-deps.patch | 129 +++++++++++++ 3 files changed, 218 insertions(+), 115 deletions(-) create mode 100644 gnu/packages/patches/freebayes-devendor-deps.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 77f1d4a096..6f66021c78 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -998,6 +998,7 @@ dist_patch_DATA = \ %D%/packages/patches/fpc-reproducibility.patch \ %D%/packages/patches/fplll-std-fenv.patch \ %D%/packages/patches/freedink-engine-fix-sdl-hints.patch \ + %D%/packages/patches/freebayes-devendor-deps.patch \ %D%/packages/patches/freeimage-unbundle.patch \ %D%/packages/patches/fuse-overlapping-headers.patch \ %D%/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch \ diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 7326686245..c527111928 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -57,6 +57,7 @@ #:use-module (guix build-system trivial) #:use-module (guix deprecation) #:use-module (gnu packages) + #:use-module (gnu packages assembly) #:use-module (gnu packages autotools) #:use-module (gnu packages algebra) #:use-module (gnu packages base) @@ -15011,125 +15012,97 @@ manipulations on VCF files.") (license license:expat))) (define-public freebayes - (let ((commit "3ce827d8ebf89bb3bdc097ee0fe7f46f9f30d5fb") - (revision "1") - (version "1.0.2")) - (package - (name "freebayes") - (version (git-version version revision commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/ekg/freebayes") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1sbzwmcbn78ybymjnhwk7qc5r912azy5vqz2y7y81616yc3ba2a2")))) - (build-system gnu-build-system) - (inputs - `(("bamtools" ,bamtools) - ("htslib" ,htslib) - ("zlib" ,zlib))) - (native-inputs - `(("bc" ,bc) ; Needed for running tests. - ("samtools" ,samtools) ; Needed for running tests. - ("parallel" ,parallel) ; Needed for running tests. - ("perl" ,perl) ; Needed for running tests. - ("procps" ,procps) ; Needed for running tests. - ("python" ,python-2) ; Needed for running tests. - ("vcflib-src" ,(package-source vcflib)) - ;; These are submodules for the vcflib version used in freebayes. - ;; This package builds against the .o files so we need to extract the source. - ("tabixpp-src" ,(package-source tabixpp)) - ("smithwaterman-src" ,(package-source smithwaterman)) - ("multichoose-src" ,(package-source multichoose)) - ("fsom-src" ,(package-source fsom)) - ("filevercmp-src" ,(package-source filevercmp)) - ("fastahack-src" ,(package-source fastahack)) - ("intervaltree-src" ,(package-source intervaltree)) - ;; These submodules are needed to run the tests. - ("bash-tap-src" ,(package-source bash-tap)) - ("test-simple-bash-src" - ,(origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/ingydotnet/test-simple-bash/") - (commit "124673ff204b01c8e96b7fc9f9b32ee35d898acc"))) - (file-name "test-simple-bash-src-checkout") - (sha256 - (base32 "043plp6z0x9yf7mdpky1fw7zcpwn1p47px95w9mh16603zqqqpga")))))) - (arguments - `(#:make-flags - (list "CC=gcc" - (string-append "BAMTOOLS_ROOT=" - (assoc-ref %build-inputs "bamtools"))) - #:test-target "test" - #:phases - (modify-phases %standard-phases - (delete 'configure) - (add-after 'unpack 'fix-tests - (lambda _ - (substitute* "test/t/01_call_variants.t" - (("grep -P \"\\(\\\\t500\\$\\|\\\\t11000\\$\\|\\\\t1000\\$\\)\"") - "grep -E ' (500|11000|1000)$'")) - #t)) - (add-after 'unpack 'unpack-submodule-sources - (lambda* (#:key inputs #:allow-other-keys) - (let ((unpack (lambda (source target) - (with-directory-excursion target - (if (file-is-directory? (assoc-ref inputs source)) - (copy-recursively (assoc-ref inputs source) ".") - (invoke "tar" "xvf" - (assoc-ref inputs source) - "--strip-components=1")))))) - (and - (unpack "vcflib-src" "vcflib") - (unpack "fastahack-src" "vcflib/fastahack") - (unpack "filevercmp-src" "vcflib/filevercmp") - (unpack "fsom-src" "vcflib/fsom") - (unpack "intervaltree-src" "vcflib/intervaltree") - (unpack "multichoose-src" "vcflib/multichoose") - (unpack "smithwaterman-src" "vcflib/smithwaterman") - (unpack "tabixpp-src" "vcflib/tabixpp") - (unpack "test-simple-bash-src" "test/test-simple-bash") - (unpack "bash-tap-src" "test/bash-tap"))))) - (add-after 'unpack-submodule-sources 'fix-makefiles - (lambda _ - ;; We don't have the .git folder to get the version tag from. - (substitute* "vcflib/Makefile" - (("^GIT_VERSION.*") - (string-append "GIT_VERSION = v" ,version))) - (substitute* "src/Makefile" - (("-I\\$\\(BAMTOOLS_ROOT\\)/src") - "-I$(BAMTOOLS_ROOT)/include/bamtools")) - #t)) - (add-before 'build 'build-tabixpp-and-vcflib - (lambda* (#:key inputs make-flags #:allow-other-keys) - (with-directory-excursion "vcflib" - (with-directory-excursion "tabixpp" - (apply invoke "make" - (string-append "HTS_LIB=" - (assoc-ref inputs "htslib") - "/lib/libhts.a") - make-flags)) - (apply invoke "make" - (string-append "CFLAGS=-Itabixpp") - "all" - make-flags)))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) - (install-file "bin/freebayes" bin) - (install-file "bin/bamleftalign" bin)) - #t))))) - (home-page "https://github.com/ekg/freebayes") - (synopsis "Haplotype-based variant detector") - (description "FreeBayes is a Bayesian genetic variant detector designed to + (package + (name "freebayes") + (version "1.3.3") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ekg/freebayes") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0myz3giad7jqp6ricdfnig9ymlcps2h67mlivadvx97ngagm85z8")) + (patches (search-patches "freebayes-devendor-deps.patch")) + (modules '((guix build utils))) + (snippet + '(begin + (delete-file-recursively "contrib/htslib") + #t)))) + (build-system meson-build-system) + (inputs + `(("fastahack" ,fastahack) + ("htslib" ,htslib) + ("smithwaterman" ,smithwaterman) + ("tabixpp" ,tabixpp) + ("zlib" ,zlib))) + (native-inputs + `(("bash-tap" ,bash-tap) + ("bc" ,bc) + ("grep" ,grep) ; Built with perl support. + ("parallel" ,parallel) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("samtools" ,samtools) + ("simde" ,simde) + ;; We need some binaries from vcflib, but we also need to link against a + ;; subset of the library. Vendor the parts we need until we have a shared library. + ("vcflib" ,vcflib) + ("vcflib-src" ,(package-source vcflib)) + ("intervaltree-src" ,(package-source intervaltree)) + ;; This submodule is needed to run the tests. + ("test-simple-bash-src" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ingydotnet/test-simple-bash/") + (commit "124673ff204b01c8e96b7fc9f9b32ee35d898acc"))) + (file-name "test-simple-bash-src-checkout") + (sha256 + (base32 "043plp6z0x9yf7mdpky1fw7zcpwn1p47px95w9mh16603zqqqpga")))))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-source + (lambda* (#:key inputs #:allow-other-keys) + (let ((bash-tap (assoc-ref inputs "bash-tap"))) + (substitute* (find-files "test/t") + (("BASH_TAP_ROOT=bash-tap") + (string-append "BASH_TAP_ROOT=" bash-tap "/bin")) + (("bash-tap/bash-tap-bootstrap") + (string-append bash-tap "/bin/bash-tap-bootstrap")) + (("source.*bash-tap-bootstrap") + (string-append "source " bash-tap "/bin/bash-tap-bootstrap"))) + (substitute* "meson.build" + ;; Some inputs aren't actually needed. + ((".*bamtools/src.*") "") + ((".*multichoose.*") "") + (("'vcflib/filevercmp'") "")) + #t))) + (add-after 'unpack 'unpack-submodule-sources + (lambda* (#:key inputs #:allow-other-keys) + (let ((unpack (lambda (source target) + (unless (directory-exists? target) + (mkdir-p target)) + (with-directory-excursion target + (if (file-is-directory? (assoc-ref inputs source)) + (copy-recursively (assoc-ref inputs source) ".") + (invoke "tar" "xvf" + (assoc-ref inputs source) + "--strip-components=1")))))) + (and + (unpack "vcflib-src" "vcflib") + (unpack "intervaltree-src" "vcflib/intervaltree") + (unpack "test-simple-bash-src" "test/test-simple-bash")) + #t)))))) + (home-page "https://github.com/ekg/freebayes") + (synopsis "Haplotype-based variant detector") + (description "FreeBayes is a Bayesian genetic variant detector designed to find small polymorphisms, specifically SNPs (single-nucleotide polymorphisms), indels (insertions and deletions), MNPs (multi-nucleotide polymorphisms), and complex events (composite insertion and substitution events) smaller than the length of a short-read sequencing alignment.") - (license license:expat)))) + (license license:expat))) (define-public samblaster (package diff --git a/gnu/packages/patches/freebayes-devendor-deps.patch b/gnu/packages/patches/freebayes-devendor-deps.patch new file mode 100644 index 0000000000..580f53a3b1 --- /dev/null +++ b/gnu/packages/patches/freebayes-devendor-deps.patch @@ -0,0 +1,129 @@ +This patch is original to Guix, ongoing work to upstream bits as possible. + +From 50833daba0b1dbe2ed364b1e980b67a09a312789 Mon Sep 17 00:00:00 2001 +From: Efraim Flashner +Date: Sun, 17 Jan 2021 13:27:17 +0200 +Subject: [PATCH] devendor-dependants + +--- + meson.build | 60 +++++++++++++++++++++++++++++++++++++++++------------ + 1 file changed, 47 insertions(+), 13 deletions(-) + +diff --git a/meson.build b/meson.build +index f6bf242..7a3805e 100644 +--- a/meson.build ++++ b/meson.build +@@ -9,8 +9,12 @@ project('freebayes', ['cpp', 'c'], + + zlib_dep = dependency('zlib') + lzma_dep = dependency('liblzma') ++simde_dep = dependency('simde') + bzip2_dep = dependency('bz2lib', required: false) + htslib_dep = dependency('htslib', required : false) ++tabixpp_dep = dependency('tabixpp', required : false) ++fastahack_dep = dependency('fastahack', required : false) ++smithwaterman_dep = dependency('smithwaterman', required : false) + thread_dep = dependency('threads') + + if htslib_dep.found() +@@ -59,6 +63,41 @@ else + ] + endif + ++if tabixpp_dep.found() ++ tabixpp_includes = '' ++ tabixpp_src = [] ++else ++ tabixpp_includes = [ ++ 'vcflib/tabixpp', ++ ] ++ tabixpp_src = [ ++ 'vcflib/tabixpp/tabix.cpp', ++ ] ++endif ++ ++if fastahack_dep.found() ++ fastahack_src = [] ++else ++ fastahack_src = [ ++ 'vcflib/fastahack/Fasta.cpp', ++ ] ++endif ++ ++if smithwaterman_dep.found() ++ smithwaterman_includes = '' ++ smithwaterman_src = [] ++else ++ smithwaterman_includes = [ ++ 'vcflib/smithwaterman', ++ ] ++ smithwaterman_src = [ ++ 'vcflib/smithwaterman/SmithWatermanGotoh.cpp', ++ 'vcflib/smithwaterman/disorder.cpp', ++ 'vcflib/smithwaterman/Repeats.cpp', ++ 'vcflib/smithwaterman/LeftAlign.cpp', ++ 'vcflib/smithwaterman/IndelAllele.cpp', ++ ] ++endif + + + # +@@ -105,22 +144,17 @@ seqlib_src = [ + ] + + vcflib_src = [ +- 'vcflib/tabixpp/tabix.cpp', + 'vcflib/src/Variant.cpp', +- 'vcflib/smithwaterman/SmithWatermanGotoh.cpp', +- 'vcflib/smithwaterman/disorder.cpp', +- 'vcflib/smithwaterman/Repeats.cpp', +- 'vcflib/smithwaterman/LeftAlign.cpp', +- 'vcflib/smithwaterman/IndelAllele.cpp', ++ tabixpp_src, ++ smithwaterman_src, + ] + + bamleftalign_src = [ + 'src/bamleftalign.cpp', + 'src/IndelAllele.cpp', + 'contrib/SeqLib/src/BamWriter.cpp', +- 'vcflib/fastahack/Fasta.cpp', +- 'vcflib/smithwaterman/LeftAlign.cpp', +- 'vcflib/smithwaterman/IndelAllele.cpp', ++ fastahack_src, ++ smithwaterman_src, + 'vcflib/src/split.cpp', + 'src/LeftAlign.cpp', + ] +@@ -135,8 +169,8 @@ incdir = include_directories( + 'contrib', + 'contrib/SeqLib', + 'vcflib/src', +- 'vcflib/tabixpp', +- 'vcflib/smithwaterman', ++ tabixpp_includes, ++ smithwaterman_includes, + 'vcflib/multichoose', + 'vcflib/filevercmp') + +@@ -152,7 +186,7 @@ executable('freebayes', + include_directories : incdir, + cpp_args : cpp_args, + c_args : c_args, +- dependencies: [zlib_dep, lzma_dep, htslib_dep, thread_dep], ++ dependencies: [zlib_dep, lzma_dep, simde_dep, htslib_dep, tabixpp_dep, smithwaterman_dep, thread_dep], + install: true + ) + +@@ -165,7 +199,7 @@ executable('bamleftalign', + include_directories : incdir, + cpp_args : cpp_args, + c_args : c_args, +- dependencies: [zlib_dep, lzma_dep, htslib_dep, thread_dep], ++ dependencies: [zlib_dep, lzma_dep, simde_dep, htslib_dep, tabixpp_dep, fastahack_dep, smithwaterman_dep, thread_dep], + install: true + ) + +-- +2.30.0 + -- cgit v1.2.3 From 8b55544212a90b0276df49596a3d373e5c2e8f5c Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 18 Jan 2021 14:39:13 -0500 Subject: gnu: mesa: Skip another test. * gnu/packages/patches/mesa-skip-disk-cache-test.patch: Rename to ... * gnu/packages/patches/mesa-skip-tests.patch: ... new file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/gl.scm (mesa)[source]: Adjust accordingly. --- gnu/local.mk | 2 +- gnu/packages/gl.scm | 2 +- .../patches/mesa-skip-disk-cache-test.patch | 19 --------- gnu/packages/patches/mesa-skip-tests.patch | 49 ++++++++++++++++++++++ 4 files changed, 51 insertions(+), 21 deletions(-) delete mode 100644 gnu/packages/patches/mesa-skip-disk-cache-test.patch create mode 100644 gnu/packages/patches/mesa-skip-tests.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 479277aafa..ba95aeca64 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1348,7 +1348,7 @@ dist_patch_DATA = \ %D%/packages/patches/libmemcached-build-with-gcc7.patch \ %D%/packages/patches/libmhash-hmac-fix-uaf.patch \ %D%/packages/patches/mediastreamer2-srtp2.patch \ - %D%/packages/patches/mesa-skip-disk-cache-test.patch \ + %D%/packages/patches/mesa-skip-tests.patch \ %D%/packages/patches/mescc-tools-boot.patch \ %D%/packages/patches/meson-for-build-rpath.patch \ %D%/packages/patches/metabat-fix-compilation.patch \ diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index dc64ccf85e..2612347913 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -249,7 +249,7 @@ also known as DXTn or DXTC) for Mesa.") (base32 "14m09bk7akj0k02lg8fhvvzbdsashlbdsgl2cw7wbqfj2mhdqwh5")) (patches - (search-patches "mesa-skip-disk-cache-test.patch")))) + (search-patches "mesa-skip-tests.patch")))) (build-system meson-build-system) (propagated-inputs `(;; The following are in the Requires.private field of gl.pc. diff --git a/gnu/packages/patches/mesa-skip-disk-cache-test.patch b/gnu/packages/patches/mesa-skip-disk-cache-test.patch deleted file mode 100644 index 190f6b6ee1..0000000000 --- a/gnu/packages/patches/mesa-skip-disk-cache-test.patch +++ /dev/null @@ -1,19 +0,0 @@ -disk_cache_create() here looks up the users home directory from -which resolves to "/" in the build environment. I could not find an easy -way to set the home directory to something else, so we disable this test -for now. - ---- a/src/compiler/glsl/tests/cache_test.c -+++ b/src/compiler/glsl/tests/cache_test.c -@@ -170,11 +170,6 @@ - unsetenv("MESA_GLSL_CACHE_DIR"); - unsetenv("XDG_CACHE_HOME"); - -- cache = disk_cache_create("test", "make_check", 0); -- expect_non_null(cache, "disk_cache_create with no environment variables"); -- -- disk_cache_destroy(cache); -- - /* Test with XDG_CACHE_HOME set */ - setenv("XDG_CACHE_HOME", CACHE_TEST_TMP "/xdg-cache-home", 1); - cache = disk_cache_create("test", "make_check", 0); diff --git a/gnu/packages/patches/mesa-skip-tests.patch b/gnu/packages/patches/mesa-skip-tests.patch new file mode 100644 index 0000000000..2622d5d312 --- /dev/null +++ b/gnu/packages/patches/mesa-skip-tests.patch @@ -0,0 +1,49 @@ +disk_cache_create() here looks up the users home directory from +which resolves to "/" in the build environment. I could not find an easy +way to set the home directory to something else, so we disable this test +for now. + +--- a/src/compiler/glsl/tests/cache_test.c ++++ b/src/compiler/glsl/tests/cache_test.c +@@ -170,11 +170,6 @@ + unsetenv("MESA_GLSL_CACHE_DIR"); + unsetenv("XDG_CACHE_HOME"); + +- cache = disk_cache_create("test", "make_check", 0); +- expect_non_null(cache, "disk_cache_create with no environment variables"); +- +- disk_cache_destroy(cache); +- + /* Test with XDG_CACHE_HOME set */ + setenv("XDG_CACHE_HOME", CACHE_TEST_TMP "/xdg-cache-home", 1); + cache = disk_cache_create("test", "make_check", 0); + +This test fails on i686-linux. I couldn't come up with a regex that +could be used to disable it just on i686-linux, so we disable it +completely with this patch: + +https://gitlab.freedesktop.org/mesa/mesa/-/issues/4091 + +diff --git a/src/util/meson.build b/src/util/meson.build +index 0893f64..909b3e0 100644 +--- a/src/util/meson.build ++++ b/src/util/meson.build +@@ -289,18 +289,6 @@ if with_tests + suite : ['util'], + ) + +- test( +- 'u_debug_stack', +- executable( +- 'u_debug_stack_test', +- files('u_debug_stack_test.cpp'), +- include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux], +- dependencies : [idep_mesautil, idep_gtest], +- c_args : [c_msvc_compat_args], +- ), +- suite : ['util'], +- ) +- + process_test_exe = executable( + 'process_test', + files('process_test.c'), -- cgit v1.2.3 From c67ff5636f2e62e4fd75ac584865c56d973e27fe Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Mon, 18 Jan 2021 23:27:25 -0600 Subject: gnu: idris: Update to 1.3.3. * gnu/packages/patches/idris-disable-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/idris.scm (idris): Update to 1.3.3. [source]: Use the patch. [native-inputs]: Add ghc-cheapskate. [arguments]: Adjust cheapskate version bounds. Make auxiliary test script executable. --- gnu/local.mk | 1 + gnu/packages/idris.scm | 12 ++++++++---- gnu/packages/patches/idris-disable-test.patch | 19 +++++++++++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/idris-disable-test.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 6f66021c78..370719f4d3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1179,6 +1179,7 @@ dist_patch_DATA = \ %D%/packages/patches/icu4c-CVE-2020-10531.patch \ %D%/packages/patches/id3lib-CVE-2007-4460.patch \ %D%/packages/patches/id3lib-UTF16-writing-bug.patch \ + %D%/packages/patches/idris-disable-test.patch \ %D%/packages/patches/ilmbase-fix-tests.patch \ %D%/packages/patches/inetutils-hurd.patch \ %D%/packages/patches/inkscape-poppler-0.76.patch \ diff --git a/gnu/packages/idris.scm b/gnu/packages/idris.scm index 1982d7cf07..ca2772b904 100644 --- a/gnu/packages/idris.scm +++ b/gnu/packages/idris.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2015 Paul van der Walt ;;; Copyright © 2016, 2017 David Craven ;;; Copyright © 2018 Alex ter Weele -;;; Copyright © 2019 Eric Bavier +;;; Copyright © 2019, 2021 Eric Bavier ;;; ;;; This file is part of GNU Guix. ;;; @@ -38,7 +38,7 @@ (define-public idris (package (name "idris") - (version "1.3.2") + (version "1.3.3") (source (origin (method url-fetch) (uri (string-append @@ -46,10 +46,12 @@ "idris-" version "/idris-" version ".tar.gz")) (sha256 (base32 - "0wychzkg0yghd2pp8fqz78vp1ayzks191knfpl7mhh8igsmb6bc7")))) + "1pachwc6msw3n1mz2z1r1w6h518w9gbhdvbaa5vi1qp3cn3wm6q4")) + (patches (search-patches "idris-disable-test.patch")))) (build-system haskell-build-system) (native-inputs ;For tests `(("perl" ,perl) + ("ghc-cheapskate" ,ghc-cheapskate) ("ghc-tasty" ,ghc-tasty) ("ghc-tasty-golden" ,ghc-tasty-golden) ("ghc-tasty-rerun" ,ghc-tasty-rerun))) @@ -98,7 +100,8 @@ (add-after 'unpack 'update-constraints (lambda _ (substitute* "idris.cabal" - (("ansi-terminal < 0\\.9") "ansi-terminal < 0.10")) + (("ansi-terminal < 0\\.9") "ansi-terminal < 0.10") + (("cheapskate >= 0\\.1\\.1\\.2 && < 0\\.2") "cheapskate >= 0.1.1.1 && < 0.2")) #t)) (add-before 'configure 'set-cc-command (lambda _ @@ -118,6 +121,7 @@ (add-after 'install 'check (lambda* (#:key outputs #:allow-other-keys #:rest args) (let ((out (assoc-ref outputs "out"))) + (chmod "test/scripts/timeout" #o755) ;must be executable (setenv "TASTY_NUM_THREADS" (number->string (parallel-job-count))) (setenv "IDRIS_CC" "gcc") ;Needed for creating executables (setenv "PATH" (string-append out "/bin:" (getenv "PATH"))) diff --git a/gnu/packages/patches/idris-disable-test.patch b/gnu/packages/patches/idris-disable-test.patch new file mode 100644 index 0000000000..ec8c7c8451 --- /dev/null +++ b/gnu/packages/patches/idris-disable-test.patch @@ -0,0 +1,19 @@ +The "pkg010" test output depends on the version of optparse-applicative being +used. The expected output requires optparse-applicative >= 0.15.1.0. Skip +the test for now. + +--- idris-1.3.3/test/TestData.hs 2021-01-19 23:05:24.238958262 -0600 ++++ idris-1.3.3/test/TestData.hs 2021-01-19 23:10:33.314390997 -0600 +@@ -212,8 +212,10 @@ + ( 5, ANY ), + ( 6, ANY ), + ( 7, ANY ), +- ( 8, ANY ), +- ( 10, ANY )]), ++ ( 8, ANY )]), ++-- FIXME: Expected output depends on optparse-applicative version. ++-- See https://github.com/idris-lang/Idris-dev/issues/4896 ++-- ( 10, ANY )]), + ("prelude", "Prelude", + [ ( 1, ANY )]), + ("primitives", "Primitive types", -- cgit v1.2.3 From 81710c867ca229348fb783ead634c1ba09f31f1c Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 20 Jan 2021 15:43:45 +0100 Subject: gnu: r-httpuv: Update to 1.5.5. * gnu/packages/cran.scm (r-httpuv): Update to 1.5.5. [source]: Update patch name and remove unused modules. * gnu/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch: Rename this file... * gnu/packages/patches/r-httpuv-1.5.5-unvendor-libuv.patch: ...to this. * gnu/local.mk (dist_patch_DATA): Rename it. --- gnu/local.mk | 2 +- gnu/packages/cran.scm | 10 ++-- .../patches/r-httpuv-1.5.4-unvendor-libuv.patch | 59 ---------------------- .../patches/r-httpuv-1.5.5-unvendor-libuv.patch | 59 ++++++++++++++++++++++ 4 files changed, 64 insertions(+), 66 deletions(-) delete mode 100644 gnu/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch create mode 100644 gnu/packages/patches/r-httpuv-1.5.5-unvendor-libuv.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 370719f4d3..c631e449d1 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1581,7 +1581,7 @@ dist_patch_DATA = \ %D%/packages/patches/readline-6.2-CVE-2014-2524.patch \ %D%/packages/patches/renpy-use-system-fribidi.patch \ %D%/packages/patches/reposurgeon-add-missing-docbook-files.patch \ - %D%/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch \ + %D%/packages/patches/r-httpuv-1.5.5-unvendor-libuv.patch \ %D%/packages/patches/ri-li-modernize_cpp.patch \ %D%/packages/patches/ripperx-missing-file.patch \ %D%/packages/patches/rpcbind-CVE-2017-8779.patch \ diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm index 1b1ad91595..4e853fc902 100644 --- a/gnu/packages/cran.scm +++ b/gnu/packages/cran.scm @@ -1024,19 +1024,17 @@ into a pipeline of data manipulation and visualisation.") (define-public r-httpuv (package (name "r-httpuv") - (version "1.5.4") + (version "1.5.5") (source (origin (method url-fetch) (uri (cran-uri "httpuv" version)) (sha256 (base32 - "066rprqvz9qln6xd85x1yh1wbbmzd157xjl8zq1zbgr8l6347inm")) + "05rir03xwamwfq5691vx0x957sgmr4i8iv5vpx5rv1f74y4wkrhb")) ;; Unvendor bundled libraries. As of 1.5.4 the vendored libuv ;; only contains fixes for building on Solaris. - (patches (search-patches "r-httpuv-1.5.4-unvendor-libuv.patch")) - (modules '((guix build utils) - (ice-9 ftw) - (srfi srfi-1))) + (patches (search-patches "r-httpuv-1.5.5-unvendor-libuv.patch")) + (modules '((guix build utils))) (snippet `(begin (delete-file-recursively "src/libuv") diff --git a/gnu/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch b/gnu/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch deleted file mode 100644 index 0947718059..0000000000 --- a/gnu/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch +++ /dev/null @@ -1,59 +0,0 @@ -Removes references to bundled libuv. - ---- a/src/Makevars 2020-07-31 11:53:30.576484531 +0200 -+++ b/src/Makevars 2020-07-31 11:54:19.369863118 +0200 -@@ -5,7 +5,7 @@ - - UNAME := $(shell uname) - --PKG_LIBS = ./libuv/.libs/libuv.a ./http-parser/http_parser.o ./sha1/sha1.o ./base64/base64.o -pthread -+PKG_LIBS = -luv ./http-parser/http_parser.o ./sha1/sha1.o ./base64/base64.o -pthread - - ifeq ($(UNAME), Darwin) - PKG_LIBS += -framework CoreServices -@@ -23,7 +23,7 @@ - - PKG_CFLAGS = $(C_VISIBILITY) -DSTRICT_R_HEADERS - PKG_CXXFLAGS = $(CXX_VISIBILITY) -DSTRICT_R_HEADERS --PKG_CPPFLAGS = -Ilibuv/include -pthread -+PKG_CPPFLAGS = -pthread - - # To avoid spurious warnings from `R CMD check --as-cran`, about compiler - # warning flags like -Werror. -@@ -43,35 +43,5 @@ - # PKG_CPPFLAGS += -D_GLIBCXX_ASSERTIONS - - --$(SHLIB): libuv/.libs/libuv.a http-parser/http_parser.o sha1/sha1.o base64/base64.o -+$(SHLIB): http-parser/http_parser.o sha1/sha1.o base64/base64.o - --# We needed to rename lt~obsolete.m4 because the name causes problems with R --# CMD check. Here we rename it back. --libuv/m4/lt~obsolete.m4: libuv/m4/lt_obsolete.m4 -- cp -p -f libuv/m4/lt_obsolete.m4 libuv/m4/lt~obsolete.m4 -- --# Run ./configure. We need to touch various autotools-related files to avoid --# it trying to run autotools programs again. We also need to make sure --# configure is executable, because on some platforms, calling unzip() in R --# does not preserve the executable bit. --# --# It's VERY IMPORTANT that mtime(aclocal.m4) <= mtime(configure), and also --# mtime(aclocal.m4) <= mtime(Makefile.in). On some platforms, passing multiple --# files to a single touch command gives them all the same time, but on others --# (Solaris and possibly some Fedoras) the timestamps are slightly increasing --# from one to the next, i.e. the order matters. To remove this fragility, we --# use "-r aclocal.m4" to ensure that all three files are guaranteed to have --# precisely the same timestamp value. --libuv/Makefile: libuv/m4/lt~obsolete.m4 -- (cd libuv \ -- && touch aclocal.m4 \ -- && touch -r aclocal.m4 configure Makefile.in \ -- && chmod +x configure \ -- && CC="$(CC)" CFLAGS="$(CFLAGS) $(CPICFLAGS) $(C_VISIBILITY)" AR="$(AR)" RANLIB="$(RANLIB)" LDFLAGS="$(LDFLAGS)" ./configure $(CONFIGURE_FLAGS)) -- --libuv/.libs/libuv.a: libuv/Makefile -- $(MAKE) --directory=libuv \ -- HAVE_DTRACE=0 -- --clean: -- $(MAKE) --directory=libuv distclean diff --git a/gnu/packages/patches/r-httpuv-1.5.5-unvendor-libuv.patch b/gnu/packages/patches/r-httpuv-1.5.5-unvendor-libuv.patch new file mode 100644 index 0000000000..0947718059 --- /dev/null +++ b/gnu/packages/patches/r-httpuv-1.5.5-unvendor-libuv.patch @@ -0,0 +1,59 @@ +Removes references to bundled libuv. + +--- a/src/Makevars 2020-07-31 11:53:30.576484531 +0200 ++++ b/src/Makevars 2020-07-31 11:54:19.369863118 +0200 +@@ -5,7 +5,7 @@ + + UNAME := $(shell uname) + +-PKG_LIBS = ./libuv/.libs/libuv.a ./http-parser/http_parser.o ./sha1/sha1.o ./base64/base64.o -pthread ++PKG_LIBS = -luv ./http-parser/http_parser.o ./sha1/sha1.o ./base64/base64.o -pthread + + ifeq ($(UNAME), Darwin) + PKG_LIBS += -framework CoreServices +@@ -23,7 +23,7 @@ + + PKG_CFLAGS = $(C_VISIBILITY) -DSTRICT_R_HEADERS + PKG_CXXFLAGS = $(CXX_VISIBILITY) -DSTRICT_R_HEADERS +-PKG_CPPFLAGS = -Ilibuv/include -pthread ++PKG_CPPFLAGS = -pthread + + # To avoid spurious warnings from `R CMD check --as-cran`, about compiler + # warning flags like -Werror. +@@ -43,35 +43,5 @@ + # PKG_CPPFLAGS += -D_GLIBCXX_ASSERTIONS + + +-$(SHLIB): libuv/.libs/libuv.a http-parser/http_parser.o sha1/sha1.o base64/base64.o ++$(SHLIB): http-parser/http_parser.o sha1/sha1.o base64/base64.o + +-# We needed to rename lt~obsolete.m4 because the name causes problems with R +-# CMD check. Here we rename it back. +-libuv/m4/lt~obsolete.m4: libuv/m4/lt_obsolete.m4 +- cp -p -f libuv/m4/lt_obsolete.m4 libuv/m4/lt~obsolete.m4 +- +-# Run ./configure. We need to touch various autotools-related files to avoid +-# it trying to run autotools programs again. We also need to make sure +-# configure is executable, because on some platforms, calling unzip() in R +-# does not preserve the executable bit. +-# +-# It's VERY IMPORTANT that mtime(aclocal.m4) <= mtime(configure), and also +-# mtime(aclocal.m4) <= mtime(Makefile.in). On some platforms, passing multiple +-# files to a single touch command gives them all the same time, but on others +-# (Solaris and possibly some Fedoras) the timestamps are slightly increasing +-# from one to the next, i.e. the order matters. To remove this fragility, we +-# use "-r aclocal.m4" to ensure that all three files are guaranteed to have +-# precisely the same timestamp value. +-libuv/Makefile: libuv/m4/lt~obsolete.m4 +- (cd libuv \ +- && touch aclocal.m4 \ +- && touch -r aclocal.m4 configure Makefile.in \ +- && chmod +x configure \ +- && CC="$(CC)" CFLAGS="$(CFLAGS) $(CPICFLAGS) $(C_VISIBILITY)" AR="$(AR)" RANLIB="$(RANLIB)" LDFLAGS="$(LDFLAGS)" ./configure $(CONFIGURE_FLAGS)) +- +-libuv/.libs/libuv.a: libuv/Makefile +- $(MAKE) --directory=libuv \ +- HAVE_DTRACE=0 +- +-clean: +- $(MAKE) --directory=libuv distclean -- cgit v1.2.3 From 708d3ec0de9cfffc933615d92825906efacd4c6d Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 20 Jan 2021 19:35:37 -0500 Subject: gnu: Mutt: Fix CVE-2021-3181. * gnu/packages/patches/mutt-CVE-2021-3181.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/mail.scm (mutt)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/mail.scm | 3 +- gnu/packages/patches/mutt-CVE-2021-3181.patch | 45 +++++++++++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/mutt-CVE-2021-3181.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index c631e449d1..0553c12f28 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1385,6 +1385,7 @@ dist_patch_DATA = \ %D%/packages/patches/mupen64plus-video-z64-glew-correct-path.patch \ %D%/packages/patches/musl-cross-locale.patch \ %D%/packages/patches/mutt-store-references.patch \ + %D%/packages/patches/mutt-CVE-2021-3181.patch \ %D%/packages/patches/m4-gnulib-libio.patch \ %D%/packages/patches/ncompress-fix-softlinks.patch \ %D%/packages/patches/netcdf-date-time.patch \ diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 5b235eea85..ab3a19578e 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -456,7 +456,8 @@ aliasing facilities to work just as they would on normal mail.") (sha256 (base32 "1m4ig69qw4g3lhm4351snmy5i0ch65fqc9vqqdybr6jy21w7w225")) - (patches (search-patches "mutt-store-references.patch")))) + (patches (search-patches "mutt-store-references.patch" + "mutt-CVE-2021-3181.patch")))) (build-system gnu-build-system) (inputs `(("cyrus-sasl" ,cyrus-sasl) diff --git a/gnu/packages/patches/mutt-CVE-2021-3181.patch b/gnu/packages/patches/mutt-CVE-2021-3181.patch new file mode 100644 index 0000000000..df5214b052 --- /dev/null +++ b/gnu/packages/patches/mutt-CVE-2021-3181.patch @@ -0,0 +1,45 @@ +Fix CVE-2021-3181: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3181 + +Patch copied from upstream source repository: + +https://gitlab.com/muttmua/mutt/-/commit/c059e20ea4c7cb3ee9ffd3500ffe313ae84b2545 + +From c059e20ea4c7cb3ee9ffd3500ffe313ae84b2545 Mon Sep 17 00:00:00 2001 +From: Kevin McCarthy +Date: Sun, 17 Jan 2021 10:40:37 -0800 +Subject: [PATCH] Fix memory leak parsing group address. + +When there was a group address terminator with no previous addresses, +an address would be allocated but not attached to the address list. + +Change this to only allocate when last exists. + +It would be more correct to not allocate at all unless we are inside a +group list, but I will address that in a separate commit to master. +--- + rfc822.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/rfc822.c b/rfc822.c +index 7ff4eaa3..ced619f2 100644 +--- a/rfc822.c ++++ b/rfc822.c +@@ -587,11 +587,10 @@ ADDRESS *rfc822_parse_adrlist (ADDRESS *top, const char *s) + #endif + + /* add group terminator */ +- cur = rfc822_new_address (); + if (last) + { +- last->next = cur; +- last = cur; ++ last->next = rfc822_new_address (); ++ last = last->next; + } + + phraselen = 0; +-- +GitLab + -- cgit v1.2.3 From 59c03bd4f9aba7ccd90428508ad072f8db01b9ed Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 25 Jan 2021 16:36:53 -0500 Subject: gnu: Mutt: Update to 2.0.5. * gnu/packages/patches/mutt-CVE-2021-3181.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/mail.scm (mutt): Update to 2.0.5. [source]: Remove obsolete patch. --- gnu/local.mk | 1 - gnu/packages/mail.scm | 7 ++--- gnu/packages/patches/mutt-CVE-2021-3181.patch | 45 --------------------------- 3 files changed, 3 insertions(+), 50 deletions(-) delete mode 100644 gnu/packages/patches/mutt-CVE-2021-3181.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 0553c12f28..c631e449d1 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1385,7 +1385,6 @@ dist_patch_DATA = \ %D%/packages/patches/mupen64plus-video-z64-glew-correct-path.patch \ %D%/packages/patches/musl-cross-locale.patch \ %D%/packages/patches/mutt-store-references.patch \ - %D%/packages/patches/mutt-CVE-2021-3181.patch \ %D%/packages/patches/m4-gnulib-libio.patch \ %D%/packages/patches/ncompress-fix-softlinks.patch \ %D%/packages/patches/netcdf-date-time.patch \ diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index ab3a19578e..b3927bbafe 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -445,7 +445,7 @@ aliasing facilities to work just as they would on normal mail.") (define-public mutt (package (name "mutt") - (version "2.0.4") + (version "2.0.5") (source (origin (method url-fetch) (uri (list @@ -455,9 +455,8 @@ aliasing facilities to work just as they would on normal mail.") version ".tar.gz"))) (sha256 (base32 - "1m4ig69qw4g3lhm4351snmy5i0ch65fqc9vqqdybr6jy21w7w225")) - (patches (search-patches "mutt-store-references.patch" - "mutt-CVE-2021-3181.patch")))) + "0k80s27sf7djb7zxj81ihksr8jkr71mfaa8976fzh41i1pn5l7g2")) + (patches (search-patches "mutt-store-references.patch")))) (build-system gnu-build-system) (inputs `(("cyrus-sasl" ,cyrus-sasl) diff --git a/gnu/packages/patches/mutt-CVE-2021-3181.patch b/gnu/packages/patches/mutt-CVE-2021-3181.patch deleted file mode 100644 index df5214b052..0000000000 --- a/gnu/packages/patches/mutt-CVE-2021-3181.patch +++ /dev/null @@ -1,45 +0,0 @@ -Fix CVE-2021-3181: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3181 - -Patch copied from upstream source repository: - -https://gitlab.com/muttmua/mutt/-/commit/c059e20ea4c7cb3ee9ffd3500ffe313ae84b2545 - -From c059e20ea4c7cb3ee9ffd3500ffe313ae84b2545 Mon Sep 17 00:00:00 2001 -From: Kevin McCarthy -Date: Sun, 17 Jan 2021 10:40:37 -0800 -Subject: [PATCH] Fix memory leak parsing group address. - -When there was a group address terminator with no previous addresses, -an address would be allocated but not attached to the address list. - -Change this to only allocate when last exists. - -It would be more correct to not allocate at all unless we are inside a -group list, but I will address that in a separate commit to master. ---- - rfc822.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/rfc822.c b/rfc822.c -index 7ff4eaa3..ced619f2 100644 ---- a/rfc822.c -+++ b/rfc822.c -@@ -587,11 +587,10 @@ ADDRESS *rfc822_parse_adrlist (ADDRESS *top, const char *s) - #endif - - /* add group terminator */ -- cur = rfc822_new_address (); - if (last) - { -- last->next = cur; -- last = cur; -+ last->next = rfc822_new_address (); -+ last = last->next; - } - - phraselen = 0; --- -GitLab - -- cgit v1.2.3 From dbcd2050500c932190d710cee43f5e14f0fd59db Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 14 Jan 2021 16:27:39 -0500 Subject: gnu: python-xyz: Move a few modules to (gnu packages python-build). * gnu/packages/python-xyz.scm (python-pep517): Inherit from python-pep517-bootstrap. Remove the inherited common fields. (python-poetry-core, python-wheel) (python-toml): Move to ... * gnu/packages/python-build.scm: ... here, a new module. (python-pep517-bootstrap): New package. * gnu/local.mk (GNU_SYSTEM_MODULES): Register the new module. --- gnu/local.mk | 1 + gnu/packages/bittorrent.scm | 1 + gnu/packages/check.scm | 1 + gnu/packages/finance.scm | 1 + gnu/packages/machine-learning.scm | 1 + gnu/packages/protobuf.scm | 1 + gnu/packages/python-build.scm | 134 ++++++++++++++++++++++++++++++++++++++ gnu/packages/python-crypto.scm | 1 + gnu/packages/python-web.scm | 1 + gnu/packages/python-xyz.scm | 94 +------------------------- gnu/packages/sphinx.scm | 1 + gnu/packages/version-control.scm | 1 + gnu/packages/virtualization.scm | 1 + 13 files changed, 148 insertions(+), 91 deletions(-) create mode 100644 gnu/packages/python-build.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index c631e449d1..cc9b47b493 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -460,6 +460,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/purescript.scm \ %D%/packages/pv.scm \ %D%/packages/python.scm \ + %D%/packages/python-build.scm \ %D%/packages/python-check.scm \ %D%/packages/python-compression.scm \ %D%/packages/python-crypto.scm \ diff --git a/gnu/packages/bittorrent.scm b/gnu/packages/bittorrent.scm index 08e61d7ba2..29b0d62ad2 100644 --- a/gnu/packages/bittorrent.scm +++ b/gnu/packages/bittorrent.scm @@ -55,6 +55,7 @@ #:use-module (gnu packages ncurses) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index d9a1fb3acf..98b5bb293f 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -67,6 +67,7 @@ #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages time) diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index 8ead37beb3..1798ad82bc 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -92,6 +92,7 @@ #:use-module (gnu packages popt) #:use-module (gnu packages protobuf) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 920b5d82ed..a3084c17e2 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -74,6 +74,7 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages protobuf) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-check) #:use-module (gnu packages python-science) #:use-module (gnu packages python-web) diff --git a/gnu/packages/protobuf.scm b/gnu/packages/protobuf.scm index a414bc6bbb..61dee46d43 100644 --- a/gnu/packages/protobuf.scm +++ b/gnu/packages/protobuf.scm @@ -40,6 +40,7 @@ #:use-module (gnu packages libevent) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-check) #:use-module (gnu packages python-xyz) #:use-module (gnu packages ruby)) diff --git a/gnu/packages/python-build.scm b/gnu/packages/python-build.scm new file mode 100644 index 0000000000..b0940b67f3 --- /dev/null +++ b/gnu/packages/python-build.scm @@ -0,0 +1,134 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015, 2020 Efraim Flashner +;;; Copyright © 2016 Leo Famulari +;;; Copyright © 2020 Marius Bakke +;;; Copyright © 2020 Tanguy Le Carrour +;;; Copyright © 2018 Maxim Cournoyer +;;; +;;; 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 python-build) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system python) + #:use-module (guix download) + #:use-module (guix packages)) + +;;; Commentary: +;;; +;;; Python packages to build... Python packages. Since they are bound to be +;;; relied on by many, their dependencies should be kept minimal, and this +;;; module should not depend on other modules containing Python packages. +;;; +;;; Code: + +(define-public python-wheel + (package + (name "python-wheel") + (version "0.33.6") + (source + (origin + (method url-fetch) + (uri (pypi-uri "wheel" version)) + (sha256 + (base32 + "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h")))) + (build-system python-build-system) + (arguments + ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn + ;; fails to find the newly-built bdist_wheel library, even though it is + ;; available on PYTHONPATH. What search path is consulted by setup.py? + '(#:tests? #f)) + (home-page "https://bitbucket.org/pypa/wheel/") + (synopsis "Format for built Python packages") + (description + "A wheel is a ZIP-format archive with a specially formatted filename and +the @code{.whl} extension. It is designed to contain all the files for a PEP +376 compatible install in a way that is very close to the on-disk format. Many +packages will be properly installed with only the @code{Unpack} step and the +unpacked archive preserves enough information to @code{Spread} (copy data and +scripts to their final locations) at any later time. Wheel files can be +installed with a newer @code{pip} or with wheel's own command line utility.") + (license license:expat))) + +(define-public python2-wheel + (package-with-python2 python-wheel)) + +;;; XXX: Not really at home, but this seems the best place to prevent circular +;;; module dependencies. +(define-public python-toml + (package + (name "python-toml") + (version "0.10.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "toml" version)) + (sha256 + (base32 + "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj")))) + (build-system python-build-system) + (arguments + `(#:tests? #f)) ;no tests suite in release + (home-page "https://github.com/uiri/toml") + (synopsis "Library for TOML") + (description + "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal +Language (TOML) configuration files.") + (license license:expat))) + +(define-public python-pep517-bootstrap + (hidden-package + (package + (name "python-pep517-bootstrap") + (version "0.9.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pep517" version)) + (sha256 + (base32 + "0zqidxah03qpnp6zkg3zd1kmd5f79hhdsfmlc0cldaniy80qddxf")))) + (build-system python-build-system) + (arguments + `(#:tests? #f)) ;to avoid circular dependencies + (propagated-inputs + `(("python-toml" ,python-toml) + ("python-wheel" ,python-wheel))) + (home-page "https://github.com/pypa/pep517") + (synopsis "Wrappers to build Python packages using PEP 517 hooks") + (description + "Wrappers to build Python packages using PEP 517 hooks.") + (license license:expat)))) + +(define-public python-poetry-core + (package + (name "python-poetry-core") + (version "1.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "poetry-core" version)) + (sha256 + (base32 "1mgv276h1iphn5fqhp2sgkgd5d0c39hs33vgaf157x5ri7rlyrka")))) + (build-system python-build-system) + (home-page "https://github.com/python-poetry/poetry-core") + (synopsis "Poetry PEP 517 build back-end") + (description + "The @code{poetry-core} module provides a PEP 517 build back-end +implementation developed for Poetry. This project is intended to be +a light weight, fully compliant, self-contained package allowing PEP 517 +compatible build front-ends to build Poetry managed projects.") + (license license:expat))) diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm index 486cc48457..c3ed58c424 100644 --- a/gnu/packages/python-crypto.scm +++ b/gnu/packages/python-crypto.scm @@ -54,6 +54,7 @@ #:use-module (gnu packages password-utils) #:use-module (gnu packages protobuf) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-check) #:use-module (gnu packages python-compression) #:use-module (gnu packages python-web) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 622f5fc6e2..c8ad94ae49 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -75,6 +75,7 @@ #:use-module (gnu packages libffi) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-check) #:use-module (gnu packages python-compression) #:use-module (gnu packages python-crypto) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index a22d6e865a..4b8e538168 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -164,6 +164,7 @@ #:use-module (gnu packages photo) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-check) #:use-module (gnu packages python-compression) #:use-module (gnu packages python-crypto) @@ -2720,38 +2721,6 @@ with sensible defaults out of the box.") (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337")))) (arguments `()))) -(define-public python-wheel - (package - (name "python-wheel") - (version "0.36.2") - (source - (origin - (method url-fetch) - (uri (pypi-uri "wheel" version)) - (sha256 - (base32 - "0pi4w0brz7a86ddk6pm8p6j0w6d7jgacgxm0c2dab3k5cb8yy7p1")))) - (build-system python-build-system) - (arguments - ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn - ;; fails to find the newly-built bdist_wheel library, even though it is - ;; available on PYTHONPATH. What search path is consulted by setup.py? - '(#:tests? #f)) - (home-page "https://bitbucket.org/pypa/wheel/") - (synopsis "Format for built Python packages") - (description - "A wheel is a ZIP-format archive with a specially formatted filename and -the @code{.whl} extension. It is designed to contain all the files for a PEP -376 compatible install in a way that is very close to the on-disk format. Many -packages will be properly installed with only the @code{Unpack} step and the -unpacked archive preserves enough information to @code{Spread} (copy data and -scripts to their final locations) at any later time. Wheel files can be -installed with a newer @code{pip} or with wheel's own command line utility.") - (license license:expat))) - -(define-public python2-wheel - (package-with-python2 python-wheel)) - (define-public python-vcversioner (package (name "python-vcversioner") @@ -4062,27 +4031,6 @@ which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.") (define-public python2-feedgenerator (package-with-python2 python-feedgenerator)) -(define-public python-toml - (package - (name "python-toml") - (version "0.10.1") - (source - (origin - (method url-fetch) - (uri (pypi-uri "toml" version)) - (sha256 - (base32 - "03wbqm5cn685cwx2664hjdpz370njl7lf0yal8s0dkp5w4mn2swj")))) - (build-system python-build-system) - (arguments - `(#:tests? #f)) ;no tests suite in release - (home-page "https://github.com/uiri/toml") - (synopsis "Library for TOML") - (description - "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal -Language (TOML) configuration files.") - (license license:expat))) - (define-public python-jsonrpc-server (package (name "python-jsonrpc-server") @@ -8308,16 +8256,8 @@ PEP 8.") (define-public python-pep517 (package + (inherit python-pep517-bootstrap) (name "python-pep517") - (version "0.9.1") - (source - (origin - (method url-fetch) - (uri (pypi-uri "pep517" version)) - (sha256 - (base32 - "0zqidxah03qpnp6zkg3zd1kmd5f79hhdsfmlc0cldaniy80qddxf")))) - (build-system python-build-system) (arguments '(#:phases (modify-phases %standard-phases @@ -8333,15 +8273,7 @@ PEP 8.") `(("python-mock" ,python-mock) ("python-pytest" ,python-pytest) ("python-testpath" ,python-testpath))) - (propagated-inputs - `(("python-toml" ,python-toml) - ("python-wheel" ,python-wheel))) - (home-page "https://github.com/pypa/pep517") - (synopsis "Wrappers to build Python packages using PEP 517 hooks") - (description - "Wrappers to build Python packages using PEP 517 hooks.") - (properties `((python2-variant . ,(delay python2-pep517)))) - (license license:expat))) + (properties `((python2-variant . ,(delay python2-pep517)))))) ;; Skip the tests so we don't create a cyclical dependency with pytest. (define-public python2-pep517 @@ -13222,26 +13154,6 @@ powerful API: thread-safety; decorator syntax; support for memcached, redis, database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.") (license license:expat))) -(define-public python-poetry-core - (package - (name "python-poetry-core") - (version "1.0.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "poetry-core" version)) - (sha256 - (base32 "1mgv276h1iphn5fqhp2sgkgd5d0c39hs33vgaf157x5ri7rlyrka")))) - (build-system python-build-system) - (home-page "https://github.com/python-poetry/poetry-core") - (synopsis "Poetry PEP 517 build back-end") - (description - "The @code{poetry-core} module provides a PEP 517 build back-end -implementation developed for Poetry. This project is intended to be -a light weight, fully compliant, self-contained package allowing PEP 517 -compatible build front-ends to build Poetry managed projects.") - (license license:expat))) - (define-public poetry (package (name "poetry") diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm index 3531ed3bdf..e666456e4a 100644 --- a/gnu/packages/sphinx.scm +++ b/gnu/packages/sphinx.scm @@ -42,6 +42,7 @@ #:use-module (gnu packages graphviz) #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages time)) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 752f06dc7b..afbae86772 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -98,6 +98,7 @@ #:use-module (gnu packages perl-check) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-check) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 2262aa6197..8da57cf6ab 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -87,6 +87,7 @@ #:use-module (gnu packages polkit) #:use-module (gnu packages protobuf) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-check) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) -- cgit v1.2.3 From 5aeee07cc922bdc605bb6cb7c2cd365d2d42f4d6 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 27 Jan 2021 15:52:58 -0500 Subject: gnu: VLC: Remove obsolete patch. * gnu/packages/patches/vlc-qt-5.15.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/video.scm (vlc)[source]: Remove patch. --- gnu/local.mk | 1 - gnu/packages/patches/vlc-qt-5.15.patch | 56 ---------------------------------- gnu/packages/video.scm | 1 - 3 files changed, 58 deletions(-) delete mode 100644 gnu/packages/patches/vlc-qt-5.15.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f71d75135d..5590faf7d7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1710,7 +1710,6 @@ dist_patch_DATA = \ %D%/packages/patches/vboot-utils-fix-format-load-address.patch \ %D%/packages/patches/vboot-utils-fix-tests-show-contents.patch \ %D%/packages/patches/vboot-utils-skip-test-workbuf.patch \ - %D%/packages/patches/vlc-qt-5.15.patch \ %D%/packages/patches/vigra-python-compat.patch \ %D%/packages/patches/vinagre-newer-freerdp.patch \ %D%/packages/patches/vinagre-newer-rdp-parameters.patch \ diff --git a/gnu/packages/patches/vlc-qt-5.15.patch b/gnu/packages/patches/vlc-qt-5.15.patch deleted file mode 100644 index e986a99861..0000000000 --- a/gnu/packages/patches/vlc-qt-5.15.patch +++ /dev/null @@ -1,56 +0,0 @@ -Fix build of VLC with Qt 5.15. Otherwise it fails like this: - ------- -In file included from gui/qt/util/timetooltip.moc.cpp:10:0: -gui/qt/util/timetooltip.hpp:49:18: error: field ‘mPainterPath’ has incomplete type ‘QPainterPath’ - QPainterPath mPainterPath; - ^~~~~~~~~~~~ -In file included from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtGui/qbrush.h:49:0, - from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtGui/qpalette.h:46, - from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtWidgets/qwidget.h:48, - from /gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtWidgets/QWidget:1, - from gui/qt/util/timetooltip.hpp:27, - from gui/qt/util/timetooltip.moc.cpp:10: -/gnu/store/jsxxnsdvij5mrrv6c0kj0261k0f44xlz-qtbase-5.15.2/include/qt5/QtGui/qmatrix.h:54:7: note: forward declaration of ‘class QPainterPath’ - class QPainterPath; - ^~~~~~~~~~~~ -make[4]: *** [Makefile:25852: gui/qt/util/libqt_plugin_la-timetooltip.moc.lo] Error 1 ------- - -diff --git a/modules/gui/qt/components/playlist/views.cpp b/modules/gui/qt/components/playlist/views.cpp -index 24db9d9..73c1779 100644 ---- a/modules/gui/qt/components/playlist/views.cpp -+++ b/modules/gui/qt/components/playlist/views.cpp -@@ -27,6 +27,7 @@ - #include "input_manager.hpp" /* THEMIM */ - - #include -+#include - #include - #include - #include -diff --git a/modules/gui/qt/dialogs/plugins.cpp b/modules/gui/qt/dialogs/plugins.cpp -index d233382..69728eb 100644 ---- a/modules/gui/qt/dialogs/plugins.cpp -+++ b/modules/gui/qt/dialogs/plugins.cpp -@@ -53,6 +53,7 @@ - #include - #include - #include -+#include - #include - #include - #include -diff --git a/modules/gui/qt/util/timetooltip.hpp b/modules/gui/qt/util/timetooltip.hpp -index 6a1329e..9f50b18 100644 ---- a/modules/gui/qt/util/timetooltip.hpp -+++ b/modules/gui/qt/util/timetooltip.hpp -@@ -25,6 +25,7 @@ - #include "qt.hpp" - - #include -+#include - - class TimeTooltip : public QWidget - { - diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index cebb70d28e..cd049fb375 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -1773,7 +1773,6 @@ videoformats depend on the configuration flags of ffmpeg.") "https://download.videolan.org/pub/videolan/vlc/" (car (string-split version #\-)) "/vlc-" version ".tar.xz")) - (patches (search-patches "vlc-qt-5.15.patch")) (sha256 (base32 "0ygqihw2c5vvzv8950dlf7rdwz1cpz1668jgyja604ljibrmix7g")))) -- cgit v1.2.3 From cd80e11b9555f6d0a9f3413613eeea319ce6c6c3 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 27 Jan 2021 22:33:07 +0100 Subject: gnu: pinentry-tty: Update to 1.1.1. * gnu/packages/gnupg.scm (pinentry-tty): Update to 1.1.1. (pinentry-efl)[source]: Remove patch. * gnu/packages/patches/pinentry-efl.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/gnupg.scm | 8 +- gnu/packages/patches/pinentry-efl.patch | 798 -------------------------------- 3 files changed, 2 insertions(+), 805 deletions(-) delete mode 100644 gnu/packages/patches/pinentry-efl.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index cc9b47b493..19ddbe3cc0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1483,7 +1483,6 @@ dist_patch_DATA = \ %D%/packages/patches/pinball-missing-separators.patch \ %D%/packages/patches/pinball-src-deps.patch \ %D%/packages/patches/pinball-system-ltdl.patch \ - %D%/packages/patches/pinentry-efl.patch \ %D%/packages/patches/pingus-boost-headers.patch \ %D%/packages/patches/pingus-sdl-libs-config.patch \ %D%/packages/patches/pixman-CVE-2016-5296.patch \ diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 4db7b4ca86..a6e75f0e38 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -775,14 +775,14 @@ including tools for signing keys, keyring analysis, and party preparation. (define-public pinentry-tty (package (name "pinentry-tty") - (version "1.1.0") + (version "1.1.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnupg/pinentry/pinentry-" version ".tar.bz2")) (sha256 (base32 - "0w35ypl960pczg5kp6km3dyr000m1hf0vpwwlh72jjkjza36c1v8")))) + "0zx5vg6wws2sp2yxwi01b8i1pnsqkydncpj7x0p8xl9y05ja04nd")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--enable-pinentry-tty"))) @@ -860,10 +860,6 @@ passphrase when @code{gpg} is run and needs it."))) (package (inherit pinentry-tty) (name "pinentry-efl") - (source - (origin - (inherit (package-source pinentry-tty)) - (patches (search-patches "pinentry-efl.patch")))) (arguments '(#:configure-flags '("--enable-pinentry-efl" "--enable-fallback-curses") diff --git a/gnu/packages/patches/pinentry-efl.patch b/gnu/packages/patches/pinentry-efl.patch deleted file mode 100644 index 5ba79e28df..0000000000 --- a/gnu/packages/patches/pinentry-efl.patch +++ /dev/null @@ -1,798 +0,0 @@ -https://git.gnupg.org/cgi-bin/gitweb.cgi?p=pinentry.git;a=commit;h=948105b7a34ec9a9e5479d376b7c86bafee50a01 -This patch can be removed with the next release of pinentry. - -From 948105b7a34ec9a9e5479d376b7c86bafee50a01 Mon Sep 17 00:00:00 2001 -From: "William L. Thomson Jr" -Date: Tue, 29 May 2018 22:50:47 +0100 -Subject: [PATCH] efl: Add an EFL-based pinentry. - -* NEWS: Update. -* Makefile.am: Add new efl subdirectory. -* configure.ac: Add --enable-pinentry-efl option. -* efl/Makefile.am: New file. -* efl/pinentry-efl.c: New file. - -Signed-off-by: Damien Goutte-Gattat ---- - Makefile.am | 8 +- - configure.ac | 44 +++- - efl/Makefile.am | 38 ++++ - efl/pinentry-efl.c | 623 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - 6 files changed, 716 insertions(+), 2 deletions(-) - create mode 100644 efl/Makefile.am - create mode 100644 efl/pinentry-efl.c - -diff --git a/Makefile.am b/Makefile.am -index 8c8b8e5..b8fd0e1 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -82,10 +82,16 @@ else - pinentry_fltk = - endif - -+if BUILD_PINENTRY_EFL -+pinentry_efl = efl -+else -+pinentry_efl = -+endif -+ - SUBDIRS = m4 secmem pinentry ${pinentry_curses} ${pinentry_tty} \ - ${pinentry_emacs} ${pinentry_gtk_2} ${pinentry_gnome_3} \ - ${pinentry_qt} ${pinentry_tqt} ${pinentry_w32} \ -- ${pinentry_fltk} doc -+ ${pinentry_fltk} ${pinentry_efl} doc - - - install-exec-local: -diff --git a/configure.ac b/configure.ac -index ff6c2e0..e305e44 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -419,6 +419,42 @@ fi - - - dnl -+dnl Check for EFL pinentry programs. -+dnl -+AC_ARG_ENABLE(pinentry-efl, -+ AC_HELP_STRING([--enable-pinentry-efl], [build EFL pinentry]), -+ pinentry_efl=$enableval, pinentry_efl=maybe) -+ -+dnl check for pkg-config -+if test "$pinentry_efl" != "no"; then -+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no) -+ if test x"${PKG_CONFIG}" = xno ; then -+ pinentry_efl=no -+ fi -+fi -+ -+if test "$pinentry_efl" != "no"; then -+ AC_MSG_CHECKING([for efl]) -+ "${PKG_CONFIG}" --exists 'elementary >= 1.18' -+ if test $? -ne 0 ; then -+ AC_MSG_RESULT([no]) -+ AC_MSG_WARN([efl >= 1.18 is required for efl pinentry]) -+ pinentry_efl=no -+ else -+ AC_MSG_RESULT([yes]) -+ EFL_CFLAGS=`"${PKG_CONFIG}" --cflags ecore-x elementary` -+ EFL_LIBS=`"${PKG_CONFIG}" --libs ecore-x elementary` -+ AC_SUBST(EFL_CFLAGS) -+ AC_SUBST(EFL_LIBS) -+ if test "$pinentry_efl" != "no" -+ then -+ pinentry_efl=yes -+ fi -+ fi -+fi -+AM_CONDITIONAL(BUILD_PINENTRY_EFL, test "$pinentry_efl" = "yes") -+ -+dnl - dnl Check for GTK+-2 / GNOME3 pinentry programs. - dnl - AC_ARG_ENABLE(pinentry-gtk2, -@@ -645,7 +681,11 @@ else - if test "$pinentry_tqt" = "yes"; then - PINENTRY_DEFAULT=pinentry-tqt - else -- AC_MSG_ERROR([[No pinentry enabled.]]) -+ if test "$pinentry_efl" = "yes"; then -+ PINENTRY_DEFAULT=pinentry-efl -+ else -+ AC_MSG_ERROR([[No pinentry enabled.]]) -+ fi - fi - fi - fi -@@ -721,6 +761,7 @@ secmem/Makefile - pinentry/Makefile - curses/Makefile - tty/Makefile -+efl/Makefile - emacs/Makefile - gtk+-2/Makefile - gnome3/Makefile -@@ -744,6 +785,7 @@ AC_MSG_NOTICE([ - Curses Pinentry ..: $pinentry_curses - TTY Pinentry .....: $pinentry_tty - Emacs Pinentry ...: $pinentry_emacs -+ EFL Pinentry .....: $pinentry_efl - GTK+-2 Pinentry ..: $pinentry_gtk_2 - GNOME 3 Pinentry .: $pinentry_gnome_3 - Qt Pinentry ......: $pinentry_qt $pinentry_qt_lib_version -diff --git a/efl/Makefile.am b/efl/Makefile.am -new file mode 100644 -index 0000000..b986a04 ---- /dev/null -+++ b/efl/Makefile.am -@@ -0,0 +1,38 @@ -+# Makefile.am - PIN entry EFL frontend. -+# Copyright (C) 2017 Obsidian-Studios, Inc. -+# Author William L. Thomson Jr. -+# -+# This file is part of PINENTRY. -+# -+# PINENTRY 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. -+# -+# PINENTRY 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA -+ -+## Process this file with automake to produce Makefile.in -+ -+bin_PROGRAMS = pinentry-efl -+ -+if FALLBACK_CURSES -+ncurses_include = $(NCURSES_INCLUDE) -+libcurses = ../pinentry/libpinentry-curses.a $(LIBCURSES) $(LIBICONV) -+else -+ncurses_include = -+libcurses = -+endif -+ -+AM_CPPFLAGS = $(COMMON_CFLAGS) $(EFL_CFLAGS) $(ncurses_include) \ -+ -I$(top_srcdir)/secmem -I$(top_srcdir)/pinentry -+LDADD = ../pinentry/libpinentry.a ../secmem/libsecmem.a \ -+ $(COMMON_LIBS) $(LIBCAP) $(EFL_LIBS) $(libcurses) -+ -+pinentry_efl_SOURCES = pinentry-efl.c -diff --git a/efl/pinentry-efl.c b/efl/pinentry-efl.c -new file mode 100644 -index 0000000..ca99693 ---- /dev/null -+++ b/efl/pinentry-efl.c -@@ -0,0 +1,623 @@ -+/* pinentry-efl.c -+ Copyright (C) 2017 Obsidian-Studios, Inc. -+ Author William L. Thomson Jr. -+ -+ Based on pinentry-gtk2.c -+ Copyright (C) 1999 Robert Bihlmeyer -+ Copyright (C) 2001, 2002, 2007, 2015 g10 Code GmbH -+ Copyright (C) 2004 by Albrecht Dreß -+ -+ pinentry-efl is a pinentry application for the EFL widget set. -+ It tries to follow the Gnome Human Interface Guide as close as -+ possible. -+ -+ 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., 675 Mass Ave, Cambridge, MA 02139, USA. -+ */ -+ -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+#include -+#include -+#include -+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wstrict-prototypes" -+#endif -+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) -+#pragma GCC diagnostic pop -+#endif -+ -+#ifdef HAVE_GETOPT_H -+#include -+#else -+#include "getopt.h" -+#endif /* HAVE_GETOPT_H */ -+ -+#include "pinentry.h" -+ -+#ifdef FALLBACK_CURSES -+#include "pinentry-curses.h" -+#endif -+ -+#define PGMNAME "pinentry-efl" -+ -+#ifndef VERSION -+#define VERSION -+#endif -+ -+#define ENTRY_HIDE "Hide entry" -+#define ENTRY_SHOW "Show entry" -+ -+typedef enum { CONFIRM_CANCEL, CONFIRM_OK, CONFIRM_NOTOK } confirm_value_t; -+ -+static const int WIDTH = 480; -+static const int BUTTON_HEIGHT = 27; -+static const int BUTTON_WIDTH = 70; -+static const int BUTTON_ICON_SIZE = 13; -+static const int PADDING = 5; -+ -+static Eina_Bool got_input; -+static Ecore_Timer *timer; -+static Evas_Object *check_label; -+static Evas_Object *error_label; -+static Evas_Object *entry; -+static Evas_Object *repeat_entry; -+static Evas_Object *qualitybar; -+static Evas_Object *win; -+static char **pargv; -+static int grab_failed; -+static int passphrase_ok; -+static int confirm_mode; -+static int pargc; -+static confirm_value_t confirm_value; -+static pinentry_t pinentry; -+ -+pinentry_cmd_handler_t pinentry_cmd_handler; -+ -+static void -+quit (void) -+{ -+ evas_object_del(win); -+ elm_exit(); -+ ecore_main_loop_quit (); -+} -+ -+static void -+delete_event (void *data EINA_UNUSED, -+ Evas_Object *obj EINA_UNUSED, -+ void *event EINA_UNUSED) -+{ -+ pinentry->close_button = 1; -+ quit (); -+} -+ -+static void -+changed_text_handler (void *data EINA_UNUSED, -+ Evas_Object *obj, -+ void *event EINA_UNUSED) -+{ -+ const char *s; -+ int length; -+ int percent; -+ -+ got_input = EINA_TRUE; -+ -+ if (pinentry->repeat_passphrase && repeat_entry) -+ { -+ elm_object_text_set (repeat_entry, ""); -+ elm_object_text_set (error_label, ""); -+ } -+ -+ if (!qualitybar || !pinentry->quality_bar) -+ return; -+ -+ s = elm_object_text_get (obj); -+ if (!s) -+ s = ""; -+ length = strlen (s); -+ percent = length? pinentry_inq_quality (pinentry, s, length) : 0; -+ evas_object_color_set(qualitybar, -+ 255 - ( 2.55 * percent ), -+ 2.55 * percent, 0, 255); -+ elm_progressbar_value_set (qualitybar, (double) percent / 100.0); -+} -+ -+static void -+on_check (void *data EINA_UNUSED, Evas_Object *obj, void *event EINA_UNUSED) -+{ -+ if(elm_check_state_get(obj)) -+ { -+ elm_entry_password_set(entry, EINA_FALSE); -+ elm_object_text_set(check_label,ENTRY_HIDE); -+ } -+ else -+ { -+ elm_entry_password_set(entry, EINA_TRUE); -+ elm_object_text_set(check_label,ENTRY_SHOW); -+ } -+ evas_object_size_hint_min_set(check_label, -+ ELM_SCALE_SIZE(BUTTON_WIDTH), -+ ELM_SCALE_SIZE(BUTTON_HEIGHT)); -+ evas_object_size_hint_align_set(check_label, 0, 1); -+} -+ -+static void -+on_click (void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED) -+{ -+ if (confirm_mode) -+ { -+ confirm_value = (confirm_value_t) data; -+ quit (); -+ return; -+ } -+ -+ if (data) -+ { -+ const char *s; -+ const char *s2; -+ -+ s = elm_entry_entry_get (entry); -+ if (!s) -+ s = ""; -+ -+ if (pinentry->repeat_passphrase && repeat_entry) -+ { -+ s2 = elm_entry_entry_get (repeat_entry); -+ if (!s2) -+ s2 = ""; -+ if (strcmp (s, s2)) -+ { -+ elm_object_text_set(error_label, -+ pinentry->repeat_error_string? -+ pinentry->repeat_error_string: -+ "not correctly repeated"); -+ elm_object_focus_set(entry,EINA_TRUE); -+ return; -+ } -+ pinentry->repeat_okay = 1; -+ } -+ -+ passphrase_ok = 1; -+ pinentry_setbufferlen (pinentry, strlen (s) + 1); -+ if (pinentry->pin) -+ strncpy (pinentry->pin, s, strlen(s) + 1); -+ } -+ quit (); -+} -+ -+static void -+enter_callback (void *data, Evas_Object * obj, void *event_info EINA_UNUSED) -+{ -+ if (data) -+ elm_object_focus_set (data, 1); -+ else -+ on_click ((void *) CONFIRM_OK, obj, NULL); -+} -+ -+static Eina_Bool -+timeout_cb (const void * data) -+{ -+ pinentry_t pe = (pinentry_t)data; -+ if (!got_input) -+ { -+ ecore_main_loop_quit(); -+ if (pe) -+ pe->specific_err = gpg_error (GPG_ERR_TIMEOUT); -+ } -+ -+ timer = NULL; -+ return ECORE_CALLBACK_DONE; -+} -+ -+static void -+create_window (void) -+{ -+ char *txt; -+ Evas_Object *icon; -+ Evas_Object *obj; -+ Evas_Object *table; -+ int btn_txt_len = 0; -+ int row = 0; -+ int ok_len = 0; -+ -+ win = elm_win_util_dialog_add(NULL,"pinentry","enter pin"); -+ elm_win_autodel_set(win, EINA_TRUE); -+ elm_win_center(win,EINA_TRUE,EINA_TRUE); -+ evas_object_smart_callback_add(win, "delete,request", delete_event, NULL); -+ -+ table = elm_table_add(win); -+ elm_table_padding_set(table,ELM_SCALE_SIZE(PADDING),0); -+ evas_object_size_hint_padding_set (table, -+ ELM_SCALE_SIZE(PADDING), -+ ELM_SCALE_SIZE(PADDING), -+ ELM_SCALE_SIZE(PADDING), -+ ELM_SCALE_SIZE(PADDING)); -+ evas_object_show(table); -+ -+ if (pinentry->title) -+ { -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, -+ pinentry->title); -+ elm_win_title_set ( win, txt ); -+ free (txt); -+ } -+ -+ /* Description Label */ -+ if (pinentry->description) -+ { -+ char* aligned; -+ int len; -+ -+ obj = elm_label_add(table); -+ elm_label_line_wrap_set (obj, ELM_WRAP_WORD); -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->description); -+ len = strlen(txt)+20; // 20 chars for align tag -+ aligned = calloc(len+1,sizeof(char)); -+ if(aligned) -+ { -+ snprintf(aligned,len, "%s",txt); -+ elm_object_text_set(obj,aligned); -+ free (aligned); -+ } else -+ elm_object_text_set(obj,txt); -+ free (txt); -+ evas_object_size_hint_weight_set(obj, EVAS_HINT_EXPAND, 0); -+ evas_object_size_hint_align_set(obj, EVAS_HINT_FILL, 0); -+ elm_table_pack(table, obj, 1, row, 5, 1); -+ evas_object_show(obj); -+ row++; -+ } -+ if (!confirm_mode && (pinentry->error || pinentry->repeat_passphrase)) -+ { -+ /* Error Label */ -+ if (pinentry->error) -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->error); -+ else -+ txt = ""; -+ obj = elm_label_add(table); -+ evas_object_color_set(obj, 255, 0, 0, 255); -+ elm_object_text_set(obj,txt); -+ elm_object_style_set(obj,"slide_bounce"); -+ elm_label_slide_duration_set(obj, 10); -+ elm_label_slide_mode_set(obj, ELM_LABEL_SLIDE_MODE_ALWAYS); -+ elm_label_slide_go(obj); -+ evas_object_size_hint_weight_set(obj, EVAS_HINT_EXPAND, 0); -+ evas_object_size_hint_align_set(obj, EVAS_HINT_FILL, 0); -+ elm_table_pack(table, obj, 1, row, 5, 1); -+ evas_object_show(obj); -+ if (pinentry->error) -+ free (txt); -+ row++; -+ } -+ -+ qualitybar = NULL; -+ -+ if (!confirm_mode) -+ { -+ -+ if (pinentry->prompt) -+ { -+ /* Entry/Prompt Label */ -+ obj = elm_label_add(table); -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->prompt); -+ elm_object_text_set(obj,txt); -+ free (txt); -+ evas_object_size_hint_weight_set(obj, 0, EVAS_HINT_EXPAND); -+ evas_object_size_hint_align_set(obj, 1, EVAS_HINT_FILL); -+ elm_table_pack(table, obj, 1, row, 1, 1); -+ evas_object_show(obj); -+ } -+ -+ entry = elm_entry_add(table); -+ elm_entry_scrollable_set(entry, EINA_TRUE); -+ elm_scroller_policy_set(entry, -+ ELM_SCROLLER_POLICY_OFF, -+ ELM_SCROLLER_POLICY_OFF); -+ elm_entry_password_set(entry, EINA_TRUE); -+ elm_entry_single_line_set(entry, EINA_TRUE); -+ evas_object_size_hint_weight_set(entry, 0, 0); -+ evas_object_size_hint_align_set(entry, EVAS_HINT_FILL, 0); -+ elm_table_pack(table, entry, 2, row, 4, 1); -+ evas_object_smart_callback_add(entry, -+ "changed", -+ changed_text_handler, -+ NULL); -+ evas_object_show(entry); -+ row++; -+ -+ /* Check box */ -+ obj = elm_check_add(table); -+ evas_object_size_hint_align_set(obj, 1, EVAS_HINT_FILL); -+ elm_table_pack(table, obj, 1, row, 1, 1); -+ evas_object_smart_callback_add(obj, "changed", on_check, NULL); -+ evas_object_show(obj); -+ -+ /* Check Label */ -+ check_label = elm_label_add(table); -+ on_check((void *)NULL, obj, (void *)NULL); -+ elm_table_pack(table, check_label, 2, row, 4, 1); -+ evas_object_show(check_label); -+ row++; -+ -+ if (pinentry->quality_bar) -+ { -+ /* Quality Bar Label */ -+ obj = elm_label_add(table); -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, -+ pinentry->quality_bar); -+ elm_object_text_set(obj,txt); -+ free (txt); -+ evas_object_size_hint_weight_set(obj, 0, EVAS_HINT_EXPAND); -+ evas_object_size_hint_align_set(obj, 1, EVAS_HINT_FILL); -+ elm_table_pack(table, obj, 1, row, 1, 1); -+ evas_object_show(obj); -+ -+ qualitybar = elm_progressbar_add(table); -+ evas_object_color_set(qualitybar, 255, 0, 0, 255); -+ evas_object_show(qualitybar); -+ if (pinentry->quality_bar_tt) -+ elm_object_tooltip_text_set (qualitybar, -+ pinentry->quality_bar_tt); -+ evas_object_size_hint_weight_set(qualitybar, EVAS_HINT_EXPAND, 0); -+ evas_object_size_hint_align_set(qualitybar, EVAS_HINT_FILL, 0); -+ elm_table_pack(table, qualitybar, 2, row, 4, 1); -+ row++; -+ } -+ -+ if (pinentry->repeat_passphrase) -+ { -+ /* Repeat Label */ -+ obj = elm_label_add(table); -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, -+ pinentry->repeat_passphrase); -+ elm_object_text_set(obj,txt); -+ free (txt); -+ evas_object_size_hint_weight_set(obj, 0, EVAS_HINT_EXPAND); -+ evas_object_size_hint_align_set(obj, 1, EVAS_HINT_FILL); -+ elm_table_pack(table, obj, 1, row, 1, 1); -+ evas_object_show(obj); -+ -+ repeat_entry = elm_entry_add(table); -+ elm_entry_scrollable_set(repeat_entry, EINA_TRUE); -+ elm_scroller_policy_set(repeat_entry, -+ ELM_SCROLLER_POLICY_OFF, -+ ELM_SCROLLER_POLICY_OFF); -+ elm_entry_password_set(repeat_entry, EINA_TRUE); -+ elm_entry_single_line_set(repeat_entry, EINA_TRUE); -+ evas_object_size_hint_weight_set(repeat_entry, 0, 0); -+ evas_object_size_hint_align_set(repeat_entry, EVAS_HINT_FILL, 0); -+ elm_table_pack(table, repeat_entry, 2, row, 4, 1); -+ evas_object_smart_callback_add (repeat_entry, "activated", -+ enter_callback, NULL); -+ evas_object_show(repeat_entry); -+ evas_object_smart_callback_add (entry, -+ "activated", -+ enter_callback, -+ repeat_entry); -+ evas_object_smart_callback_add(repeat_entry, -+ "activated", -+ on_click, -+ (void *) CONFIRM_OK); -+ row++; -+ } -+ else -+ evas_object_smart_callback_add(entry, -+ "activated", -+ on_click, -+ (void *) CONFIRM_OK); -+ } -+ -+ /* Cancel Button */ -+ if (!pinentry->one_button) -+ { -+ obj = elm_button_add(table); -+ icon = elm_icon_add (table); -+ evas_object_size_hint_aspect_set (icon, EVAS_ASPECT_CONTROL_BOTH, 1, 1); -+ if (elm_icon_standard_set (icon, "dialog-cancel") || -+ elm_icon_standard_set (icon, "window-close")) -+ { -+ evas_object_size_hint_min_set(icon, -+ ELM_SCALE_SIZE(BUTTON_ICON_SIZE), -+ ELM_SCALE_SIZE(BUTTON_ICON_SIZE)); -+ elm_object_part_content_set(obj, "icon", icon); -+ evas_object_show (icon); -+ } -+ else -+ evas_object_del(icon); -+ if (pinentry->cancel || pinentry->default_cancel) -+ { -+ if(pinentry->cancel) -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->cancel); -+ else -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, -+ pinentry->default_cancel); -+ if(txt[0]=='_') -+ elm_object_text_set(obj,txt+1); -+ else -+ elm_object_text_set(obj,txt); -+ btn_txt_len = ELM_SCALE_SIZE(strlen(txt) * (PADDING * 1.5)); -+ free (txt); -+ } -+ else -+ elm_object_text_set(obj, "Cancel"); //STOCK_CANCEL -+ evas_object_size_hint_align_set(obj, 0, 0); -+ if(btn_txt_len>ELM_SCALE_SIZE(BUTTON_WIDTH)) -+ evas_object_size_hint_min_set(obj, -+ btn_txt_len, -+ ELM_SCALE_SIZE(BUTTON_HEIGHT)); -+ else -+ evas_object_size_hint_min_set(obj, -+ ELM_SCALE_SIZE(BUTTON_WIDTH), -+ ELM_SCALE_SIZE(BUTTON_HEIGHT)); -+ elm_table_pack(table, obj, 4, row, 1, 1); -+ evas_object_smart_callback_add(obj, -+ "clicked", -+ on_click, -+ (void *) CONFIRM_CANCEL); -+ evas_object_show(obj); -+ } -+ -+ /* OK Button */ -+ obj = elm_button_add(table); -+ icon = elm_icon_add (table); -+ evas_object_size_hint_aspect_set (icon, EVAS_ASPECT_CONTROL_BOTH, 1, 1); -+ if (elm_icon_standard_set (icon, "dialog-ok") || -+ elm_icon_standard_set (icon, "list-add")) -+ { -+ evas_object_size_hint_min_set(icon, -+ ELM_SCALE_SIZE(BUTTON_ICON_SIZE), -+ ELM_SCALE_SIZE(BUTTON_ICON_SIZE)); -+ elm_object_part_content_set(obj, "icon", icon); -+ evas_object_show (icon); -+ } -+ else -+ evas_object_del(icon); -+ if (pinentry->ok || pinentry->default_ok) -+ { -+ if(pinentry->ok) -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->ok); -+ else -+ txt = pinentry_utf8_to_local (pinentry->lc_ctype, pinentry->default_ok); -+ if(txt[0]=='_') -+ elm_object_text_set(obj,txt+1); -+ else -+ elm_object_text_set(obj,txt); -+ ok_len = ELM_SCALE_SIZE(strlen(txt) * (PADDING * 1.5)); -+ if(ok_len>btn_txt_len) -+ btn_txt_len = ok_len; -+ free (txt); -+ } -+ else -+ elm_object_text_set(obj,"OK"); //STOCK_OK -+ evas_object_size_hint_align_set(obj, 0, 0); -+ if(btn_txt_len>ELM_SCALE_SIZE(BUTTON_WIDTH)) -+ evas_object_size_hint_min_set(obj, -+ btn_txt_len, -+ ELM_SCALE_SIZE(BUTTON_HEIGHT)); -+ else -+ evas_object_size_hint_min_set(obj, -+ ELM_SCALE_SIZE(BUTTON_WIDTH), -+ ELM_SCALE_SIZE(BUTTON_HEIGHT)); -+ elm_table_pack(table, obj, 5, row, 1, 1); -+ evas_object_smart_callback_add(obj, "clicked", on_click, (void *) CONFIRM_OK); -+ evas_object_show(obj); -+ -+ /* Key/Lock Icon */ -+ obj = elm_icon_add (win); -+ evas_object_size_hint_aspect_set (obj, EVAS_ASPECT_CONTROL_BOTH, 1, 1); -+ if (elm_icon_standard_set (obj, "dialog-password")) -+ { -+ double ic_size = WIDTH/5; -+ if(row==0) -+ ic_size = ic_size/3.5; -+ else if(row<4) -+ ic_size = ic_size - ic_size/row; -+ evas_object_size_hint_min_set(obj, -+ ELM_SCALE_SIZE(ic_size), -+ ELM_SCALE_SIZE(ic_size)); -+ evas_object_size_hint_weight_set(obj, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); -+ evas_object_size_hint_align_set(obj, EVAS_HINT_FILL, 0.5); -+ elm_table_pack(table, obj, 0, 0, 1, row? row:1); -+ evas_object_show (obj); -+ } -+ else -+ evas_object_del(obj); -+ -+ /* Box for padding */ -+ obj = elm_box_add (win); -+ elm_box_pack_end (obj, table); -+ evas_object_show (obj); -+ -+ elm_win_resize_object_add(win,obj); -+ evas_object_show(win); -+ -+ if(entry) -+ elm_object_focus_set (entry, EINA_TRUE); -+ -+ if (pinentry->timeout > 0) -+ timer = ecore_timer_add (pinentry->timeout, -+ (Ecore_Task_Cb)timeout_cb, -+ pinentry); -+} -+ -+static int -+efl_cmd_handler (pinentry_t pe) -+{ -+ int want_pass = !!pe->pin; -+ -+ got_input = EINA_FALSE; -+ pinentry = pe; -+ confirm_value = CONFIRM_CANCEL; -+ passphrase_ok = 0; -+ confirm_mode = want_pass ? 0 : 1; -+ /* init ecore-x explicitly using DISPLAY since this can launch -+ * from console -+ */ -+ if (pe->display) -+ ecore_x_init (pe->display); -+ elm_init (pargc, pargv); -+ create_window (); -+ ecore_main_loop_begin (); -+ -+ if (timer) -+ { -+ ecore_timer_del (timer); -+ timer = NULL; -+ } -+ -+ if (confirm_value == CONFIRM_CANCEL || grab_failed) -+ pe->canceled = 1; -+ -+ pinentry = NULL; -+ if (want_pass) -+ { -+ if (passphrase_ok && pe->pin) -+ return strlen (pe->pin); -+ else -+ return -1; -+ } -+ else -+ return (confirm_value == CONFIRM_OK) ? 1 : 0; -+} -+ -+int -+main (int argc, char *argv[]) -+{ -+ pinentry_init (PGMNAME); -+ -+#ifdef FALLBACK_CURSES -+ if (pinentry_have_display (argc, argv)) -+ { -+#endif -+ -+ pinentry_cmd_handler = efl_cmd_handler; -+ pargc = argc; -+ pargv = argv; -+ -+#ifdef FALLBACK_CURSES -+ } -+ else -+ { -+ pinentry_cmd_handler = curses_cmd_handler; -+ } -+#endif -+ -+ pinentry_parse_opts (argc, argv); -+ if (pinentry_loop ()) -+ return 1; -+ -+ return 0; -+} --- -2.8.0.rc3 - -- cgit v1.2.3 From 189e62fa69049538884077155cc70cac43260118 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sun, 29 Nov 2020 11:58:26 +0100 Subject: services: cuirass: Add remote build support. --- gnu/local.mk | 1 + gnu/services/cuirass.scm | 234 ++++++++++++++++++++++++++++++++++++----------- 2 files changed, 181 insertions(+), 54 deletions(-) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 19ddbe3cc0..ee57d6fe51 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -683,6 +683,7 @@ GNU_SYSTEM_MODULES = \ %D%/tests.scm \ %D%/tests/audio.scm \ %D%/tests/base.scm \ + %D%/tests/cuirass.scm \ %D%/tests/cups.scm \ %D%/tests/databases.scm \ %D%/tests/desktop.scm \ diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm index cb98f1e369..f426b9a1a7 100644 --- a/gnu/services/cuirass.scm +++ b/gnu/services/cuirass.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Mathieu Lirzin ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès -;;; Copyright © 2017 Mathieu Othacehe +;;; Copyright © 2017, 2020 Mathieu Othacehe ;;; Copyright © 2017 Jan Nieuwenhuizen ;;; Copyright © 2018, 2019 Ricardo Wurmus ;;; Copyright © 2018 Clément Lassieur @@ -33,11 +33,19 @@ #:use-module (gnu services shepherd) #:use-module (gnu services admin) #:use-module (gnu system shadow) - #:export ( + #:export ( + cuirass-remote-server-configuration + cuirass-remote-server-configuration? + + cuirass-configuration cuirass-configuration? + cuirass-service-type - cuirass-service-type)) + + cuirass-remote-worker-configuration + cuirass-remote-worker-configuration? + cuirass-remote-worker-service-type)) ;;;; Commentary: ;;; @@ -46,6 +54,27 @@ ;;; ;;;; Code: +(define %cuirass-default-database + "dbname=cuirass host=/var/run/postgresql") + +(define-record-type* + cuirass-remote-server-configuration make-cuirass-remote-server-configuration + cuirass-remote-server-configuration? + (backend-port cuirass-remote-server-configuration-backend-port ;int + (default #f)) + (publish-port cuirass-remote-server-configuration-publish-port ;int + (default #f)) + (log-file cuirass-remote-server-log-file ;string + (default "/var/log/cuirass-remote-server.log")) + (cache cuirass-remote-server-configuration-cache ;string + (default "/var/cache/cuirass/remote/")) + (trigger-url cuirass-remote-server-trigger-url ;string + (default #f)) + (public-key cuirass-remote-server-configuration-public-key ;string + (default #f)) + (private-key cuirass-remote-server-configuration-private-key ;string + (default #f))) + (define-record-type* cuirass-configuration make-cuirass-configuration cuirass-configuration? @@ -57,16 +86,16 @@ (default "/var/log/cuirass-web.log")) (cache-directory cuirass-configuration-cache-directory ;string (dir-name) (default "/var/cache/cuirass")) - (ttl cuirass-configuration-ttl ;integer - (default (* 30 24 3600))) (user cuirass-configuration-user ;string (default "cuirass")) (group cuirass-configuration-group ;string (default "cuirass")) (interval cuirass-configuration-interval ;integer (seconds) (default 60)) + (remote-server cuirass-configuration-remote-server + (default #f)) (database cuirass-configuration-database ;string - (default "dbname=cuirass host=/var/run/postgresql")) + (default %cuirass-default-database)) (port cuirass-configuration-port ;integer (port) (default 8081)) (host cuirass-configuration-host ;string @@ -91,8 +120,8 @@ (user (cuirass-configuration-user config)) (group (cuirass-configuration-group config)) (interval (cuirass-configuration-interval config)) + (remote-server (cuirass-configuration-remote-server config)) (database (cuirass-configuration-database config)) - (ttl (cuirass-configuration-ttl config)) (port (cuirass-configuration-port config)) (host (cuirass-configuration-host config)) (specs (cuirass-configuration-specifications config)) @@ -100,53 +129,95 @@ (one-shot? (cuirass-configuration-one-shot? config)) (fallback? (cuirass-configuration-fallback? config)) (extra-options (cuirass-configuration-extra-options config))) - (list (shepherd-service - (documentation "Run Cuirass.") - (provision '(cuirass)) - (requirement '(guix-daemon postgres networking)) - (start #~(make-forkexec-constructor - (list (string-append #$cuirass "/bin/cuirass") - "--cache-directory" #$cache-directory - "--specifications" - #$(scheme-file "cuirass-specs.scm" specs) - "--database" #$database - "--ttl" #$(string-append (number->string ttl) "s") - "--interval" #$(number->string interval) - #$@(if use-substitutes? '("--use-substitutes") '()) - #$@(if one-shot? '("--one-shot") '()) - #$@(if fallback? '("--fallback") '()) - #$@extra-options) - - #:environment-variables - (list "GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt" - (string-append "GIT_EXEC_PATH=" #$git - "/libexec/git-core")) - - #:user #$user - #:group #$group - #:log-file #$log-file)) - (stop #~(make-kill-destructor))) - (shepherd-service - (documentation "Run Cuirass web interface.") - (provision '(cuirass-web)) - (requirement '(guix-daemon postgres networking)) - (start #~(make-forkexec-constructor - (list (string-append #$cuirass "/bin/cuirass") - "--cache-directory" #$cache-directory - "--database" #$database - "--ttl" #$(string-append (number->string ttl) "s") - "--web" - "--port" #$(number->string port) - "--listen" #$host - "--interval" #$(number->string interval) - #$@(if use-substitutes? '("--use-substitutes") '()) - #$@(if fallback? '("--fallback") '()) - #$@extra-options) - - #:user #$user - #:group #$group - #:log-file #$web-log-file)) - (stop #~(make-kill-destructor)))))) + `(,(shepherd-service + (documentation "Run Cuirass.") + (provision '(cuirass)) + (requirement '(guix-daemon postgres networking)) + (start #~(make-forkexec-constructor + (list (string-append #$cuirass "/bin/cuirass") + "--cache-directory" #$cache-directory + "--specifications" + #$(scheme-file "cuirass-specs.scm" specs) + "--database" #$database + "--interval" #$(number->string interval) + #$@(if remote-server '("--build-remote") '()) + #$@(if use-substitutes? '("--use-substitutes") '()) + #$@(if one-shot? '("--one-shot") '()) + #$@(if fallback? '("--fallback") '()) + #$@extra-options) + + #:environment-variables + (list "GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt" + (string-append "GIT_EXEC_PATH=" #$git + "/libexec/git-core")) + + #:user #$user + #:group #$group + #:log-file #$log-file)) + (stop #~(make-kill-destructor))) + ,(shepherd-service + (documentation "Run Cuirass web interface.") + (provision '(cuirass-web)) + (requirement '(guix-daemon postgres networking)) + (start #~(make-forkexec-constructor + (list (string-append #$cuirass "/bin/cuirass") + "--cache-directory" #$cache-directory + "--database" #$database + "--web" + "--port" #$(number->string port) + "--listen" #$host + "--interval" #$(number->string interval) + #$@(if use-substitutes? '("--use-substitutes") '()) + #$@(if fallback? '("--fallback") '()) + #$@extra-options) + + #:user #$user + #:group #$group + #:log-file #$web-log-file)) + (stop #~(make-kill-destructor))) + ,@(if remote-server + (match-record remote-server + (backend-port publish-port log-file cache trigger-url + public-key private-key) + (list + (shepherd-service + (documentation "Run Cuirass remote build server.") + (provision '(cuirass-remote-server)) + (requirement '(avahi-daemon cuirass guix-daemon networking)) + (start #~(make-forkexec-constructor + (list (string-append #$cuirass "/bin/remote-server") + (string-append "--database=" #$database) + (string-append "--cache=" #$cache) + (string-append "--user=" #$user) + #$@(if backend-port + (list (string-append + "--backend-port=" + (number->string backend-port))) + '()) + #$@(if publish-port + (list (string-append + "--publish-port=" + (number->string publish-port))) + '()) + #$@(if trigger-url + (list + (string-append + "--trigger-substitute-url=" + trigger-url)) + '()) + #$@(if public-key + (list + (string-append "--public-key=" + public-key)) + '()) + #$@(if private-key + (list + (string-append "--private-key=" + private-key)) + '())) + #:log-file #$log-file)) + (stop #~(make-kill-destructor))))) + '())))) (define (cuirass-account config) "Return the user accounts and user groups for CONFIG." @@ -212,3 +283,58 @@ cuirass-postgresql-role))) (description "Run the Cuirass continuous integration service."))) + +(define-record-type* + cuirass-remote-worker-configuration make-cuirass-remote-worker-configuration + cuirass-remote-worker-configuration? + (cuirass cuirass-remote-worker-configuration-cuirass ;package + (default cuirass)) + (workers cuirass-remote-worker-workers ;int + (default 1)) + (log-file cuirass-remote-worker-log-file ;string + (default "/var/log/cuirass-remote-worker.log")) + (publish-port cuirass-remote-worker-configuration-publish-port ;int + (default #f)) + (public-key cuirass-remote-worker-configuration-public-key ;string + (default #f)) + (private-key cuirass-remote-worker-configuration-private-key ;string + (default #f))) + +(define (cuirass-remote-worker-shepherd-service config) + "Return a for the Cuirass remote worker service with +CONFIG." + (match-record config + (cuirass workers publish-port public-key private-key) + (list (shepherd-service + (documentation "Run Cuirass remote build worker.") + (provision '(cuirass-remote-worker)) + (requirement '(avahi-daemon guix-daemon networking)) + (start #~(make-forkexec-constructor + (list (string-append #$cuirass "/bin/remote-worker") + (string-append "--workers" #$workers) + #$@(if publish-port + (list (string-append + "--publish-port=" + (number->string publish-port))) + '()) + #$@(if public-key + (list + (string-append "--public-key=" + public-key)) + '()) + #$@(if private-key + (list + (string-append "--private-key=" + private-key)) + '())))) + (stop #~(make-kill-destructor)))))) + +(define cuirass-remote-worker-service-type + (service-type + (name 'cuirass-remote-worker) + (extensions + (list + (service-extension shepherd-root-service-type + cuirass-remote-worker-shepherd-service))) + (description + "Run the Cuirass remote build worker service."))) -- cgit v1.2.3 From 42008264d9fff544ee00c3c109093472b8a92bd2 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Fri, 29 Jan 2021 15:17:15 -0500 Subject: gnu: Remove avogadro. This package fails to build and has been superseded by avogadro2. * gnu/packages/chemistry.scm (avogadro): Remove variable. * gnu/packages/patches/avogadro-boost148.patch, gnu/packages/patches/avogadro-eigen3-update.patch, gnu/packages/patches/avogadro-python-eigen-lib.patch: Delete files. * gnu/local.mk (dist_patch_DATA): Remove them. --- gnu/local.mk | 3 - gnu/packages/chemistry.scm | 85 --- gnu/packages/patches/avogadro-boost148.patch | 69 --- gnu/packages/patches/avogadro-eigen3-update.patch | 603 --------------------- .../patches/avogadro-python-eigen-lib.patch | 161 ------ 5 files changed, 921 deletions(-) delete mode 100644 gnu/packages/patches/avogadro-boost148.patch delete mode 100644 gnu/packages/patches/avogadro-eigen3-update.patch delete mode 100644 gnu/packages/patches/avogadro-python-eigen-lib.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index ee57d6fe51..4ca5d60937 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -823,9 +823,6 @@ dist_patch_DATA = \ %D%/packages/patches/audiofile-function-signature.patch \ %D%/packages/patches/automake-skip-amhello-tests.patch \ %D%/packages/patches/avahi-localstatedir.patch \ - %D%/packages/patches/avogadro-boost148.patch \ - %D%/packages/patches/avogadro-eigen3-update.patch \ - %D%/packages/patches/avogadro-python-eigen-lib.patch \ %D%/packages/patches/avidemux-install-to-lib.patch \ %D%/packages/patches/awesome-reproducible-png.patch \ %D%/packages/patches/aws-c-event-stream-cmake-prefix.patch \ diff --git a/gnu/packages/chemistry.scm b/gnu/packages/chemistry.scm index 5351ea596b..e7b061515b 100644 --- a/gnu/packages/chemistry.scm +++ b/gnu/packages/chemistry.scm @@ -52,91 +52,6 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system python)) -(define-public avogadro - (package - (name "avogadro") - (version "1.2.0") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/cryos/avogadro") - (commit version))) - (sha256 - (base32 "0258py3lkba85qhs5ynancinyym61vlp0zaq9yrfs3hhnhpzv9n2")) - (file-name (git-file-name name version)) - (patches - (search-patches "avogadro-eigen3-update.patch" - "avogadro-python-eigen-lib.patch" - "avogadro-boost148.patch")))) - (build-system cmake-build-system) - (arguments - `(#:tests? #f - #:configure-flags - (list "-DENABLE_GLSL=ON" - (string-append "-DPYTHON_LIBRARIES=" - (assoc-ref %build-inputs "python") - "/lib") - (string-append "-DPYTHON_INCLUDE_DIRS=" - (assoc-ref %build-inputs "python") - "/include/python" - ,(version-major+minor - (package-version python)))) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-python-lib-path - (lambda* (#:key outputs #:allow-other-keys) - ;; This is necessary to install the Python module in the correct - ;; directory. - (substitute* "libavogadro/src/python/CMakeLists.txt" - (("^EXECUTE_PROCESS.*$") "") - (("^.*from sys import stdout.*$") "") - (("^.*OUTPUT_VARIABLE.*") - (string-append "set(PYTHON_LIB_PATH \"" - (assoc-ref outputs "out") - "/lib/python" - ,(version-major+minor - (package-version python)) - "/site-packages\")"))) - #t)) - (add-after 'install 'wrap-program - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; Make sure 'avogadro' runs with the correct PYTHONPATH. - (let* ((out (assoc-ref outputs "out"))) - (setenv "PYTHONPATH" - (string-append - (assoc-ref outputs "out") - "/lib/python" - ,(version-major+minor - (package-version python)) - "/site-packages:" - (getenv "PYTHONPATH"))) - (wrap-program (string-append out "/bin/avogadro") - `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH"))))) - #t))))) - (native-inputs - `(("doxygen" ,doxygen) - ("pkg-config" ,pkg-config))) - (inputs - `(("boost" ,boost) - ("eigen" ,eigen) - ("glew" ,glew) - ("openbabel" ,openbabel) - ("python" ,python-2) - ("python-numpy" ,python2-numpy) - ("python-pyqt" ,python2-pyqt-4) - ("python-sip" ,python2-sip) - ("qt" ,qt-4) - ("zlib" ,zlib))) - (home-page "https://avogadro.cc") - (synopsis "Advanced molecule editor") - (description - "Avogadro is an advanced molecule editor and visualizer designed for use -in computational chemistry, molecular modeling, bioinformatics, materials -science, and related areas. It offers flexible high quality rendering and a -powerful plugin architecture.") - (license license:gpl2+))) - (define-public avogadrolibs (package (name "avogadrolibs") diff --git a/gnu/packages/patches/avogadro-boost148.patch b/gnu/packages/patches/avogadro-boost148.patch deleted file mode 100644 index f244f14674..0000000000 --- a/gnu/packages/patches/avogadro-boost148.patch +++ /dev/null @@ -1,69 +0,0 @@ -Index: avogadro-1.2.0/libavogadro/src/pythonengine_p.h -=================================================================== ---- avogadro-1.2.0.orig/libavogadro/src/pythonengine_p.h -+++ avogadro-1.2.0/libavogadro/src/pythonengine_p.h -@@ -31,7 +31,9 @@ - - #include - #include -+#ifndef Q_MOC_RUN - #include -+#endif - - namespace Avogadro { - -Index: avogadro-1.2.0/libavogadro/src/pythonextension_p.h -=================================================================== ---- avogadro-1.2.0.orig/libavogadro/src/pythonextension_p.h -+++ avogadro-1.2.0/libavogadro/src/pythonextension_p.h -@@ -33,7 +33,9 @@ - #include - #include - #include -+#ifndef Q_MOC_RUN - #include -+#endif - - #include - #include -Index: avogadro-1.2.0/libavogadro/src/pythontool_p.h -=================================================================== ---- avogadro-1.2.0.orig/libavogadro/src/pythontool_p.h -+++ avogadro-1.2.0/libavogadro/src/pythontool_p.h -@@ -31,7 +31,9 @@ - - #include - #include -+#ifndef Q_MOC_RUN - #include -+#endif - - #include - #include -Index: avogadro-1.2.0/libavogadro/src/pythoninterpreter.h -=================================================================== ---- avogadro-1.2.0.orig/libavogadro/src/pythoninterpreter.h -+++ avogadro-1.2.0/libavogadro/src/pythoninterpreter.h -@@ -26,7 +26,9 @@ - #define PYTHONINTERPRETER_H - - #include -+#ifndef Q_MOC_RUN - #include -+#endif - #include - #include - -Index: avogadro-1.2.0/libavogadro/src/pythonscript.h -=================================================================== ---- avogadro-1.2.0.orig/libavogadro/src/pythonscript.h -+++ avogadro-1.2.0/libavogadro/src/pythonscript.h -@@ -27,6 +27,8 @@ - #define PYTHONSCRIPT_H - - #include -+#ifndef Q_MOC_RUN - #include -+#endif - - #include "pythonerror.h" diff --git a/gnu/packages/patches/avogadro-eigen3-update.patch b/gnu/packages/patches/avogadro-eigen3-update.patch deleted file mode 100644 index a5f669292f..0000000000 --- a/gnu/packages/patches/avogadro-eigen3-update.patch +++ /dev/null @@ -1,603 +0,0 @@ -From 43af3c117b0b3220b15c2fe2895b94bbd83d3a60 Mon Sep 17 00:00:00 2001 -From: Claudio Fernandes -Date: Sun, 15 Jan 2017 21:23:39 -0200 -Subject: [PATCH] Adapt Avogadro to Eigen 3.3 - ---- - CMakeLists.txt | 9 +------ - avogadro/src/mainwindow.cpp | 5 ++-- - libavogadro/src/camera.cpp | 10 ++++---- - libavogadro/src/camera.h | 14 +++++------ - libavogadro/src/engines/wireengine.cpp | 4 ++-- - .../crystallography/crystallographyextension.cpp | 2 +- - .../crystallography/ui/ceviewoptionswidget.cpp | 2 +- - .../src/extensions/orca/orcaanalysedialog.cpp | 1 - - .../src/extensions/orca/orcainputdialog.cpp | 1 - - .../src/extensions/qtaim/qtaimmathutilities.cpp | 1 + - .../qtaim/qtaimwavefunctionevaluator.cpp | 28 +++++++++++----------- - .../extensions/surfaces/openqube/gamessukout.cpp | 1 + - .../src/extensions/surfaces/openqube/slaterset.cpp | 6 +++-- - libavogadro/src/glpainter_p.cpp | 14 +++++------ - libavogadro/src/glwidget.cpp | 4 ++-- - libavogadro/src/molecule.cpp | 26 ++++++++++++++++++-- - libavogadro/src/navigate.cpp | 2 +- - libavogadro/src/tools/bondcentrictool.cpp | 28 +++++++++++----------- - libavogadro/src/tools/manipulatetool.cpp | 17 +++++++------ - libavogadro/src/tools/navigatetool.cpp | 3 ++- - libavogadro/src/tools/skeletontree.cpp | 7 +++--- - libavogadro/src/tools/skeletontree.h | 2 +- - 22 files changed, 102 insertions(+), 85 deletions(-) - ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -231,14 +231,7 @@ if(NOT Linguist_FOUND) - message(WARNING " Qt4 Linguist not found, please install it if you want Avogadro translations") - endif() - --find_package(Eigen3) # find and setup Eigen3 if available --if(NOT EIGEN3_FOUND) -- message(STATUS "Cannot find Eigen3, trying Eigen2") -- find_package(Eigen2 REQUIRED) # Some version is required --else() --# Use Stage10 Eigen3 support -- set (EIGEN2_SUPPORT_STAGE10_FULL_EIGEN2_API TRUE) --endif() -+find_package(Eigen3 REQUIRED) # find and setup Eigen3 if available - - find_package(ZLIB REQUIRED) - find_package(OpenBabel2 REQUIRED) # find and setup OpenBabel ---- a/avogadro/src/mainwindow.cpp -+++ b/avogadro/src/mainwindow.cpp -@@ -115,7 +115,6 @@ - #include - - #include --#include - #define USEQUAT - // This is a "hidden" exported Qt function on the Mac for Qt-4.x. - #ifdef Q_WS_MAC -@@ -2775,7 +2774,7 @@ protected: - linearGoal.row(1) = linearGoal.row(2).cross(linearGoal.row(0)); - - // calculate the translation matrix -- Transform3d goal(linearGoal); -+ Projective3d goal(linearGoal); - - goal.pretranslate(- 3.0 * (d->glWidget->radius() + CAMERA_NEAR_DISTANCE) * Vector3d::UnitZ()); - -@@ -2840,7 +2839,7 @@ protected: - Matrix3d linearGoal = Matrix3d::Identity(); - - // calculate the translation matrix -- Transform3d goal(linearGoal); -+ Projective3d goal(linearGoal); - - goal.pretranslate(- 3.0 * (d->glWidget->radius() + CAMERA_NEAR_DISTANCE) * Vector3d::UnitZ()); - ---- a/libavogadro/src/camera.cpp -+++ b/libavogadro/src/camera.cpp -@@ -47,7 +47,7 @@ namespace Avogadro - - CameraPrivate() {}; - -- Eigen::Transform3d modelview, projection; -+ Eigen::Projective3d modelview, projection; - const GLWidget *parent; - double angleOfViewY; - double orthoScale; -@@ -169,20 +169,20 @@ namespace Avogadro - - double Camera::distance(const Eigen::Vector3d & point) const - { -- return ( d->modelview * point ).norm(); -+ return ( d->modelview * point.homogeneous() ).head<3>().norm(); - } - -- void Camera::setModelview(const Eigen::Transform3d &matrix) -+ void Camera::setModelview(const Eigen::Projective3d &matrix) - { - d->modelview = matrix; - } - -- const Eigen::Transform3d & Camera::modelview() const -+ const Eigen::Projective3d & Camera::modelview() const - { - return d->modelview; - } - -- Eigen::Transform3d & Camera::modelview() -+ Eigen::Projective3d & Camera::modelview() - { - return d->modelview; - } ---- a/libavogadro/src/camera.h -+++ b/libavogadro/src/camera.h -@@ -101,16 +101,16 @@ namespace Avogadro { - double angleOfViewY() const; - /** Sets 4x4 "modelview" matrix representing the camera orientation and position. - * @param matrix the matrix to copy from -- * @sa Eigen::Transform3d & modelview(), applyModelview() */ -- void setModelview(const Eigen::Transform3d &matrix); -+ * @sa Eigen::Projective3d & modelview(), applyModelview() */ -+ void setModelview(const Eigen::Projective3d &matrix); - /** @return a constant reference to the 4x4 "modelview" matrix representing - * the camera orientation and position -- * @sa setModelview(), Eigen::Transform3d & modelview() */ -- const Eigen::Transform3d & modelview() const; -+ * @sa setModelview(), Eigen::Projective3d & modelview() */ -+ const Eigen::Projective3d & modelview() const; - /** @return a non-constant reference to the 4x4 "modelview" matrix representing - * the camera orientation and position -- * @sa setModelview(), const Eigen::Transform3d & modelview() const */ -- Eigen::Transform3d & modelview(); -+ * @sa setModelview(), const Eigen::Projective3d & modelview() const */ -+ Eigen::Projective3d & modelview(); - /** Calls gluPerspective() or glOrtho() with parameters automatically chosen - * for rendering the GLWidget's molecule with this camera. Should be called - * only in GL_PROJECTION matrix mode. Example code is given -@@ -342,7 +342,7 @@ namespace Avogadro { - * @return {x/w, y/w, z/w} vector - */ - Eigen::Vector3d V4toV3DivW(const Eigen::Vector4d & v4) { -- return v4.start<3>()/v4.w(); -+ return v4.head<3>()/v4.w(); - } - }; - ---- a/libavogadro/src/engines/wireengine.cpp -+++ b/libavogadro/src/engines/wireengine.cpp -@@ -109,7 +109,7 @@ namespace Avogadro { - const Camera *camera = pd->camera(); - - // perform a rough form of frustum culling -- Eigen::Vector3d transformedPos = pd->camera()->modelview() * v; -+ Eigen::Vector3d transformedPos = (pd->camera()->modelview() * v.homogeneous()).head<3>(); - double dot = transformedPos.z() / transformedPos.norm(); - if(dot > -0.8) - return true; -@@ -167,7 +167,7 @@ namespace Avogadro { - map = pd->colorMap(); // fall back to global color map - - // perform a rough form of frustum culling -- Eigen::Vector3d transformedEnd1 = pd->camera()->modelview() * v1; -+ Eigen::Vector3d transformedEnd1 = (pd->camera()->modelview() * v1.homogeneous()).head<3>(); - double dot = transformedEnd1.z() / transformedEnd1.norm(); - if(dot > -0.8) - return true; // i.e., don't bother rendering ---- a/libavogadro/src/extensions/crystallography/crystallographyextension.cpp -+++ b/libavogadro/src/extensions/crystallography/crystallographyextension.cpp -@@ -1989,7 +1989,7 @@ namespace Avogadro - // fix coordinates - // Apply COB matrix: - Eigen::Matrix3d invCob; -- cob.computeInverse(&invCob); -+ invCob = cob.inverse(); - for (QList::iterator - it = fcoords.begin(), - it_end = fcoords.end(); ---- a/libavogadro/src/extensions/crystallography/ui/ceviewoptionswidget.cpp -+++ b/libavogadro/src/extensions/crystallography/ui/ceviewoptionswidget.cpp -@@ -139,7 +139,7 @@ namespace Avogadro - { - // View into a Miller plane - Camera *camera = m_glWidget->camera(); -- Eigen::Transform3d modelView; -+ Eigen::Projective3d modelView; - modelView.setIdentity(); - - // OK, so we want to rotate to look along the normal at the plane ---- a/libavogadro/src/extensions/orca/orcaanalysedialog.cpp -+++ b/libavogadro/src/extensions/orca/orcaanalysedialog.cpp -@@ -41,7 +41,6 @@ - #include - - #include --#include - - #include - ---- a/libavogadro/src/extensions/orca/orcainputdialog.cpp -+++ b/libavogadro/src/extensions/orca/orcainputdialog.cpp -@@ -33,7 +33,6 @@ - #include - - #include --#include - - #include - ---- a/libavogadro/src/extensions/qtaim/qtaimmathutilities.cpp -+++ b/libavogadro/src/extensions/qtaim/qtaimmathutilities.cpp -@@ -28,6 +28,7 @@ - - #include - #include -+#include - - namespace Avogadro { - namespace QTAIMMathUtilities { ---- a/libavogadro/src/extensions/qtaim/qtaimwavefunctionevaluator.cpp -+++ b/libavogadro/src/extensions/qtaim/qtaimwavefunctionevaluator.cpp -@@ -35,21 +35,21 @@ namespace Avogadro - m_nprim=wfn.numberOfGaussianPrimitives(); - m_nnuc=wfn.numberOfNuclei(); - -- m_nucxcoord=Map >(wfn.xNuclearCoordinates(),m_nnuc); -- m_nucycoord=Map >(wfn.yNuclearCoordinates(),m_nnuc); -- m_nuczcoord=Map >(wfn.zNuclearCoordinates(),m_nnuc); -- m_nucz=Map >(wfn.nuclearCharges(),m_nnuc); -- m_X0=Map >(wfn.xGaussianPrimitiveCenterCoordinates(),m_nprim,1); -- m_Y0=Map >(wfn.yGaussianPrimitiveCenterCoordinates(),m_nprim,1); -- m_Z0=Map >(wfn.zGaussianPrimitiveCenterCoordinates(),m_nprim,1); -- m_xamom=Map >(wfn.xGaussianPrimitiveAngularMomenta(),m_nprim,1); -- m_yamom=Map >(wfn.yGaussianPrimitiveAngularMomenta(),m_nprim,1); -- m_zamom=Map >(wfn.zGaussianPrimitiveAngularMomenta(),m_nprim,1); -- m_alpha=Map >(wfn.gaussianPrimitiveExponentCoefficients(),m_nprim,1); -+ m_nucxcoord=Map >(const_cast(wfn.xNuclearCoordinates()),m_nnuc); -+ m_nucycoord=Map >(const_cast(wfn.yNuclearCoordinates()),m_nnuc); -+ m_nuczcoord=Map >(const_cast(wfn.zNuclearCoordinates()),m_nnuc); -+ m_nucz=Map >(const_cast(wfn.nuclearCharges()),m_nnuc); -+ m_X0=Map >(const_cast(wfn.xGaussianPrimitiveCenterCoordinates()),m_nprim,1); -+ m_Y0=Map >(const_cast(wfn.yGaussianPrimitiveCenterCoordinates()),m_nprim,1); -+ m_Z0=Map >(const_cast(wfn.zGaussianPrimitiveCenterCoordinates()),m_nprim,1); -+ m_xamom=Map >(const_cast(wfn.xGaussianPrimitiveAngularMomenta()),m_nprim,1); -+ m_yamom=Map >(const_cast(wfn.yGaussianPrimitiveAngularMomenta()),m_nprim,1); -+ m_zamom=Map >(const_cast(wfn.zGaussianPrimitiveAngularMomenta()),m_nprim,1); -+ m_alpha=Map >(const_cast(wfn.gaussianPrimitiveExponentCoefficients()),m_nprim,1); - // TODO Implement screening for unoccupied molecular orbitals. -- m_occno=Map >(wfn.molecularOrbitalOccupationNumbers(),m_nmo,1); -- m_orbe=Map >(wfn.molecularOrbitalEigenvalues(),m_nmo,1); -- m_coef=Map >(wfn.molecularOrbitalCoefficients(),m_nmo,m_nprim); -+ m_occno=Map >(const_cast(wfn.molecularOrbitalOccupationNumbers()),m_nmo,1); -+ m_orbe=Map >(const_cast(wfn.molecularOrbitalEigenvalues()),m_nmo,1); -+ m_coef=Map >(const_cast(wfn.molecularOrbitalCoefficients()),m_nmo,m_nprim); - m_totalEnergy=wfn.totalEnergy(); - m_virialRatio=wfn.virialRatio(); - ---- a/libavogadro/src/extensions/surfaces/openqube/gamessukout.cpp -+++ b/libavogadro/src/extensions/surfaces/openqube/gamessukout.cpp -@@ -19,6 +19,7 @@ - using Eigen::Vector3d; - using std::vector; - -+#include - #include - - namespace OpenQube ---- a/libavogadro/src/extensions/surfaces/openqube/slaterset.cpp -+++ b/libavogadro/src/extensions/surfaces/openqube/slaterset.cpp -@@ -25,9 +25,9 @@ - - #include "cube.h" - --#include - #include - #include -+#include - - #include - -@@ -250,7 +250,9 @@ bool SlaterSet::initialize() - - SelfAdjointEigenSolver s(m_overlap); - MatrixXd p = s.eigenvectors(); -- MatrixXd m = p * s.eigenvalues().cwise().inverse().cwise().sqrt().asDiagonal() * p.inverse(); -+ // TODO check if this is correct -+ MatrixXd m1 = (s.eigenvalues().array().inverse().sqrt()); -+ MatrixXd m = p.array()*(m1.diagonal().array())*p.inverse().array(); - m_normalized = m * m_eigenVectors; - - if (!(m_overlap*m*m).isIdentity()) ---- a/libavogadro/src/glpainter_p.cpp -+++ b/libavogadro/src/glpainter_p.cpp -@@ -789,13 +789,13 @@ namespace Avogadro - } else { - points[theta-1] = Eigen::AngleAxisd(theta * (M_PI / 180.0) / 2, n) * u; - } -- points[theta-1] = d->widget->camera()->modelview() * (origin + points[theta-1]); -+ points[theta-1] = (d->widget->camera()->modelview() * (origin + points[theta-1]).homogeneous()).head<3>(); - } - - // Get vectors representing the points' positions in terms of the model view. -- Eigen::Vector3d _origin = d->widget->camera()->modelview() * origin; -- Eigen::Vector3d _direction1 = d->widget->camera()->modelview() * (origin+u); -- Eigen::Vector3d _direction2 = d->widget->camera()->modelview() * (origin+v); -+ Eigen::Vector3d _origin = (d->widget->camera()->modelview() * origin.homogeneous()).head<3>(); -+ Eigen::Vector3d _direction1 = (d->widget->camera()->modelview() * (origin+u).homogeneous()).head<3>(); -+ Eigen::Vector3d _direction2 = (d->widget->camera()->modelview() * (origin+v).homogeneous()).head<3>(); - - glPushAttrib(GL_ALL_ATTRIB_BITS); - glPushMatrix(); -@@ -880,12 +880,12 @@ namespace Avogadro - } else { - points[theta-1] = Eigen::AngleAxisd(theta * (M_PI / 180.0) / 2, n) * u; - } -- points[theta-1] = d->widget->camera()->modelview() * (origin + points[theta-1]); -+ points[theta-1] = (d->widget->camera()->modelview() * (origin + points[theta-1]).homogeneous()).head<3>(); - } - - // Get vectors representing the points' positions in terms of the model view. -- Eigen::Vector3d _direction1 = d->widget->camera()->modelview() * (origin + u); -- Eigen::Vector3d _direction2 = d->widget->camera()->modelview() * (origin + v); -+ Eigen::Vector3d _direction1 = (d->widget->camera()->modelview() * (origin + u).homogeneous()).head<3>(); -+ Eigen::Vector3d _direction2 = (d->widget->camera()->modelview() * (origin + v).homogeneous()).head<3>(); - - glPushAttrib(GL_ALL_ATTRIB_BITS); - glPushMatrix(); ---- a/libavogadro/src/glwidget.cpp -+++ b/libavogadro/src/glwidget.cpp -@@ -765,7 +765,7 @@ namespace Avogadro { - GLfloat fogColor[4]= {static_cast(d->background.redF()), static_cast(d->background.greenF()), - static_cast(d->background.blueF()), static_cast(d->background.alphaF())}; - glFogfv(GL_FOG_COLOR, fogColor); -- Vector3d distance = camera()->modelview() * d->center; -+ Vector3d distance = (camera()->modelview() * d->center.homogeneous()).head<3>(); - double distanceToCenter = distance.norm(); - glFogf(GL_FOG_DENSITY, 1.0); - glHint(GL_FOG_HINT, GL_NICEST); -@@ -1711,7 +1711,7 @@ namespace Avogadro { - - if (d->renderModelViewDebug) { - // Model view matrix: -- const Eigen::Transform3d &modelview = d->camera->modelview(); -+ const Eigen::Projective3d &modelview = d->camera->modelview(); - y += d->pd->painter()->drawText - (x, y, tr("ModelView row 1: %L1 %L2 %L3 %L4") - .arg(modelview(0, 0), 6, 'f', 2, ' ') ---- a/libavogadro/src/molecule.cpp -+++ b/libavogadro/src/molecule.cpp -@@ -38,7 +38,7 @@ - #include "zmatrix.h" - - #include --#include -+#include - - #include - -@@ -1907,7 +1907,29 @@ namespace Avogadro{ - } - d->center /= static_cast(nAtoms); - Eigen::Hyperplane planeCoeffs; -- Eigen::fitHyperplane(numAtoms(), atomPositions, &planeCoeffs); -+ //Eigen::fitHyperplane(numAtoms(), atomPositions, &planeCoeffs); -+ -+ // TODO check if this is OK -+ /************************/ -+ typedef Eigen::Matrix CovMatrixType; -+ typedef Eigen::Vector3d VectorType; -+ -+ VectorType mean = d->center; -+ int size=3; -+ int numPoints=numAtoms(); -+ VectorType ** points=atomPositions; -+ CovMatrixType covMat = CovMatrixType::Zero(size, size); -+ VectorType remean = VectorType::Zero(size); -+ for(int i = 0; i < numPoints; ++i) -+ { -+ VectorType diff = (*(points[i]) - mean).conjugate(); -+ covMat += diff * diff.adjoint(); -+ } -+ Eigen::SelfAdjointEigenSolver eig(covMat); -+ planeCoeffs.normal() = eig.eigenvectors().col(0); -+ /************************/ -+ -+ - delete[] atomPositions; - d->normalVector = planeCoeffs.normal(); - } ---- a/libavogadro/src/navigate.cpp -+++ b/libavogadro/src/navigate.cpp -@@ -40,7 +40,7 @@ namespace Avogadro { - void Navigate::zoom(GLWidget *widget, const Eigen::Vector3d &goal, - double delta) - { -- Vector3d transformedGoal = widget->camera()->modelview() * goal; -+ Vector3d transformedGoal = (widget->camera()->modelview() * goal.homogeneous()).head<3>(); - double distanceToGoal = transformedGoal.norm(); - - double t = ZOOM_SPEED * delta; ---- a/libavogadro/src/tools/bondcentrictool.cpp -+++ b/libavogadro/src/tools/bondcentrictool.cpp -@@ -578,8 +578,8 @@ namespace Avogadro { - - Vector3d clicked = *m_clickedAtom->pos(); - -- Vector3d axis = Vector3d(0, 0, ((widget->camera()->modelview() * other).z() >= -- (widget->camera()->modelview() * center).z() ? -1 : 1)); -+ Vector3d axis = Vector3d(0, 0, ((widget->camera()->modelview() * other.homogeneous()).z() >= -+ (widget->camera()->modelview() * center.homogeneous()).z() ? -1 : 1)); - - Vector3d centerProj = widget->camera()->project(center); - centerProj -= Vector3d(0,0,centerProj.z()); -@@ -673,8 +673,8 @@ namespace Avogadro { - - Vector3d clicked = *m_clickedAtom->pos(); - -- Vector3d axis = Vector3d(0, 0, ((widget->camera()->modelview() * other).z() >= -- (widget->camera()->modelview() * center).z() ? -1 : 1)); -+ Vector3d axis = Vector3d(0, 0, ((widget->camera()->modelview() * other.homogeneous()).z() >= -+ (widget->camera()->modelview() * center.homogeneous()).z() ? -1 : 1)); - - Vector3d centerProj = widget->camera()->project(center); - centerProj -= Vector3d(0,0,centerProj.z()); -@@ -1362,10 +1362,10 @@ namespace Avogadro { - - planeVec = length * (planeVec / planeVec.norm()); - -- Vector3d topLeft = widget->camera()->modelview() * (left + planeVec); -- Vector3d topRight = widget->camera()->modelview() * (right + planeVec); -- Vector3d botRight = widget->camera()->modelview() * (right - planeVec); -- Vector3d botLeft = widget->camera()->modelview() * (left - planeVec); -+ Vector3d topLeft = (widget->camera()->modelview() * (left + planeVec).homogeneous()).head<3>(); -+ Vector3d topRight = (widget->camera()->modelview() * (right + planeVec).homogeneous()).head<3>(); -+ Vector3d botRight = (widget->camera()->modelview() * (right - planeVec).homogeneous()).head<3>(); -+ Vector3d botLeft = (widget->camera()->modelview() * (left - planeVec).homogeneous()).head<3>(); - - float alpha = 0.4; - double lineWidth = 1.5; -@@ -1444,10 +1444,10 @@ namespace Avogadro { - C = D + ((C-D).normalized() * minWidth); - } - -- Vector3d topLeft = widget->camera()->modelview() * D; -- Vector3d topRight = widget->camera()->modelview() * C; -- Vector3d botRight = widget->camera()->modelview() * B; -- Vector3d botLeft = widget->camera()->modelview() * A; -+ Vector3d topLeft = (widget->camera()->modelview() * D.homogeneous()).head<3>(); -+ Vector3d topRight = (widget->camera()->modelview() * C.homogeneous()).head<3>(); -+ Vector3d botRight = (widget->camera()->modelview() * B.homogeneous()).head<3>(); -+ Vector3d botLeft = (widget->camera()->modelview() * A.homogeneous()).head<3>(); - - float alpha = 0.4; - double lineWidth = 1.5; -@@ -1506,12 +1506,12 @@ namespace Avogadro { - Vector3d positionVector) - { - //Rotate skeleton around a particular axis and center point -- Eigen::Transform3d rotation; -+ Eigen::Projective3d rotation; - rotation = Eigen::AngleAxisd(angle, rotationVector); - rotation.pretranslate(centerVector); - rotation.translate(-centerVector); - -- return rotation*positionVector; -+ return (rotation*positionVector.homogeneous()).head<3>(); - } - - // ########## showAnglesChanged ########## ---- a/libavogadro/src/tools/manipulatetool.cpp -+++ b/libavogadro/src/tools/manipulatetool.cpp -@@ -40,7 +40,6 @@ - #include - - using Eigen::Vector3d; --using Eigen::Transform3d; - using Eigen::AngleAxisd; - - namespace Avogadro { -@@ -138,7 +137,7 @@ namespace Avogadro { - double yRotate = m_settingsWidget->yRotateSpinBox->value() * DEG_TO_RAD; - double zRotate = m_settingsWidget->zRotateSpinBox->value() * DEG_TO_RAD; - -- Eigen::Transform3d rotation; -+ Eigen::Projective3d rotation; - rotation.matrix().setIdentity(); - rotation.translation() = center; - rotation.rotate(AngleAxisd(xRotate, Vector3d::UnitX()) -@@ -152,12 +151,12 @@ namespace Avogadro { - if (p->type() == Primitive::AtomType) { - Atom *atom = static_cast(p); - tempPos = translate + *(atom->pos()); -- atom->setPos(rotation * tempPos); -+ atom->setPos((rotation * tempPos.homogeneous()).head<3>()); - } - } else { - foreach(Atom *atom, widget->molecule()->atoms()) { - tempPos = translate + *(atom->pos()); -- atom->setPos(rotation * tempPos); -+ atom->setPos((rotation * tempPos.homogeneous()).head<3>()); - } - } - -@@ -199,7 +198,7 @@ namespace Avogadro { - widget->setCursor(Qt::SizeVerCursor); - - // Move the selected atom(s) in to or out of the screen -- Vector3d transformedGoal = widget->camera()->modelview() * *goal; -+ Vector3d transformedGoal = (widget->camera()->modelview() * goal->homogeneous()).head<3>(); - double distanceToGoal = transformedGoal.norm(); - - double t = ZOOM_SPEED * delta; -@@ -255,7 +254,7 @@ namespace Avogadro { - - // Rotate the selected atoms about the center - // rotate only selected primitives -- Transform3d fragmentRotation; -+ Eigen::Projective3d fragmentRotation; - fragmentRotation.matrix().setIdentity(); - fragmentRotation.translation() = *center; - fragmentRotation.rotate( -@@ -266,7 +265,7 @@ namespace Avogadro { - - foreach(Primitive *p, widget->selectedPrimitives()) - if (p->type() == Primitive::AtomType) -- static_cast(p)->setPos(fragmentRotation * *static_cast(p)->pos()); -+ static_cast(p)->setPos((fragmentRotation * static_cast(p)->pos()->homogeneous()).head<3>()); - widget->molecule()->update(); - } - -@@ -274,7 +273,7 @@ namespace Avogadro { - double delta) const - { - // Tilt the selected atoms about the center -- Transform3d fragmentRotation; -+ Eigen::Projective3d fragmentRotation; - fragmentRotation.matrix().setIdentity(); - fragmentRotation.translation() = *center; - fragmentRotation.rotate(AngleAxisd(delta * ROTATION_SPEED, widget->camera()->backTransformedZAxis())); -@@ -282,7 +281,7 @@ namespace Avogadro { - - foreach(Primitive *p, widget->selectedPrimitives()) - if (p->type() == Primitive::AtomType) -- static_cast(p)->setPos(fragmentRotation * *static_cast(p)->pos()); -+ static_cast(p)->setPos((fragmentRotation * static_cast(p)->pos()->homogeneous()).head<3>()); - widget->molecule()->update(); - } - ---- a/libavogadro/src/tools/navigatetool.cpp -+++ b/libavogadro/src/tools/navigatetool.cpp -@@ -92,7 +92,8 @@ namespace Avogadro { - double sumOfWeights = 0.; - QList atoms = widget->molecule()->atoms(); - foreach (Atom *atom, atoms) { -- Vector3d transformedAtomPos = widget->camera()->modelview() * *atom->pos(); -+ Vector3d transformedAtomPos = (widget->camera()->modelview() * -+ atom->pos()->homogeneous()).head<3>(); - double atomDistance = transformedAtomPos.norm(); - double dot = transformedAtomPos.z() / atomDistance; - double weight = exp(-30. * (1. + dot)); ---- a/libavogadro/src/tools/skeletontree.cpp -+++ b/libavogadro/src/tools/skeletontree.cpp -@@ -29,6 +29,7 @@ - #include - #include - #include -+#include - - using namespace Eigen; - using namespace std; -@@ -221,7 +222,7 @@ namespace Avogadro { - { - if (m_rootNode) { - //Rotate skeleton around a particular axis and center point -- Eigen::Transform3d rotation; -+ Eigen::Projective3d rotation; - rotation = Eigen::AngleAxisd(angle, rotationAxis); - rotation.pretranslate(centerVector); - rotation.translate(-centerVector); -@@ -248,11 +249,11 @@ namespace Avogadro { - // ########## recursiveRotate ########## - - void SkeletonTree::recursiveRotate(Node* n, -- const Eigen::Transform3d &rotationMatrix) -+ const Eigen::Projective3d &rotationMatrix) - { - // Update the root node with the new position - Atom* a = n->atom(); -- a->setPos(rotationMatrix * (*a->pos())); -+ a->setPos((rotationMatrix * (*a->pos()).homogeneous()).head<3>()); - a->update(); - - // Now update the children ---- a/libavogadro/src/tools/skeletontree.h -+++ b/libavogadro/src/tools/skeletontree.h -@@ -230,6 +230,6 @@ namespace Avogadro { - * @param centerVector Center location to rotate around. - */ - void recursiveRotate(Node* n, -- const Eigen::Transform3d &rotationMatrix); -+ const Eigen::Projective3d &rotationMatrix); - - }; - } // End namespace Avogadro \ No newline at end of file diff --git a/gnu/packages/patches/avogadro-python-eigen-lib.patch b/gnu/packages/patches/avogadro-python-eigen-lib.patch deleted file mode 100644 index ac9f2e30af..0000000000 --- a/gnu/packages/patches/avogadro-python-eigen-lib.patch +++ /dev/null @@ -1,161 +0,0 @@ -From 2d4be7ede177a8df7340fe3b209698d591ee8a04 Mon Sep 17 00:00:00 2001 -From: Claudio Fernandes -Date: Mon, 16 Jan 2017 19:48:23 -0200 -Subject: [PATCH] Adapt libavogadro/python to Eigen 3.3 - ---- - libavogadro/src/python/camera.cpp | 2 +- - libavogadro/src/python/eigen.cpp | 60 +++++++++++++++++++-------------------- - 2 files changed, 31 insertions(+), 31 deletions(-) - -diff --git a/libavogadro/src/python/camera.cpp b/libavogadro/src/python/camera.cpp -index 69ca87bf8..30b32af7d 100644 ---- a/libavogadro/src/python/camera.cpp -+++ b/libavogadro/src/python/camera.cpp -@@ -10,7 +10,7 @@ using namespace Avogadro; - void export_Camera() - { - -- const Eigen::Transform3d& (Camera::*modelview_ptr)() const = &Camera::modelview; -+ const Eigen::Projective3d& (Camera::*modelview_ptr)() const = &Camera::modelview; - Eigen::Vector3d (Camera::*unProject_ptr1)(const Eigen::Vector3d&) const = &Camera::unProject; - Eigen::Vector3d (Camera::*unProject_ptr2)(const QPoint&, const Eigen::Vector3d&) const = &Camera::unProject; - Eigen::Vector3d (Camera::*unProject_ptr3)(const QPoint&) const = &Camera::unProject; -diff --git a/libavogadro/src/python/eigen.cpp b/libavogadro/src/python/eigen.cpp -index c1faedbcc..20b4e719d 100644 ---- a/libavogadro/src/python/eigen.cpp -+++ b/libavogadro/src/python/eigen.cpp -@@ -305,9 +305,9 @@ template <> struct ScalarTraits - struct innerclass - { - // -- // Eigen::Transform3d --> python array (4x4) -+ // Eigen::Projective3d --> python array (4x4) - // -- static PyObject* convert(Eigen::Transform3d const &trans) -+ static PyObject* convert(Eigen::Projective3d const &trans) - { - npy_intp dims[2] = { 4, 4 }; - PyObject *result = PyArray_SimpleNew(2, dims, PyArray_DOUBLE); -@@ -321,9 +321,9 @@ template <> struct ScalarTraits - return incref(result); - } - // -- // Eigen::Transform3d* --> python array (4x4) -+ // Eigen::Projective3d* --> python array (4x4) - // -- static PyObject* convert(Eigen::Transform3d *trans) -+ static PyObject* convert(Eigen::Projective3d *trans) - { - npy_intp dims[2] = { 4, 4 }; - PyObject *result = PyArray_SimpleNew(2, dims, PyArray_DOUBLE); -@@ -337,9 +337,9 @@ template <> struct ScalarTraits - return incref(result); - } - // -- // const Eigen::Transform3d* --> python array (4x4) -+ // const Eigen::Projective3d* --> python array (4x4) - // -- static PyObject* convert(const Eigen::Transform3d *trans) -+ static PyObject* convert(const Eigen::Projective3d *trans) - { - npy_intp dims[2] = { 4, 4 }; - PyObject *result = PyArray_SimpleNew(2, dims, PyArray_DOUBLE); -@@ -358,10 +358,10 @@ template <> struct ScalarTraits - Transform3d_to_python_array() - { - #ifndef WIN32 -- to_python_converter(); -+ to_python_converter(); - #endif -- to_python_converter(); -- to_python_converter(); -+ to_python_converter(); -+ to_python_converter(); - } - - }; -@@ -373,17 +373,17 @@ template <> struct ScalarTraits - // Insert an rvalue from_python converter at the tail of the - // chain. Used for implicit conversions - // -- // python array --> Eigen::Transform3d -+ // python array --> Eigen::Projective3d - // - // used for: - // -- // void function(Eigen::Transform3d vec) -- // void function(Eigen::Transform3d & vec) -- // void function(const Eigen::Transform3d & vec) -+ // void function(Eigen::Projective3d vec) -+ // void function(Eigen::Projective3d & vec) -+ // void function(const Eigen::Projective3d & vec) - // -- converter::registry::push_back( &convertible, &construct, type_id() ); -+ converter::registry::push_back( &convertible, &construct, type_id() ); - -- converter::registry::insert( &convert, type_id() ); -+ converter::registry::insert( &convert, type_id() ); - } - - static void* convert(PyObject *obj_ptr) -@@ -401,7 +401,7 @@ template <> struct ScalarTraits - throw_error_already_set(); // the 1D array does not have exactly 3 elements - - double *values = reinterpret_cast(array->data); -- Eigen::Transform3d *c_obj = new Eigen::Transform3d(); -+ Eigen::Projective3d *c_obj = new Eigen::Projective3d(); - double *dataPtr = c_obj->data(); - - for (int i = 0; i < 16; ++i) -@@ -432,7 +432,7 @@ template <> struct ScalarTraits - // I think this is a better way to get at the double array, where is this - // deleted though? Does Boost::Python do it? - double *values = reinterpret_cast(array->data); -- Eigen::Transform3d *storage = new Eigen::Transform3d(); -+ Eigen::Projective3d *storage = new Eigen::Projective3d(); - double *dataPtr = storage->data(); - - for (int i = 0; i < 16; ++i) -@@ -467,21 +467,21 @@ class EigenUnitTestHelper - void set_vector3d_ptr(Eigen::Vector3d* vec) { m_vector3d = *vec; } - void set_const_vector3d_ptr(const Eigen::Vector3d* const vec) { m_vector3d = *vec; } - -- //Eigen::Transform3d transform3d() { return m_transform3d; } -- //Eigen::Transform3d& transform3d_ref() { return m_transform3d; } -- const Eigen::Transform3d& const_transform3d_ref() { return m_transform3d; } -- Eigen::Transform3d* transform3d_ptr() { return &m_transform3d; } -- const Eigen::Transform3d* const_transform3d_ptr() { return &m_transform3d; } -- -- //void set_transform3d(Eigen::Transform3d vec) { m_transform3d = vec; } -- //void set_transform3d_ref(Eigen::Transform3d& vec) { m_transform3d = vec; } -- void set_const_transform3d_ref(const Eigen::Transform3d& vec) { m_transform3d = vec; } -- void set_transform3d_ptr(Eigen::Transform3d* vec) { m_transform3d = *vec; } -- void set_const_transform3d_ptr(const Eigen::Transform3d* const vec) { m_transform3d = *vec; } -+ //Eigen::Projective3d transform3d() { return m_transform3d; } -+ //Eigen::Projective3d& transform3d_ref() { return m_transform3d; } -+ const Eigen::Projective3d& const_transform3d_ref() { return m_transform3d; } -+ Eigen::Projective3d* transform3d_ptr() { return &m_transform3d; } -+ const Eigen::Projective3d* const_transform3d_ptr() { return &m_transform3d; } -+ -+ //void set_transform3d(Eigen::Projective3d vec) { m_transform3d = vec; } -+ //void set_transform3d_ref(Eigen::Projective3d& vec) { m_transform3d = vec; } -+ void set_const_transform3d_ref(const Eigen::Projective3d& vec) { m_transform3d = vec; } -+ void set_transform3d_ptr(Eigen::Projective3d* vec) { m_transform3d = *vec; } -+ void set_const_transform3d_ptr(const Eigen::Projective3d* const vec) { m_transform3d = *vec; } - - private: - Eigen::Vector3d m_vector3d; -- Eigen::Transform3d m_transform3d; -+ Eigen::Projective3d m_transform3d; - - }; - #endif -@@ -529,6 +529,6 @@ void export_Eigen() - Vector3x_to_python_array(); - Vector3x_from_python_array(); - -- // Eigen::Transform3d -+ // Eigen::Projective3d - Transform3d_to_python_array(); - Transform3d_from_python_array(); -- cgit v1.2.3 From 0981f872cb1fb94fcdf3f4d00bd08c6a6b61ed8d Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sun, 31 Jan 2021 00:50:34 -0500 Subject: gnu: gst-plugins-good: Fix a test failure on 32-bit systems. * gnu/packages/patches/gst-plugins-good-fix-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gstreamer.scm (gst-plugins-good)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/gstreamer.scm | 1 + .../patches/gst-plugins-good-fix-test.patch | 94 ++++++++++++++++++++++ 3 files changed, 96 insertions(+) create mode 100644 gnu/packages/patches/gst-plugins-good-fix-test.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 5590faf7d7..29decae1d1 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1128,6 +1128,7 @@ dist_patch_DATA = \ %D%/packages/patches/grub-setup-root.patch \ %D%/packages/patches/grub-verifiers-Blocklist-fallout-cleanup.patch \ %D%/packages/patches/gspell-dash-test.patch \ + %D%/packages/patches/gst-plugins-good-fix-test.patch \ %D%/packages/patches/guile-1.8-cpp-4.5.patch \ %D%/packages/patches/guile-2.2-skip-oom-test.patch \ %D%/packages/patches/guile-2.2-skip-so-test.patch \ diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm index 10d9011401..b582585d75 100644 --- a/gnu/packages/gstreamer.scm +++ b/gnu/packages/gstreamer.scm @@ -591,6 +591,7 @@ for the GStreamer multimedia library.") (string-append "https://gstreamer.freedesktop.org/src/" name "/" name "-" version ".tar.xz")) + (patches (search-patches "gst-plugins-good-fix-test.patch")) (sha256 (base32 "1929nhjsvbl4bw37nfagnfsnxz737cm2x3ayz9ayrn9lwkfm45zp")))) (build-system meson-build-system) diff --git a/gnu/packages/patches/gst-plugins-good-fix-test.patch b/gnu/packages/patches/gst-plugins-good-fix-test.patch new file mode 100644 index 0000000000..38ec0ba802 --- /dev/null +++ b/gnu/packages/patches/gst-plugins-good-fix-test.patch @@ -0,0 +1,94 @@ +Fix a broken test: + +https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/803 + +Patches copied from upstream source repository: + +https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/commit/2ce5909f3a0b0da3abb7b794215d6b8b72a3b7fa +https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/commit/f5310ce346180a717f091f2f09bcbb3ddfb15436 + +From 2ce5909f3a0b0da3abb7b794215d6b8b72a3b7fa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= +Date: Thu, 12 Nov 2020 23:38:21 +0000 +Subject: [PATCH 1/2] tests: qtdemux: fix crash on 32-bit architectures + +Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/803 + +Part-of: +--- + tests/check/elements/qtdemux.c | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +diff --git a/tests/check/elements/qtdemux.c b/tests/check/elements/qtdemux.c +index 5271c6576..0c748278b 100644 +--- a/tests/check/elements/qtdemux.c ++++ b/tests/check/elements/qtdemux.c +@@ -797,9 +797,10 @@ GST_START_TEST (test_qtdemux_pad_names) + "protection-system", G_TYPE_STRING, + "9a04f079-9840-4286-ab92-e65be0885f95", NULL); + caps = +- gst_caps_new_simple ("video/quicktime", "variant", G_TYPE_STRING, +- "mss-fragmented", "timesacle", G_TYPE_UINT64, 10000000, "media-caps", +- GST_TYPE_CAPS, mediacaps, NULL); ++ gst_caps_new_simple ("video/quicktime", ++ "variant", G_TYPE_STRING, "mss-fragmented", ++ "timesacle", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000), ++ "media-caps", GST_TYPE_CAPS, mediacaps, NULL); + + /* Send segment event* */ + event = gst_event_new_caps (caps); +@@ -852,9 +853,10 @@ GST_START_TEST (test_qtdemux_pad_names) + "protection-system", G_TYPE_STRING, + "9a04f079-9840-4286-ab92-e65be0885f95", NULL); + caps = +- gst_caps_new_simple ("video/quicktime", "variant", G_TYPE_STRING, +- "mss-fragmented", "timesacle", G_TYPE_UINT64, 10000000, "media-caps", +- GST_TYPE_CAPS, mediacaps, NULL); ++ gst_caps_new_simple ("video/quicktime", ++ "variant", G_TYPE_STRING, "mss-fragmented", ++ "timesacle", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000), ++ "media-caps", GST_TYPE_CAPS, mediacaps, NULL); + + /* Send segment event* */ + event = gst_event_new_caps (caps); +-- +2.30.0 + + +From f5310ce346180a717f091f2f09bcbb3ddfb15436 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= +Date: Thu, 12 Nov 2020 23:39:21 +0000 +Subject: [PATCH 2/2] tests: qtdemux: fix typo in caps field + +timesacle -> timescale + +Part-of: +--- + tests/check/elements/qtdemux.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/check/elements/qtdemux.c b/tests/check/elements/qtdemux.c +index 0c748278b..4a14c45c0 100644 +--- a/tests/check/elements/qtdemux.c ++++ b/tests/check/elements/qtdemux.c +@@ -799,7 +799,7 @@ GST_START_TEST (test_qtdemux_pad_names) + caps = + gst_caps_new_simple ("video/quicktime", + "variant", G_TYPE_STRING, "mss-fragmented", +- "timesacle", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000), ++ "timescale", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000), + "media-caps", GST_TYPE_CAPS, mediacaps, NULL); + + /* Send segment event* */ +@@ -855,7 +855,7 @@ GST_START_TEST (test_qtdemux_pad_names) + caps = + gst_caps_new_simple ("video/quicktime", + "variant", G_TYPE_STRING, "mss-fragmented", +- "timesacle", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000), ++ "timescale", G_TYPE_UINT64, G_GUINT64_CONSTANT (10000000), + "media-caps", GST_TYPE_CAPS, mediacaps, NULL); + + /* Send segment event* */ +-- +2.30.0 + -- cgit v1.2.3 From 6bacfa63c10a277b559373f29f68723cfb31b0e9 Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Sat, 2 Jan 2021 18:48:03 -0500 Subject: gnu: Add c++-gsl. * gnu/packages/cpp.scm (c++-gsl): New variable. * gnu/packages/patches/c++-gsl-find-system-gtest.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. Signed-off-by: Leo Prikler --- gnu/local.mk | 1 + gnu/packages/cpp.scm | 29 +++++++ .../patches/c++-gsl-find-system-gtest.patch | 96 ++++++++++++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 gnu/packages/patches/c++-gsl-find-system-gtest.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 4ca5d60937..4acba0990e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -913,6 +913,7 @@ dist_patch_DATA = \ %D%/packages/patches/cursynth-wave-rand.patch \ %D%/packages/patches/cvs-CVE-2017-12836.patch \ %D%/packages/patches/cyrus-sasl-ac-try-run-fix.patch \ + %D%/packages/patches/c++-gsl-find-system-gtest.patch \ %D%/packages/patches/date-output-pkg-config-files.patch \ %D%/packages/patches/datefudge-gettimeofday.patch \ %D%/packages/patches/dbacl-include-locale.h.patch \ diff --git a/gnu/packages/cpp.scm b/gnu/packages/cpp.scm index 73a3ceb2df..d19712275c 100644 --- a/gnu/packages/cpp.scm +++ b/gnu/packages/cpp.scm @@ -63,6 +63,35 @@ #:use-module (gnu packages tls) #:use-module (gnu packages web)) +(define-public c++-gsl + (package + (name "c++-gsl") + (version "3.1.0") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/microsoft/GSL.git") + (commit + (string-append "v" version)))) + (file-name + (git-file-name name version)) + (patches + (search-patches + "c++-gsl-find-system-gtest.patch")) + (sha256 + (base32 "0gbvr48f03830g3154bjhw92b8ggmg6wwh5xyb8nppk9v6w752l0")))) + (build-system cmake-build-system) + (native-inputs + `(("googletest" ,googletest) + ("pkg-config" ,pkg-config))) + (synopsis "Guidelines Support Library") + (description "c++-gsl contains functions and types that are suggested for +use by the C++ Core Guidelines maintained by the Standard C++ Foundation.") + (home-page "https://github.com/microsoft/GSL/") + (license license:expat))) + (define-public libzen (package (name "libzen") diff --git a/gnu/packages/patches/c++-gsl-find-system-gtest.patch b/gnu/packages/patches/c++-gsl-find-system-gtest.patch new file mode 100644 index 0000000000..2def650292 --- /dev/null +++ b/gnu/packages/patches/c++-gsl-find-system-gtest.patch @@ -0,0 +1,96 @@ +From f5cf01083baf7e8dc8318db3648bc6098dc32d67 Mon Sep 17 00:00:00 2001 +From: Nicholas Guriev +Date: Sat, 18 Apr 2020 13:30:17 +0300 +Subject: [PATCH] Search for GoogleTest via pkg-config first + +--- + tests/CMakeLists.txt | 55 ++++++++++++++++++++++++-------------------- + 1 file changed, 30 insertions(+), 25 deletions(-) + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 02193197..53d475c2 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -1,36 +1,41 @@ + cmake_minimum_required(VERSION 3.0.2) + + project(GSLTests CXX) ++include(FindPkgConfig) + + # will make visual studio generated project group files + set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +-configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) +-execute_process( +- COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . +- RESULT_VARIABLE result +- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download +-) +-if(result) +- message(FATAL_ERROR "CMake step for googletest failed: ${result}") +-endif() ++pkg_search_module(GTestMain gtest_main) ++if (NOT GTestMain_FOUND) ++ configure_file(CMakeLists.txt.in googletest-download/CMakeLists.txt) ++ execute_process( ++ COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" . ++ RESULT_VARIABLE result ++ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ++ ) ++ if(result) ++ message(FATAL_ERROR "CMake step for googletest failed: ${result}") ++ endif() + +-execute_process( +- COMMAND ${CMAKE_COMMAND} --build . +- RESULT_VARIABLE result +- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download +-) +-if(result) +- message(FATAL_ERROR "CMake step for googletest failed: ${result}") +-endif() ++ execute_process( ++ COMMAND ${CMAKE_COMMAND} --build . ++ RESULT_VARIABLE result ++ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download ++ ) ++ if(result) ++ message(FATAL_ERROR "CMake step for googletest failed: ${result}") ++ endif() + +-set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) ++ set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) ++ set(GTestMain_LIBRARIES gtest_main) + +-add_subdirectory( +- ${CMAKE_CURRENT_BINARY_DIR}/googletest-src +- ${CMAKE_CURRENT_BINARY_DIR}/googletest-build +- EXCLUDE_FROM_ALL +-) ++ add_subdirectory( ++ ${CMAKE_CURRENT_BINARY_DIR}/googletest-src ++ ${CMAKE_CURRENT_BINARY_DIR}/googletest-build ++ EXCLUDE_FROM_ALL ++ ) ++endif() + + if (MSVC AND (GSL_CXX_STANDARD EQUAL 17)) + set(GSL_CPLUSPLUS_OPT -Zc:__cplusplus -permissive-) +@@ -149,7 +154,7 @@ function(add_gsl_test name) + target_link_libraries(${name} + GSL + gsl_tests_config +- gtest_main ++ ${GTestMain_LIBRARIES} + ) + add_test( + ${name} +@@ -254,7 +259,7 @@ function(add_gsl_test_noexcept name) + target_link_libraries(${name} + GSL + gsl_tests_config_noexcept +- gtest_main ++ ${GTestMain_LIBRARIES} + ) + add_test( + ${name} -- cgit v1.2.3 From a84399eddfd3e55eedcef0283f2fcdff80f504b7 Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Thu, 7 Jan 2021 19:41:42 -0500 Subject: gnu: Add webrtc-for-telegram-desktop. * gnu/packages/telegram.scm: New module. (webrtc-for-telegram-desktop): New variable. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. Signed-off-by: Leo Prikler --- gnu/local.mk | 1 + gnu/packages/telegram.scm | 144 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 145 insertions(+) create mode 100644 gnu/packages/telegram.scm (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 4acba0990e..e93425f394 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -535,6 +535,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/task-management.scm \ %D%/packages/tbb.scm \ %D%/packages/tcl.scm \ + %D%/packages/telegram.scm \ %D%/packages/telephony.scm \ %D%/packages/terminals.scm \ %D%/packages/terraform.scm \ diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm new file mode 100644 index 0000000000..8efa8f2a0a --- /dev/null +++ b/gnu/packages/telegram.scm @@ -0,0 +1,144 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Raghav Gururajan +;;; +;;; 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 telegram) + #:use-module (gnu packages) + #:use-module (gnu packages assembly) + #:use-module (gnu packages image) + #:use-module (gnu packages linux) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages protobuf) + #:use-module (gnu packages pulseaudio) + #:use-module (gnu packages python) + #:use-module (gnu packages tls) + #:use-module (gnu packages video) + #:use-module (gnu packages xiph) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module (guix build-system cmake)) + +(define-public webrtc-for-telegram-desktop + (let ((commit "fa86fcc00c218813d61a272a56feab55c76a1ab9") + (revision "52")) + (hidden-package + (package + (name "webrtc-for-telegram-desktop") + (version + (git-version "0" revision commit)) + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/desktop-app/tg_owt.git") + (commit commit))) + (file-name + (git-file-name name version)) + (sha256 + (base32 "06gcrlym6vqqw7zlds9lpwyg37d5m81d87h16aps19v0v9gzan0l")) + (modules '((guix build utils) + (ice-9 ftw) + (srfi srfi-1))) + (snippet + `(begin + (let ((keep + '( ;; Custom forks which are incompatible with the ones in Guix. + "abseil-cpp" "libsrtp" "openh264" "rnnoise" + ;; Not available in Guix. + "pffft" "usrsctp" + ;; Has cmake support files for libvpx input. + "libvpx"))) + (with-directory-excursion "src/third_party" + (for-each delete-file-recursively + (lset-difference string=? + (scandir ".") + (cons* "." ".." keep)))) + #t))))) + (build-system cmake-build-system) + (arguments + `(#:tests? #f ; No target + #:configure-flags + (list + "-DCMAKE_C_FLAGS=-fPIC" + "-DCMAKE_CXX_FLAGS=-fPIC") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'copy-inputs + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((libvpx-from (assoc-ref inputs "libvpx")) + (libyuv-from (assoc-ref inputs "libyuv")) + (libvpx-to (string-append (getcwd) + "/src/third_party/libvpx/source/libvpx")) + (libyuv-to (string-append (getcwd) + "/src/third_party/libyuv"))) + (copy-recursively libvpx-from libvpx-to) + (copy-recursively libyuv-from libyuv-to)) + #t))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("python" ,python-wrapper) + ("yasm" ,yasm))) + (inputs + `(("alsa" ,alsa-lib) + ("ffmpeg" ,ffmpeg) + ("libjpeg" ,libjpeg-turbo) + ("libvpx" + ,(origin + (method git-fetch) + (uri + (git-reference + (url "https://chromium.googlesource.com/webm/libvpx") + (commit "5b63f0f821e94f8072eb483014cfc33b05978bb9"))) + (file-name + (git-file-name "libvpx-for-webrtc-for-telegram-desktop" version)) + (sha256 + (base32 "1psvxaddihlw1k5n0anxif3qli6zyw2sa2ywn6mkb8six9myrp68")))) + ("libyuv" + ,(origin + (method git-fetch) + (uri + (git-reference + (url "https://chromium.googlesource.com/libyuv/libyuv") + (commit "ad890067f661dc747a975bc55ba3767fe30d4452"))) + (file-name + (git-file-name "libyuv-for-webrtc-for-telegram-desktop" version)) + (sha256 + (base32 "01knnk4h247rq536097n9n3s3brxlbby3nv3ppdgsqfda3k159ll")))) + ("openssl" ,openssl) + ("opus" ,opus) + ("protobuf" ,protobuf) + ("pulseaudio" ,pulseaudio))) + (synopsis "WebRTC support for Telegram Desktop") + (description "WebRTC-for-Telegram-Desktop is a custom WebRTC fork by +Telegram project, for its use in telegram desktop client.") + (home-page "https://github.com/desktop-app/tg_owt") + (license + (list + ;; Abseil-CPP + license:asl2.0 + ;; LibYuv + (license:non-copyleft "file:///src/third_party/libyuv/LICENSE") + ;; OpenH264 + license:bsd-2 + ;; PFFFT + (license:non-copyleft "file:///src/third_party/pffft/LICENSE") + ;; RnNoise + license:gpl3 + ;; LibSRTP, LibVPx, UsrSCTP and Others + license:bsd-3)))))) -- cgit v1.2.3 From 5be01dcdc1c8fa89fd120919258b574c844c13cb Mon Sep 17 00:00:00 2001 From: Alexey Abramov Date: Fri, 15 Jan 2021 17:26:37 +0100 Subject: gnu: obs: Use an environment variable for plugins location. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/video.scm (obs): Use it. * gnu/packages/patches/obs-modules-location.patch: Patch it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/patches/obs-modules-location.patch | 33 +++++++++++++++++++++++++ gnu/packages/video.scm | 14 ++++++++++- 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/obs-modules-location.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index d53ed440f9..49a5925280 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1411,6 +1411,7 @@ dist_patch_DATA = \ %D%/packages/patches/nvi-dbpagesize-binpower.patch \ %D%/packages/patches/nvi-db4.patch \ %D%/packages/patches/nyacc-binary-literals.patch \ + %D%/packages/patches/obs-modules-location.patch \ %D%/packages/patches/ocaml-bitstring-fix-configure.patch \ %D%/packages/patches/ocaml-cairo2-caml_ba_array-fix.patch \ %D%/packages/patches/ocaml-CVE-2015-8869.patch \ diff --git a/gnu/packages/patches/obs-modules-location.patch b/gnu/packages/patches/obs-modules-location.patch new file mode 100644 index 0000000000..18b286d006 --- /dev/null +++ b/gnu/packages/patches/obs-modules-location.patch @@ -0,0 +1,33 @@ +From d250434e6c8eb4f8c8cb47ef3cc6e6de8fa8f828 Mon Sep 17 00:00:00 2001 +From: Alexey Abramov +Date: Fri, 15 Jan 2021 17:07:17 +0100 +Subject: [PATCH] Use environment variable for a default module location + +diff --git a/libobs/obs-nix.c b/libobs/obs-nix.c +index 382fa0546..481ea0f14 100644 +*** a/libobs/obs-nix.c +--- b/libobs/obs-nix.c +@@ -66,8 +66,19 @@ + + void add_default_module_paths(void) + { +- for (int i = 0; i < module_patterns_size; i++) +- obs_add_module_path(module_bin[i], module_data[i]); ++ char *bin_directory = getenv("OBS_PLUGINS_DIRECTORY"); ++ char *data_directory = getenv("OBS_PLUGINS_DATA_DIRECTORY"); ++ if (bin_directory && data_directory) { ++ struct dstr dstr_data_directory; ++ dstr_init_copy(&dstr_data_directory, data_directory); ++ dstr_cat(&dstr_data_directory, "/%module%"); ++ obs_add_module_path(bin_directory, dstr_data_directory.array); ++ dstr_free(&dstr_data_directory); ++ ++ } else { ++ for (int i = 0; i < module_patterns_size; i++) ++ obs_add_module_path(module_bin[i], module_data[i]); ++ } + } + + /* +-- +2.29.2 \ No newline at end of file diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index cd049fb375..ef80cb4cc2 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -47,6 +47,7 @@ ;;; Copyright © 2020 Alexandru-Sergiu Marton ;;; Copyright © 2020 Ivan Kozlov ;;; Copyright © 2020 Antoine Côté +;;; Copyright © 2021 Alexey Abramov ;;; ;;; This file is part of GNU Guix. ;;; @@ -3083,7 +3084,9 @@ be used for realtime video capture via Linux-specific APIs.") (file-name (git-file-name name version)) (sha256 (base32 - "1k1asqiqw757v59ayx0w029ril947hs0lcp8n91knzjl891fr4nc")))) + "1k1asqiqw757v59ayx0w029ril947hs0lcp8n91knzjl891fr4nc")) + (patches + (search-patches "obs-modules-location.patch")))) (build-system cmake-build-system) (arguments `(#:configure-flags @@ -3098,6 +3101,15 @@ be used for realtime video capture via Linux-specific APIs.") (wrap-program (string-append out "/bin/obs") `("QT_PLUGIN_PATH" ":" prefix (,plugin-path)))) #t))))) + (native-search-paths + (list (search-path-specification + (variable "OBS_PLUGINS_DIRECTORY") + (separator #f) ;single entry + (files '("lib/obs-plugins"))) + (search-path-specification + (variable "OBS_PLUGINS_DATA_DIRECTORY") + (separator #f) ;single entry + (files '("share/obs/obs-plugins"))))) (native-inputs `(("cmocka" ,cmocka) ("pkg-config" ,pkg-config))) -- cgit v1.2.3 From 5058090ed4b6f4a9d09d74d9516295afff75ece5 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 2 Feb 2021 21:55:25 +0100 Subject: gnu: Add python-mediafile. * gnu/packages/music.scm (python-mediafile): New variable. * gnu/packages/patches/python-mediafile-wavpack.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 3 +- gnu/packages/music.scm | 26 ++++++++++ .../patches/python-mediafile-wavpack.patch | 57 ++++++++++++++++++++++ 3 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-mediafile-wavpack.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 49a5925280..b9b4b664e4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -7,7 +7,7 @@ # Copyright © 2016, 2017, 2018 Kei Kebreau # Copyright © 2016, 2017 Rene Saavedra # Copyright © 2016 Adonay "adfeno" Felipe Nogueira -# Copyright © 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus +# Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus # Copyright © 2016 Ben Woodcroft # Copyright © 2016, 2017, 2018, 2019 Alex Vong # Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner @@ -1543,6 +1543,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-pyfakefs-remove-bad-test.patch \ %D%/packages/patches/python-flint-includes.patch \ %D%/packages/patches/python-libxml2-utf8.patch \ + %D%/packages/patches/python-mediafile-wavpack.patch \ %D%/packages/patches/python-memcached-syntax-warnings.patch \ %D%/packages/patches/python-mox3-python3.6-compat.patch \ %D%/packages/patches/python-testtools.patch \ diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index f8b93ae41a..4c1681f2a4 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -3225,6 +3225,32 @@ streams on an individual packet/page level.") (define-public python2-mutagen (package-with-python2 python-mutagen)) +(define-public python-mediafile + (package + (name "python-mediafile") + (version "0.6.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "mediafile" version)) + (patches (search-patches "python-mediafile-wavpack.patch")) + (sha256 + (base32 + "0jmsp3f57xj35ayp8b6didk85nxgl3viw34s5px3l5dwgc055yx3")))) + (build-system python-build-system) + (propagated-inputs + `(("python-mutagen" ,python-mutagen) + ("python-six" ,python-six) + ("python-tox" ,python-tox))) + (home-page "https://github.com/beetbox/mediafile") + (synopsis "Read and write audio file tags") + (description + "MediaFile is a simple interface to the metadata tags for many audio file +formats. It wraps Mutagen, a high-quality library for low-level tag +manipulation, with a high-level, format-independent interface for a common set +of tags.") + (license license:expat))) + (define-public python-musicbrainzngs (package (name "python-musicbrainzngs") diff --git a/gnu/packages/patches/python-mediafile-wavpack.patch b/gnu/packages/patches/python-mediafile-wavpack.patch new file mode 100644 index 0000000000..9839fe87b5 --- /dev/null +++ b/gnu/packages/patches/python-mediafile-wavpack.patch @@ -0,0 +1,57 @@ +This patch has already been applied upstream, but is not included in the +current release 0.6.0. + +From d2fc3b59f77c515b02dfe7ad936f89264375d2b4 Mon Sep 17 00:00:00 2001 +From: Adrian Sampson +Date: Wed, 29 Jul 2020 19:42:57 -0400 +Subject: [PATCH] Fix test for WavPack bitrate + +Fixes #34. +--- + docs/index.rst | 5 +++++ + mediafile.py | 2 +- + test/test_mediafile.py | 2 +- + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/docs/index.rst b/docs/index.rst +index 7b622df..1465405 100644 +--- a/docs/index.rst ++++ b/docs/index.rst +@@ -100,6 +100,11 @@ Internals + Changelog + --------- + ++v0.7.0 ++'''''' ++ ++- Mutagen 1.45.0 or later is now required. ++ + v0.6.0 + '''''' + +diff --git a/mediafile.py b/mediafile.py +index 23fadaf..9e9d063 100644 +--- a/mediafile.py ++++ b/mediafile.py +@@ -56,7 +56,7 @@ + import six + + +-__version__ = '0.6.0' ++__version__ = '0.7.0' + __all__ = ['UnreadableFileError', 'FileTypeError', 'MediaFile'] + + log = logging.getLogger(__name__) +diff --git a/test/test_mediafile.py b/test/test_mediafile.py +index e9e1850..7f17f44 100644 +--- a/test/test_mediafile.py ++++ b/test/test_mediafile.py +@@ -907,7 +907,7 @@ class WavpackTest(ReadWriteTestBase, unittest.TestCase): + 'bitrate': 109312, + 'format': u'WavPack', + 'samplerate': 44100, +- 'bitdepth': 0, ++ 'bitdepth': 16, + 'channels': 1, + } + -- cgit v1.2.3