diff options
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | doc/guix.texi | 9 | ||||
-rw-r--r-- | gnu/packages/admin.scm | 2 | ||||
-rw-r--r-- | gnu/packages/adns.scm | 4 | ||||
-rw-r--r-- | gnu/packages/autotools.scm | 4 | ||||
-rw-r--r-- | gnu/packages/base.scm | 6 | ||||
-rw-r--r-- | gnu/packages/commencement.scm | 23 | ||||
-rw-r--r-- | gnu/packages/compression.scm | 12 | ||||
-rw-r--r-- | gnu/packages/dejagnu.scm | 29 | ||||
-rw-r--r-- | gnu/packages/glib.scm | 10 | ||||
-rw-r--r-- | gnu/packages/gnuzilla.scm | 15 | ||||
-rw-r--r-- | gnu/packages/gtk.scm | 15 | ||||
-rw-r--r-- | gnu/packages/libidn.scm | 10 | ||||
-rw-r--r-- | gnu/packages/networking.scm | 2 | ||||
-rw-r--r-- | gnu/packages/nss.scm | 14 | ||||
-rw-r--r-- | gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch | 54 | ||||
-rw-r--r-- | gnu/packages/patches/gobject-introspection-cc.patch | 18 | ||||
-rw-r--r-- | gnu/packages/pdf.scm | 74 | ||||
-rw-r--r-- | gnu/packages/sdl.scm | 42 | ||||
-rw-r--r-- | gnu/packages/web-browsers.scm | 13 | ||||
-rw-r--r-- | gnu/packages/xorg.scm | 5 | ||||
-rw-r--r-- | guix/build-system/mozilla.scm | 52 | ||||
-rw-r--r-- | guix/build/minetest-build-system.scm | 9 | ||||
-rw-r--r-- | guix/build/qt-utils.scm | 10 | ||||
-rw-r--r-- | guix/build/utils.scm | 11 | ||||
-rw-r--r-- | guix/lint.scm | 1 |
26 files changed, 266 insertions, 179 deletions
diff --git a/Makefile.am b/Makefile.am index a10aeb817b..0c4ee3f01e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -144,6 +144,7 @@ MODULES = \ guix/build-system/font.scm \ guix/build-system/go.scm \ guix/build-system/meson.scm \ + guix/build-system/mozilla.scm \ guix/build-system/minify.scm \ guix/build-system/minetest.scm \ guix/build-system/asdf.scm \ diff --git a/doc/guix.texi b/doc/guix.texi index 62e994ceb1..8ab86b1181 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -8511,6 +8511,15 @@ directory, the parameter @code{#:javascript-files} can be used to specify a list of file names to feed to the minifier. @end defvr +@defvr {Scheme Variable} mozilla-build-system +This variable is exported by @code{(guix build-system mozilla)}. It +sets the @code{--target} and @code{--host} configuration flags to what +software developed by Mozilla expects -- due to historical reasons, +Mozilla software expects @code{--host} to be the system that is +cross-compiled from and @code{--target} to be the system that is +cross-compiled to, contrary to the standard Autotools conventions. +@end defvr + @defvr {Scheme Variable} ocaml-build-system This variable is exported by @code{(guix build-system ocaml)}. It implements a build procedure for @uref{https://ocaml.org, OCaml} packages, which consists diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index ed66e358ea..f247cdf41a 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -1285,7 +1285,7 @@ connection alive.") (list perl file)) (inputs `(("inetutils" ,inetutils) - ("bash" ,(canonical-package bash-minimal)) ;for wrap-program + ("bash" ,bash-minimal) ,@(if (hurd-target?) '() `(("net-tools" ,net-tools) ("iproute" ,iproute))) diff --git a/gnu/packages/adns.scm b/gnu/packages/adns.scm index 5703016549..432f7367b7 100644 --- a/gnu/packages/adns.scm +++ b/gnu/packages/adns.scm @@ -76,9 +76,7 @@ scripts.") "0gcincjvpll2qmlc906jx6mfq97s87mgi0zby0753ki0rr2ch0s8")))) (build-system gnu-build-system) (arguments - '(;; FIXME: Some tests require network access - #:tests? #f - #:phases + '(#:phases (modify-phases %standard-phases (add-before 'check 'filter-live-tests (lambda _ diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm index 1eea731233..0c3152d7f8 100644 --- a/gnu/packages/autotools.scm +++ b/gnu/packages/autotools.scm @@ -324,14 +324,14 @@ output is indexed in many ways to simplify browsing.") (define-public automake (package (name "automake") - (version "1.16.3") + (version "1.16.4") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/automake/automake-" version ".tar.xz")) (sha256 (base32 - "0fmz2fhmzcpacnprl5msphvaflwiy0hvpgmqlgfny72ddijzfazz")) + "0v8kbw4fan7apbjwziylyjl5z708w452r5q6kpafcmssi04wryl0")) (patches (search-patches "automake-skip-amhello-tests.patch")))) (build-system gnu-build-system) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 0e49b6044c..580b198311 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <[email protected]> ;;; Copyright © 2014 Alex Kost <[email protected]> ;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis <[email protected]> -;;; Copyright © 2016, 2017, 2019, 2020, 2021 Efraim Flashner <[email protected]> +;;; Copyright © 2016, 2017, 2019, 2020, 2021, 2022 Efraim Flashner <[email protected]> ;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen <[email protected]> ;;; Copyright © 2016, 2018 Alex Vong <[email protected]> ;;; Copyright © 2017 Rene Saavedra <[email protected]> @@ -104,14 +104,14 @@ command-line arguments, multiple languages, and so on.") (define-public grep (package (name "grep") - (version "3.6") + (version "3.7") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/grep/grep-" version ".tar.xz")) (sha256 (base32 - "0gipv6bzkm1aihj0ncqpyh164xrzgcxcv9r1kwzyk2g1mzl1azk6")) + "0g42svbc1nq5bamxfj6x7320wli4dlj86padk0hwgbk04hqxl42w")) (patches (search-patches "grep-timing-sensitive-test.patch")))) (build-system gnu-build-system) (native-inputs (list perl)) ;some of the tests require it diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 26769d2626..42df348f29 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2014 Andreas Enge <[email protected]> ;;; Copyright © 2012 Nikita Karetnikov <[email protected]> ;;; Copyright © 2014, 2015, 2017 Mark H Weaver <[email protected]> -;;; Copyright © 2017, 2018, 2019, 2021 Efraim Flashner <[email protected]> +;;; Copyright © 2017, 2018, 2019, 2021, 2022 Efraim Flashner <[email protected]> ;;; Copyright © 2018 Tobias Geerinckx-Rice <[email protected]> ;;; Copyright © 2018, 2019, 2020 Jan (janneke) Nieuwenhuizen <[email protected]> ;;; Copyright © 2019, 2020, 2021 Marius Bakke <[email protected]> @@ -3146,8 +3146,7 @@ memoized as a function of '%current-system'." `(,@(%boot0-inputs) ("expat" ,expat-sans-tests))) ;remove OpenSSL, zlib, etc. (native-inputs ;and pkg-config - `(("sitecustomize.py" ,(local-file (search-auxiliary-file - "python/sitecustomize.py"))))) + `()) (arguments `(#:implicit-inputs? #f #:guile ,%bootstrap-guile @@ -3173,6 +3172,13 @@ memoized as a function of '%current-system'." ;; Prevent the 'ossaudiodev' extension from being ;; built, since it requires Linux headers. (("'linux', ") "")))) + (add-after 'install 'remove-tests + (lambda* (#:key outputs #:allow-other-keys) + (delete-file-recursively + (string-append (assoc-ref outputs "out") + "/lib/python" + ,(version-major+minor version) + "/test")))) ,@(if (hurd-system?) `((add-before 'build 'fix-regen (lambda* (#:key inputs #:allow-other-keys) @@ -3180,11 +3186,14 @@ memoized as a function of '%current-system'." (substitute* "Lib/plat-generic/regen" (("/usr/include/") (string-append libc "/include/"))))))) - '()) - (add-after 'install 'install-sitecustomize.py - ,(customize-site version))))) + '())))) (native-search-paths - (list (guix-pythonpath-search-path version))))) + (list (search-path-specification + (variable "PYTHONPATH") + (files (list (string-append + "lib/python" + (version-major+minor version) + "/site-packages")))))))) (define/system-dependent ld-wrapper-boot0 ;; The first 'ld' wrapper, defined with 'define/system-dependent' because diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 8185a6157e..6b91b51504 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021, 2022 Ricardo Wurmus <[email protected]> ;;; Copyright © 2015, 2017, 2018 Leo Famulari <[email protected]> ;;; Copyright © 2015 Jeff Mickey <[email protected]> -;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <[email protected]> +;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner <[email protected]> ;;; Copyright © 2016 Ben Woodcroft <[email protected]> ;;; Copyright © 2016 Danny Milosavljevic <[email protected]> ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <[email protected]> @@ -232,14 +232,14 @@ adding and extracting files to/from a tar archive.") (define-public gzip (package (name "gzip") - (version "1.10") + (version "1.11") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/gzip/gzip-" version ".tar.xz")) (sha256 (base32 - "1h6p374d3j8d4cdfydzls021xa2yby8myc0h8d6m8bc7k6ncq9c4")))) + "01vrly90rvc98af6rcmrb3gwv1l6pylasvsdka23dffwizb9b6lv")))) (build-system gnu-build-system) (synopsis "General file (de)compression (using lzw)") (arguments @@ -260,15 +260,13 @@ adding and extracting files to/from a tar archive.") (string-append "#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN\n" "# define _IO_IN_BACKUP 0x100\n" "#endif\n\n" - "/* BSD stdio derived implementations"))) - #t)) + "/* BSD stdio derived implementations"))))) (add-after 'unpack 'use-absolute-name-of-gzip (lambda* (#:key outputs #:allow-other-keys) (substitute* "gunzip.in" (("exec gzip") (string-append "exec " (assoc-ref outputs "out") - "/bin/gzip"))) - #t))))) + "/bin/gzip")))))))) (description "GNU Gzip provides data compression and decompression utilities; the typical extension is \".gz\". Unlike the \"zip\" format, it compresses a single diff --git a/gnu/packages/dejagnu.scm b/gnu/packages/dejagnu.scm index 08be5a8afd..b51a2f22ad 100644 --- a/gnu/packages/dejagnu.scm +++ b/gnu/packages/dejagnu.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013 Ludovic Courtès <[email protected]> -;;; Copyright © 2016, 2017 Efraim Flashner <[email protected]> +;;; Copyright © 2016, 2017, 2022 Efraim Flashner <[email protected]> ;;; Copyright © 2018 Mark H Weaver <[email protected]> ;;; ;;; This file is part of GNU Guix. @@ -43,25 +43,25 @@ '(#:phases (modify-phases %standard-phases (replace 'check - (lambda _ + (lambda* (#:key tests? #:allow-other-keys) ;; Note: The test-suite *requires* /dev/pts among the ;; `build-chroot-dirs' of the build daemon when ;; building in a chroot. See ;; <http://thread.gmane.org/gmane.linux.distributions.nixos/1036> ;; for details. - (if (and (directory-exists? "/dev/pts") - (directory-exists? "/proc")) + (when tests? + (if (and (directory-exists? "/dev/pts") + (directory-exists? "/proc")) (begin - ;; Provide `runtest' with a log name, otherwise it - ;; tries to run `whoami', which fails when in a chroot. - (setenv "LOGNAME" "guix-builder") + ;; Provide `runtest' with a log name, otherwise it + ;; tries to run `whoami', which fails when in a chroot. + (setenv "LOGNAME" "guix-builder") - ;; The test-suite needs to have a non-empty stdin: - ;; <http://lists.gnu.org/archive/html/bug-dejagnu/2003-06/msg00002.html>. - (unless (zero? (system "make check < /dev/zero")) - (error "make check failed"))) - (display "test suite cannot be run, skipping\n")) - #t)) + ;; The test-suite needs to have a non-empty stdin: + ;; <http://lists.gnu.org/archive/html/bug-dejagnu/2003-06/msg00002.html>. + (unless (zero? (system "make check < /dev/zero")) + (error "make check failed"))) + (display "test suite cannot be run, skipping\n"))))) (add-after 'install 'post-install (lambda* (#:key inputs outputs #:allow-other-keys) ;; Use the right `expect' binary. @@ -71,8 +71,7 @@ (("^mypath.*$" all) (string-append all "export PATH=" - expect "/bin:$PATH\n"))) - #t)))))) + expect "/bin:$PATH\n"))))))))) (home-page "https://www.gnu.org/software/dejagnu/") (synopsis "GNU software testing framework") diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 7e6acc0984..7bb0fdc9f4 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -427,14 +427,14 @@ be used when cross-compiling." (define gobject-introspection (package (name "gobject-introspection") - (version "1.66.1") + (version "1.68.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" "gobject-introspection/" (version-major+minor version) "/gobject-introspection-" version ".tar.xz")) (sha256 - (base32 "078n0q7b6z682mf4irclrksm73cyixq295mqnqifl9plwmgaai6x")) + (base32 "09sawnv3xj9pzgy2qrrk87dl3jibfphnswb61i5bh0d2h4j28afj")) (patches (search-patches "gobject-introspection-cc.patch" "gobject-introspection-girepository.patch" @@ -483,11 +483,7 @@ be used when cross-compiling." ("bison" ,bison) ("flex" ,flex))) (inputs - `(,@(if (%current-target-system) - `(("python" ,python)) - `(("bison" ,bison) - ("flex" ,flex) - ("python" ,python-wrapper))) + `(("python" ,python) ("zlib" ,zlib))) (propagated-inputs (list glib diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index a9b5ed9fe9..e6505e7a95 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -51,6 +51,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system cargo) #:use-module (guix build-system trivial) + #:use-module (guix build-system mozilla) #:use-module (gnu packages admin) #:use-module (gnu packages audio) #:use-module (gnu packages autotools) @@ -113,7 +114,7 @@ (substitute* '("js/src/config/milestone.pl") (("defined\\(@TEMPLATE_FILE)") "@TEMPLATE_FILE")) #t)))) - (build-system gnu-build-system) + (build-system mozilla-build-system) (native-inputs `(("perl" ,perl) ("pkg-config" ,pkg-config) @@ -387,15 +388,7 @@ in C/C++.") ;; This is important because without it gjs will segfault during the ;; configure phase. With jemalloc only the standalone mozjs console ;; will work. - "--disable-jemalloc" - ;; Mozilla deviates from Autotools conventions due to historical - ;; reasons. - #$@(if (%current-target-system) - #~(#$(string-append - "--host=" - (nix-system->gnu-triplet (%current-system))) - #$(string-append "--target=" (%current-target-system))) - #~()))) + "--disable-jemalloc")) #:phases (modify-phases %standard-phases ;; Make sure pkg-config will be found. @@ -891,7 +884,7 @@ in C/C++.") (name "icecat") (version %icecat-version) (source icecat-source) - (build-system gnu-build-system) + (build-system mozilla-build-system) (inputs `(("alsa-lib" ,alsa-lib) ("bzip2" ,bzip2) diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scm index ced9d621aa..ae84e769e6 100644 --- a/gnu/packages/gtk.scm +++ b/gnu/packages/gtk.scm @@ -188,7 +188,7 @@ tools have full access to view and control running applications.") ("pkg-config" ,pkg-config) ("python" ,python-wrapper))) (inputs - `(("bash-minimal" ,bash-minimal) + `(("bash-minimal" ,bash-minimal) ;for glib-or-gtk-wrap ("drm" ,libdrm) ("ghostscript" ,ghostscript) ("libspectre" ,libspectre) @@ -638,9 +638,8 @@ highlighting and other features typical of a source code editor.") (with-directory-excursion "docs" (substitute* "meson.build" (("http://docbook.sourceforge.net/release/xsl/current/") - (string-append (assoc-ref ,(if (%current-target-system) - '(or native-inputs inputs) - 'inputs) "docbook-xsl") + (string-append (assoc-ref (or native-inputs inputs) + "docbook-xsl") "/xml/xsl/docbook-xsl-1.79.2/"))) (substitute* (find-files "." "\\.xml$") (("http://www.oasis-open.org/docbook/xml/4\\.3/") @@ -654,11 +653,11 @@ highlighting and other features typical of a source code editor.") (("\\[ 'pixbuf-fail', \\['conform', 'slow'\\], \\],") "")))) ;; The slow tests take longer than the specified timeout. - ,@(if (any (cute string=? <> (%current-system)) - '("armhf-linux" "aarch64-linux")) + ,@(if (target-arm? (%current-system)) '((replace 'check - (lambda _ - (invoke "meson" "test" "--timeout-multiplier" "5")))) + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "meson" "test" "--timeout-multiplier" "5"))))) '())))) (propagated-inputs (list ;; Required by gdk-pixbuf-2.0.pc diff --git a/gnu/packages/libidn.scm b/gnu/packages/libidn.scm index 7c8b77f6fb..e21cbb0e69 100644 --- a/gnu/packages/libidn.scm +++ b/gnu/packages/libidn.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012 Andreas Enge <[email protected]> -;;; Copyright © 2016, 2017, 2021 Efraim Flashner <[email protected]> +;;; Copyright © 2016, 2017, 2021, 2022 Efraim Flashner <[email protected]> ;;; Copyright © 2017 Marius Bakke <[email protected]> ;;; Copyright © 2017 Mark H Weaver <[email protected]> ;;; Copyright © 2017 Eric Bavier <[email protected]> @@ -34,14 +34,14 @@ (define-public libidn (package (name "libidn") - (version "1.37") + (version "1.38") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/libidn/libidn-" version ".tar.gz")) (sha256 (base32 - "1hljls9rkilh04dwiwg388wk8djkac8idijrdysqq2nqbh6rg3iw")))) + "1xphpfw58il0vb14nvd0rgfkacj76rchv8nr9nqkpkapyx0bh06y")))) (build-system gnu-build-system) ;; FIXME: No Java and C# libraries are currently built. (arguments @@ -60,14 +60,14 @@ Java libraries.") (define-public libidn2 (package (name "libidn2") - (version "2.3.1") + (version "2.3.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/libidn/" name "-" version ".tar.gz")) (sha256 (base32 - "0b8gsksj2g9f4iywwdma3v4jcg7i9rqvdxfmclwvbf1n72a89xla")))) + "14agfrv7lhwba9l20966kmp96ppzbyr9bld9g4shks3qwza0r53n")))) (inputs (list libunistring)) (build-system gnu-build-system) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 69e27f3113..760b23f977 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -2282,7 +2282,7 @@ sockets in Perl.") (inputs (list dbus zlib)) (arguments - `(#:phases + '(#:phases (modify-phases %standard-phases (replace 'check (lambda* (#:key tests? #:allow-other-keys) diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm index aae8886095..92f23bf166 100644 --- a/gnu/packages/nss.scm +++ b/gnu/packages/nss.scm @@ -29,6 +29,7 @@ #:use-module (guix gexp) #:use-module (guix download) #:use-module (guix build-system gnu) + #:use-module (guix build-system mozilla) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages) #:use-module (gnu packages bash) @@ -49,7 +50,7 @@ (sha256 (base32 "1j5b2m8cjlhnnv8sq34587avaagkqvh521w4f95miwgvsn3xlaap")))) - (build-system gnu-build-system) + (build-system mozilla-build-system) (inputs ;; For 'compile-et.pl' and 'nspr-config'. (list perl ;for 'compile-et.pl' @@ -69,16 +70,7 @@ (list "--disable-static" "--enable-64bit" (string-append "LDFLAGS=-Wl,-rpath=" - (assoc-ref %outputs "out") "/lib") - ;; Mozilla deviates from Autotools conventions - ;; due to historical reasons. Adjust to Mozilla conventions, - ;; otherwise the Makefile will try to use TARGET-gcc - ;; as a ‘native’ compiler. - ,@(if (%current-target-system) - `(,(string-append "--host=" - (nix-system->gnu-triplet (%current-system))) - ,(string-append "--target=" (%current-target-system))) - '())) + (assoc-ref %outputs "out") "/lib")) ;; Use fixed timestamps for reproducibility. #:make-flags '("SH_DATE='1970-01-01 00:00:01'" ;; This is epoch 1 in microseconds. diff --git a/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch b/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch index 956fa617c3..c23b054a39 100644 --- a/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch +++ b/gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch @@ -1,11 +1,20 @@ -# Names of libraries included in typelib files are opened by dlopen. Here we -# add the full path. -# -# This patch was provided by Luca Bruno <[email protected]> for -# 'gobject-introspection' 1.40.0 in Nix. -# -# It has since been updated to work with newer versions of -# gobject-introspection. +Names of libraries included in typelib files are opened by dlopen. +Here we add the full path. + +This patch was provided by Luca Bruno <[email protected]>, +for 'gobject-introspection' 1.40.0 in Nix. + +It has since been updated to work with newer versions of +gobject-introspection. +--- + giscanner/scannermain.py | 37 ++++++++++++++++++++++++++++++++++++ + giscanner/shlibs.py | 30 ++++++++++++++++++++--------- + giscanner/utils.py | 15 +++++---------- + tests/scanner/test_shlibs.py | 3 ++- + 4 files changed, 65 insertions(+), 20 deletions(-) + +diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py +index 957ba0b7..78f9b11b 100644 --- a/giscanner/scannermain.py +++ b/giscanner/scannermain.py @@ -95,6 +95,39 @@ def get_windows_option_group(parser): @@ -48,7 +57,7 @@ def _get_option_parser(): parser = optparse.OptionParser('%prog [options] sources', version='%prog ' + giscanner.__version__) -@@ -205,6 +238,10 @@ match the namespace prefix.""") +@@ -214,6 +247,10 @@ match the namespace prefix.""") parser.add_option("", "--filelist", action="store", dest="filelist", default=[], help="file containing headers and sources to be scanned") @@ -59,6 +68,8 @@ group = get_preprocessor_option_group(parser) parser.add_option_group(group) +diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py +index 9f8ab5df..8aa37c99 100644 --- a/giscanner/shlibs.py +++ b/giscanner/shlibs.py @@ -57,6 +57,14 @@ def _ldd_library_pattern(library_name): @@ -76,7 +87,7 @@ # This is a what we do for non-la files. We assume that we are on an # ELF-like system where ldd exists and the soname extracted with ldd is # a filename that can be opened with dlopen(). -@@ -106,7 +112,8 @@ def _resolve_non_libtool(options, binary, libraries): +@@ -108,7 +116,8 @@ def _resolve_non_libtool(options, binary, libraries): output = output.decode("utf-8", "replace") shlibs = resolve_from_ldd_output(libraries, output) @@ -86,7 +97,7 @@ def sanitize_shlib_path(lib): -@@ -115,19 +122,18 @@ def sanitize_shlib_path(lib): +@@ -117,19 +126,18 @@ def sanitize_shlib_path(lib): # In case we get relative paths on macOS (like @rpath) then we fall # back to the basename as well: # https://gitlab.gnome.org/GNOME/gobject-introspection/issues/222 @@ -111,7 +122,7 @@ if len(patterns) == 0: return [] -@@ -139,8 +145,12 @@ def resolve_from_ldd_output(libraries, output): +@@ -141,8 +149,12 @@ def resolve_from_ldd_output(libraries, output): if line.endswith(':'): continue for word in line.split(): @@ -126,10 +137,11 @@ if m: del patterns[library] shlibs.append(m.group()) - +diff --git a/giscanner/utils.py b/giscanner/utils.py +index 45807f17..8a319cd1 100644 --- a/giscanner/utils.py +++ b/giscanner/utils.py -@@ -111,17 +111,11 @@ def extract_libtool_shlib(la_file): +@@ -113,16 +113,11 @@ def extract_libtool_shlib(la_file): if dlname is None: return None @@ -141,8 +153,7 @@ - if libdir is None: - return dlbasename - return libdir + '/' + dlbasename -- # From the comments in extract_libtool(), older libtools had -- # a path rather than the raw dlname +- # Older libtools had a path rather than the raw dlname - return os.path.basename(dlname) + dlbasename = os.path.basename(dlname) + libdir = _extract_libdir_field(la_file) @@ -151,10 +162,12 @@ + return libdir + '/' + dlbasename - def extract_libtool(la_file): + # Returns arguments for invoking libtool, if applicable, otherwise None +diff --git a/tests/scanner/test_shlibs.py b/tests/scanner/test_shlibs.py +index a8337c60..7f123103 100644 --- a/tests/scanner/test_shlibs.py +++ b/tests/scanner/test_shlibs.py -@@ -40,6 +64,7 @@ class TestLddParser(unittest.TestCase): +@@ -40,7 +40,8 @@ class TestLddParser(unittest.TestCase): self.assertEqual( sanitize_shlib_path('/foo/bar'), @@ -163,4 +176,7 @@ + '/foo/bar') def test_unresolved_library(self): -output = '' + output = '' +-- +2.33.0 + diff --git a/gnu/packages/patches/gobject-introspection-cc.patch b/gnu/packages/patches/gobject-introspection-cc.patch index 6a86b56b44..748a1a0a89 100644 --- a/gnu/packages/patches/gobject-introspection-cc.patch +++ b/gnu/packages/patches/gobject-introspection-cc.patch @@ -1,14 +1,22 @@ Use gcc as the default C compiler if CC is not set. -diff -ru gobject-introspection-1.58.1.orig/giscanner/__init__.py gobject-introspection-1.58.1/giscanner/__init__.py ---- gobject-introspection-1.58.1.orig/giscanner/__init__.py 1970-01-01 01:00:00.000000000 +0100 -+++ gobject-introspection-1.58.1/giscanner/__init__.py 2018-12-03 13:33:28.788971299 +0100 -@@ -22,6 +22,8 @@ +--- + giscanner/__init__.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/giscanner/__init__.py b/giscanner/__init__.py +index 7c2f365a..607fe341 100644 +--- a/giscanner/__init__.py ++++ b/giscanner/__init__.py +@@ -21,6 +21,8 @@ import os builddir = os.environ.get('UNINSTALLED_INTROSPECTION_BUILDDIR') if builddir is not None: - __path__.append(os.path.join(builddir, 'giscanner')) + __path__.append(os.path.join(builddir, 'giscanner')) # type: ignore # mypy issue #1422 +if not 'CC' in os.environ: + os.environ['CC'] = 'gcc' try: from ._version import __version__ except ImportError: +-- +2.33.0 + diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index d4e97e1d82..c79d941b20 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -17,7 +17,7 @@ ;;; Copyright © 2019 Alex Griffin <[email protected]> ;;; Copyright © 2019 Ben Sturmfels <[email protected]> ;;; Copyright © 2019,2020 Hartmut Goebel <[email protected]> -;;; Copyright © 2020, 2021 Nicolas Goaziou <[email protected]> +;;; Copyright © 2020-2022 Nicolas Goaziou <[email protected]> ;;; Copyright © 2020 Michael Rohleder <[email protected]> ;;; Copyright © 2020 Timotej Lazar <[email protected]> ;;; Copyright © 2020 Maxim Cournoyer <[email protected]> @@ -42,6 +42,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix build-system gnu) @@ -776,46 +777,47 @@ line tools for batch rendering @command{pdfdraw}, rewriting files (define-public qpdf (package - (name "qpdf") - (version "10.0.1") - (source (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/qpdf/qpdf/" version - "/qpdf-" version ".tar.gz")) - (sha256 - (base32 - "0yw2cpw7ygfd6jlgpwbi8vsnvv9p55zxp9h17x77z2qq733pf8jx")))) - (build-system gnu-build-system) - (arguments - `(#:disallowed-references (,perl) + (name "qpdf") + (version "10.5.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/qpdf/qpdf/" version + "/qpdf-" version ".tar.gz")) + (sha256 + (base32 + "01p07hh74j1ajb2dhjdfhqbc3bwwvlj86j3r505wbmaglhv7s9c8")))) + (build-system gnu-build-system) + (arguments + (list + #:disallowed-references (list perl) #:phases - (modify-phases %standard-phases - (add-before 'configure 'patch-paths - (lambda _ - (substitute* "make/libtool.mk" - (("SHELL=/bin/bash") - (string-append "SHELL=" (which "bash")))) - (substitute* (append - '("qtest/bin/qtest-driver") - (find-files "." "\\.test")) - (("/usr/bin/env") (which "env"))) - #t))))) - (native-inputs - (list pkg-config perl)) - (propagated-inputs - ;; In Requires.private of libqpdf.pc. - (list libjpeg-turbo zlib)) - (synopsis "Command-line tools and library for transforming PDF files") - (description - "QPDF is a command-line program that does structural, content-preserving + #~(modify-phases %standard-phases + (add-before 'configure 'patch-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "make/libtool.mk" + (("SHELL=/bin/bash") + (string-append "SHELL=" + (search-input-file inputs "/bin/bash")))) + (substitute* + (append '("qtest/bin/qtest-driver") + (find-files "." "\\.test")) + (("/usr/bin/env") (which "env")))))))) + (native-inputs + (list perl pkg-config)) + (propagated-inputs + ;; In Requires.private of libqpdf.pc. + (list libjpeg-turbo zlib)) + (synopsis "Command-line tools and library for transforming PDF files") + (description + "QPDF is a command-line program that does structural, content-preserving transformations on PDF files. It could have been called something like pdf-to-pdf. It includes support for merging and splitting PDFs and to manipulate the list of pages in a PDF file. It is not a PDF viewer or a program capable of converting PDF into other formats.") - ;; Prior to the 7.0 release, QPDF was licensed under Artistic 2.0. - ;; Users can still choose to use the old license at their option. - (license (list license:asl2.0 license:clarified-artistic)) - (home-page "http://qpdf.sourceforge.net/"))) + ;; Prior to the 7.0 release, QPDF was licensed under Artistic 2.0. + ;; Users can still choose to use the old license at their option. + (license (list license:asl2.0 license:clarified-artistic)) + (home-page "http://qpdf.sourceforge.net/"))) (define-public qpdfview (package diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm index 4c38e2f055..89ceb41209 100644 --- a/gnu/packages/sdl.scm +++ b/gnu/packages/sdl.scm @@ -111,23 +111,24 @@ joystick, and graphics hardware.") (license license:lgpl2.1))) (define-public sdl2 - (package (inherit sdl) + (package + (inherit sdl) (name "sdl2") - (version "2.0.14") + (version "2.0.18") (source (origin - (method url-fetch) - (uri - (string-append "https://libsdl.org/release/SDL2-" - version ".tar.gz")) - (sha256 - (base32 - "1g1jahknv5r4yhh1xq5sf0md20ybdw1zh1i15lry26sq39bmn8fq")))) + (method url-fetch) + (uri + (string-append "https://libsdl.org/release/SDL2-" + version ".tar.gz")) + (sha256 + (base32 + "073iwmggkvvl82fssqb7xzbb4awraprjig6zxav0p8dz7pbhrm4l")))) (arguments (substitute-keyword-arguments (package-arguments sdl) ((#:configure-flags flags) `(append '("--disable-wayland-shared" "--enable-video-kmsdrm" "--disable-kmsdrm-shared") - ,flags)) + ,flags)) ((#:make-flags flags ''()) `(cons* ;; SDL dlopens libudev, so make sure it is in rpath. This overrides @@ -141,16 +142,17 @@ joystick, and graphics hardware.") ;; experience a bug where input events are doubled. ;; ;; For more information, see: https://dev.solus-project.com/T1721 - (append `(("dbus" ,dbus) - ("eudev" ,eudev) ; for discovering input devices - ("fcitx" ,fcitx) ; helps with CJK input - ("glib" ,glib) - ("ibus" ,ibus) - ("libxkbcommon" ,libxkbcommon) - ("libxcursor" ,libxcursor) ; enables X11 cursor support - ("wayland" ,wayland) - ("wayland-protocols" ,wayland-protocols)) - (package-inputs sdl))) + (modify-inputs (package-inputs sdl) + (prepend + dbus + eudev ;for discovering input devices + fcitx ;helps with CJK input + glib + ibus + libxkbcommon + libxcursor + wayland ;enables X11 cursor support + wayland-protocols))) (license license:bsd-3))) (define-public libmikmod diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.scm index 0639bf7a92..b2698d80d9 100644 --- a/gnu/packages/web-browsers.scm +++ b/gnu/packages/web-browsers.scm @@ -89,6 +89,7 @@ #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) + #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) @@ -483,6 +484,7 @@ interface.") python-jinja2 python-markupsafe python-pygments + python-pynacl python-pypeg2 python-pyyaml ;; FIXME: python-pyqtwebengine needs to come before python-pyqt so @@ -499,6 +501,11 @@ interface.") #:tests? #f #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-systemdir + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "qutebrowser/utils/standarddir.py" + (("/usr/share") (string-append out "/share")))))) (add-before 'check 'set-env-offscreen (lambda _ (setenv "QT_QPA_PLATFORM" "offscreen"))) @@ -523,6 +530,12 @@ interface.") (("Exec=qutebrowser") (string-append "Exec=" out "/bin/qutebrowser"))) (install-file "misc/org.qutebrowser.qutebrowser.desktop" app)))) + (add-after 'install 'install-userscripts + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (scripts (string-append out "/share/qutebrowser/userscripts"))) + (mkdir-p scripts) + (copy-recursively "misc/userscripts" scripts)))) (add-after 'wrap 'wrap-qt-process-path (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index 02b5f58e72..16bf2bf2d6 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -3995,10 +3995,7 @@ extension to the X11 protocol. It includes: (inputs (list libx11 xkbcomp-intermediate)) (native-inputs - `(("gettext" ,gettext-minimal) - ("perl" ,perl) - ("pkg-config" ,pkg-config) - ("python" ,python))) + (list gettext-minimal libxslt perl pkg-config python)) (home-page "https://www.x.org/wiki/") (synopsis "Xorg XKB configuration files") (description diff --git a/guix/build-system/mozilla.scm b/guix/build-system/mozilla.scm new file mode 100644 index 0000000000..b4141c8177 --- /dev/null +++ b/guix/build-system/mozilla.scm @@ -0,0 +1,52 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Maxime Devos <[email protected]> +;;; +;;; 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 <http://www.gnu.org/licenses/>. + +(define-module (guix build-system mozilla) + #:use-module (guix build-system gnu) + #:use-module (guix build-system) + #:use-module (guix utils) + #:export (mozilla-build-system)) + +;; +;; Build procedure for packages using Autotools with the Mozillian conventions +;; for --target, --host and --build, which are different from the GNU +;; conventions. +;; +;; Code: + +(define* (lower-mozilla name #:key system target #:allow-other-keys + #:rest arguments) + (define lower (build-system-lower gnu-build-system)) + (if target + (apply lower + (substitute-keyword-arguments arguments + ;; Override --target and --host to what Mozillian configure + ;; scripts expect. + ((#:configure-flags configure-flags ''()) + `(cons* ,(string-append "--target=" target) + ,(string-append "--host=" (nix-system->gnu-triplet system)) + ,configure-flags)))) + (apply lower name arguments))) ; not cross-compiling + +(define mozilla-build-system + (build-system + (name 'mozilla) + (description "The build system for Mozilla software using the Autotools") + (lower lower-mozilla))) + +;;; mozilla.scm ends here diff --git a/guix/build/minetest-build-system.scm b/guix/build/minetest-build-system.scm index 5f68686067..4a7a87ab83 100644 --- a/guix/build/minetest-build-system.scm +++ b/guix/build/minetest-build-system.scm @@ -91,15 +91,6 @@ If it is unknown, make an educated guess." #:install-plan (mod-install-plan (apply guess-mod-name arguments)) arguments)) -(define %png-magic-bytes - ;; Magic bytes of PNG images, see ‘5.2 PNG signatures’ in - ;; ‘Portable Network Graphics (PNG) Specification (Second Edition)’ - ;; on <https://www.w3.org/TR/PNG/>. - #vu8(137 80 78 71 13 10 26 10)) - -(define png-file? - ((@@ (guix build utils) file-header-match) %png-magic-bytes)) - (define* (minimise-png #:key inputs native-inputs #:allow-other-keys) "Minimise PNG images found in the working directory." (define optipng (which "optipng")) diff --git a/guix/build/qt-utils.scm b/guix/build/qt-utils.scm index fa018a93ac..b9c5a76f34 100644 --- a/guix/build/qt-utils.scm +++ b/guix/build/qt-utils.scm @@ -91,7 +91,7 @@ '("QTWEBENGINEPROCESS_PATH" = regular "/lib/qt5/libexec/QtWebEngineProcess")))) -(define* (wrap-qt-program* program #:key inputs output-dir +(define* (wrap-qt-program* program #:key sh inputs output-dir qt-wrap-excluded-inputs) (define input-directories @@ -106,9 +106,9 @@ (cons output-dir input-directories) output-dir))) (when (not (null? vars-to-wrap)) - (apply wrap-program program vars-to-wrap)))) + (apply wrap-program program #:sh sh vars-to-wrap)))) -(define* (wrap-qt-program program-name #:key inputs output +(define* (wrap-qt-program program-name #:key (sh (which "bash")) inputs output (qt-wrap-excluded-inputs %qt-wrap-excluded-inputs)) "Wrap the specified program (which must reside in the OUTPUT's \"/bin\" directory) with suitably set environment variables. @@ -116,10 +116,11 @@ directory) with suitably set environment variables. This is like qt-build-systems's phase \"qt-wrap\", but only the named program is wrapped." (wrap-qt-program* (string-append output "/bin/" program-name) + #:sh sh #:output-dir output #:inputs inputs #:qt-wrap-excluded-inputs qt-wrap-excluded-inputs)) -(define* (wrap-all-qt-programs #:key inputs outputs +(define* (wrap-all-qt-programs #:key (sh (which "bash")) inputs outputs (qt-wrap-excluded-outputs '()) (qt-wrap-excluded-inputs %qt-wrap-excluded-inputs) #:allow-other-keys) @@ -148,6 +149,7 @@ add a dependency of that output on Qt." ((output . output-dir) (unless (member output qt-wrap-excluded-outputs) (for-each (cut wrap-qt-program* <> + #:sh sh #:output-dir output-dir #:inputs inputs #:qt-wrap-excluded-inputs qt-wrap-excluded-inputs) (find-files-to-wrap output-dir)))))) diff --git a/guix/build/utils.scm b/guix/build/utils.scm index dd5a91f52f..b822caf619 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -62,6 +62,8 @@ symbolic-link? call-with-temporary-output-file call-with-ascii-input-file + file-header-match + png-file? elf-file? ar-file? gzip-file? @@ -291,6 +293,15 @@ with the bytes in HEADER, a bytevector." #f ;FILE is a directory (apply throw args)))))) +(define %png-magic-bytes + ;; Magic bytes of PNG images, see ‘5.2 PNG signatures’ in + ;; ‘Portable Network Graphics (PNG) Specification (Second Edition)’ + ;; on <https://www.w3.org/TR/PNG/>. + #vu8(137 80 78 71 13 10 26 10)) + +(define png-file? + (file-header-match %png-magic-bytes)) + (define %elf-magic-bytes ;; Magic bytes of ELF files. See <elf.h>. (u8-list->bytevector (map char->integer (string->list "\x7FELF")))) diff --git a/guix/lint.scm b/guix/lint.scm index 3ca7a0b608..8615bb916c 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -576,7 +576,6 @@ or \"bash-minimal\" is not in its inputs. 'wrap-script' is not supported." (('wrap-program _ . _) (list (report-wrap-program-error package 'wrap-program))) ;; Wrapper of 'wrap-program' for Qt programs. - ;; TODO #:sh is not yet supported but probably will be. (('wrap-qt-program _ '#:sh . _) '()) (('wrap-qt-program _ . _) (list (report-wrap-program-error package 'wrap-qt-program))) |