From d37c7f7ad4134cc15d1558eb6c0bc4c59a0db1af Mon Sep 17 00:00:00 2001 From: Liliana Marie Prikler Date: Fri, 27 May 2022 00:12:37 +0200 Subject: gnu: emacs-deferred: Fix wrong number of arguments. * gnu/packages/patches/emacs-deferred-fix-number-of-arguments.patch: New file. * gnu/packages/emacs-xyz.scm (emacs-deferred)[patches]: Use it here. * gnu/local.mk (dist_patch_DATA): Add it here. --- .../emacs-deferred-fix-number-of-arguments.patch | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 gnu/packages/patches/emacs-deferred-fix-number-of-arguments.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/emacs-deferred-fix-number-of-arguments.patch b/gnu/packages/patches/emacs-deferred-fix-number-of-arguments.patch new file mode 100644 index 0000000000..fdb444c29b --- /dev/null +++ b/gnu/packages/patches/emacs-deferred-fix-number-of-arguments.patch @@ -0,0 +1,58 @@ +From 226734f06196d31971d8ca2026a9ce432d5227d0 Mon Sep 17 00:00:00 2001 +From: r0man +Date: Thu, 26 May 2022 10:42:25 +0200 +Subject: [PATCH] Fix wrong-number-of-arguments error + +With Emacs 28 I'm seeing the following error when running the tests. + +``` +deferred error : (wrong-number-of-arguments # 4) +``` + +I believe this is because the `start-process-shell-command` function +is called with the command arguments as &rest parameters. This is the +function signature of `start-process-shell-command`, and it only takes +3 arguments, the name, buffer, and command. The command argument can +be a shell string like "ls -l" for example. + +``` +(defun start-process-shell-command (name buffer command) ...) +``` + +The `start-process` function on the other hand has &rest parameters +and can be called with a list of arguments. + +``` +(defun start-process (name buffer program &rest program-args) ...) +``` + +This PR fixes the issue by concatenating the command and it's argument +before calling out to `deferred:process-buffer-gen`, which is used in +both cases, when calling `start-process-shell-command`, and when +calling `start-process`. +--- + deferred.el | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/deferred.el b/deferred.el +index 041c90b..3092ac0 100644 +--- a/deferred.el ++++ b/deferred.el +@@ -754,7 +754,7 @@ object. The process name and buffer name of the argument of the + `start-process-shell-command' are generated by this function automatically. + The next deferred object receives stdout and stderr string from + the command process." +- (deferred:process-gen 'start-process-shell-command command args)) ++ (deferred:process-gen 'start-process-shell-command (string-join (cons command args) " ") nil)) + + (defun deferred:process-buffer (command &rest args) + "A deferred wrapper of `start-process'. Return a deferred +@@ -770,7 +770,7 @@ object. The process name and buffer name of the argument of the + `start-process-shell-command' are generated by this function automatically. + The next deferred object receives stdout and stderr buffer from + the command process." +- (deferred:process-buffer-gen 'start-process-shell-command command args)) ++ (deferred:process-buffer-gen 'start-process-shell-command (string-join (cons command args) " ") nil)) + + (defun deferred:process-gen (f command args) + "[internal]" -- cgit v1.2.3 From 48efbde7a944acfe4fc944bf27bfa9ff82592024 Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Mon, 30 May 2022 09:03:02 +0200 Subject: gnu: virtuoso-ose: Update to 7.2.7. * gnu/packages/databases.scm (virtuoso-ose): Update to 7.2.7; Run autogen after applying the patch below. * gnu/packages/patches/virtuoso-ose-remove-pre-built-jar-files.patch: New file. --- gnu/packages/databases.scm | 26 ++++- .../virtuoso-ose-remove-pre-built-jar-files.patch | 117 +++++++++++++++++++++ 2 files changed, 141 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/virtuoso-ose-remove-pre-built-jar-files.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 2d72c78233..a161e29907 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -100,6 +100,7 @@ #:use-module (gnu packages gnome) #:use-module (gnu packages gnupg) #:use-module (gnu packages golang) + #:use-module (gnu packages gperf) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) #:use-module (gnu packages icu4c) @@ -3229,14 +3230,30 @@ Memory-Mapped Database} (LMDB), a high-performance key-value store.") (define-public virtuoso-ose (package (name "virtuoso-ose") - (version "7.2.6") + (version "7.2.7") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/virtuoso/virtuoso/" version "/" "virtuoso-opensource-" version ".tar.gz")) (sha256 - (base32 "0ly7s7a3w2a2zhhi9rq9k2qlnzapqbbc1rcdqb3zqqpgg81krz9q")))) + (base32 "1853ln0smiilf3pni70gq6nmi9ps039cy44g6b5i9d2z1n9hnj02")) + (patches (search-patches "virtuoso-ose-remove-pre-built-jar-files.patch")) + (modules '((guix build utils))) + ;; This snippet removes pre-built Java archives. + (snippet + '(for-each delete-file-recursively + (list "binsrc/hibernate" + "binsrc/jena" + "binsrc/jena2" + "binsrc/jena3" + "binsrc/jena4" + "binsrc/rdf4j" + "binsrc/sesame" + "binsrc/sesame2" + "binsrc/sesame3" + "binsrc/sesame4" + "libsrc/JDBCDriverType4"))))) (build-system gnu-build-system) (arguments `(#:tests? #f ; Tests require a network connection. @@ -3247,6 +3264,9 @@ Memory-Mapped Database} (LMDB), a high-performance key-value store.") "--enable-static=no") #:phases (modify-phases %standard-phases + (replace 'bootstrap + (lambda _ + (invoke "sh" "autogen.sh"))) ;; Even with "--enable-static=no", "libvirtuoso-t.a" is left in ;; the build output. The following phase removes it. (add-after 'install 'remove-static-libs @@ -3256,6 +3276,8 @@ Memory-Mapped Database} (LMDB), a high-performance key-value store.") (delete-file (string-append lib "/" file))) '("libvirtuoso-t.a" "libvirtuoso-t.la")))))))) + (native-inputs + (list autoconf automake bison flex gperf libtool)) (inputs (list openssl net-tools readline zlib)) (home-page "http://vos.openlinksw.com/owiki/wiki/VOS/") diff --git a/gnu/packages/patches/virtuoso-ose-remove-pre-built-jar-files.patch b/gnu/packages/patches/virtuoso-ose-remove-pre-built-jar-files.patch new file mode 100644 index 0000000000..17413c71ae --- /dev/null +++ b/gnu/packages/patches/virtuoso-ose-remove-pre-built-jar-files.patch @@ -0,0 +1,117 @@ +This patch disables build targets that contain pre-built Java archives that +would be copied to the build's output. + +Patch by Roel Janssen +*** a-virtuoso-opensource-7.2.7/binsrc/Makefile.am 1970-01-01 01:00:01.000000000 +0100 +--- b-virtuoso-opensource-7.2.7/binsrc/Makefile.am 2022-05-27 12:20:52.909135774 +0200 +*************** +*** 19,25 **** + # + # + +! SUBDIRS = dav mono virtuoso tests rdf_mappers driver maildrop sqldoc hosting bpel fct tutorial conductor samples vsp ws sync vspx vad cached_resources virtodbc virtoledb virtuoso_sink xddl VirtuosoClient.Net oat isparql jena jena2 jena3 jena4 sesame sesame2 sesame3 sesame4 redland hibernate dbpedia rdb2rdf rdf4j + + + # ---------------------------------------------------------------------- +--- 19,25 ---- + # + # + +! SUBDIRS = dav mono virtuoso tests rdf_mappers driver maildrop sqldoc hosting bpel fct tutorial conductor samples vsp ws sync vspx vad cached_resources virtodbc virtoledb virtuoso_sink xddl VirtuosoClient.Net oat isparql redland dbpedia rdb2rdf + + + # ---------------------------------------------------------------------- +*** a-virtuoso-opensource-7.2.7/configure.ac 1970-01-01 01:00:01.000000000 +0100 +--- b-virtuoso-opensource-7.2.7/configure.ac 2022-05-27 12:27:51.879208018 +0200 +*************** +*** 57,64 **** + dnl AM_INIT_AUTOMAKE([1.8]) + dnl AM_INIT_AUTOMAKE([1.9 tar-ustar]) + dnl +! AM_INIT_AUTOMAKE([1.9 tar-ustar]) +! + AM_MAINTAINER_MODE + + +--- 57,63 ---- + dnl AM_INIT_AUTOMAKE([1.8]) + dnl AM_INIT_AUTOMAKE([1.9 tar-ustar]) + dnl +! AM_INIT_AUTOMAKE([1.9 tar-ustar subdir-objects]) + AM_MAINTAINER_MODE + + +*************** +*** 3157,3163 **** + binsrc/dbpedia/Makefile + binsrc/driver/Makefile + binsrc/fct/Makefile +- binsrc/hibernate/Makefile + binsrc/hosting/Makefile + binsrc/hosting/mono/Makefile + binsrc/hosting/mono/tests/Makefile +--- 3156,3161 ---- +*************** +*** 3169,3184 **** + binsrc/hosting/ruby/Makefile + binsrc/hosting/shapefileio/Makefile + binsrc/isparql/Makefile +- binsrc/jena/Makefile +- binsrc/jena2/Makefile +- binsrc/jena3/Makefile +- binsrc/jena4/Makefile + binsrc/maildrop/Makefile + binsrc/mono/Makefile + binsrc/oat/Makefile + binsrc/rdf_mappers/Makefile + binsrc/rdb2rdf/Makefile +- binsrc/rdf4j/Makefile + binsrc/redland/Makefile + binsrc/samples/demo/Makefile + binsrc/samples/hslookup/Makefile +--- 3167,3177 ---- +*************** +*** 3191,3200 **** + binsrc/samples/webapp/Makefile + binsrc/samples/xpath/Makefile + binsrc/samples/xquery/Makefile +- binsrc/sesame/Makefile +- binsrc/sesame2/Makefile +- binsrc/sesame3/Makefile +- binsrc/sesame4/Makefile + binsrc/sqldoc/Makefile + binsrc/sync/Makefile + binsrc/tests/biftest/Makefile +--- 3184,3189 ---- +*************** +*** 3236,3245 **** + docsrc/stylesheets/Makefile + docsrc/xmlsource/Makefile + libsrc/Dk/Makefile +- libsrc/JDBCDriverType4/Makefile +- libsrc/JDBCDriverType4/testsuite_4.0/Makefile +- libsrc/JDBCDriverType4/virtuoso/jdbc/Makefile +- libsrc/JDBCDriverType4/virtuoso/Makefile + libsrc/langfunc/Makefile + libsrc/odbcsdk/Makefile + libsrc/plugin/Makefile +--- 3225,3230 ---- +*** a-virtuoso-opensource-7.2.7/libsrc/Makefile.am 1970-01-01 01:00:01.000000000 +0100 +--- b-virtuoso-opensource-7.2.7/libsrc/Makefile.am 2022-05-27 12:30:12.658593011 +0200 +*************** +*** 19,25 **** + # + # + +! SUBDIRS = util zlib odbcsdk Dk Thread langfunc Wi plugin Tidy Xml.new JDBCDriverType4 + + noinst_HEADERS = Dk.h libutil.h + +--- 19,25 ---- + # + # + +! SUBDIRS = util zlib odbcsdk Dk Thread langfunc Wi plugin Tidy Xml.new + + noinst_HEADERS = Dk.h libutil.h + -- cgit v1.2.3 From 3f31525546647a4936e4692b630efda6afac3715 Mon Sep 17 00:00:00 2001 From: Morgan Smith Date: Wed, 25 May 2022 17:37:32 -0400 Subject: gnu: GCC: Add cross environment variables patch to GCC 12. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/patches/gcc-12-cross-environment-variables.patch : New file. * gnu/local.mk (dist_patch_DATA): Add gcc-12-cross-environment-variables.patch. * gnu/packages/cross-base.scm (cross-gcc)[source](patches): Apply the patch. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/cross-base.scm | 3 ++ .../gcc-12-cross-environment-variables.patch | 54 ++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 gnu/packages/patches/gcc-12-cross-environment-variables.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 182c0dd4a9..3de938e5d0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1131,6 +1131,7 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-9-strmov-store-file-names.patch \ %D%/packages/patches/gcc-12-strmov-store-file-names.patch \ %D%/packages/patches/gcc-10-cross-environment-variables.patch \ + %D%/packages/patches/gcc-12-cross-environment-variables.patch \ %D%/packages/patches/gcolor3-update-libportal-usage.patch \ %D%/packages/patches/gd-fix-tests-on-i686.patch \ %D%/packages/patches/gd-brect-bounds.patch \ diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 93e4f8a445..9c98c923ff 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -242,6 +242,9 @@ target that libc." (append (origin-patches (package-source xgcc)) (append (cond + ((version>=? (package-version xgcc) "12.0") + (search-patches "gcc-12-cross-environment-variables.patch" + "gcc-cross-gxx-include-dir.patch")) ((version>=? (package-version xgcc) "10.0") (search-patches "gcc-10-cross-environment-variables.patch" "gcc-cross-gxx-include-dir.patch")) diff --git a/gnu/packages/patches/gcc-12-cross-environment-variables.patch b/gnu/packages/patches/gcc-12-cross-environment-variables.patch new file mode 100644 index 0000000000..8787f094c0 --- /dev/null +++ b/gnu/packages/patches/gcc-12-cross-environment-variables.patch @@ -0,0 +1,54 @@ +Search path environment variables for cross-compilers. See the discussion +at . + +Note: Touch 'C_INCLUDE_PATH' et al. rather than 'CPATH', as discussed +at . + +diff --git a/gcc/gcc.cc b/gcc/gcc.cc +--- a/gcc/gcc.cc ++++ b/gcc/gcc.cc +@@ -4832,7 +4832,7 @@ process_command (unsigned int decoded_options_count, + } + + temp = env.get (LIBRARY_PATH_ENV); +- if (temp && *cross_compile == '0') ++ if (temp) + { + const char *startp, *endp; + char *nstore = (char *) alloca (strlen (temp) + 3); +diff --git a/gcc/incpath.cc b/gcc/incpath.cc +--- a/gcc/incpath.cc ++++ b/gcc/incpath.cc +@@ -480,8 +480,8 @@ register_include_chains (cpp_reader *pfile, const char *sysroot, + int stdinc, int cxx_stdinc, int verbose) + { + static const char *const lang_env_vars[] = +- { "C_INCLUDE_PATH", "CPLUS_INCLUDE_PATH", +- "OBJC_INCLUDE_PATH", "OBJCPLUS_INCLUDE_PATH" }; ++ { "CROSS_C_INCLUDE_PATH", "CROSS_CPLUS_INCLUDE_PATH", ++ "CROSS_OBJC_INCLUDE_PATH", "CROSS_OBJCPLUS_INCLUDE_PATH" }; + cpp_options *cpp_opts = cpp_get_options (pfile); + size_t idx = (cpp_opts->objc ? 2: 0); + +@@ -492,7 +492,7 @@ register_include_chains (cpp_reader *pfile, const char *sysroot, + + /* CPATH and language-dependent environment variables may add to the + include chain. */ +- add_env_var_paths ("CPATH", INC_BRACKET); ++ add_env_var_paths ("CROSS_CPATH", INC_BRACKET); + add_env_var_paths (lang_env_vars[idx], INC_SYSTEM); + + target_c_incpath.extra_pre_includes (sysroot, iprefix, stdinc); +diff --git a/gcc/system.h b/gcc/system.h +--- a/gcc/system.h ++++ b/gcc/system.h +@@ -1317,4 +1317,6 @@ endswith (const char *str, const char *suffix) + return memcmp (str + str_len - suffix_len, suffix, suffix_len) == 0; + } + ++#define LIBRARY_PATH_ENV "CROSS_LIBRARY_PATH" ++ + #endif /* ! GCC_SYSTEM_H */ +-- +2.36.1 + -- cgit v1.2.3 From 092ee3515520c759174d235910aefc3a54b00b97 Mon Sep 17 00:00:00 2001 From: Greg Hogan Date: Tue, 3 May 2022 17:54:16 +0000 Subject: gnu: casync: Update to 99559cd1. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/sync.scm (casync): Update to 99559cd1. [source]: Remove patch. [arguments]: Fix installation. [native-inputs]: Add python. [inputs]: Add eudev. * gnu/packages/patches/casync-renameat2-declaration.patch: Delete file. * gnu/local.mk: Remove it. Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 - .../patches/casync-renameat2-declaration.patch | 27 --------- gnu/packages/sync.scm | 67 ++++++++++++---------- 3 files changed, 37 insertions(+), 58 deletions(-) delete mode 100644 gnu/packages/patches/casync-renameat2-declaration.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 3de938e5d0..f6aae15e76 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -926,7 +926,6 @@ dist_patch_DATA = \ %D%/packages/patches/calibre-no-updates-dialog.patch \ %D%/packages/patches/calibre-remove-test-sqlite.patch \ %D%/packages/patches/calibre-remove-test-unrar.patch \ - %D%/packages/patches/casync-renameat2-declaration.patch \ %D%/packages/patches/catdoc-CVE-2017-11110.patch \ %D%/packages/patches/circos-remove-findbin.patch \ %D%/packages/patches/cdparanoia-fpic.patch \ diff --git a/gnu/packages/patches/casync-renameat2-declaration.patch b/gnu/packages/patches/casync-renameat2-declaration.patch deleted file mode 100644 index 74c2ca7b3c..0000000000 --- a/gnu/packages/patches/casync-renameat2-declaration.patch +++ /dev/null @@ -1,27 +0,0 @@ -Fix build failure on glibc 2.28 where 'renameat2' would end up being -declared twice: . - -From 625244ca47e8ee1375d2d0092271bfd13b0913ea Mon Sep 17 00:00:00 2001 -From: Daniel Mack -Date: Tue, 13 Nov 2018 17:52:48 +0100 -Subject: [PATCH] meson.build: pass -D_GNU_SOURCE when checking for functions - -As described in #166, -D_GNU_SOURCE needs to be passed to the meson function -availability checker. h/t to @tomeon for providing a link to the solution as -well. ---- - meson.build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index f42ed16..c0f741e 100644 ---- a/meson.build -+++ b/meson.build -@@ -78,6 +78,6 @@ foreach ident : [ - ['copy_file_range', '''#include - #include '''], - ] -- have = cc.has_function(ident[0], prefix : ident[1]) -+ have = cc.has_function(ident[0], args : '-D_GNU_SOURCE', prefix : ident[1]) - conf.set10('HAVE_' + ident[0].to_upper(), have) - endforeach diff --git a/gnu/packages/sync.scm b/gnu/packages/sync.scm index 801aef3f44..3dfaf40796 100644 --- a/gnu/packages/sync.scm +++ b/gnu/packages/sync.scm @@ -451,35 +451,42 @@ written in @command{scsh}. It makes use of @command{unison} and (license license:expat)))) (define-public casync - (package - (name "casync") - (version "2") - (home-page "https://github.com/systemd/casync/") - (source (origin - (method git-fetch) - (uri (git-reference - (url home-page) - (commit (string-append "v" version)))) - (sha256 - (base32 - "0znkp3fcksrykcsv06y2mjvf2lbwmin25snmvfa8i5qfm3f4rm88")) - (file-name (string-append name "-" version "-checkout")) - (patches (search-patches "casync-renameat2-declaration.patch")))) - (build-system meson-build-system) - (native-inputs - (list pkg-config python-sphinx rsync)) ;for tests - (inputs - (list xz ;for liblzma - `(,zstd "lib") - curl - acl - libselinux - fuse - openssl - zlib)) - (synopsis "File synchronization and backup system") - (description - "casync is a @dfn{content-addressable data synchronizer} that can be used + (let ((commit "99559cd1d8cea69b30022261b5ed0b8021415654") + (revision "0")) + (package + (name "casync") + (version (git-version "2" revision commit)) + (home-page "https://github.com/systemd/casync/") + (source (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit commit))) + (sha256 + (base32 + "139g82rkwv1kzss6crfmw3p01xnyjzz66b1ckprpbfncxb24047w")) + (file-name (string-append name "-" version "-checkout")))) + (build-system meson-build-system) + (arguments + `(#:configure-flags + (let ((out (assoc-ref %outputs "out"))) + (list (string-append "-Dudevrulesdir=" + out "/lib/udev/rules.d"))))) + (native-inputs + (list pkg-config python python-sphinx rsync)) ;for tests + (inputs + (list xz ;for liblzma + `(,zstd "lib") + curl + acl + libselinux + eudev + fuse + openssl + zlib)) + (synopsis "File synchronization and backup system") + (description + "casync is a @dfn{content-addressable data synchronizer} that can be used as the basis of a backup system. It is: @itemize @@ -490,7 +497,7 @@ large file systems or directory trees; over the Internet in an HTTP and CDN friendly way; @item An efficient backup system. @end itemize\n") - (license license:lgpl2.1+))) + (license license:lgpl2.1+)))) (define-public rclone (package -- cgit v1.2.3 From 6169c582d154f65a9834a4e07226de4fc98ea67f Mon Sep 17 00:00:00 2001 From: yarl baudig Date: Mon, 30 May 2022 09:20:24 +0200 Subject: gnu: emacs-helpful: Update to 0.19 * gnu/packages/patches/emacs-helpful-docstring-test.patch: New file. * gnu/packages/emacs-xyz.scm (emacs-helpful): Update to 0.19. [source]: Use the patch. * gnu/local.mk (dist_patch_DATA): Register the patch. Signed-off-by: Liliana Marie Prikler --- gnu/local.mk | 1 + gnu/packages/emacs-xyz.scm | 6 ++++-- .../patches/emacs-helpful-fix-docstring-test.patch | 18 ++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/emacs-helpful-fix-docstring-test.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index f6aae15e76..bb2913c3a2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1028,6 +1028,7 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-git-email-missing-parens.patch \ %D%/packages/patches/emacs-fix-scheme-indent-function.patch \ %D%/packages/patches/emacs-json-reformat-fix-tests.patch \ + %D%/packages/patches/emacs-helpful-fix-docstring-test.patch \ %D%/packages/patches/emacs-highlight-stages-add-gexp.patch \ %D%/packages/patches/emacs-hyperbole-toggle-messaging.patch \ %D%/packages/patches/emacs-libgit-use-system-libgit2.patch \ diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 8fe450cf7b..22d723c879 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -20130,7 +20130,7 @@ downloading manager for Emacs.") (define-public emacs-helpful (package (name "emacs-helpful") - (version "0.18") + (version "0.19") (source (origin (method git-fetch) @@ -20139,7 +20139,9 @@ downloading manager for Emacs.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "0gdjxykqkal2x765mi51m99i5ql23i1fy909wy4mzj5ajhjfgqcc")))) + (base32 "0qwsifzsjw95l83m7z07fr9h1sqbhggwmcps1qgbddpan2a8ab8a")) + ;; Cherry-picked from upstream, remove when bumping to 0.20. + (patches (search-patches "emacs-helpful-fix-docstring-test.patch")))) (build-system emacs-build-system) (propagated-inputs (list emacs-elisp-refs emacs-dash emacs-s emacs-f emacs-shut-up)) diff --git a/gnu/packages/patches/emacs-helpful-fix-docstring-test.patch b/gnu/packages/patches/emacs-helpful-fix-docstring-test.patch new file mode 100644 index 0000000000..de40010fa2 --- /dev/null +++ b/gnu/packages/patches/emacs-helpful-fix-docstring-test.patch @@ -0,0 +1,18 @@ +This patch fixing a build failure has been cherry-picked from upstream. +Originally submitted as pull request by Erik Šabič. +See also . +diff --git a/test/helpful-unit-test.el b/test/helpful-unit-test.el +index a07aa8e..8a95129 100644 +--- a/test/helpful-unit-test.el ++++ b/test/helpful-unit-test.el +@@ -119,7 +119,9 @@ bar"))) + (should + (equal + (helpful--docstring #'test-foo-advised t) +- "Docstring here too."))) ++ (if (version< emacs-version "28") ++ "Docstring here too." ++ "Docstring here too.\n\nThis function has :around advice: `ad-Advice-test-foo-advised'.")))) + + (defun test-foo-no-docstring () + nil) -- cgit v1.2.3 From d11d27e2e4a0e6d132127f5130533b0ce9d04481 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 27 May 2022 11:48:14 -0400 Subject: gnu: guile-ac-d-bus: Run test suite. * gnu/packages/patches/guile-ac-d-bus-fix-tests.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/guile-xyz.scm (guile-ac-d-bus) [source]: Apply patch. [phases]{check}: New phase. [native-inputs]: Add bash-minimal. --- gnu/local.mk | 1 + gnu/packages/guile-xyz.scm | 15 ++++++++++-- .../patches/guile-ac-d-bus-fix-tests.patch | 28 ++++++++++++++++++++++ 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/guile-ac-d-bus-fix-tests.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index bb2913c3a2..93b4902151 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1236,6 +1236,7 @@ dist_patch_DATA = \ %D%/packages/patches/guile-3.0-relocatable.patch \ %D%/packages/patches/guile-linux-syscalls.patch \ %D%/packages/patches/guile-3.0-linux-syscalls.patch \ + %D%/packages/patches/guile-ac-d-bus-fix-tests.patch \ %D%/packages/patches/guile-cross-compilation.patch \ %D%/packages/patches/guile-fibers-destroy-peer-schedulers.patch \ %D%/packages/patches/guile-fibers-wait-for-io-readiness.patch \ diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 0b1537a963..3c02a85bc3 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -3843,7 +3843,8 @@ and space linear in the size of the input text.") (file-name (git-file-name name version)) (sha256 (base32 - "0rl809qimhgz6b0rixakb42r2l4g53jr09a2g0s1hxgab0blz0kb")))) + "0rl809qimhgz6b0rixakb42r2l4g53jr09a2g0s1hxgab0blz0kb")) + (patches (search-patches "guile-ac-d-bus-fix-tests.patch")))) (build-system guile-build-system) (arguments (list @@ -3884,12 +3885,22 @@ and space linear in the size of the input text.") (lambda _ (with-directory-excursion "docs" (invoke "makeinfo" "ac-d-bus")))) + (add-after 'build-doc 'check + (lambda* (#:key (tests? #t) #:allow-other-keys) + (when tests? + ;; There is no locale for the ö character, which crashes + ;; substitute*; reset the conversion strategy to workaround it. + (with-fluids ((%default-port-conversion-strategy 'substitute)) + (substitute* (find-files "tests") + (("#!/usr/bin/env scheme-script") + (string-append "#!" (which "guile"))))) + (invoke "./run-tests.sh")))) (add-after 'install 'install-doc (lambda _ (install-file "docs/ac-d-bus.info" (string-append #$output "/share/info"))))))) (native-inputs - (list guile-3.0 texinfo)) + (list bash-minimal guile-3.0 texinfo)) (propagated-inputs (list guile-packrat)) (synopsis "D-Bus protocol implementation in R6RS Scheme") diff --git a/gnu/packages/patches/guile-ac-d-bus-fix-tests.patch b/gnu/packages/patches/guile-ac-d-bus-fix-tests.patch new file mode 100644 index 0000000000..19fd475c39 --- /dev/null +++ b/gnu/packages/patches/guile-ac-d-bus-fix-tests.patch @@ -0,0 +1,28 @@ +Submitted upstream: https://gitlab.com/weinholt/ac-d-bus/-/merge_requests/3 + +diff --git a/tests/test-signature.sps b/tests/test-signature.sps +index 278401b..cc5574f 100755 +--- a/tests/test-signature.sps ++++ b/tests/test-signature.sps +@@ -43,6 +43,7 @@ + (format-type-signature '(message BYTE BYTE BYTE BYTE UINT32 UINT32 + (ARRAY (STRUCT BYTE VARIANT))))) + ++(define fail-count (test-runner-fail-count (test-runner-get))) + (test-end) + +-(exit (if (zero? (test-runner-fail-count (test-runner-get))) 0 1)) ++(exit (if (zero? fail-count) 0 1)) +diff --git a/tests/test-wire.sps b/tests/test-wire.sps +index c3354bf..06ae73b 100755 +--- a/tests/test-wire.sps ++++ b/tests/test-wire.sps +@@ -147,6 +147,7 @@ + #x08 #x01 #x67 #x00 #x00 #x00 #x00 #x00 #x05 #x01 #x75 #x00 #x04 #x00 #x00 #x00 + #x07 #x01 #x73 #x00 #x06 #x00 #x00 #x00 #x3A #x31 #x2E #x32 #x39 #x38 #x00 #x00))) + ++(define fail-count (test-runner-fail-count (test-runner-get))) + (test-end) + +-(exit (if (zero? (test-runner-fail-count (test-runner-get))) 0 1)) ++(exit (if (zero? fail-count) 0 1)) -- cgit v1.2.3 From 55fc0947d484f13dec89a4897b9313c8079b1d98 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 29 Apr 2022 17:32:48 -0400 Subject: gnu: Remove python2-parameterized. * gnu/packages/check.scm (python2-parameterized): Delete variable. * gnu/packages/patches/python2-parameterized-docstring-test.patch: Delete file. * gnu/local.mk (dist_patch_DATA): De-register it. --- gnu/local.mk | 1 - gnu/packages/check.scm | 11 ----------- .../patches/python2-parameterized-docstring-test.patch | 18 ------------------ 3 files changed, 30 deletions(-) delete mode 100644 gnu/packages/patches/python2-parameterized-docstring-test.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 93b4902151..3452b75e3b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1705,7 +1705,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-mox3-python3.6-compat.patch \ %D%/packages/patches/python-typing-inspect-fix.patch \ %D%/packages/patches/python-packaging-test-arch.patch \ - %D%/packages/patches/python2-parameterized-docstring-test.patch \ %D%/packages/patches/python-paste-remove-timing-test.patch \ %D%/packages/patches/python-pycrypto-CVE-2013-7459.patch \ %D%/packages/patches/python-pycrypto-time-clock.patch \ diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 69644aefec..197205a47e 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -818,19 +818,8 @@ but it works for any C/C++ project.") (description "Parameterized is a Python library that aims to fix parameterized testing for every Python test framework. It supports nose, py.test, and unittest.") - (properties `((python2-variant . ,(delay python2-parameterized)))) (license license:bsd-2))) -(define-public python2-parameterized - (let ((base (package-with-python2 (strip-python2-variant - python-parameterized)))) - (package/inherit - base - (source - (origin - (inherit (package-source base)) - (patches (search-patches "python2-parameterized-docstring-test.patch"))))))) - (define-public python-minimock (package (name "python-minimock") diff --git a/gnu/packages/patches/python2-parameterized-docstring-test.patch b/gnu/packages/patches/python2-parameterized-docstring-test.patch deleted file mode 100644 index 14691e1904..0000000000 --- a/gnu/packages/patches/python2-parameterized-docstring-test.patch +++ /dev/null @@ -1,18 +0,0 @@ -Skip unicode docstring test, required when running on Python 2. - -See . - ---- a/parameterized/test.py -+++ b/parameterized/test.py -@@ -284,11 +284,6 @@ - " More" %(foo, ) - ) - -- @parameterized.expand([param("foo")]) -- def test_unicode_docstring(self, foo): -- u"""Döcumentation.""" -- self._assert_docstring(u"Döcumentation [with foo=%r]." %(foo, )) -- - @parameterized.expand([param("foo", )]) - def test_default_values_get_correct_value(self, foo, bar=12): - """Documentation""" -- cgit v1.2.3 From cfc02804fc5808647630c2fd75402887923168c8 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 29 Apr 2022 17:36:15 -0400 Subject: gnu: gourmet: Update to 0.17.4-0-8af29c8 and enable tests. * gnu/packages/patches/gourmet-sqlalchemy-compat.patch: Add file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/nutrition.scm (gourmet): Update to 0.17.4-0-8af29c8. [source]: Apply patch. [python]: Delete argument. [tests?]: Likewise. [phases]{prepare-x}: New phase. {check}: New phase override. {install-dekstop-file-and-icons}: New phase. [native-inputs]: Delete python2-distutils-extra, intltool and python2-pygtk. Add python-dogtail, python-pytest, python-selenium and xorg-server-for-tests. [inputs]: Delete python2-pygtk, python2-sqlalchemy, python2-lxml, python2-pillow and python2-elib.intl. Add gtk+, python-argcomplete, python-beautifulsoup4, python-gst, python-keyring, python-lxml, python-pillow, python-pycairo, python-pyenchant, python-pygobject, python-requests, python-scrape-schema-recipe, python-sqlalchemy. --- gnu/local.mk | 1 + gnu/packages/nutrition.scm | 120 ++++++++++++++------- .../patches/gourmet-sqlalchemy-compat.patch | 18 ++++ 3 files changed, 98 insertions(+), 41 deletions(-) create mode 100644 gnu/packages/patches/gourmet-sqlalchemy-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 3452b75e3b..1a0b998de3 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1214,6 +1214,7 @@ dist_patch_DATA = \ %D%/packages/patches/go-github-com-urfave-cli-fix-tests.patch \ %D%/packages/patches/go-github-com-urfave-cli-v2-fix-tests.patch \ %D%/packages/patches/go-skip-gc-test.patch \ + %D%/packages/patches/gourmet-sqlalchemy-compat.patch \ %D%/packages/patches/gpaste-fix-paths.patch \ %D%/packages/patches/gpm-glibc-2.26.patch \ %D%/packages/patches/gpodder-disable-updater.patch \ diff --git a/gnu/packages/nutrition.scm b/gnu/packages/nutrition.scm index 8176ded9e1..90a70753de 100644 --- a/gnu/packages/nutrition.scm +++ b/gnu/packages/nutrition.scm @@ -30,13 +30,17 @@ #:use-module (gnu packages) #:use-module (gnu packages check) #:use-module (gnu packages databases) - #:use-module (gnu packages gtk) + #:use-module (gnu packages enchant) #:use-module (gnu packages glib) + #:use-module (gnu packages gtk) + #:use-module (gnu packages gstreamer) #:use-module (gnu packages image) #: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 time) + #:use-module (gnu packages xorg) #:use-module (gnu packages xml)) (define-public python-scrape-schema-recipe @@ -78,46 +82,80 @@ in the @url{https://schema.org/Recipe} format.") (license asl2.0))) (define-public gourmet - (package - (name "gourmet") - (version "0.17.4") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/thinkle/gourmet") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "09a2zk140l4babwdj8pwcgl9v7rvwff9cn7h3ppfhm3yvsgkrx07")))) - (build-system python-build-system) - (native-inputs - `(("distutils-extra" ,python2-distutils-extra) - ("intltool" ,intltool) - ("python-pygtk" ,python2-pygtk))) ;for tests - ;; TODO: Add python-reportlab and/or python-poppler for printing/pdf - ;; export, and python-beautifulsoup for web import plugin. - (inputs - `(("pygtk" ,python2-pygtk) - ("sqlalchemy" ,python2-sqlalchemy) - ("python-lxml" ,python2-lxml) - ("python-pillow" ,python2-pillow) - ("elib.intl" ,python2-elib.intl))) - (arguments - `(#:python ,python-2 ;exception and print syntax - #:tests? #f ;tests look bitrotted - #:phases - (modify-phases %standard-phases - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (invoke "python" "setup.py" "install" "--prefix" - (assoc-ref outputs "out"))))))) - (home-page "https://thinkle.github.io/gourmet/") - (synopsis "Recipe organizer") - (description - "Gourmet Recipe Manager is a recipe organizer that allows you to collect, + ;; Use the latest commit to gain Python 3 support. + (let ((revision "0") + (commit "8af29c8ded24528030e5ae2ea3461f61c1e5a575")) + (package + (name "gourmet") + (version (git-version "0.17.4" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/thinkle/gourmet") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "08fbw6zp32ws6w9czwy2sqc9c9izlkglsskshj2114d0l79z4gj8")) + (patches (search-patches "gourmet-sqlalchemy-compat.patch")))) + (build-system python-build-system) + (arguments + (list + #:modules `((guix build utils) + (guix build python-build-system) + (ice-9 ftw) + (srfi srfi-26)) + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'prepare-x + ;; Both the tests and the sanity-check phase need an X server to + ;; succeed. + (lambda _ + (system "Xvfb &") + (setenv "DISPLAY" ":0"))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (setenv "HOME" "/tmp") ;needed by tests + (apply invoke "pytest" "-vv" + ;; XXX: This is needed because some tests in deeper + ;; directories or otherwise discovered by Pytest are + ;; broken. + (map (cut string-append "gourmet/tests/" <>) + (scandir "gourmet/tests" + (cut string-prefix? "test_" <>))))))) + (add-after 'install 'install-dekstop-file-and-icons + (lambda _ + (define share (string-append #$output "/share")) + (install-file ".flatpak/io.github.thinkle.Gourmet.desktop" + (string-append share "/applications")) + (install-file ".flatpak/io.github.thinkle.Gourmet.svg" + (string-append share "/icons/Gourmet"))))))) + (native-inputs + (list python-dogtail + python-pytest + python-selenium + xorg-server-for-tests)) + (inputs + (list gtk+ + python-argcomplete + python-beautifulsoup4 + python-gst + python-keyring + python-lxml + python-pillow + python-pycairo + python-pyenchant + python-pygobject + python-requests + python-scrape-schema-recipe + python-sqlalchemy)) + (home-page "https://thinkle.github.io/gourmet/") + (synopsis "Recipe organizer") + (description + "Gourmet Recipe Manager is a recipe organizer that allows you to collect, search, organize, and browse your recipes. Gourmet can also generate shopping lists and calculate nutritional information. It imports Mealmaster, MasterCook and KRecipe files and exports PDFs, webpages, and other formats.") - (license gpl2+))) + (license gpl2+)))) diff --git a/gnu/packages/patches/gourmet-sqlalchemy-compat.patch b/gnu/packages/patches/gourmet-sqlalchemy-compat.patch new file mode 100644 index 0000000000..d0cdf9e5a7 --- /dev/null +++ b/gnu/packages/patches/gourmet-sqlalchemy-compat.patch @@ -0,0 +1,18 @@ +diff --git a/gourmet/backends/db.py b/gourmet/backends/db.py +index faa6a57a..7e6d2bc6 100644 +--- a/gourmet/backends/db.py ++++ b/gourmet/backends/db.py +@@ -773,9 +773,11 @@ class RecData (Pluggable): + """Return the number of rows in table that match criteria + """ + if criteria: +- return table.count(*make_simple_select_arg(criteria,table)).execute().fetchone()[0] ++ return sqlalchemy.select( ++ sqlalchemy.func.count(criteria)).select_from(table).scalar() + else: +- return table.count().execute().fetchone()[0] ++ return sqlalchemy.select( ++ sqlalchemy.func.count()).select_from(table).scalar() + + def fetch_join (self, table1, table2, col1, col2, + column_names=None, sort_by=[], **criteria): -- cgit v1.2.3 From 64c86457db9dceafc3453967e9f6c6fec776ab13 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 29 Apr 2022 23:49:31 -0400 Subject: gnu: Remove python2-subprocess32. * gnu/packages/python-xyz.scm (python2-subprocess32): Delete variable. * gnu/packages/patches/python2-subprocess32-disable-input-test.patch: Delete file. * gnu/local.mk (dist_patch_DATA): De-register it. --- gnu/local.mk | 1 - .../python2-subprocess32-disable-input-test.patch | 18 ----------- gnu/packages/python-xyz.scm | 37 ---------------------- 3 files changed, 56 deletions(-) delete mode 100644 gnu/packages/patches/python2-subprocess32-disable-input-test.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 1a0b998de3..a4d5235be6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1721,7 +1721,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-robotframework-sshlibrary-rf5-compat.patch \ %D%/packages/patches/python-seaborn-kde-test.patch \ %D%/packages/patches/python-seaborn-2690.patch \ - %D%/packages/patches/python2-subprocess32-disable-input-test.patch \ %D%/packages/patches/python-unittest2-python3-compat.patch \ %D%/packages/patches/python-unittest2-remove-argparse.patch \ %D%/packages/patches/python-versioneer-guix-support.patch \ diff --git a/gnu/packages/patches/python2-subprocess32-disable-input-test.patch b/gnu/packages/patches/python2-subprocess32-disable-input-test.patch deleted file mode 100644 index 05b4eef1ba..0000000000 --- a/gnu/packages/patches/python2-subprocess32-disable-input-test.patch +++ /dev/null @@ -1,18 +0,0 @@ -This test tries to send a KeyboardInterrupt, which does -not work in the build environment. - ---- a/test_subprocess32.py 2017-03-06 22:21:49.334045485 +0100 -+++ b/test_subprocess32.py 2017-03-06 22:22:02.490439949 +0100 -@@ -1299,12 +1299,6 @@ - getattr(p, method)(*args) - return p - -- def test_send_signal(self): -- p = self._kill_process('send_signal', signal.SIGINT) -- _, stderr = p.communicate() -- self.assertIn('KeyboardInterrupt', stderr) -- self.assertNotEqual(p.wait(), 0) -- - def test_kill(self): - p = self._kill_process('kill') - _, stderr = p.communicate() diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index dba156eaa8..31c597a859 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -14401,43 +14401,6 @@ to the Python ecosystem.") 3.2.3 for use with older versions of Python and PyPy.") (license license:expat))) -(define-public python2-subprocess32 - (package - (name "python2-subprocess32") - (version "3.2.7") - (source (origin - (method url-fetch) - (uri (pypi-uri "subprocess32" version)) - (sha256 - (base32 - "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y")) - (patches - (search-patches "python2-subprocess32-disable-input-test.patch")))) - (build-system python-build-system) - (arguments - `(#:python ,python-2 - ;; The test suite fails with Python > 2.7.13: - ;; import test.support - ;; ImportError: No module named support - #:tests? #f - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-/bin/sh - (lambda _ - (substitute* '("subprocess32.py" - "test_subprocess32.py") - (("/bin/sh") (which "sh"))) - #t))))) - (home-page "https://github.com/google/python-subprocess32") - (synopsis "Backport of the subprocess module from Python 3.2") - (description - "This is a backport of the @code{subprocess} standard library module -from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some -new features. On POSIX systems it is guaranteed to be reliable when used -in threaded applications. It includes timeout support from Python 3.3 but -otherwise matches 3.2’s API.") - (license license:psfl))) - (define-public python-promise (package (name "python-promise") -- cgit v1.2.3 From edac21bfc78ffea85f4dac7206e5e7cd621bba19 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 29 Apr 2022 23:50:26 -0400 Subject: gnu: Remove wicd. The last release is from 2017, stuck on Python 2. * gnu/packages/wicd.scm: Delete file. * gnu/packages/patches/wicd-bitrate-none-fix.patch: Delete file. * gnu/packages/patches/wicd-get-selected-profile-fix.patch: Likewise. * gnu/packages/patches/wicd-urwid-1.3.patch: Likewise. * gnu/packages/patches/wicd-wpa2-ttls.patch: Likewise. * gnu/local.mk: De-register them. * gnu/services/networking.scm: Remove wicd service... * doc/guix.texi: ... and its documentation. * gnu/system/linux-container.scm (containerized-operating-system) : Remove wicd-service-type. --- doc/guix.texi | 14 -- gnu/local.mk | 5 - gnu/packages/patches/wicd-bitrate-none-fix.patch | 24 --- .../patches/wicd-get-selected-profile-fix.patch | 16 -- gnu/packages/patches/wicd-urwid-1.3.patch | 18 -- gnu/packages/patches/wicd-wpa2-ttls.patch | 38 ---- gnu/packages/wicd.scm | 197 --------------------- gnu/services/networking.scm | 62 ------- gnu/system/linux-container.scm | 3 +- 9 files changed, 1 insertion(+), 376 deletions(-) delete mode 100644 gnu/packages/patches/wicd-bitrate-none-fix.patch delete mode 100644 gnu/packages/patches/wicd-get-selected-profile-fix.patch delete mode 100644 gnu/packages/patches/wicd-urwid-1.3.patch delete mode 100644 gnu/packages/patches/wicd-wpa2-ttls.patch delete mode 100644 gnu/packages/wicd.scm (limited to 'gnu/packages/patches') diff --git a/doc/guix.texi b/doc/guix.texi index 88e009fe7c..2bfff7c2ff 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18659,20 +18659,6 @@ List of additional command-line arguments to pass to the daemon. @end table @end deftp -@cindex wicd -@cindex wireless -@cindex WiFi -@cindex network management -@deffn {Scheme Procedure} wicd-service [#:wicd @var{wicd}] -Return a service that runs @url{https://launchpad.net/wicd,Wicd}, a network -management daemon that aims to simplify wired and wireless networking. - -This service adds the @var{wicd} package to the global profile, providing -several commands to interact with the daemon and configure networking: -@command{wicd-client}, a graphical user interface, and the @command{wicd-cli} -and @command{wicd-curses} user interfaces. -@end deffn - @cindex ModemManager Some networking devices such as modems require special care, and this is what the services below focus on. diff --git a/gnu/local.mk b/gnu/local.mk index a4d5235be6..7a030283a7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -612,7 +612,6 @@ GNU_SYSTEM_MODULES = \ %D%/packages/web-browsers.scm \ %D%/packages/webkit.scm \ %D%/packages/wget.scm \ - %D%/packages/wicd.scm \ %D%/packages/wine.scm \ %D%/packages/wireservice.scm \ %D%/packages/wm.scm \ @@ -1941,10 +1940,6 @@ dist_patch_DATA = \ %D%/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch \ %D%/packages/patches/webrtc-audio-processing-big-endian.patch \ %D%/packages/patches/websocketpp-fix-for-cmake-3.15.patch \ - %D%/packages/patches/wicd-bitrate-none-fix.patch \ - %D%/packages/patches/wicd-get-selected-profile-fix.patch \ - %D%/packages/patches/wicd-urwid-1.3.patch \ - %D%/packages/patches/wicd-wpa2-ttls.patch \ %D%/packages/patches/widelands-add-missing-map-include.patch \ %D%/packages/patches/widelands-system-wide_minizip.patch \ %D%/packages/patches/wmctrl-64-fix.patch \ diff --git a/gnu/packages/patches/wicd-bitrate-none-fix.patch b/gnu/packages/patches/wicd-bitrate-none-fix.patch deleted file mode 100644 index 1809b7217d..0000000000 --- a/gnu/packages/patches/wicd-bitrate-none-fix.patch +++ /dev/null @@ -1,24 +0,0 @@ -Fix copied from https://bugs.launchpad.net/wicd/+bug/1432423/comments/1 - ---- wicd-1.7.3/curses/netentry_curses.py 1969-12-31 19:00:00.000000000 -0500 -+++ wicd-1.7.3/curses/netentry_curses.py 2015-08-11 23:26:19.999999649 -0400 -@@ -538,11 +538,16 @@ - self.bitrates = wireless.GetAvailableBitrates() - self.bitrates.append('auto') - self.bitrate_combo.set_list(self.bitrates) -+ -+ # bitrate property is sometimes None -+ chosen_bitrate = wireless.GetWirelessProperty(networkID, 'bitrate') -+ if chosen_bitrate not in self.bitrates: -+ chosen_bitrate = 'auto' -+ - self.bitrate_combo.set_focus( -- self.bitrates.index( -- wireless.GetWirelessProperty(networkID, 'bitrate') -- ) -+ self.bitrates.index(chosen_bitrate) - ) -+ - self.allow_lower_bitrates_chkbox.set_state( - to_bool(self.format_entry(networkID, 'allow_lower_bitrates')) - ) diff --git a/gnu/packages/patches/wicd-get-selected-profile-fix.patch b/gnu/packages/patches/wicd-get-selected-profile-fix.patch deleted file mode 100644 index 3042a87308..0000000000 --- a/gnu/packages/patches/wicd-get-selected-profile-fix.patch +++ /dev/null @@ -1,16 +0,0 @@ -Fix copied from https://bugs.launchpad.net/wicd/+bug/1421918/comments/2 - ---- wicd-1.7.3/curses/wicd-curses.py 2014-12-21 16:57:33 +0000 -+++ wicd-1.7.3/curses/wicd-curses.py 2015-02-24 23:41:01 +0000 -@@ -532,7 +532,10 @@ - def get_selected_profile(self): - """Get the selected wired profile""" - loc = self.get_focus()[1] -- return self.theList[loc] -+ if len(self.theList) > loc: -+ return self.theList[loc] -+ else: -+ return self.theList[-1] - - - class AdHocDialog(Dialog2): diff --git a/gnu/packages/patches/wicd-urwid-1.3.patch b/gnu/packages/patches/wicd-urwid-1.3.patch deleted file mode 100644 index 1dc47f869b..0000000000 --- a/gnu/packages/patches/wicd-urwid-1.3.patch +++ /dev/null @@ -1,18 +0,0 @@ -Update the wicd-curses client to work with urwid-1.3. Based on a patch from: -http://technik.blogbasis.net/wicd-curses-fix-fuer-attributeerror-screen-object-no-attribute-get_input_nonblocking-04-12-2014 - ---- wicd-1.7.3/curses/wicd-curses.py.orig 2014-12-21 14:40:46.000000000 -0500 -+++ wicd-1.7.3/curses/wicd-curses.py 2015-02-05 23:41:17.530901204 -0500 -@@ -1153,9 +1153,10 @@ - if not ui._started: - return False - -- input_data = ui.get_input_nonblocking() -+ ui.set_input_timeouts(max_wait=0) -+ input_data = ui.get_input() - # Resolve any "alarms" in the waiting -- self.handle_keys(input_data[1]) -+ self.handle_keys(input_data) - - # Update the screen - canvas = self.frame.render((self.size), True) diff --git a/gnu/packages/patches/wicd-wpa2-ttls.patch b/gnu/packages/patches/wicd-wpa2-ttls.patch deleted file mode 100644 index 9d80ee7ed2..0000000000 --- a/gnu/packages/patches/wicd-wpa2-ttls.patch +++ /dev/null @@ -1,38 +0,0 @@ -Add a template for WPA2-TTLS, which is notably used by Eduroam. - ---- a/encryption/templates/active -+++ b/encryption/templates/active -@@ -4,6 +4,7 @@ wpa-psk - wpa-psk-hex - wpa2-leap - wpa2-peap -+wpa2-ttls - wep-hex - wep-passphrase - wep-shared -diff --git a/encryption/templates/wpa2-ttls b/encryption/templates/wpa2-ttls -new file mode 100644 -index 0000000..4f66a1e ---- /dev/null -+++ b/encryption/templates/wpa2-ttls -@@ -0,0 +1,20 @@ -+name = WPA2-TTLS (used notably by Eduroam) -+author = various contributors -+version = 1 -+require identity *Identity anonymous_identity *Anonymous_identity password *Password ca_cert *Path_to_CA_Cert -+protected password *Password -+----- -+ctrl_interface=/var/run/wpa_supplicant -+network={ -+ ssid="$_ESSID" -+ scan_ssid=$_SCAN -+ proto=WPA2 -+ key_mgmt=WPA-EAP -+ group=CCMP TKIP -+ eap=TTLS -+ identity="$_IDENTITY" -+ password="$_PASSWORD" -+ anonymous_identity="$_ANONYMOUS_IDENTITY" -+ ca_cert="$_CA_CERT" -+ phase2="auth=PAP" -+} diff --git a/gnu/packages/wicd.scm b/gnu/packages/wicd.scm deleted file mode 100644 index 073d440479..0000000000 --- a/gnu/packages/wicd.scm +++ /dev/null @@ -1,197 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2015 Mark H Weaver -;;; Copyright © 2015 Pierre-Antoine Rault -;;; Copyright © 2015 Andreas Enge -;;; Copyright © 2016 Ludovic Courtès -;;; -;;; 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 wicd) - #:use-module (guix packages) - #:use-module (guix download) - #:use-module (guix build-system python) - #:use-module (guix licenses) - #:use-module (guix utils) - #:use-module (gnu packages) - #:use-module (gnu packages glib) - #:use-module (gnu packages gtk) - #:use-module (gnu packages gnome) - #:use-module (gnu packages gettext) - #:use-module (gnu packages linux) - #:use-module (gnu packages admin) - #:use-module (gnu packages python) - #:use-module (gnu packages python-xyz)) - -(define-public wicd - (package - (name "wicd") - (version "1.7.4") - (source - (origin - (method url-fetch) - (uri (string-append "https://launchpad.net/wicd/" - (version-major+minor version) "/" version - "/+download/wicd-" version ".tar.gz")) - (sha256 - (base32 "0qpbwwsrqdp40mm3a8djpn2d055rxxspdhwijwsdnws700a9d637")) - (patches (search-patches - "wicd-bitrate-none-fix.patch" - "wicd-get-selected-profile-fix.patch" - "wicd-urwid-1.3.patch" - "wicd-wpa2-ttls.patch")))) - (build-system python-build-system) - (native-inputs `(("gettext" ,gettext-minimal))) - (inputs `(("dbus-glib" ,dbus-glib) - ("python2-dbus" ,python2-dbus) - ("python2-pygtk" ,python2-pygtk) - ("python2-urwid" ,python2-urwid) - ("python2-babel" ,python2-babel) - ("wireless-tools" ,wireless-tools) - ("wpa-supplicant" ,wpa-supplicant) - ("net-tools" ,net-tools) - ("isc-dhcp" ,isc-dhcp) - ("iproute" ,iproute) - ("hicolor-icon-theme" ,hicolor-icon-theme))) - (arguments - `(#:python ,python-2 - #:tests? #f ; test suite requires networking - ;; wicd directly extends distutils command classes, - ;; we can't easily make setup.py use setuptools. - #:use-setuptools? #f - #:phases - (modify-phases %standard-phases - (add-before 'build 'configure - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (python (assoc-ref inputs "python"))) - (define (which* cmd) - (cond ((string=? cmd "ping") - "/run/setuid-programs/ping") - ((which cmd) - => identity) - (else - (format (current-error-port) - "WARNING: Unable to find absolute path for ~s~%" - cmd) - #f))) - (substitute* "setup.py" - ;; The handling of unrecognized distros in setup.py is - ;; broken. Work around the problem. - (("\\('init=', " all) - (string-append "#" all)) - ;; Inhibit attempts to install in /var or /etc. - (("\\(wpath\\.(log|etc|networks|.*scripts), " all) - (string-append "#" all))) - - ;; Patch references to subprograms with absolute pathnames. - (substitute* "wicd/wnettools.py" - (("(misc\\.Run\\(\\[?[\"'])([^\"' ]*)" all pre cmd) - (string-append pre (which* cmd))) - (("(self\\._find_program_path|misc\\.find_path)\\([\"']([^\"']*)[\"']\\)" - all dummy cmd) - (let ((pathname (which* cmd))) - (if pathname - (string-append "'" pathname "'") - "None"))) - (("([\"'])(ifconfig|route|wpa_cli|wpa_supplicant|iwconfig|iwpriv|iwlist|ping)" - all open-quote cmd) - (string-append open-quote (which* cmd)))) - - ;; setup.py cannot cope without LANG - (setenv "LANG" "C") - - (let ((params - (list - (string-append "--python=" python "/bin/python") - "--no-install-init" - "--no-install-docs" - "--no-install-acpi" - "--no-install-pmutils" - "--no-install-kde" - "--no-install-gnome-shell-extensions" - - ;; Don't pass --distro= despite setup.py's complaints. - ;; Guix isn't recognised, and if it ever would be we'd - ;; rather ask upstream to follow standards instead. - - "--wicdgroup=netdev" - "--loggroup=root" - "--logperms=0640" - - ;; XXX setup.py configure asks us to pass --init=, - ;; but if we do it says "no such option 'init'". - ;; (string-append "--init=" out "/etc/init.d") - - (string-append "--initfile=" out "/etc/init.d/wicd") - (string-append "--lib=" out "/lib/wicd") - (string-append "--share=" out "/share/wicd") - - "--etc=/etc/wicd" - "--scripts=/etc/wicd/scripts" - "--pmutils=/etc/pm-utils/sleep.d" - - (string-append "--encryption=" - out "/etc/encryption/templates") - (string-append "--bin=" out "/bin") - (string-append "--sbin=" out "/sbin") - (string-append "--daemon=" out "/share/wicd/daemon") - (string-append "--backends=" out "/share/wicd/backends") - (string-append "--curses=" out "/share/wicd/curses") - (string-append "--gtk=" out "/share/wicd/gtk") - (string-append "--cli=" out "/share/wicd/cli") - (string-append "--gnome-shell-extensions=" - out "/share/gnome-shell-extensions") - (string-append "--icons=" out "/share/icons/hicolor") - (string-append "--pixmaps=" out "/share/pixmaps") - (string-append "--images=" out "/share/icons") - (string-append "--dbus=" out "/etc/dbus-1/system.d") - (string-append "--dbus-service=" - out "/share/dbus-1/system-services") - (string-append "--systemd=" out "/lib/systemd/system") - (string-append "--logrotate=" out "/etc/logrotate.d") - (string-append "--desktop=" out "/share/applications") - (string-append "--translations=" out "/share/locale") - (string-append "--autostart=" out "/etc/xdg/autostart") - (string-append "--docdir=" out "/share/doc/wicd") - (string-append "--mandir=" out "/share/man") - (string-append "--kdedir=" out "/share/autostart")))) - (format #t - "running ~s with command ~s and parameters ~s~%" - "python setup.py" "configure" params) - (apply invoke "python" "setup.py" "configure" params))))) - (add-after 'install 'post-install - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - ;; wicd's installer tries to put dhclient.conf.template.default - ;; in /etc/wicd/other, which is not available in the build - ;; environment, so here we install it manually in the output - ;; directory. - (let ((dest-dir (string-append out "/etc/wicd")) - (name "dhclient.conf.template.default")) - (install-file (string-append "other/" name) dest-dir)) - - ;; Copy index.theme from hicolor-icon-theme. This is needed to - ;; allow wicd-gtk to find its icons. - (let ((hicolor (assoc-ref inputs "hicolor-icon-theme")) - (name "/share/icons/hicolor/index.theme")) - (install-file (string-append hicolor name) - (string-append out "/share/icons/hicolor"))) - #t)))))) - (synopsis "Network connection manager") - (description "Wicd is a network manager that aims to simplify wired and -wireless networking.") - (home-page "https://launchpad.net/wicd") - (license gpl2+))) diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index d8fe638940..90b9317510 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -57,7 +57,6 @@ #:use-module (gnu packages messaging) #:use-module (gnu packages networking) #:use-module (gnu packages ntp) - #:use-module (gnu packages wicd) #:use-module (gnu packages gnome) #:use-module (gnu packages ipfs) #:use-module (gnu build linux-container) @@ -130,9 +129,6 @@ tor-hidden-service tor-service-type - wicd-service-type - wicd-service - network-manager-configuration network-manager-configuration? network-manager-configuration-dns @@ -1092,64 +1088,6 @@ project's documentation} for more information." (service tor-hidden-service-type (hidden-service name mapping))) - -;;; -;;; Wicd. -;;; - -(define %wicd-activation - ;; Activation gexp for Wicd. - #~(begin - (use-modules (guix build utils)) - - (mkdir-p "/etc/wicd") - (let ((file-name "/etc/wicd/dhclient.conf.template.default")) - (unless (file-exists? file-name) - (copy-file (string-append #$wicd file-name) - file-name))) - - ;; Wicd invokes 'wpa_supplicant', which needs this directory for its - ;; named socket files. - (mkdir-p "/var/run/wpa_supplicant") - (chmod "/var/run/wpa_supplicant" #o750))) - -(define (wicd-shepherd-service wicd) - "Return a shepherd service for WICD." - (list (shepherd-service - (documentation "Run the Wicd network manager.") - (provision '(networking)) - (requirement '(user-processes dbus-system loopback)) - (start #~(make-forkexec-constructor - (list (string-append #$wicd "/sbin/wicd") - "--no-daemon"))) - (stop #~(make-kill-destructor))))) - -(define wicd-service-type - (service-type (name 'wicd) - (extensions - (list (service-extension shepherd-root-service-type - wicd-shepherd-service) - (service-extension dbus-root-service-type - list) - (service-extension activation-service-type - (const %wicd-activation)) - - ;; Add Wicd to the global profile. - (service-extension profile-service-type list))) - (description - "Run @url{https://launchpad.net/wicd,Wicd}, a network -management daemon that aims to simplify wired and wireless networking."))) - -(define* (wicd-service #:key (wicd wicd)) - "Return a service that runs @url{https://launchpad.net/wicd,Wicd}, a network -management daemon that aims to simplify wired and wireless networking. - -This service adds the @var{wicd} package to the global profile, providing -several commands to interact with the daemon and configure networking: -@command{wicd-client}, a graphical user interface, and the @command{wicd-cli} -and @command{wicd-curses} user interfaces." - (service wicd-service-type wicd)) - ;;; ;;; ModemManager diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm index eeb0f68c02..24077e347a 100644 --- a/gnu/system/linux-container.scm +++ b/gnu/system/linux-container.scm @@ -129,8 +129,7 @@ containerized OS. EXTRA-FILE-SYSTEMS is a list of file systems to add to OS." static-networking-service-type dhcp-client-service-type network-manager-service-type - connman-service-type - wicd-service-type) + connman-service-type) (list)))) (define services-to-add -- cgit v1.2.3 From 88a77bdda15cd915481de02655987489853786c3 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 1 May 2022 02:26:52 -0400 Subject: gnu: Remove python2-pygobject. * gnu/packages/glib.scm (python2-pygobject, python2-pygobject-2): Delete variables. (python-pygobject)[properties]: Delete field. * gnu/packages/patches/python2-pygobject-2-deprecation.patch: Delete file. * gnu/local.mk (dist_patch_DATA): De-register it. * gnu/packages/gnome.scm (libsecret): Remove commented Python 2 inputs. --- gnu/local.mk | 1 - gnu/packages/glib.scm | 70 +--------------------- gnu/packages/gnome.scm | 7 --- .../patches/python2-pygobject-2-deprecation.patch | 39 ------------ 4 files changed, 1 insertion(+), 116 deletions(-) delete mode 100644 gnu/packages/patches/python2-pygobject-2-deprecation.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 7a030283a7..b54c1fbefe 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1710,7 +1710,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-pycrypto-time-clock.patch \ %D%/packages/patches/python-pyan3-fix-absolute-path-bug.patch \ %D%/packages/patches/python-pyan3-fix-positional-arguments.patch \ - %D%/packages/patches/python2-pygobject-2-deprecation.patch \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ %D%/packages/patches/python-pytorch-runpath.patch \ %D%/packages/patches/python-pytorch-system-libraries.patch \ diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 30e5433776..09d5a03555 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -816,44 +816,6 @@ useful for C++.") (modify-inputs (package-propagated-inputs glibmm) (replace "libsigc++" libsigc++-2))))) -(define-public python2-pygobject-2 - (package - (name "python2-pygobject") - ;; This was the last version to declare the 2.0 platform number, i.e. its - ;; pkg-config files were named pygobject-2.0.pc - (version "2.28.7") - (source - (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/pygobject/" - (version-major+minor version) - "/pygobject-" version ".tar.xz")) - (sha256 - (base32 - "0nkam61rsn7y3wik3vw46wk5q2cjfh2iph57hl9m39rc8jijb7dv")) - (patches (search-patches "python2-pygobject-2-deprecation.patch")))) - (build-system gnu-build-system) - (native-inputs - `(("which" ,which) - ("glib-bin" ,glib "bin") ;for tests: glib-compile-schemas - ("pkg-config" ,pkg-config) - ("dbus" ,dbus))) ;for tests - (inputs - `(("python" ,python-2) - ("glib" ,glib) - ("python2-pycairo" ,python2-pycairo) - ("gobject-introspection" ,gobject-introspection))) - (propagated-inputs - (list libffi)) ;mentioned in pygobject-2.0.pc - (arguments - `(#:tests? #f ;segfaults during tests - #:configure-flags '("LIBS=-lcairo-gobject"))) - (home-page "https://pypi.org/project/PyGObject/") - (synopsis "Python bindings for GObject") - (description - "Python bindings for GLib, GObject, and GIO.") - (license license:lgpl2.1+))) - (define-public python-pygobject (package (name "python-pygobject") @@ -902,37 +864,7 @@ useful for C++.") (synopsis "Python bindings for GObject") (description "Python bindings for GLib, GObject, and GIO.") - (license license:lgpl2.1+) - (properties `((python2-variant . ,(delay python2-pygobject)))))) - -(define-public python2-pygobject - (let ((base (strip-python2-variant python-pygobject))) - (package/inherit base - (name "python2-pygobject") - - ;; Note: We use python-build-system here, because Meson only supports - ;; Python 3, and needs PYTHONPATH etc set up correctly, which makes it - ;; difficult to use for Python 2 projects. - (build-system python-build-system) - (arguments - `(#:python ,python-2 - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'delete-broken-tests - (lambda _ - ;; FIXME: this test freezes and times out. - (delete-file "tests/test_mainloop.py") - ;; FIXME: this test fails with this kind of error: - ;; AssertionError: != -Date: Sat, 13 Aug 2011 04:13:28 -0400 -Subject: remove references to deprecated GI_INFO_TYPE_ERROR_DOMAIN - - -diff --git a/gi/pygi-info.c b/gi/pygi-info.c -index 8729e25..007b609 100644 ---- a/gi/pygi-info.c -+++ b/gi/pygi-info.c -@@ -165,9 +165,6 @@ _pygi_info_new (GIBaseInfo *info) - case GI_INFO_TYPE_CONSTANT: - type = &PyGIConstantInfo_Type; - break; -- case GI_INFO_TYPE_ERROR_DOMAIN: -- type = &PyGIErrorDomainInfo_Type; -- break; - case GI_INFO_TYPE_UNION: - type = &PyGIUnionInfo_Type; - break; -@@ -484,7 +481,6 @@ _pygi_g_type_info_size (GITypeInfo *type_info) - case GI_INFO_TYPE_INVALID: - case GI_INFO_TYPE_FUNCTION: - case GI_INFO_TYPE_CONSTANT: -- case GI_INFO_TYPE_ERROR_DOMAIN: - case GI_INFO_TYPE_VALUE: - case GI_INFO_TYPE_SIGNAL: - case GI_INFO_TYPE_PROPERTY: -@@ -863,7 +859,6 @@ pygi_g_struct_info_is_simple (GIStructInfo *struct_info) - case GI_INFO_TYPE_INVALID: - case GI_INFO_TYPE_FUNCTION: - case GI_INFO_TYPE_CONSTANT: -- case GI_INFO_TYPE_ERROR_DOMAIN: - case GI_INFO_TYPE_VALUE: - case GI_INFO_TYPE_SIGNAL: - case GI_INFO_TYPE_PROPERTY: --- -cgit v0.10.1 - -- cgit v1.2.3 From dc71b4f1c65c9f3244f96aaf69b9218825361eda Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 6 May 2022 00:09:29 -0400 Subject: gnu: breezy: Update to 3.2.2. * gnu/packages/patches/breezy-fix-gio.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/version-control.scm (breezy): Update to 3.2.2. [source]{snippet}: Delete pre-generated cythonized C files. {patches}: Apply patch. [tests?]: Disable tests. [phases]{patch-test-shebangs, check}: New phase and override. [native-inputs]: Add nano, python-cython, python-docutils, and python-testrepository. [inputs]: Use new style. Add python-launchpadlib and python-pygobject. [description]: Adjust Bazaar URL. --- gnu/local.mk | 1 + gnu/packages/patches/breezy-fix-gio.patch | 338 ++++++++++++++++++++++++++++++ gnu/packages/version-control.scm | 64 ++++-- 3 files changed, 388 insertions(+), 15 deletions(-) create mode 100644 gnu/packages/patches/breezy-fix-gio.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index b54c1fbefe..513216183d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -916,6 +916,7 @@ dist_patch_DATA = \ %D%/packages/patches/bloomberg-bde-cmake-module-path.patch \ %D%/packages/patches/bloomberg-bde-tools-fix-install-path.patch \ %D%/packages/patches/bpftrace-disable-bfd-disasm.patch \ + %D%/packages/patches/breezy-fix-gio.patch \ %D%/packages/patches/byobu-writable-status.patch \ %D%/packages/patches/bubblewrap-fix-locale-in-tests.patch \ %D%/packages/patches/cabal-install-base16-bytestring1.0.patch \ diff --git a/gnu/packages/patches/breezy-fix-gio.patch b/gnu/packages/patches/breezy-fix-gio.patch new file mode 100644 index 0000000000..f70e761555 --- /dev/null +++ b/gnu/packages/patches/breezy-fix-gio.patch @@ -0,0 +1,338 @@ +This patch combines https://code.launchpad.net/~jelmer/brz/enable-gio/+merge/419150 +and https://bazaar.launchpad.net/~jelmer/brz/fix-gio/revision/7570. + +=== modified file 'breezy/transport/gio_transport.py' +--- a/breezy/transport/gio_transport.py 2022-04-09 12:17:41 +0000 ++++ b/breezy/transport/gio_transport.py 2022-04-09 12:33:51 +0000 +@@ -52,11 +52,7 @@ + from ..tests.test_server import TestServer + + try: +- import glib +-except ImportError as e: +- raise errors.DependencyNotPresent('glib', e) +-try: +- import gio ++ from gi.repository import Gio as gio + except ImportError as e: + raise errors.DependencyNotPresent('gio', e) + + +@@ -57,6 +57,9 @@ + raise errors.DependencyNotPresent('gio', e) + + ++from gi.repository.GLib import GError ++ ++ + class GioLocalURLServer(TestServer): + """A pretend server for local transports, using file:// urls. + +@@ -81,7 +84,7 @@ + def __init__(self, transport, relpath): + FileStream.__init__(self, transport, relpath) + self.gio_file = transport._get_GIO(relpath) +- self.stream = self.gio_file.create() ++ self.stream = self.gio_file.create(0, None) + + def _close(self): + self.stream.close() +@@ -90,7 +93,7 @@ + try: + # Using pump_string_file seems to make things crash + osutils.pumpfile(BytesIO(bytes), self.stream) +- except gio.Error as e: ++ except GError as e: + # self.transport._translate_gio_error(e,self.relpath) + raise errors.BzrError(str(e)) + +@@ -98,12 +101,12 @@ + class GioStatResult(object): + + def __init__(self, f): +- info = f.query_info('standard::size,standard::type') ++ info = f.query_info('standard::size,standard::type', 0, None) + self.st_size = info.get_size() + type = info.get_file_type() +- if (type == gio.FILE_TYPE_REGULAR): ++ if type == gio.FileType.REGULAR: + self.st_mode = stat.S_IFREG +- elif type == gio.FILE_TYPE_DIRECTORY: ++ elif type == gio.FileType.DIRECTORY: + self.st_mode = stat.S_IFDIR + + +@@ -122,7 +125,7 @@ + user, netloc = netloc.rsplit('@', 1) + # Seems it is not possible to list supported backends for GIO + # so a hardcoded list it is then. +- gio_backends = ['dav', 'file', 'ftp', 'obex', 'sftp', 'ssh', 'smb'] ++ gio_backends = ['dav', 'file', 'ftp', 'obex', 'sftp', 'ssh', 'smb', 'http'] + if scheme not in gio_backends: + raise urlutils.InvalidURL(base, + extra="GIO support is only available for " + +@@ -138,13 +141,10 @@ + _from_transport=_from_transport) + + def _relpath_to_url(self, relpath): +- full_url = urlutils.join(self.url, relpath) +- if isinstance(full_url, str): +- raise urlutils.InvalidURL(full_url) +- return full_url ++ return urlutils.join(self.url, relpath) + + def _get_GIO(self, relpath): +- """Return the ftplib.GIO instance for this object.""" ++ """Return the GIO instance for this object.""" + # Ensures that a connection is established + connection = self._get_connection() + if connection is None: +@@ -152,7 +152,7 @@ + connection, credentials = self._create_connection() + self._set_connection(connection, credentials) + fileurl = self._relpath_to_url(relpath) +- file = gio.File(fileurl) ++ file = gio.File.new_for_uri(fileurl) + return file + + def _auth_cb(self, op, message, default_user, default_domain, flags): +@@ -197,7 +197,7 @@ + try: + obj.mount_enclosing_volume_finish(res) + self.loop.quit() +- except gio.Error as e: ++ except GError as e: + self.loop.quit() + raise errors.BzrError( + "Failed to mount the given location: " + str(e)) +@@ -209,12 +209,12 @@ + user, password = credentials + + try: +- connection = gio.File(self.url) ++ connection = gio.File.new_for_uri(self.url) + mount = None + try: + mount = connection.find_enclosing_mount() +- except gio.Error as e: +- if (e.code == gio.ERROR_NOT_MOUNTED): ++ except GError as e: ++ if e.code == gio.IOErrorEnum.NOT_MOUNTED: + self.loop = glib.MainLoop() + ui.ui_factory.show_message('Mounting %s using GIO' % + self.url) +@@ -227,7 +227,7 @@ + m = connection.mount_enclosing_volume(op, + self._mount_done_cb) + self.loop.run() +- except gio.Error as e: ++ except GError as e: + raise errors.TransportError(msg="Error setting up connection:" + " %s" % str(e), orig_error=e) + return connection, (user, password) +@@ -257,8 +257,8 @@ + if stat.S_ISREG(st.st_mode) or stat.S_ISDIR(st.st_mode): + return True + return False +- except gio.Error as e: +- if e.code == gio.ERROR_NOT_FOUND: ++ except GError as e: ++ if e.code == gio.IOErrorEnum.NOT_FOUND: + return False + else: + self._translate_gio_error(e, relpath) +@@ -281,10 +281,10 @@ + buf = fin.read() + fin.close() + return BytesIO(buf) +- except gio.Error as e: ++ except GError as e: + # If we get a not mounted here it might mean + # that a bad path has been entered (or that mount failed) +- if (e.code == gio.ERROR_NOT_MOUNTED): ++ if e.code == gio.IOErrorEnum.NOT_MOUNTED: + raise errors.PathError(relpath, + extra='Failed to get file, make sure the path is correct. ' + + str(e)) +@@ -307,19 +307,19 @@ + closed = True + try: + f = self._get_GIO(tmppath) +- fout = f.create() ++ fout = f.create(0, None) + closed = False + length = self._pump(fp, fout) + fout.close() + closed = True + self.stat(tmppath) + dest = self._get_GIO(relpath) +- f.move(dest, flags=gio.FILE_COPY_OVERWRITE) ++ f.move(dest, flags=gio.FileCopyFlags.OVERWRITE) + f = None + if mode is not None: + self._setmode(relpath, mode) + return length +- except gio.Error as e: ++ except GError as e: + self._translate_gio_error(e, relpath) + finally: + if not closed and fout is not None: +@@ -335,7 +335,7 @@ + f = self._get_GIO(relpath) + f.make_directory() + self._setmode(relpath, mode) +- except gio.Error as e: ++ except GError as e: + self._translate_gio_error(e, relpath) + + def open_write_stream(self, relpath, mode=None): +@@ -369,14 +369,11 @@ + f.delete() + else: + raise errors.NotADirectory(relpath) +- except gio.Error as e: ++ except GError as e: + self._translate_gio_error(e, relpath) + except errors.NotADirectory as e: + # just pass it forward + raise e +- except Exception as e: +- mutter('failed to rmdir %s: %s' % (relpath, e)) +- raise errors.PathError(relpath) + + def append_file(self, relpath, file, mode=None): + """Append the text in the file-like object into the final +@@ -392,7 +389,7 @@ + result = 0 + fo = self._get_GIO(tmppath) + fi = self._get_GIO(relpath) +- fout = fo.create() ++ fout = fo.create(0, None) + try: + info = GioStatResult(fi) + result = info.st_size +@@ -400,11 +397,11 @@ + self._pump(fin, fout) + fin.close() + # This separate except is to catch and ignore the +- # gio.ERROR_NOT_FOUND for the already existing file. ++ # gio.IOErrorEnum.NOT_FOUND for the already existing file. + # It is valid to open a non-existing file for append. + # This is caused by the broken gio append_to... +- except gio.Error as e: +- if e.code != gio.ERROR_NOT_FOUND: ++ except GError as e: ++ if e.code != gio.IOErrorEnum.NOT_FOUND: + self._translate_gio_error(e, relpath) + length = self._pump(file, fout) + fout.close() +@@ -413,9 +410,11 @@ + raise errors.BzrError("Failed to append size after " + "(%d) is not original (%d) + written (%d) total (%d)" % + (info.st_size, result, length, result + length)) +- fo.move(fi, flags=gio.FILE_COPY_OVERWRITE) ++ fo.move( ++ fi, flags=gio.FileCopyFlags.OVERWRITE, cancellable=None, ++ progress_callback=None) + return result +- except gio.Error as e: ++ except GError as e: + self._translate_gio_error(e, relpath) + + def _setmode(self, relpath, mode): +@@ -429,8 +428,8 @@ + try: + f = self._get_GIO(relpath) + f.set_attribute_uint32(gio.FILE_ATTRIBUTE_UNIX_MODE, mode) +- except gio.Error as e: +- if e.code == gio.ERROR_NOT_SUPPORTED: ++ except GError as e: ++ if e.code == gio.IOErrorEnum.NOT_SUPPORTED: + # Command probably not available on this server + mutter("GIO Could not set permissions to %s on %s. %s", + oct(mode), self._remote_path(relpath), str(e)) +@@ -444,8 +443,8 @@ + mutter("GIO move (rename): %s => %s", rel_from, rel_to) + f = self._get_GIO(rel_from) + t = self._get_GIO(rel_to) +- f.move(t) +- except gio.Error as e: ++ f.move(t, flags=0, cancellable=None, progress_callback=None) ++ except GError as e: + self._translate_gio_error(e, rel_from) + + def move(self, rel_from, rel_to): +@@ -455,8 +454,8 @@ + mutter("GIO move: %s => %s", rel_from, rel_to) + f = self._get_GIO(rel_from) + t = self._get_GIO(rel_to) +- f.move(t, flags=gio.FILE_COPY_OVERWRITE) +- except gio.Error as e: ++ f.move(t, flags=gio.FileCopyFlags.OVERWRITE) ++ except GError as e: + self._translate_gio_error(e, relfrom) + + def delete(self, relpath): +@@ -466,7 +465,7 @@ + mutter("GIO delete: %s", relpath) + f = self._get_GIO(relpath) + f.delete() +- except gio.Error as e: ++ except GError as e: + self._translate_gio_error(e, relpath) + + def external_url(self): +@@ -489,11 +488,11 @@ + try: + entries = [] + f = self._get_GIO(relpath) +- children = f.enumerate_children(gio.FILE_ATTRIBUTE_STANDARD_NAME) ++ children = f.enumerate_children(gio.FILE_ATTRIBUTE_STANDARD_NAME, 0, None) + for child in children: + entries.append(urlutils.escape(child.get_name())) + return entries +- except gio.Error as e: ++ except GError as e: + self._translate_gio_error(e, relpath) + + def iter_files_recursive(self): +@@ -519,7 +518,7 @@ + mutter("GIO stat: %s", relpath) + f = self._get_GIO(relpath) + return GioStatResult(f) +- except gio.Error as e: ++ except GError as e: + self._translate_gio_error(e, relpath, extra='error w/ stat') + + def lock_read(self, relpath): +@@ -556,21 +555,21 @@ + mutter("GIO Error: %s %s" % (str(err), path)) + if extra is None: + extra = str(err) +- if err.code == gio.ERROR_NOT_FOUND: ++ if err.code == gio.IOErrorEnum.NOT_FOUND: + raise errors.NoSuchFile(path, extra=extra) +- elif err.code == gio.ERROR_EXISTS: ++ elif err.code == gio.IOErrorEnum.EXISTS: + raise errors.FileExists(path, extra=extra) +- elif err.code == gio.ERROR_NOT_DIRECTORY: ++ elif err.code == gio.IOErrorEnum.NOT_DIRECTORY: + raise errors.NotADirectory(path, extra=extra) +- elif err.code == gio.ERROR_NOT_EMPTY: ++ elif err.code == gio.IOErrorEnum.NOT_EMPTY: + raise errors.DirectoryNotEmpty(path, extra=extra) +- elif err.code == gio.ERROR_BUSY: ++ elif err.code == gio.IOErrorEnum.BUSY: + raise errors.ResourceBusy(path, extra=extra) +- elif err.code == gio.ERROR_PERMISSION_DENIED: ++ elif err.code == gio.IOErrorEnum.PERMISSION_DENIED: + raise errors.PermissionDenied(path, extra=extra) +- elif err.code == gio.ERROR_HOST_NOT_FOUND: ++ elif err.code == gio.IOErrorEnum.HOST_NOT_FOUND: + raise errors.PathError(path, extra=extra) +- elif err.code == gio.ERROR_IS_DIRECTORY: ++ elif err.code == gio.IOErrorEnum.IS_DIRECTORY: + raise errors.PathError(path, extra=extra) + else: + mutter('unable to understand error for path: %s: %s', path, err) + diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 30d15919ab..7351d96600 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -187,29 +187,63 @@ as well as the classic centralized workflow.") (uri (string-append "https://launchpad.net/brz/" (version-major+minor version) "/" version "/+download/breezy-" version ".tar.gz")) + (modules '((guix build utils))) + ;; Delete pre-generated Cython C files. + (snippet '(for-each delete-file (find-files "." "\\pyx.c$"))) (sha256 - (base32 "1md4b6ajawf5h50fqizmjj0g833ihc674dh7fn0mvl4d412nwyhq")))) + (base32 + "1md4b6ajawf5h50fqizmjj0g833ihc674dh7fn0mvl4d412nwyhq")) + (patches (search-patches "breezy-fix-gio.patch")))) (build-system python-build-system) - ;; TODO: Maybe regenerate C files with Cython? - (inputs - `(("gettext" ,gettext-minimal) - ("python-configobj" ,python-configobj) - ("python-dulwich" ,python-dulwich) - ("python-fastbencode" ,python-fastbencode) - ("python-fastimport" ,python-fastimport) - ("python-paramiko" ,python-paramiko) - ("python-patiencediff" ,python-patiencediff) - ("python-pycryptodome" ,python-pycryptodome) - ("python-pygpgme" ,python-pygpgme))) (arguments - `(#:tests? #f)) ; no tests in release tarball + (list + #:tests? #f ;FIXME: the test suite hangs + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-test-shebangs + (lambda _ + (substitute* (append (find-files "breezy/bzr/tests") + (find-files "breezy/tests")) + (("#!/bin/sh") + (format #f "#!~a" (which "sh")))))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; The test_read_bundle tests fails with "TypeError: a + ;; bytes-like object is required, not '_ResultTuple'" (see: + ;; https://bugs.launchpad.net/brz/+bug/1968415/comments/4). + (substitute* "breezy/bzr/tests/__init__.py" + (("'test_read_bundle'," all) + (string-append "# " all))) + (setenv "BZR_EDITOR" "nano") + (setenv "HOME" "/tmp") + (invoke "testr" "init") + (invoke "testr" "run"))))))) + (native-inputs + (list nano ;for tests + python-cython + python-docutils + python-subunit + python-testrepository)) + (inputs + (list gettext-minimal + python-configobj + python-dulwich + python-fastbencode + python-fastimport + python-launchpadlib + python-paramiko + python-patiencediff + python-pycryptodome + python-pygobject + python-pygpgme)) (home-page "https://www.breezy-vcs.org/") (synopsis "Decentralized revision control system") (description "Breezy (@command{brz}) is a decentralized revision control system. By default, Breezy provides support for both the -@uref{https://www.bazaar-vcs.org, Bazaar} and @uref{https://www.git-scm.com, -Git} file formats. Breezy is backwards compatible with Bazaar's disk format +@uref{https://bazaar.canonical.com/, Bazaar} and @uref{https://www.git-scm.com, +Git} file formats. Breezy is backwabrds compatible with Bazaar's disk format and protocols. One of the key differences with Bazaar is that Breezy runs on Python 3.3 and later, rather than on Python 2.") (license license:gpl2+))) -- cgit v1.2.3 From aad73bb58edd03d448cc0c9c4fd209eda7976ec4 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 12 May 2022 21:40:30 -0400 Subject: gnu: Remove rapicorn. * gnu/packages/graphics.scm (rapicorn): Delete variable. * gnu/packages/patches/rapicorn-isnan.patch: Remove patch. * gnu/local.mk (dist_patch_DATA): De-register it. --- gnu/local.mk | 1 - gnu/packages/graphics.scm | 67 ------------------------ gnu/packages/patches/rapicorn-isnan.patch | 87 ------------------------------- 3 files changed, 155 deletions(-) delete mode 100644 gnu/packages/patches/rapicorn-isnan.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 513216183d..1286bdddb5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1747,7 +1747,6 @@ dist_patch_DATA = \ %D%/packages/patches/ragel-char-signedness.patch \ %D%/packages/patches/randomjungle-disable-static-build.patch \ %D%/packages/patches/range-v3-build-with-gcc10.patch \ - %D%/packages/patches/rapicorn-isnan.patch \ %D%/packages/patches/rapidjson-gcc-compat.patch \ %D%/packages/patches/raptor2-heap-overflow.patch \ %D%/packages/patches/ratpoints-sturm_and_rp_private.patch \ diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 4b07061fa1..64286bf68d 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm @@ -1361,73 +1361,6 @@ realistic reflections, shading, perspective and other effects.") (home-page "http://www.povray.org/") (license license:agpl3+))) -(define-public rapicorn - (package - (name "rapicorn") - (version "16.0.0") - (source (origin - (method url-fetch) - (uri (string-append "https://testbit.eu/pub/dists/rapicorn/" - "rapicorn-" version ".tar.xz")) - (sha256 - (base32 - "1y51yjrpsihas1jy905m9p3r8iiyhq6bwi2690c564i5dnix1f9d")) - (patches (search-patches "rapicorn-isnan.patch")))) - (build-system gnu-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-tests - (lambda _ - ;; Our grep does not support perl regular expressions. - (substitute* "taptool.sh" - (("grep -P") "grep -E")) - ;; Disable path tests because we cannot access /bin or /sbin. - (substitute* "rcore/tests/multitest.cc" - (("TCMP \\(Path::equals \\(\"/bin\"") "//")) - #t)) - (add-before 'check 'pre-check - (lambda _ - ;; The test suite requires a running X server (with DISPLAY - ;; number 99 or higher). - (system "Xvfb :99 &") - (setenv "DISPLAY" ":99") - #t)) - (add-after 'unpack 'replace-fhs-paths - (lambda _ - (substitute* (cons "Makefile.decl" - (find-files "." "^Makefile\\.in$")) - (("/bin/ls") (which "ls")) - (("/usr/bin/env") (which "env"))) - #t))))) - ;; These libraries are listed in the "Required" section of the pkg-config - ;; file. - (propagated-inputs - (list librsvg cairo pango libxml2 python2-enum34)) - (inputs - `(("gdk-pixbuf" ,gdk-pixbuf) - ("libpng" ,libpng-1.2) - ("readline" ,readline) - ("libcroco" ,libcroco) - ("python" ,python-2) - ("cython" ,python2-cython))) - (native-inputs - `(("pandoc" ,pandoc) - ("bison" ,bison) - ("flex" ,flex) - ("doxygen" ,doxygen) - ("graphviz" ,graphviz) - ("intltool" ,intltool) - ("pkg-config" ,pkg-config) - ("xvfb" ,xorg-server-for-tests))) - (home-page "https://rapicorn.testbit.org/") - (synopsis "Toolkit for rapid development of user interfaces") - (description - "Rapicorn is a toolkit for rapid development of user interfaces in C++ -and Python. The user interface is designed in a declarative markup language -and is connected to the programming logic using data bindings and commands.") - (license license:mpl2.0))) - (define-public ctl (package (name "ctl") diff --git a/gnu/packages/patches/rapicorn-isnan.patch b/gnu/packages/patches/rapicorn-isnan.patch deleted file mode 100644 index b0e7819e64..0000000000 --- a/gnu/packages/patches/rapicorn-isnan.patch +++ /dev/null @@ -1,87 +0,0 @@ -From e0c8341b3e4e13778bcde00d477e461ea8e94306 Mon Sep 17 00:00:00 2001 -From: Stefan Westerfeld -Date: Fri, 22 Apr 2016 18:03:37 +0200 -Subject: [PATCH 031/176] RCORE: compile fixes for KUbuntu 16.04/gcc - 5.3.1-14ubuntu2 - -Rapicorn uses isnan(...) and isinf(...) from cmath.h, however on KUbuntu 16.04 -it should use std::isnan(...) and std::isinf(...) instead. Patch below. - -Acked-by: Tim Janik ---- - rcore/strings.cc | 10 +++++----- - rcore/tests/benchrcore.cc | 4 ++-- - rcore/tests/strings.cc | 4 ++-- - 3 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/rcore/strings.cc b/rcore/strings.cc -index d5b0216..8b3bc3f 100644 ---- a/rcore/strings.cc -+++ b/rcore/strings.cc -@@ -437,7 +437,7 @@ static long double - libc_strtold (const char *nptr, char **endptr) - { - const long double result = strtold (nptr, endptr); -- if (isnan (result) && std::signbit (result) == 0) -+ if (std::isnan (result) && std::signbit (result) == 0) - { - const char *p = nptr; - while (isspace (*p)) -@@ -500,9 +500,9 @@ string_to_double (const char *dblstring, const char **endptr) - String - string_from_float (float value) - { -- if (isnan (value)) -+ if (std::isnan (value)) - return std::signbit (value) ? "-NaN" : "+NaN"; -- if (isinf (value)) -+ if (std::isinf (value)) - return std::signbit (value) ? "-Infinity" : "+Infinity"; - return string_format ("%.7g", value); - } -@@ -511,9 +511,9 @@ string_from_float (float value) - String - string_from_double (double value) - { -- if (isnan (value)) -+ if (std::isnan (value)) - return std::signbit (value) ? "-NaN" : "+NaN"; -- if (isinf (value)) -+ if (std::isinf (value)) - return std::signbit (value) ? "-Infinity" : "+Infinity"; - return string_format ("%.17g", value); - } -diff --git a/rcore/tests/benchrcore.cc b/rcore/tests/benchrcore.cc -index 3899a08..12fde16 100644 ---- a/rcore/tests/benchrcore.cc -+++ b/rcore/tests/benchrcore.cc -@@ -188,8 +188,8 @@ test_random_numbers() - const double rf = random_frange (989617512, 9876547656); - TASSERT (rf >= 989617512 && rf < 9876547656); - } -- TASSERT (isnan (random_frange (NAN, 1))); -- TASSERT (isnan (random_frange (0, NAN))); -+ TASSERT (std::isnan (random_frange (NAN, 1))); -+ TASSERT (std::isnan (random_frange (0, NAN))); - #if 0 // example penalty paid in random_int64() - size_t i, j = 0; - for (i = 0; i < 100; i++) -diff --git a/rcore/tests/strings.cc b/rcore/tests/strings.cc -index 468a6e6..dae3e3d 100644 ---- a/rcore/tests/strings.cc -+++ b/rcore/tests/strings.cc -@@ -311,9 +311,9 @@ string_conversions (void) - TCMP (string_to_double ("-0.5"), ==, -0.5); - double tfloat; - tfloat = string_to_double ("+NAN"); -- assert (isnan (tfloat) && std::signbit (tfloat) == 0); -+ assert (std::isnan (tfloat) && std::signbit (tfloat) == 0); - tfloat = string_to_double ("-NAN"); -- assert (isnan (tfloat) && std::signbit (tfloat) == 1); -+ assert (std::isnan (tfloat) && std::signbit (tfloat) == 1); - TCMP (string_capitalize ("fOO bar"), ==, "Foo Bar"); - TCMP (string_capitalize ("foo BAR BAZ", 2), ==, "Foo Bar BAZ"); - } --- -2.9.1 - -- cgit v1.2.3 From 607e48ba3ccb038e2fa4b956cb62ce628cdc8cd0 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 12 May 2022 23:43:39 -0400 Subject: gnu: Add vtk-7. * gnu/packages/image-processing.scm: (vtk-7): New variable. * gnu/packages/patches/vtk-7-gcc-10-compat.patch: New patch. * gnu/packages/patches/vtk-7-hdf5-compat.patch: Likewise. * gnu/packages/patches/vtk-7-python-compat.patch: Likewise. * gnu/local.mk (dist_patch_DATA): Register them. --- gnu/local.mk | 3 ++ gnu/packages/image-processing.scm | 22 +++++++++++++++ gnu/packages/patches/vtk-7-gcc-10-compat.patch | 14 ++++++++++ gnu/packages/patches/vtk-7-hdf5-compat.patch | 38 ++++++++++++++++++++++++++ gnu/packages/patches/vtk-7-python-compat.patch | 16 +++++++++++ 5 files changed, 93 insertions(+) create mode 100644 gnu/packages/patches/vtk-7-gcc-10-compat.patch create mode 100644 gnu/packages/patches/vtk-7-hdf5-compat.patch create mode 100644 gnu/packages/patches/vtk-7-python-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 1286bdddb5..0cd874dae7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1935,6 +1935,9 @@ dist_patch_DATA = \ %D%/packages/patches/vte-CVE-2012-2738-pt1.patch \ %D%/packages/patches/vte-CVE-2012-2738-pt2.patch \ %D%/packages/patches/vtk-fix-freetypetools-build-failure.patch \ + %D%/packages/patches/vtk-7-gcc-10-compat.patch \ + %D%/packages/patches/vtk-7-hdf5-compat.patch \ + %D%/packages/patches/vtk-7-python-compat.patch \ %D%/packages/patches/warsow-qfusion-fix-bool-return-type.patch \ %D%/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch \ %D%/packages/patches/webrtc-audio-processing-big-endian.patch \ diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm index 1995f71cc2..08aeaed202 100644 --- a/gnu/packages/image-processing.scm +++ b/gnu/packages/image-processing.scm @@ -407,6 +407,28 @@ a suite of 3D interaction widgets, supports parallel processing, and integrates with various databases on GUI toolkits such as Qt and Tk.") (license license:bsd-3))) +(define-public vtk-7 + (package + (inherit vtk) + (version "7.1.1") + (source (origin + (method url-fetch) + (uri (string-append "https://vtk.org/files/release/" + (version-major+minor version) + "/VTK-" version ".tar.gz")) + (sha256 + (base32 + "0nm7xwwj7rnsxjdv2ssviys8nhci4n9iiiqm2y14s520hl2dsp1d")) + (patches (search-patches "vtk-7-python-compat.patch" + "vtk-7-hdf5-compat.patch" + "vtk-7-gcc-10-compat.patch")))) + (arguments + (substitute-keyword-arguments (package-arguments vtk) + ((#:configure-flags flags) + ;; Otherwise, the build would fail with: "error: invalid conversion + ;; from ‘const char*’ to ‘char*’ [-fpermissive]". + `(cons "-DCMAKE_CXX_FLAGS=-fpermissive" ,flags)))))) + ;; itksnap needs an older variant of VTK. (define-public vtk-6 (package (inherit vtk) diff --git a/gnu/packages/patches/vtk-7-gcc-10-compat.patch b/gnu/packages/patches/vtk-7-gcc-10-compat.patch new file mode 100644 index 0000000000..50f9f6cca3 --- /dev/null +++ b/gnu/packages/patches/vtk-7-gcc-10-compat.patch @@ -0,0 +1,14 @@ +Retrieved from +https://sources.debian.org/src/vtk7/7.1.1%2Bdfsg2-10.1/debian/patches/. + +--- a/CMake/VTKGenerateExportHeader.cmake ++++ b/CMake/VTKGenerateExportHeader.cmake +@@ -174,7 +174,7 @@ + execute_process(COMMAND ${CMAKE_C_COMPILER} --version + OUTPUT_VARIABLE _gcc_version_info + ERROR_VARIABLE _gcc_version_info) +- string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*" ++ string(REGEX MATCH "[0-9]*\\.[0-9]\\.[0-9]*" + _gcc_version "${_gcc_version_info}") + # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the + # patch level, handle this here: diff --git a/gnu/packages/patches/vtk-7-hdf5-compat.patch b/gnu/packages/patches/vtk-7-hdf5-compat.patch new file mode 100644 index 0000000000..1f3c0c7be4 --- /dev/null +++ b/gnu/packages/patches/vtk-7-hdf5-compat.patch @@ -0,0 +1,38 @@ +Description: The H5FD_class_t struct gained an extra member in 1.10 +Bug-Debian: https://bugs.debian.org/846372 +Author: Iain Lane +--- a/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx ++++ b/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx +@@ -139,7 +139,11 @@ + #if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) + static haddr_t H5FD_dsm_get_eoa(const H5FD_t *_file, H5FD_mem_t type); + static herr_t H5FD_dsm_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t addr); ++#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=10)) ++static haddr_t H5FD_dsm_get_eof(const H5FD_t *_file, H5FD_mem_t type); ++#else + static haddr_t H5FD_dsm_get_eof(const H5FD_t *_file); ++#endif + #else + static haddr_t H5FD_dsm_get_eoa(H5FD_t *_file); + static herr_t H5FD_dsm_set_eoa(H5FD_t *_file, haddr_t addr); +@@ -155,6 +159,9 @@ + "dsm", /*name */ + MAXADDR, /*maxaddr */ + H5F_CLOSE_WEAK, /*fc_degree */ ++#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) ++ NULL, /* terminate */ ++#endif + NULL, /*sb_size */ + NULL, /*sb_encode */ + NULL, /*sb_decode */ +@@ -687,7 +694,9 @@ + *------------------------------------------------------------------------- + */ + static haddr_t +-#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) ++#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=10)) ++H5FD_dsm_get_eof(const H5FD_t *_file, H5FD_mem_t type) ++#elif (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8)) + H5FD_dsm_get_eof(const H5FD_t *_file) + #else + H5FD_dsm_get_eof(H5FD_t *_file) diff --git a/gnu/packages/patches/vtk-7-python-compat.patch b/gnu/packages/patches/vtk-7-python-compat.patch new file mode 100644 index 0000000000..375624e4e2 --- /dev/null +++ b/gnu/packages/patches/vtk-7-python-compat.patch @@ -0,0 +1,16 @@ +Author: Gert Wollny +Description: Work around compile bug with python 3.7.1 +Debian-Bug: https://bugs.debian.org/914347 +diff --git a/Wrapping/PythonCore/vtkPythonArgs.cxx b/Wrapping/PythonCore/vtkPythonArgs.cxx +index 1b1e4b9..682f8b8 100644 +--- a/Wrapping/PythonCore/vtkPythonArgs.cxx ++++ b/Wrapping/PythonCore/vtkPythonArgs.cxx +@@ -102,7 +102,7 @@ bool vtkPythonGetStringValue(PyObject *o, T *&a, const char *exctext) + else if (PyUnicode_Check(o)) + { + #if PY_VERSION_HEX >= 0x03030000 +- a = PyUnicode_AsUTF8(o); ++ a = const_cast(PyUnicode_AsUTF8(o)); + return true; + #else + PyObject *s = _PyUnicode_AsDefaultEncodedString(o, NULL); -- cgit v1.2.3 From 887dec8a51604408214d28290ce857451dcd7192 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 13 May 2022 01:25:05 -0400 Subject: gnu: itk-snap: Fix build. * gnu/packages/patches/itk-snap-alt-glibc-compat.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/image-processing.scm (itk-snap): Apply it. [phases]: Delete trailing #t. [inputs]: Use new style. Replace vtk-6 with vtk-7. --- gnu/local.mk | 1 + gnu/packages/image-processing.scm | 52 ++++++++++------------ .../patches/itk-snap-alt-glibc-compat.patch | 22 +++++++++ 3 files changed, 46 insertions(+), 29 deletions(-) create mode 100644 gnu/packages/patches/itk-snap-alt-glibc-compat.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 0cd874dae7..c4d774052b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1302,6 +1302,7 @@ dist_patch_DATA = \ %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/itk-snap-alt-glibc-compat.patch \ %D%/packages/patches/json-c-0.13-CVE-2020-12762.patch \ %D%/packages/patches/json-c-0.12-CVE-2020-12762.patch \ %D%/packages/patches/jsoncpp-pkg-config-version.patch \ diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm index 08aeaed202..d0d80c08cf 100644 --- a/gnu/packages/image-processing.scm +++ b/gnu/packages/image-processing.scm @@ -1032,7 +1032,8 @@ combine the information contained in both.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "15i5ixpryfrbf3vrrb5rici8fb585f25k0v1ljds16bp1f1msr4q")))) + (base32 "15i5ixpryfrbf3vrrb5rici8fb585f25k0v1ljds16bp1f1msr4q")) + (patches (search-patches "itk-snap-alt-glibc-compat.patch")))) (build-system cmake-build-system) (arguments `(#:configure-flags @@ -1051,22 +1052,19 @@ combine the information contained in both.") (substitute* "CMakeLists.txt" (("install_qt5_executable\ \\(\\$\\{SNAP_MAIN_INSTALL_DIR\\}/\\$\\{SNAP_EXE\\}\\)") - "")) - #t)) + "")))) (add-after 'unpack 'disable-gui-tests (lambda _ ;; The GUI tests just time out. (substitute* "CMakeLists.txt" ((" (Workspace|DiffSpace|ProbeIntensity|RegionCompetition\ |RandomForest|RandomForestBailOut)") - "")) - #t)) + "")))) (add-after 'unpack 'make-reproducible (lambda _ (substitute* "CMakeLists.txt" (("TODAY\\(SNAP_VERSION_COMPILE_DATE\\)") - "SET(SNAP_VERSION_COMPILE_DATE \"(removed for reproducibility)\")")) - #t)) + "SET(SNAP_VERSION_COMPILE_DATE \"(removed for reproducibility)\")")))) (add-after 'unpack 'prepare-submodules (lambda* (#:key inputs #:allow-other-keys) (rmdir "Submodules/c3d") @@ -1077,19 +1075,16 @@ combine the information contained in both.") (("vcl_") "std::")) (rmdir "Submodules/greedy") (symlink (assoc-ref inputs "greedy-src") - "Submodules/greedy") - #t)) + "Submodules/greedy"))) (add-after 'unpack 'fix-includes (lambda _ (substitute* "GUI/Model/RegistrationModel.cxx" (("") - "")) - #t)) + "")))) (add-before 'check 'prepare-tests (lambda _ ;; Needed by at least one test. - (setenv "HOME" "/tmp") - #t)) + (setenv "HOME" "/tmp"))) (add-after 'install 'wrap-executable (lambda* (#:key inputs outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) @@ -1098,23 +1093,22 @@ combine the information contained in both.") ,(map (lambda (label) (string-append (assoc-ref inputs label) "/lib/qt5/plugins")) - '("qtbase" "qtdeclarative")))) - #t)))))) + '("qtbase" "qtdeclarative")))))))))) (inputs - `(("curl" ,curl) - ("fftw" ,fftw) - ("fftwf" ,fftwf) - ("glu" ,glu) - ("hdf5" ,hdf5) - ("mesa" ,mesa-opencl) - ;; This package does not build with either insight-toolkit 5.0.0 and - ;; not with 4.13. It really needs to be 4.12. - ("itk" ,insight-toolkit-4.12) - ("vtk" ,vtk-6) - ("qtbase" ,qtbase-5) - ("qtdeclarative" ,qtdeclarative) - ("vxl" ,vxl-1) - ("zlib" ,zlib))) + (list curl + fftw + fftwf + glu + hdf5 + mesa-opencl + ;; This package does not build with either insight-toolkit 5.0.0 + ;; and not with 4.13. It really needs to be 4.12. + insight-toolkit-4.12 + vtk-7 + qtbase-5 + qtdeclarative + vxl-1 + zlib)) (native-inputs `(("googletest" ,googletest) ("qttools" ,qttools) diff --git a/gnu/packages/patches/itk-snap-alt-glibc-compat.patch b/gnu/packages/patches/itk-snap-alt-glibc-compat.patch new file mode 100644 index 0000000000..764c5da2c2 --- /dev/null +++ b/gnu/packages/patches/itk-snap-alt-glibc-compat.patch @@ -0,0 +1,22 @@ +Retrieved from ALT Linux. +https://git.altlinux.org/tasks/273587/build/300/x86_64/srpm/itk-snap-3.8.0-alt6.src.rpm + +diff --git a/GUI/Qt/main.cxx b/GUI/Qt/main.cxx +index 576f7160..ceab92e6 100644 +--- a/GUI/Qt/main.cxx ++++ b/GUI/Qt/main.cxx +@@ -51,12 +51,13 @@ using namespace std; + #if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__)) + + #include ++#include + #include + + void SegmentationFaultHandler(int sig) + { + cerr << "*************************************" << endl; +- cerr << "ITK-SNAP: " << sys_siglist[sig] << endl; ++ cerr << "ITK-SNAP: " << strsignal(sig) << " (" << sigabbrev_np(sig) << ")" << endl; + cerr << "BACKTRACE: " << endl; + void *array[50]; + int nsize = backtrace(array, 50); -- cgit v1.2.3 From 54ef40a1f79d6d636ba26ac47f6dd0b84172dd0d Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 13 May 2022 11:47:19 -0400 Subject: gnu: mia: Update to 2.4.7. * gnu/packages/patches/mia-fix-boost-headers.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/image-processing.scm (mia): Update to 2.4.7. [source]: Apply patch. [configure-flags]: Use the more conventional OFF option value (instead of 0). [inputs]: Use new style. Replace python2-lxml by python-lxml. Replace vtk by vtk-7. [native-inputs]: Use new style. Replace python-2 with python-wrapper. --- gnu/local.mk | 1 + gnu/packages/image-processing.scm | 56 +-- gnu/packages/patches/mia-fix-boost-headers.patch | 479 +++++++++++++++++++++++ 3 files changed, 510 insertions(+), 26 deletions(-) create mode 100644 gnu/packages/patches/mia-fix-boost-headers.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index c4d774052b..83ee7e2930 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1492,6 +1492,7 @@ dist_patch_DATA = \ %D%/packages/patches/mesa-skip-tests.patch \ %D%/packages/patches/meson-allow-dirs-outside-of-prefix.patch \ %D%/packages/patches/mhash-keygen-test-segfault.patch \ + %D%/packages/patches/mia-fix-boost-headers.patch \ %D%/packages/patches/minetest-add-MINETEST_MOD_PATH.patch \ %D%/packages/patches/mingw-w64-6.0.0-gcc.patch \ %D%/packages/patches/mingw-w64-dlltool-temp-prefix.patch \ diff --git a/gnu/packages/image-processing.scm b/gnu/packages/image-processing.scm index e725fe04f7..f4bf1724b4 100644 --- a/gnu/packages/image-processing.scm +++ b/gnu/packages/image-processing.scm @@ -185,7 +185,7 @@ licences similar to the Modified BSD licence.")))) (define-public mia (package (name "mia") - (version "2.4.6") + (version "2.4.7") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/mia/mia/" @@ -193,37 +193,41 @@ licences similar to the Modified BSD licence.")))) "/mia-" version ".tar.xz")) (sha256 (base32 - "0j4nd5z7i3v199jh7hqqhwd4g7snchizkc7rhzanpvngqg91m1pb")))) + "0qpcd3n26q52dpyibm11f5l6cgscdr54p2jish39gc3p1f5h3ws1")) + (patches (search-patches "mia-fix-boost-headers.patch")))) (build-system cmake-build-system) (arguments `(#:configure-flags - (list "-DMIA_CREATE_NIPYPE_INTERFACES=0" + (list "-DMIA_CREATE_NIPYPE_INTERFACES=OFF" "-DCMAKE_CXX_FLAGS=-fpermissive"))) (inputs - `(("boost" ,boost) - ("dcmtk" ,dcmtk) - ("doxygen" ,doxygen) - ("eigen" ,eigen) - ("fftw" ,fftw) - ("fftwf" ,fftwf) - ("gsl" ,gsl) - ("gts" ,gts) - ("hdf5" ,hdf5) - ("itpp" ,itpp) - ("libjpeg" ,libjpeg-turbo) - ("libpng" ,libpng) - ("libtiff" ,libtiff) - ("libxml" ,libxml2) - ("libxml++" ,libxml++) - ("maxflow" ,maxflow) - ("niftilib" ,niftilib) - ("nlopt" ,nlopt) - ("openexr" ,openexr-2) - ("python-lxml" ,python2-lxml) - ("vtk" ,vtk))) + (list boost + dcmtk + doxygen + eigen + fftw + fftwf + gsl + gts + hdf5 + itpp + libjpeg-turbo + libpng + libtiff + libxml2 + libxml++ + maxflow + niftilib + nlopt + openexr-2 + python-lxml + ;; The build fails when using the regular VTK (currently at version + ;; 9), with error "addons/vtk/vtkvf.cc:23:10: fatal error: + ;; vtkStructuredPointsReader.h: No such file or directory". + vtk-7)) (native-inputs - `(("pkg-config" ,pkg-config) - ("python" ,python-2))) + (list pkg-config + python-wrapper)) (home-page "http://mia.sourceforge.net") (synopsis "Toolkit for gray scale medical image analysis") (description "MIA provides a combination of command line tools, plug-ins, diff --git a/gnu/packages/patches/mia-fix-boost-headers.patch b/gnu/packages/patches/mia-fix-boost-headers.patch new file mode 100644 index 0000000000..158ab2afeb --- /dev/null +++ b/gnu/packages/patches/mia-fix-boost-headers.patch @@ -0,0 +1,479 @@ +Retrieved from Debian, and added a few "#include " +directives to fix the build. + +diff --git a/addons/hdf5/test_hdf5_3dimage.cc b/addons/hdf5/test_hdf5_3dimage.cc +index a7185618..7a398821 100644 +--- a/addons/hdf5/test_hdf5_3dimage.cc ++++ b/addons/hdf5/test_hdf5_3dimage.cc +@@ -23,7 +23,7 @@ + #include + + #include +-#include ++#include + + #include + +diff --git a/addons/hdf5/test_hdf5mia.cc b/addons/hdf5/test_hdf5mia.cc +index 3d62106e..8141be07 100644 +--- a/addons/hdf5/test_hdf5mia.cc ++++ b/addons/hdf5/test_hdf5mia.cc +@@ -23,7 +23,6 @@ + #include + + #include +-#include + #include + + #include +diff --git a/addons/nifti/test_niftiimage.cc b/addons/nifti/test_niftiimage.cc +index 8df3f0b5..840ae585 100644 +--- a/addons/nifti/test_niftiimage.cc ++++ b/addons/nifti/test_niftiimage.cc +@@ -23,8 +23,6 @@ + #include + + #include +-#include +- + + #include + #include +diff --git a/addons/vistaio/test_2dvistaio.cc b/addons/vistaio/test_2dvistaio.cc +index b3da29a0..9b1599dd 100644 +--- a/addons/vistaio/test_2dvistaio.cc ++++ b/addons/vistaio/test_2dvistaio.cc +@@ -23,8 +23,6 @@ + #include + + #include +-#include +- + + #include + #include +diff --git a/addons/vistaio/test_3dvistaio.cc b/addons/vistaio/test_3dvistaio.cc +index 93c007d0..c3ae1fdb 100644 +--- a/addons/vistaio/test_3dvistaio.cc ++++ b/addons/vistaio/test_3dvistaio.cc +@@ -23,8 +23,6 @@ + #include + + #include +-#include +- + + #include + #include +diff --git a/addons/vtk/test_vtkimage.cc b/addons/vtk/test_vtkimage.cc +index eaf96a6b..8212ef1d 100644 +--- a/addons/vtk/test_vtkimage.cc ++++ b/addons/vtk/test_vtkimage.cc +@@ -23,8 +23,6 @@ + #include + + #include +-#include +- + + #include + #include +diff --git a/mia/2d/creator/test_circle.cc b/mia/2d/creator/test_circle.cc +index 9784e05d..7ca4bab9 100644 +--- a/mia/2d/creator/test_circle.cc ++++ b/mia/2d/creator/test_circle.cc +@@ -21,8 +21,6 @@ + + #include + #include +-#include +- + #include + + using namespace mia; +diff --git a/mia/2d/filter/test_convert.cc b/mia/2d/filter/test_convert.cc +index 80304793..f40d295a 100644 +--- a/mia/2d/filter/test_convert.cc ++++ b/mia/2d/filter/test_convert.cc +@@ -25,7 +25,6 @@ + #include + + #include +-#include + #include + + +diff --git a/mia/2d/filter/test_morphological.cc b/mia/2d/filter/test_morphological.cc +index 2fc58583..9a004946 100644 +--- a/mia/2d/filter/test_morphological.cc ++++ b/mia/2d/filter/test_morphological.cc +@@ -20,7 +20,6 @@ + + #include + #include +-#include + #include + + namespace bmpl = boost::mpl; +diff --git a/mia/2d/filter/test_sortlabel.cc b/mia/2d/filter/test_sortlabel.cc +index 78464e1a..49c327e3 100644 +--- a/mia/2d/filter/test_sortlabel.cc ++++ b/mia/2d/filter/test_sortlabel.cc +@@ -23,7 +23,6 @@ + #include + + #include +-#include + namespace bmpl = boost::mpl; + + +diff --git a/mia/2d/filter/test_thinning.cc b/mia/2d/filter/test_thinning.cc +index 3ebb2cdc..8bc5b356 100644 +--- a/mia/2d/filter/test_thinning.cc ++++ b/mia/2d/filter/test_thinning.cc +@@ -21,7 +21,6 @@ + + #include + #include +-#include + #include + #include + +diff --git a/mia/2d/test_filter_cast.cc b/mia/2d/test_filter_cast.cc +index e806e14f..91c77398 100644 +--- a/mia/2d/test_filter_cast.cc ++++ b/mia/2d/test_filter_cast.cc +@@ -24,7 +24,7 @@ + #include + #include + +-#include ++#include + #include + #include + +diff --git a/mia/2d/test_image.cc b/mia/2d/test_image.cc +index c82dc59b..1f602510 100644 +--- a/mia/2d/test_image.cc ++++ b/mia/2d/test_image.cc +@@ -24,6 +24,7 @@ + #include + + #include ++#include + + #include + +diff --git a/mia/2d/test_interpol.cc b/mia/2d/test_interpol.cc +index d1f3703d..5caafccf 100644 +--- a/mia/2d/test_interpol.cc ++++ b/mia/2d/test_interpol.cc +@@ -23,7 +23,6 @@ + + #include + +-#include + #include + #include + +diff --git a/mia/3d/fifotestfixture.cc b/mia/3d/fifotestfixture.cc +index ab2e7c65..1b6e6bb4 100644 +--- a/mia/3d/fifotestfixture.cc ++++ b/mia/3d/fifotestfixture.cc +@@ -24,7 +24,7 @@ + + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/mia/3d/filter/test_convert.cc b/mia/3d/filter/test_convert.cc +index e83032c1..dad9afaa 100644 +--- a/mia/3d/filter/test_convert.cc ++++ b/mia/3d/filter/test_convert.cc +@@ -20,7 +20,6 @@ + + #include + #include +-#include + #include + #include + #include +diff --git a/mia/3d/test_image.cc b/mia/3d/test_image.cc +index 18f71892..c21e0d20 100644 +--- a/mia/3d/test_image.cc ++++ b/mia/3d/test_image.cc +@@ -21,7 +21,8 @@ + #include + #include + #include +-#include ++#include ++#include + + #include + #include +diff --git a/mia/3d/test_imageio.cc b/mia/3d/test_imageio.cc +index 0640a668..7a6b5635 100644 +--- a/mia/3d/test_imageio.cc ++++ b/mia/3d/test_imageio.cc +@@ -20,7 +20,6 @@ + + #include + #include +-#include + #include + + #include +diff --git a/mia/core/splinekernel/test_bspline.cc b/mia/core/splinekernel/test_bspline.cc +index 54d6bda3..0abfe443 100644 +--- a/mia/core/splinekernel/test_bspline.cc ++++ b/mia/core/splinekernel/test_bspline.cc +@@ -23,8 +23,6 @@ + #include + #include + #include +-#include +- + + using namespace mia; + using namespace mia::bsplinekernel; +diff --git a/mia/core/test_cost.cc b/mia/core/test_cost.cc +index 70097b2e..305ca84d 100644 +--- a/mia/core/test_cost.cc ++++ b/mia/core/test_cost.cc +@@ -27,7 +27,7 @@ + #include + + #include +-#include ++#include + #include + + NS_MIA_USE +diff --git a/mia/core/test_cstplan.cc b/mia/core/test_cstplan.cc +index aa241d48..a9e5a0e3 100644 +--- a/mia/core/test_cstplan.cc ++++ b/mia/core/test_cstplan.cc +@@ -23,7 +23,7 @@ + + #include + #include +-#include ++#include + + #include + +diff --git a/mia/core/test_dictmap.cc b/mia/core/test_dictmap.cc +index a9217290..fd05fe30 100644 +--- a/mia/core/test_dictmap.cc ++++ b/mia/core/test_dictmap.cc +@@ -26,7 +26,7 @@ + + #include + #include +-#include ++#include + + #include + #include +diff --git a/mia/core/test_fifofilter.cc b/mia/core/test_fifofilter.cc +index 2a066f2e..6e2a385d 100644 +--- a/mia/core/test_fifofilter.cc ++++ b/mia/core/test_fifofilter.cc +@@ -27,7 +27,7 @@ + + #include + #include +-#include ++#include + + + #include +diff --git a/mia/core/test_gsl_matrix.cc b/mia/core/test_gsl_matrix.cc +index 4add5f7a..6d16353d 100644 +--- a/mia/core/test_gsl_matrix.cc ++++ b/mia/core/test_gsl_matrix.cc +@@ -25,7 +25,7 @@ + #define BOOST_TEST_MAIN + #define BOOST_TEST_ALTERNATIVE_INIT_API + #include +-#include ++#include + #include + + #include +diff --git a/mia/core/test_gsl_matrix_vector_ops.cc b/mia/core/test_gsl_matrix_vector_ops.cc +index e5f7d7b9..217020f7 100644 +--- a/mia/core/test_gsl_matrix_vector_ops.cc ++++ b/mia/core/test_gsl_matrix_vector_ops.cc +@@ -28,7 +28,7 @@ + #define BOOST_TEST_MAIN + #define BOOST_TEST_ALTERNATIVE_INIT_API + #include +-#include ++#include + + #include + #include +diff --git a/mia/core/test_gsl_multimin.cc b/mia/core/test_gsl_multimin.cc +index 5bbc434b..129f578a 100644 +--- a/mia/core/test_gsl_multimin.cc ++++ b/mia/core/test_gsl_multimin.cc +@@ -25,7 +25,7 @@ + #define BOOST_TEST_MAIN + #define BOOST_TEST_ALTERNATIVE_INIT_API + #include +-#include ++#include + #include + + #include +diff --git a/mia/core/test_gsl_pca.cc b/mia/core/test_gsl_pca.cc +index 436b36b0..12942921 100644 +--- a/mia/core/test_gsl_pca.cc ++++ b/mia/core/test_gsl_pca.cc +@@ -27,7 +27,7 @@ + #define BOOST_TEST_MAIN + #define BOOST_TEST_ALTERNATIVE_INIT_API + #include +-#include ++#include + + #include + +diff --git a/mia/core/test_gsl_vector.cc b/mia/core/test_gsl_vector.cc +index 541c88b8..ba91f159 100644 +--- a/mia/core/test_gsl_vector.cc ++++ b/mia/core/test_gsl_vector.cc +@@ -25,10 +25,9 @@ + #define BOOST_TEST_MAIN + #define BOOST_TEST_ALTERNATIVE_INIT_API + #include +-#include ++#include + + #include +-#include + + #include + +diff --git a/mia/core/test_interpol.cc b/mia/core/test_interpol.cc +index 36669dc0..2dd5157d 100644 +--- a/mia/core/test_interpol.cc ++++ b/mia/core/test_interpol.cc +@@ -24,7 +24,7 @@ + #include + + #include +-#include ++#include + #include + #include + +diff --git a/mia/core/test_parameter.cc b/mia/core/test_parameter.cc +index ae9b4976..28ef2a80 100644 +--- a/mia/core/test_parameter.cc ++++ b/mia/core/test_parameter.cc +@@ -26,7 +26,7 @@ + + #include + #include +-#include ++#include + + #include + #include +diff --git a/mia/core/test_probmap.cc b/mia/core/test_probmap.cc +index 2dc6cb6c..38052681 100644 +--- a/mia/core/test_probmap.cc ++++ b/mia/core/test_probmap.cc +@@ -22,7 +22,7 @@ + + #include + #include +-#include ++#include + + #include + #include +diff --git a/mia/core/test_sqmin.cc b/mia/core/test_sqmin.cc +index f00b3b85..4a0b67b9 100644 +--- a/mia/core/test_sqmin.cc ++++ b/mia/core/test_sqmin.cc +@@ -23,7 +23,7 @@ + #define BOOST_TEST_DYN_LINK + #include + #include +-#include ++#include + + #include + +diff --git a/mia/internal/autotest.hh b/mia/internal/autotest.hh +index 419f6e8f..4458c0b2 100644 +--- a/mia/internal/autotest.hh ++++ b/mia/internal/autotest.hh +@@ -34,7 +34,7 @@ + #define BOOST_TEST_MAIN + #define BOOST_TEST_NO_MAIN + #include +-#include ++#include + + #include + #include +diff --git a/mia/internal/plugintester.hh b/mia/internal/plugintester.hh +index 2d42b858..e632e5f7 100644 +--- a/mia/internal/plugintester.hh ++++ b/mia/internal/plugintester.hh +@@ -31,7 +31,7 @@ + #define BOOST_TEST_MAIN + #define BOOST_TEST_NO_MAIN + #include +-#include ++#include + + #include + #include +diff --git a/mia/test/testhelpers.hh b/mia/test/testhelpers.hh +index 27f37e7f..68c213a6 100644 +--- a/mia/test/testhelpers.hh ++++ b/mia/test/testhelpers.hh +@@ -23,7 +23,7 @@ + + #include + #include +-#include ++#include + + namespace miatest + { +diff --git a/src/2dlerp.cc b/src/2dlerp.cc +index 4c7dde77..1e8801de 100644 +--- a/src/2dlerp.cc ++++ b/src/2dlerp.cc +@@ -25,7 +25,7 @@ + + #include + #include +-#include ++#include + + #include + #include +diff --git a/src/3dlerp.cc b/src/3dlerp.cc +index 6ee8dca0..2f1c1f3a 100644 +--- a/src/3dlerp.cc ++++ b/src/3dlerp.cc +@@ -24,7 +24,7 @@ + #define BOOST_TEST_NO_MAIN + #include + #include +-#include ++#include + + #include + #include -- cgit v1.2.3 From 5e25a69e6e3733ad8845d1b187940877deba7750 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 13 May 2022 14:03:41 -0400 Subject: gnu: mozjs: Cleanup to only keep the last version. * gnu/packages/gnuzilla.scm (mozjs): Preserve only the metadata and otherwise update fields to use those of mozjs-78. [arguments]: Use gexps. [phases]: Delete trailing #t. [native-inputs]: Use new style. (mozjs-38, mozjs-52, mozjs-60, mozjs-78): Delete variables. * gnu/packages/patches/mozjs17-aarch64-support.patch * gnu/packages/patches/mozjs24-aarch64-support.patch * gnu/packages/patches/mozjs38-pkg-config-version.patch * gnu/packages/patches/mozjs38-shell-version.patch * gnu/packages/patches/mozjs38-tracelogger.patch * gnu/packages/patches/mozjs38-version-detection.patch * gnu/packages/patches/mozjs60-riscv64-support.patch: Delete patches. * gnu/local.mk (dist_patch_DATA): De-register them. * gnu/packages/games.scm (0ad): Adjust accordingly. * gnu/packages/gnome.scm (gjs): Likewise. * gnu/packages/polkit.scm (polkit-mozjs): Likewise. --- gnu/local.mk | 7 - gnu/packages/games.scm | 2 +- gnu/packages/gnome.scm | 2 +- gnu/packages/gnuzilla.scm | 567 ++++--------------- gnu/packages/patches/mozjs17-aarch64-support.patch | 60 -- gnu/packages/patches/mozjs24-aarch64-support.patch | 21 - .../patches/mozjs38-pkg-config-version.patch | 24 - gnu/packages/patches/mozjs38-shell-version.patch | 67 --- gnu/packages/patches/mozjs38-tracelogger.patch | 608 --------------------- .../patches/mozjs38-version-detection.patch | 180 ------ gnu/packages/patches/mozjs60-riscv64-support.patch | 122 ----- gnu/packages/polkit.scm | 2 +- 12 files changed, 114 insertions(+), 1548 deletions(-) delete mode 100644 gnu/packages/patches/mozjs17-aarch64-support.patch delete mode 100644 gnu/packages/patches/mozjs24-aarch64-support.patch delete mode 100644 gnu/packages/patches/mozjs38-pkg-config-version.patch delete mode 100644 gnu/packages/patches/mozjs38-shell-version.patch delete mode 100644 gnu/packages/patches/mozjs38-tracelogger.patch delete mode 100644 gnu/packages/patches/mozjs38-version-detection.patch delete mode 100644 gnu/packages/patches/mozjs60-riscv64-support.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 83ee7e2930..947669459e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1509,13 +1509,6 @@ dist_patch_DATA = \ %D%/packages/patches/monero-use-system-miniupnpc.patch \ %D%/packages/patches/mono-mdoc-timestamping.patch \ %D%/packages/patches/mosaicatcher-unbundle-htslib.patch \ - %D%/packages/patches/mozjs17-aarch64-support.patch \ - %D%/packages/patches/mozjs24-aarch64-support.patch \ - %D%/packages/patches/mozjs38-pkg-config-version.patch \ - %D%/packages/patches/mozjs38-shell-version.patch \ - %D%/packages/patches/mozjs38-tracelogger.patch \ - %D%/packages/patches/mozjs38-version-detection.patch \ - %D%/packages/patches/mozjs60-riscv64-support.patch \ %D%/packages/patches/mrrescue-support-love-11.patch \ %D%/packages/patches/mtools-mformat-uninitialized.patch \ %D%/packages/patches/mumps-build-parallelism.patch \ diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 76f1e5df86..05bcdc9b98 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -6690,7 +6690,7 @@ fight against their plot and save his fellow rabbits from slavery.") libxcursor libxml2 miniupnpc - mozjs-78 + mozjs openal sdl2 wxwidgets diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index f33f3a2632..15d0d5f6a0 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -7203,7 +7203,7 @@ configuration program to choose applications starting on login.") ("xvfb" ,xorg-server-for-tests))) (propagated-inputs ;; These are all in the Requires.private field of gjs-1.0.pc. - (list cairo gobject-introspection mozjs-78)) + (list cairo gobject-introspection mozjs)) (inputs (list gtk+ readline)) (synopsis "Javascript bindings for GNOME") diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index 8f1e8fe647..0c64c44adf 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -96,356 +96,6 @@ (define-public mozjs (package (name "mozjs") - (version "17.0.0") - (source (origin - (method url-fetch) - (uri (string-append - "https://ftp.mozilla.org/pub/mozilla.org/js/" - name version ".tar.gz")) - (sha256 - (base32 - "1fig2wf4f10v43mqx67y68z6h77sy900d1w0pz9qarrqx57rc7ij")) - (patches (search-patches "mozjs17-aarch64-support.patch")) - (modules '((guix build utils))) - (snippet - ;; Fix incompatibility with Perl 5.22+. - '(begin - (substitute* '("js/src/config/milestone.pl") - (("defined\\(@TEMPLATE_FILE)") "@TEMPLATE_FILE")) - #t)))) - (build-system gnu-build-system) - (native-inputs - `(("perl" ,perl) - ("pkg-config" ,pkg-config) - ("python" ,python-2))) - (propagated-inputs - (list nspr)) ; in the Requires.private field of mozjs-17.0.pc - (inputs - (list zlib)) - (arguments - `(;; XXX: parallel build fails, lacking: - ;; mkdir -p "system_wrapper_js/" - #:parallel-build? #f - #:make-flags '("CXXFLAGS=-fpermissive") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'delete-timedout-test - ;; This test times out on slower hardware. - (lambda _ - (delete-file "js/src/jit-test/tests/basic/bug698584.js") - #t)) - (add-before 'configure 'chdir - (lambda _ - (chdir "js/src") - #t)) - (replace 'configure - ;; configure fails if it is followed by SHELL and CONFIG_SHELL - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (setenv "SHELL" (which "sh")) - (setenv "CONFIG_SHELL" (which "sh")) - (invoke "./configure" (string-append "--prefix=" out) - ,@(if (string=? "aarch64-linux" - (%current-system)) - '("--host=aarch64-unknown-linux-gnu") - '())))))))) - (home-page - "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey") - (synopsis "Mozilla javascript engine") - (description "SpiderMonkey is Mozilla's JavaScript engine written -in C/C++.") - (license license:mpl2.0))) ; and others for some files - -(define-public mozjs-24 - (package (inherit mozjs) - (name "mozjs") - (version "24.2.0") - (source (origin - (method url-fetch) - (uri (string-append - "https://ftp.mozilla.org/pub/mozilla.org/js/" - name "-" version ".tar.bz2")) - (sha256 - (base32 - "1n1phk8r3l8icqrrap4czplnylawa0ddc2cc4cgdz46x3lrkybz6")) - (modules '((guix build utils))) - (patches (search-patches "mozjs24-aarch64-support.patch")) - (snippet - ;; Fix incompatibility with Perl 5.22+. - '(begin - (substitute* '("js/src/config/milestone.pl") - (("defined\\(@TEMPLATE_FILE)") "@TEMPLATE_FILE")) - #t)))) - (arguments - (substitute-keyword-arguments (package-arguments mozjs) - ((#:phases phases) - `(modify-phases ,phases - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - ;; configure fails if it is followed by SHELL and CONFIG_SHELL - (setenv "SHELL" (which "sh")) - (setenv "CONFIG_SHELL" (which "sh")) - (invoke "./configure" - (string-append "--prefix=" out) - "--with-system-nspr" - "--enable-system-ffi" - "--enable-threadsafe" - ,@(if (string=? "aarch64-linux" - (%current-system)) - '("--host=aarch64-unknown-linux-gnu") - '()))))))))) - (inputs - (list libffi zlib)))) - -(define-public mozjs-38 - (package - (inherit mozjs) - (name "mozjs") - (version "38.2.1.rc0") - (source (origin - (method url-fetch) - (uri (string-append - "https://anduin.linuxfromscratch.org/BLFS/mozjs/" - name "-" version ".tar.bz2")) - (sha256 - (base32 - "0p4bmbpgkfsj54xschcny0a118jdrdgg0q29rwxigg3lh5slr681")) - (patches - (search-patches - ;; See https://bugzilla.mozilla.org/show_bug.cgi?id=1269317 for - ;; GCC 6 compatibility. - - "mozjs38-version-detection.patch" ; for 0ad - "mozjs38-tracelogger.patch" - - ;; See https://bugzilla.mozilla.org/show_bug.cgi?id=1339931. - "mozjs38-pkg-config-version.patch" - "mozjs38-shell-version.patch")) - (modules '((guix build utils))) - (snippet - '(begin - ;; Fix incompatibility with sed 4.4. - (substitute* "js/src/configure" - (("\\^\\[:space:\\]") "^[[:space:]]")) - - ;; The headers are symlinks to files that are in /tmp, so they - ;; end up broken. Copy them instead. - (substitute* - "python/mozbuild/mozbuild/backend/recursivemake.py" - (("\\['dist_include'\\].add_symlink") - "['dist_include'].add_copy")) - - ;; Remove bundled libraries. - (for-each delete-file-recursively - '("intl" - "js/src/ctypes/libffi" - "js/src/ctypes/libffi-patches" - "modules/zlib")) - #t)))) - (arguments - `(;; XXX: parallel build fails, lacking: - ;; mkdir -p "system_wrapper_js/" - #:parallel-build? #f - ;; See https://bugzilla.mozilla.org/show_bug.cgi?id=1008470. - #:tests? #f - #:phases - (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (chdir "js/src") - (setenv "SHELL" (which "sh")) - (setenv "CONFIG_SHELL" (which "sh")) - (invoke "./configure" - (string-append "--prefix=" out) - "--enable-ctypes" - "--enable-gcgenerational" - "--enable-optimize" - "--enable-pie" - "--enable-readline" - "--enable-shared-js" - "--enable-system-ffi" - "--enable-threadsafe" - "--enable-xterm-updates" - "--with-system-icu" - "--with-system-nspr" - "--with-system-zlib" - - ;; Intl API requires bundled ICU. - "--without-intl-api"))))))) - (native-inputs - `(("perl" ,perl) - ("pkg-config" ,pkg-config) - ("python-2" ,python-2))) - (inputs - (list libffi readline icu4c zlib)))) - -(define-public mozjs-52 - ;; No releases yet at . - ;; While we could take a snapshot of the complete mozilla-esr52 repository at - ;; , - ;; we take the Debian version instead, because it is easier to work with. - (let ((commit "6507e63cc416fd7a3269e390efe712f8b56f374a") - (revision "1")) - (package (inherit mozjs-38) - (version (git-version "52.0" revision commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://salsa.debian.org/gnome-team/mozjs52.git") - (commit commit))) - (file-name (git-file-name "mozjs" version)) - (sha256 - (base32 - "1ny0s53r8wn4byys87h784xrq1xg767akmfm6gqrbvrz57mlm3q2")))) - (arguments - `(#:tests? #f ; depends on repository metadata - #:configure-flags - '("--enable-ctypes" - "--enable-optimize" - "--enable-pie" - "--enable-readline" - "--enable-shared-js" - "--enable-system-ffi" - "--with-system-icu" - "--with-system-nspr" - "--with-system-zlib" - - ;; Intl API requires bundled ICU. - "--without-intl-api" - - ;; Without this gnome-shell will crash at runtime. - "--disable-jemalloc") - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-and-chdir - (lambda* (#:key inputs #:allow-other-keys) - ;; This patch prevents a segfault when executing JS_Init(). - ;; The build does not fail without this patch, but the - ;; configure phase of the gjs package would fail. - ;; See https://bugzilla.mozilla.org/show_bug.cgi?id=1176787 - (make-file-writable "js/src/old-configure.in") - (make-file-writable "js/src/old-configure") - (make-file-writable "mozglue/build/moz.build") - (invoke "patch" "-p1" "--force" - "--input" "debian/patches/disable-mozglue.patch") - (invoke "touch" "js/src/configure") - (chdir "js/src") - #t)) - (replace 'configure - (lambda* (#:key inputs outputs configure-flags #:allow-other-keys) - ;; The configure script does not accept environment variables - ;; as arguments. - (let ((out (assoc-ref outputs "out"))) - (setenv "SHELL" (which "sh")) - (setenv "CONFIG_SHELL" (which "sh")) - (setenv "AUTOCONF" (which "autoconf")) - (apply invoke "./configure" - (cons (string-append "--prefix=" out) - configure-flags)))))))) - (native-inputs - (modify-inputs (package-native-inputs mozjs-38) - (prepend autoconf-2.13 automake)))))) - -(define-public mozjs-60 - ;; No releases yet at . - ;; While we could take a snapshot of the complete mozilla-esr60 repository at - ;; , - ;; we take the Debian version instead, because it is easier to work with. - (package - (inherit mozjs-38) - (version "60.2.3-4") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://salsa.debian.org/gnome-team/mozjs60.git") - (commit (string-append "debian/" version)))) - (file-name (git-file-name "mozjs" version)) - (sha256 - (base32 - "1xl6avsj9gkgma71p56jzs7nasc767k3n1frnmri5pad4rj94bij")) - (patches (search-patches "mozjs60-riscv64-support.patch")))) - (arguments - `(#:tests? #f ; FIXME: all tests pass, but then the check phase fails anyway. - #:test-target "check-jstests" - #:configure-flags - ,#~(quasiquote - ("--enable-ctypes" - "--enable-optimize" - "--enable-pie" - "--enable-readline" - "--enable-shared-js" - "--enable-system-ffi" - "--with-system-nspr" - #$@(if (%current-target-system) - #~(,(string-append "--with-nspr-prefix=" - #$(this-package-input "nspr"))) - #~()) - "--with-system-zlib" - "--with-system-icu" - "--with-intl-api" - ;; 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))) - #~()))) - #:phases - (modify-phases %standard-phases - ;; Make sure pkg-config will be found. - ,@(if (%current-target-system) - `((add-before 'configure 'set-PKG-CONFIG - (lambda _ - (setenv "PKG_CONFIG" ,(pkg-config-for-target))))) - '()) - (replace 'configure - (lambda* (#:key inputs outputs configure-flags #:allow-other-keys) - ;; The configure script does not accept environment variables as - ;; arguments. It also must be run from a different directory, - ;; but not the root directory either. - (let ((out (assoc-ref outputs "out"))) - (mkdir "run-configure-from-here") - (chdir "run-configure-from-here") - (setenv "SHELL" (which "sh")) - (setenv "CONFIG_SHELL" (which "sh")) - (setenv "AUTOCONF" (which "autoconf")) - (apply invoke "../js/src/configure" - (cons (string-append "--prefix=" out) - configure-flags)) - #t))) - (add-after 'unpack 'update-config-scripts - (lambda* (#:key native-inputs inputs #:allow-other-keys) - (for-each (lambda (file) - (install-file - (search-input-file - (or native-inputs inputs) - (string-append "/bin/" file)) "build/autoconf")) - '("config.guess" "config.sub")))) - (add-after 'unpack 'disable-broken-tests - (lambda _ - ;; This test assumes that /bin exists and contains certain - ;; executables. - (delete-file "js/src/tests/shell/os.js") - #t))))) - (native-inputs - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("config" ,config) - ("which" ,which) - ("perl" ,perl) - ("pkg-config" ,pkg-config) - ("python" ,python-2))))) - -(define-public mozjs-78 - (package - (inherit mozjs-60) (version "78.15.0") (source (origin (method url-fetch) @@ -456,13 +106,16 @@ in C/C++.") (sha256 (base32 "0l91cxdc5v9fps79ckb1kid4gw6v5qng1jd9zvaacwaiv628shx4")))) + (build-system gnu-build-system) (arguments - `(#:imported-modules ,%cargo-utils-modules ;for `generate-all-checksums' - #:modules ((guix build cargo-utils) + (list + #:imported-modules %cargo-utils-modules ;for `generate-all-checksums' + #:modules `((guix build cargo-utils) ,@%gnu-build-system-modules) - #:test-target "check-jstests" - #:configure-flags - '(;; Disable debugging symbols to save space. + #:test-target "check-jstests" + #:configure-flags + #~(list + ;; Disable debugging symbols to save space. "--disable-debug" "--disable-debug-symbols" ;; This is important because without it gjs will segfault during the @@ -483,109 +136,111 @@ in C/C++.") "--with-system-nspr" "--with-system-zlib" "--with-intl-api") - #:phases - (modify-phases %standard-phases - (add-after 'patch-source-shebangs 'patch-cargo-checksums - (lambda _ - (let ((null-hash - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")) - (for-each (lambda (file) - (format #t "patching checksums in ~a~%" file) - (substitute* file - (("^checksum = \".*\"") - (string-append "checksum = \"" null-hash "\"")))) - (find-files "." "Cargo\\.lock$")) - (for-each generate-all-checksums - '("js" "third_party/rust")) - #t))) - (replace 'configure - (lambda* (#:key inputs outputs configure-flags #:allow-other-keys) - ;; The configure script does not accept environment variables as - ;; arguments. It also must be run from a different directory, - ;; but not the root directory either. - (let ((out (assoc-ref outputs "out"))) - (mkdir "run-configure-from-here") - (chdir "run-configure-from-here") - (setenv "SHELL" (which "sh")) - (setenv "CONFIG_SHELL" (which "sh")) - (setenv "AUTOCONF" (which "autoconf")) - (apply invoke "../js/src/configure" - (cons (string-append "--prefix=" out) - configure-flags)) - #t))) - (add-after 'unpack 'adjust-for-icu-68 - (lambda _ - (with-directory-excursion "js/src/tests" - ;; The test suite expects a lightly patched ICU 67. Since - ;; Guix is about to switch to ICU 68, massage the tests to - ;; work with that instead of patching ICU. Try removing this - ;; phase for newer versions of mozjs. - - ;; These tests look up locale names and expects to get - ;; "GB" instead of "UK". - (substitute* "non262/Intl/DisplayNames/language.js" - (("Traditionell, GB") - "Traditionell, UK")) - (substitute* "non262/Intl/DisplayNames/region.js" - (("\"GB\": \"GB\"") - "\"GB\": \"UK\"")) - - ;; XXX: Some localized time formats have changed, and - ;; substitution fails for accented characters, even though - ;; it works in the REPL(?). Just delete these for now. - (delete-file "non262/Intl/Date/toLocaleString_timeZone.js") - (delete-file "non262/Intl/Date/toLocaleDateString_timeZone.js") - - ;; Similarly, these get an unexpected "A" suffix when looking - ;; up a time in the "ar-MA-u-ca-islamicc" locale, which is - ;; tricky to substitute. - (delete-file "non262/Intl/DateTimeFormat/format_timeZone.js") - (delete-file "non262/Intl/DateTimeFormat/format.js") - - ;; This file compares a generated list of ICU locale names - ;; with actual lookups. Some have changed slightly, i.e. - ;; daf-Latn-ZZ -> daf-Latn-CI, so drop it for simplicity. - (delete-file "non262/Intl/Locale/likely-subtags-generated.js")) - - #t)) - (add-before 'check 'pre-check - (lambda _ - (with-directory-excursion "../js/src/tests" - (substitute* "shell/os.js" - ;; FIXME: Why does the killed process have an exit status? - ((".*killed process should not have exitStatus.*") - "")) - - ;; XXX: Delete all tests that test time zone functionality, - ;; because the test suite uses /etc/localtime to figure out - ;; the offset from the hardware clock, which does not work - ;; in the build container. See . - (delete-file-recursively "non262/Date") - (delete-file "non262/Intl/DateTimeFormat/tz-environment-variable.js") - - (setenv "JSTESTS_EXTRA_ARGS" - (string-join - (list - ;; Do not run tests marked as "random". - "--exclude-random" - ;; Exclude web platform tests. - "--wpt=disabled" - ;; Respect the daemons configured number of jobs. - (string-append "--worker-count=" - (number->string (parallel-job-count))))))) - #t))))) + #:phases + #~(modify-phases %standard-phases + (add-after 'patch-source-shebangs 'patch-cargo-checksums + (lambda _ + (let ((null-hash + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")) + (for-each (lambda (file) + (format #t "patching checksums in ~a~%" file) + (substitute* file + (("^checksum = \".*\"") + (string-append "checksum = \"" null-hash "\"")))) + (find-files "." "Cargo\\.lock$")) + (for-each generate-all-checksums + '("js" "third_party/rust"))))) + (replace 'configure + (lambda* (#:key inputs configure-flags #:allow-other-keys) + ;; The configure script does not accept environment variables as + ;; arguments. It also must be run from a different directory, + ;; but not the root directory either. + (mkdir "run-configure-from-here") + (chdir "run-configure-from-here") + (setenv "SHELL" (which "sh")) + (setenv "CONFIG_SHELL" (which "sh")) + (setenv "AUTOCONF" (which "autoconf")) + (apply invoke "../js/src/configure" + (cons (string-append "--prefix=" #$output) + configure-flags)))) + (add-after 'unpack 'adjust-for-icu-68 + (lambda _ + (with-directory-excursion "js/src/tests" + ;; The test suite expects a lightly patched ICU 67. Since + ;; Guix is about to switch to ICU 68, massage the tests to + ;; work with that instead of patching ICU. Try removing this + ;; phase for newer versions of mozjs. + + ;; These tests look up locale names and expects to get + ;; "GB" instead of "UK". + (substitute* "non262/Intl/DisplayNames/language.js" + (("Traditionell, GB") + "Traditionell, UK")) + (substitute* "non262/Intl/DisplayNames/region.js" + (("\"GB\": \"GB\"") + "\"GB\": \"UK\"")) + + ;; XXX: Some localized time formats have changed, and + ;; substitution fails for accented characters, even though + ;; it works in the REPL(?). Just delete these for now. + (delete-file "non262/Intl/Date/toLocaleString_timeZone.js") + (delete-file "non262/Intl/Date/toLocaleDateString_timeZone.js") + + ;; Similarly, these get an unexpected "A" suffix when looking + ;; up a time in the "ar-MA-u-ca-islamicc" locale, which is + ;; tricky to substitute. + (delete-file "non262/Intl/DateTimeFormat/format_timeZone.js") + (delete-file "non262/Intl/DateTimeFormat/format.js") + + ;; This file compares a generated list of ICU locale names + ;; with actual lookups. Some have changed slightly, i.e. + ;; daf-Latn-ZZ -> daf-Latn-CI, so drop it for simplicity. + (delete-file "non262/Intl/Locale/likely-subtags-generated.js")))) + (add-before 'check 'pre-check + (lambda _ + (with-directory-excursion "../js/src/tests" + (substitute* "shell/os.js" + ;; FIXME: Why does the killed process have an exit status? + ((".*killed process should not have exitStatus.*") + "")) + + ;; XXX: Delete all tests that test time zone functionality, + ;; because the test suite uses /etc/localtime to figure out + ;; the offset from the hardware clock, which does not work + ;; in the build container. See . + (delete-file-recursively "non262/Date") + (delete-file "non262/Intl/DateTimeFormat/tz-environment-variable.js") + + (setenv "JSTESTS_EXTRA_ARGS" + (string-join + (list + ;; Do not run tests marked as "random". + "--exclude-random" + ;; Exclude web platform tests. + "--wpt=disabled" + ;; Respect the daemons configured number of jobs. + (string-append "--worker-count=" + (number->string (parallel-job-count)))))))))))) (native-inputs - `(("autoconf" ,autoconf-2.13) - ("automake" ,automake) - ;; TODO(staging): Use the default LLVM in the next rebuild cycle. - ("llvm" ,llvm-9) ;for llvm-objdump - ("perl" ,perl) - ("pkg-config" ,pkg-config) - ("python" ,python-3) - ("rust" ,rust) - ("cargo" ,rust "cargo"))) + (list autoconf-2.13 + automake + ;; TODO(staging): Use the default LLVM in the next rebuild cycle. + llvm-9 ;for llvm-objdump + perl + pkg-config + python-3 + rust + `(,rust "cargo"))) (inputs - (list icu4c readline zlib)))) + (list icu4c readline zlib)) + (propagated-inputs + (list nspr)) ; in the Requires.private field of mozjs-*.pc + (home-page + "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey") + (synopsis "Mozilla javascript engine") + (description "SpiderMonkey is Mozilla's JavaScript engine written +in C/C++.") + (license license:mpl2.0))) ; and others for some files (define mozilla-compare-locales (origin diff --git a/gnu/packages/patches/mozjs17-aarch64-support.patch b/gnu/packages/patches/mozjs17-aarch64-support.patch deleted file mode 100644 index 51e2e306d5..0000000000 --- a/gnu/packages/patches/mozjs17-aarch64-support.patch +++ /dev/null @@ -1,60 +0,0 @@ -https://build.opensuse.org/package/view_file/openSUSE:Factory/mozjs17/mozjs-aarch64-support.patch - -index c071c33..90764c3 100644 ---- a/js/src/assembler/jit/ExecutableAllocator.h -+++ b/js/src/assembler/jit/ExecutableAllocator.h -@@ -382,6 +382,12 @@ public: - { - reprotectRegion(start, size, Executable); - } -+#elif WTF_CPU_AARCH64 && WTF_PLATFORM_LINUX -+ static void cacheFlush(void* code, size_t size) -+ { -+ intptr_t end = reinterpret_cast(code) + size; -+ __builtin___clear_cache(reinterpret_cast(code), reinterpret_cast(end)); -+ } - #else - static void makeWritable(void*, size_t) {} - static void makeExecutable(void*, size_t) {} -diff --git a/js/src/assembler/wtf/Platform.h b/js/src/assembler/wtf/Platform.h -index 0c84896..e8763a7 100644 ---- a/js/src/assembler/wtf/Platform.h -+++ b/js/src/assembler/wtf/Platform.h -@@ -325,6 +325,10 @@ - #define WTF_THUMB_ARCH_VERSION 0 - #endif - -+/* CPU(AArch64) - 64-bit ARM */ -+#if defined(__aarch64__) -+#define WTF_CPU_AARCH64 1 -+#endif - - /* WTF_CPU_ARMV5_OR_LOWER - ARM instruction set v5 or earlier */ - /* On ARMv5 and below the natural alignment is required. -diff --git a/js/src/configure.in b/js/src/configure.in -index 15605b2..19fd704 100644 ---- a/js/src/configure.in -+++ b/js/src/configure.in -@@ -1121,6 +1121,10 @@ arm*) - CPU_ARCH=arm - ;; - -+aarch64) -+ CPU_ARCH=aarch64 -+ ;; -+ - mips|mipsel) - CPU_ARCH="mips" - ;; -diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h -index 0eec2d9..fe26dab 100644 ---- a/mfbt/double-conversion/utils.h -+++ b/mfbt/double-conversion/utils.h -@@ -58,6 +58,7 @@ - defined(__mips__) || defined(__powerpc__) || \ - defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ - defined(__SH4__) || defined(__alpha__) || \ -+ defined(__aarch64__) || \ - defined(_MIPS_ARCH_MIPS32R2) - #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) diff --git a/gnu/packages/patches/mozjs24-aarch64-support.patch b/gnu/packages/patches/mozjs24-aarch64-support.patch deleted file mode 100644 index 9dca8e500c..0000000000 --- a/gnu/packages/patches/mozjs24-aarch64-support.patch +++ /dev/null @@ -1,21 +0,0 @@ -This patch is sourced from Debian's mozjs24 patch set. - -Description: Add arm64 support -Author: Andreas Schwab -Origin: vendor, https://build.opensuse.org/package/view_file/openSUSE:Factory/mozjs17/mozjs-aarch64-support.patch -Forwarded: no -Last-Update: 2014-01-03 - -Index: b/mfbt/double-conversion/utils.h -=================================================================== ---- a/mfbt/double-conversion/utils.h -+++ b/mfbt/double-conversion/utils.h -@@ -58,7 +58,7 @@ - defined(__mips__) || defined(__powerpc__) || \ - defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ - defined(__SH4__) || defined(__alpha__) || \ -- defined(_MIPS_ARCH_MIPS32R2) -+ defined(_MIPS_ARCH_MIPS32R2) || defined(__aarch64__) - #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 - #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) - #if defined(_WIN32) diff --git a/gnu/packages/patches/mozjs38-pkg-config-version.patch b/gnu/packages/patches/mozjs38-pkg-config-version.patch deleted file mode 100644 index 49ff6f6f8d..0000000000 --- a/gnu/packages/patches/mozjs38-pkg-config-version.patch +++ /dev/null @@ -1,24 +0,0 @@ -Taken from https://bug1339931.bmoattachments.org/attachment.cgi?id=8837770. - -Add major version to pkg-config filename. -Author: Rico Tzschichholz -Forwarded: no -Last-Update: 2015-05-04 - -Index: b/js/src/Makefile.in -=================================================================== ---- a/js/src/Makefile.in -+++ b/js/src/Makefile.in -@@ -214,10 +214,10 @@ - $(JS_CONFIG_NAME): js-config - cp $^ $@ - --$(LIBRARY_NAME).pc: js.pc -+$(JS_LIBRARY_NAME).pc: js.pc - cp $^ $@ - --install:: $(LIBRARY_NAME).pc -+install:: $(JS_LIBRARY_NAME).pc - $(SYSINSTALL) $^ $(DESTDIR)$(libdir)/pkgconfig - - install:: js-config.h diff --git a/gnu/packages/patches/mozjs38-shell-version.patch b/gnu/packages/patches/mozjs38-shell-version.patch deleted file mode 100644 index e7d3d19c85..0000000000 --- a/gnu/packages/patches/mozjs38-shell-version.patch +++ /dev/null @@ -1,67 +0,0 @@ -Taken from https://bug1339931.bmoattachments.org/attachment.cgi?id=8837771. - -# HG changeset patch -# Parent 4732a0e5d22bc7e5c1f1ace7a182d537d9cc2c6a -Add major version to shell and js-config filenames. -Author: Rico Tzschichholz -Forwarded: no -Last-Update: 2014-10-29 - ---- -diff --git a/js/src/configure b/js/src/configure ---- a/js/src/configure -+++ b/js/src/configure -@@ -1696,8 +1696,13 @@ - MOZJS_PATCH_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9]*[^0-9]*||"` - IS_ALPHA=`echo $MOZILLA_VERSION | grep '[ab]'` - -+if test -n "$JS_STANDALONE"; then -+JS_SHELL_NAME=js$MOZJS_MAJOR_VERSION -+JS_CONFIG_NAME=js$MOZJS_MAJOR_VERSION-config -+else - JS_SHELL_NAME=js - JS_CONFIG_NAME=js-config -+fi - - - if test -n "$IS_ALPHA"; then - -diff --git a/js/src/configure.in b/js/src/configure.in ---- a/js/src/configure.in -+++ b/js/src/configure.in -@@ -234,16 +234,13 @@ MOZJS_MINOR_VERSION=`echo $MOZILLA_VERSI - MOZJS_PATCH_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9]*[^0-9]*||"` - IS_ALPHA=`echo $MOZILLA_VERSION | grep '[ab]'` - --dnl XXX in a temporary bid to avoid developer anger at renaming files --dnl XXX before "js" symlinks exist, don't change names. --dnl --dnl if test -n "$JS_STANDALONE"; then --dnl JS_SHELL_NAME=js$MOZJS_MAJOR_VERSION --dnl JS_CONFIG_NAME=js$MOZJS_MAJOR_VERSION-config --dnl else -+if test -n "$JS_STANDALONE"; then -+JS_SHELL_NAME=js$MOZJS_MAJOR_VERSION -+JS_CONFIG_NAME=js$MOZJS_MAJOR_VERSION-config -+else - JS_SHELL_NAME=js - JS_CONFIG_NAME=js-config --dnl fi -+fi - - changequote([,]) - if test -n "$IS_ALPHA"; then - -diff -r 80a9e64d75f5 js/src/Makefile.in ---- a/js/src/Makefile.in Wed Jun 25 15:11:42 2014 +0200 -+++ b/js/src/Makefile.in Sat Jul 05 14:08:38 2014 +0200 -@@ -273,6 +273,9 @@ - SCRIPTS = $(JS_CONFIG_NAME) - SDK_BINARY = $(JS_CONFIG_NAME) - -+$(JS_CONFIG_NAME): js-config -+ cp $^ $@ -+ - $(JS_LIBRARY_NAME).pc: js.pc - cp $^ $@ - diff --git a/gnu/packages/patches/mozjs38-tracelogger.patch b/gnu/packages/patches/mozjs38-tracelogger.patch deleted file mode 100644 index 0375ec36cc..0000000000 --- a/gnu/packages/patches/mozjs38-tracelogger.patch +++ /dev/null @@ -1,608 +0,0 @@ -Squashed version of several commits to fix the tracelogger. - -Taken from -https://github.com/GNOME/jhbuild/blob/master/patches/mozjs38-fix-tracelogger.patch. - -# === Fix the SM38 tracelogger === -# This patch is a squashed version of several patches that were adapted -# to fix failing hunks. -# -# Applied in the following order, they are: -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1223767 -# Assertion failure: i < size_, at js/src/vm/TraceLoggingTypes.h:210 -# Also fix stop-information to make reduce.py work correctly. -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1227914 -# Limit the memory tracelogger can take. -# This causes tracelogger to flush data to the disk regularly and prevents out of -# memory issues if a lot of data gets logged. -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1155618 -# Fix tracelogger destructor that touches possibly uninitialised hash table. -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1223636 -# Don't treat extraTextId as containing only extra ids. -# This fixes an assertion failure: id == nextTextId at js/src/vm/TraceLoggingGraph.cpp -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1227028 -# Fix when to keep the payload of a TraceLogger event. -# This fixes an assertion failure: textId < uint32_t(1 << 31) at js/src/vm/TraceLoggingGraph.h -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1266649 -# Handle failing to add to pointermap gracefully. -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1280648 -# Don't cache based on pointers to movable GC things. -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1224123 -# Fix the use of LastEntryId in tracelogger.h. -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1231170 -# Use size in debugger instead of the current id to track last logged item. -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1221844 -# Move TraceLogger_Invalidation to LOG_ITEM. -# Add some debug checks to logTimestamp. -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1255766 -# Also mark resizing of memory. -# * https://bugzilla.mozilla.org/show_bug.cgi?id=1259403 -# Only increase capacity by multiples of 2. -# Always make sure there are 3 free slots for events. -# === - -diff --git a/js/src/jit-test/tests/tracelogger/bug1231170.js b/js/src/jit-test/tests/tracelogger/bug1231170.js -new file mode 100644 -index 0000000..023e93e ---- /dev/null -+++ b/js/src/jit-test/tests/tracelogger/bug1231170.js -@@ -0,0 +1,3 @@ -+var du = new Debugger(); -+if (typeof du.drainTraceLogger === "function") -+ du.drainTraceLogger(); -diff --git a/js/src/jit-test/tests/tracelogger/bug1266649.js b/js/src/jit-test/tests/tracelogger/bug1266649.js -new file mode 100644 -index 0000000..81ae7ad ---- /dev/null -+++ b/js/src/jit-test/tests/tracelogger/bug1266649.js -@@ -0,0 +1,10 @@ -+ -+var du = new Debugger(); -+if (typeof du.setupTraceLogger === "function" && -+ typeof oomTest === 'function') -+{ -+ du.setupTraceLogger({ -+ Scripts: true -+ }) -+ oomTest(() => function(){}); -+} -diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp -index 93e2fda..09049d6 100644 ---- a/js/src/jit/Ion.cpp -+++ b/js/src/jit/Ion.cpp -@@ -1055,6 +1055,8 @@ IonScript::Destroy(FreeOp* fop, IonScript* script) - - script->destroyCaches(); - script->unlinkFromRuntime(fop); -+ // Frees the potential event we have set. -+ script->traceLoggerScriptEvent_ = TraceLoggerEvent(); - fop->free_(script); - } - -diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp -index 26262fd..af7f313 100644 ---- a/js/src/vm/Debugger.cpp -+++ b/js/src/vm/Debugger.cpp -@@ -369,10 +369,10 @@ Debugger::Debugger(JSContext* cx, NativeObject* dbg) - objects(cx), - environments(cx), - #ifdef NIGHTLY_BUILD -- traceLoggerLastDrainedId(0), -+ traceLoggerLastDrainedSize(0), - traceLoggerLastDrainedIteration(0), - #endif -- traceLoggerScriptedCallsLastDrainedId(0), -+ traceLoggerScriptedCallsLastDrainedSize(0), - traceLoggerScriptedCallsLastDrainedIteration(0) - { - assertSameCompartment(cx, dbg); -@@ -3907,9 +3907,9 @@ Debugger::drainTraceLogger(JSContext* cx, unsigned argc, Value* vp) - size_t num; - TraceLoggerThread* logger = TraceLoggerForMainThread(cx->runtime()); - bool lostEvents = logger->lostEvents(dbg->traceLoggerLastDrainedIteration, -- dbg->traceLoggerLastDrainedId); -+ dbg->traceLoggerLastDrainedSize); - EventEntry* events = logger->getEventsStartingAt(&dbg->traceLoggerLastDrainedIteration, -- &dbg->traceLoggerLastDrainedId, -+ &dbg->traceLoggerLastDrainedSize, - &num); - - RootedObject array(cx, NewDenseEmptyArray(cx)); -@@ -4002,10 +4002,10 @@ Debugger::drainTraceLoggerScriptCalls(JSContext* cx, unsigned argc, Value* vp) - size_t num; - TraceLoggerThread* logger = TraceLoggerForMainThread(cx->runtime()); - bool lostEvents = logger->lostEvents(dbg->traceLoggerScriptedCallsLastDrainedIteration, -- dbg->traceLoggerScriptedCallsLastDrainedId); -+ dbg->traceLoggerScriptedCallsLastDrainedSize); - EventEntry* events = logger->getEventsStartingAt( - &dbg->traceLoggerScriptedCallsLastDrainedIteration, -- &dbg->traceLoggerScriptedCallsLastDrainedId, -+ &dbg->traceLoggerScriptedCallsLastDrainedSize, - &num); - - RootedObject array(cx, NewDenseEmptyArray(cx)); -diff --git a/js/src/vm/Debugger.h b/js/src/vm/Debugger.h -index 8cac36a..c92d685 100644 ---- a/js/src/vm/Debugger.h -+++ b/js/src/vm/Debugger.h -@@ -314,10 +314,10 @@ class Debugger : private mozilla::LinkedListElement - * lost events. - */ - #ifdef NIGHTLY_BUILD -- uint32_t traceLoggerLastDrainedId; -+ uint32_t traceLoggerLastDrainedSize; - uint32_t traceLoggerLastDrainedIteration; - #endif -- uint32_t traceLoggerScriptedCallsLastDrainedId; -+ uint32_t traceLoggerScriptedCallsLastDrainedSize; - uint32_t traceLoggerScriptedCallsLastDrainedIteration; - - class FrameRange; -diff --git a/js/src/vm/TraceLogging.cpp b/js/src/vm/TraceLogging.cpp -index 6715b36..9766a6f 100644 ---- a/js/src/vm/TraceLogging.cpp -+++ b/js/src/vm/TraceLogging.cpp -@@ -131,7 +131,7 @@ TraceLoggerThread::init() - { - if (!pointerMap.init()) - return false; -- if (!extraTextId.init()) -+ if (!textIdPayloads.init()) - return false; - if (!events.init()) - return false; -@@ -185,10 +185,10 @@ TraceLoggerThread::~TraceLoggerThread() - graph = nullptr; - } - -- for (TextIdHashMap::Range r = extraTextId.all(); !r.empty(); r.popFront()) -- js_delete(r.front().value()); -- extraTextId.finish(); -- pointerMap.finish(); -+ if (textIdPayloads.initialized()) { -+ for (TextIdHashMap::Range r = textIdPayloads.all(); !r.empty(); r.popFront()) -+ js_delete(r.front().value()); -+ } - } - - bool -@@ -287,7 +287,7 @@ TraceLoggerThread::eventText(uint32_t id) - if (id < TraceLogger_Last) - return TLTextIdString(static_cast(id)); - -- TextIdHashMap::Ptr p = extraTextId.lookup(id); -+ TextIdHashMap::Ptr p = textIdPayloads.lookup(id); - MOZ_ASSERT(p); - - return p->value()->string(); -@@ -341,13 +341,15 @@ TraceLoggerThread::extractScriptDetails(uint32_t textId, const char** filename, - TraceLoggerEventPayload* - TraceLoggerThread::getOrCreateEventPayload(TraceLoggerTextId textId) - { -- TextIdHashMap::AddPtr p = extraTextId.lookupForAdd(textId); -- if (p) -+ TextIdHashMap::AddPtr p = textIdPayloads.lookupForAdd(textId); -+ if (p) { -+ MOZ_ASSERT(p->value()->textId() == textId); // Sanity check. - return p->value(); -+ } - - TraceLoggerEventPayload* payload = js_new(textId, (char*)nullptr); - -- if (!extraTextId.add(p, textId, payload)) -+ if (!textIdPayloads.add(p, textId, payload)) - return nullptr; - - return payload; -@@ -357,8 +359,10 @@ TraceLoggerEventPayload* - TraceLoggerThread::getOrCreateEventPayload(const char* text) - { - PointerHashMap::AddPtr p = pointerMap.lookupForAdd((const void*)text); -- if (p) -+ if (p) { -+ MOZ_ASSERT(p->value()->textId() < nextTextId); // Sanity check. - return p->value(); -+ } - - size_t len = strlen(text); - char* str = js_pod_malloc(len + 1); -@@ -369,7 +373,7 @@ TraceLoggerThread::getOrCreateEventPayload(const char* text) - MOZ_ASSERT(ret == len); - MOZ_ASSERT(strlen(str) == len); - -- uint32_t textId = extraTextId.count() + TraceLogger_Last; -+ uint32_t textId = nextTextId; - - TraceLoggerEventPayload* payload = js_new(textId, str); - if (!payload) { -@@ -377,17 +381,19 @@ TraceLoggerThread::getOrCreateEventPayload(const char* text) - return nullptr; - } - -- if (!extraTextId.putNew(textId, payload)) { -+ if (!textIdPayloads.putNew(textId, payload)) { - js_delete(payload); - return nullptr; - } - -- if (!pointerMap.add(p, text, payload)) -- return nullptr; -- - if (graph.get()) - graph->addTextId(textId, str); - -+ nextTextId++; -+ -+ if (!pointerMap.add(p, text, payload)) -+ return nullptr; -+ - return payload; - } - -@@ -407,9 +413,14 @@ TraceLoggerThread::getOrCreateEventPayload(TraceLoggerTextId type, const char* f - if (!traceLoggerState->isTextIdEnabled(type)) - return getOrCreateEventPayload(type); - -- PointerHashMap::AddPtr p = pointerMap.lookupForAdd(ptr); -- if (p) -- return p->value(); -+ PointerHashMap::AddPtr p; -+ if (ptr) { -+ p = pointerMap.lookupForAdd(ptr); -+ if (p) { -+ MOZ_ASSERT(p->value()->textId() < nextTextId); // Sanity check. -+ return p->value(); -+ } -+ } - - // Compute the length of the string to create. - size_t lenFilename = strlen(filename); -@@ -428,24 +439,28 @@ TraceLoggerThread::getOrCreateEventPayload(TraceLoggerTextId type, const char* f - MOZ_ASSERT(ret == len); - MOZ_ASSERT(strlen(str) == len); - -- uint32_t textId = extraTextId.count() + TraceLogger_Last; -+ uint32_t textId = nextTextId; - TraceLoggerEventPayload* payload = js_new(textId, str); - if (!payload) { - js_free(str); - return nullptr; - } - -- if (!extraTextId.putNew(textId, payload)) { -+ if (!textIdPayloads.putNew(textId, payload)) { - js_delete(payload); - return nullptr; - } - -- if (!pointerMap.add(p, ptr, payload)) -- return nullptr; -- - if (graph.get()) - graph->addTextId(textId, str); - -+ nextTextId++; -+ -+ if (ptr) { -+ if (!pointerMap.add(p, ptr, payload)) -+ return nullptr; -+ } -+ - return payload; - } - -@@ -453,14 +468,14 @@ TraceLoggerEventPayload* - TraceLoggerThread::getOrCreateEventPayload(TraceLoggerTextId type, JSScript* script) - { - return getOrCreateEventPayload(type, script->filename(), script->lineno(), script->column(), -- script); -+ nullptr); - } - - TraceLoggerEventPayload* - TraceLoggerThread::getOrCreateEventPayload(TraceLoggerTextId type, - const JS::ReadOnlyCompileOptions& script) - { -- return getOrCreateEventPayload(type, script.filename(), script.lineno, script.column, &script); -+ return getOrCreateEventPayload(type, script.filename(), script.lineno, script.column, nullptr); - } - - void -@@ -485,7 +500,7 @@ TraceLoggerThread::startEvent(uint32_t id) - if (!traceLoggerState->isTextIdEnabled(id)) - return; - -- logTimestamp(id); -+ log(id); - } - - void -@@ -510,7 +525,7 @@ TraceLoggerThread::stopEvent(uint32_t id) - if (!traceLoggerState->isTextIdEnabled(id)) - return; - -- logTimestamp(TraceLogger_Stop); -+ log(TraceLogger_Stop); - } - - void -@@ -522,23 +537,57 @@ TraceLoggerThread::logTimestamp(TraceLoggerTextId id) - void - TraceLoggerThread::logTimestamp(uint32_t id) - { -+ MOZ_ASSERT(id > TraceLogger_LastTreeItem && id < TraceLogger_Last); -+ log(id); -+} -+ -+void -+TraceLoggerThread::log(uint32_t id) -+{ - if (enabled == 0) - return; - - MOZ_ASSERT(traceLoggerState); -- if (!events.ensureSpaceBeforeAdd()) { -+ -+ // We request for 3 items to add, since if we don't have enough room -+ // we record the time it took to make more place. To log this information -+ // we need 2 extra free entries. -+ if (!events.hasSpaceForAdd(3)) { - uint64_t start = rdtsc() - traceLoggerState->startupTime; - -- if (graph.get()) -- graph->log(events); -+ if (!events.ensureSpaceBeforeAdd(3)) { -+ if (graph.get()) -+ graph->log(events); -+ -+ iteration_++; -+ events.clear(); -+ -+ // Remove the item in the pointerMap for which the payloads -+ // have no uses anymore -+ for (PointerHashMap::Enum e(pointerMap); !e.empty(); e.popFront()) { -+ if (e.front().value()->uses() != 0) -+ continue; -+ -+ TextIdHashMap::Ptr p = textIdPayloads.lookup(e.front().value()->textId()); -+ MOZ_ASSERT(p); -+ textIdPayloads.remove(p); -+ -+ e.removeFront(); -+ } - -- iteration_++; -- events.clear(); -+ // Free all payloads that have no uses anymore. -+ for (TextIdHashMap::Enum e(textIdPayloads); !e.empty(); e.popFront()) { -+ if (e.front().value()->uses() == 0) { -+ js_delete(e.front().value()); -+ e.removeFront(); -+ } -+ } -+ } - - // Log the time it took to flush the events as being from the - // Tracelogger. - if (graph.get()) { -- MOZ_ASSERT(events.capacity() > 2); -+ MOZ_ASSERT(events.hasSpaceForAdd(2)); - EventEntry& entryStart = events.pushUninitialized(); - entryStart.time = start; - entryStart.textId = TraceLogger_Internal; -@@ -548,13 +597,6 @@ TraceLoggerThread::logTimestamp(uint32_t id) - entryStop.textId = TraceLogger_Stop; - } - -- // Free all TextEvents that have no uses anymore. -- for (TextIdHashMap::Enum e(extraTextId); !e.empty(); e.popFront()) { -- if (e.front().value()->uses() == 0) { -- js_delete(e.front().value()); -- e.removeFront(); -- } -- } - } - - uint64_t time = rdtsc() - traceLoggerState->startupTime; -@@ -956,3 +998,16 @@ TraceLoggerEvent::~TraceLoggerEvent() - if (payload_) - payload_->release(); - } -+ -+TraceLoggerEvent& -+TraceLoggerEvent::operator=(const TraceLoggerEvent& other) -+{ -+ if (hasPayload()) -+ payload()->release(); -+ if (other.hasPayload()) -+ other.payload()->use(); -+ -+ payload_ = other.payload_; -+ -+ return *this; -+} -diff --git a/js/src/vm/TraceLogging.h b/js/src/vm/TraceLogging.h -index a124dcb..91a1eb0 100644 ---- a/js/src/vm/TraceLogging.h -+++ b/js/src/vm/TraceLogging.h -@@ -110,6 +110,9 @@ class TraceLoggerEvent { - bool hasPayload() const { - return !!payload_; - } -+ -+ TraceLoggerEvent& operator=(const TraceLoggerEvent& other); -+ TraceLoggerEvent(const TraceLoggerEvent& event) = delete; - }; - - /** -@@ -130,6 +133,10 @@ class TraceLoggerEventPayload { - uses_(0) - { } - -+ ~TraceLoggerEventPayload() { -+ MOZ_ASSERT(uses_ == 0); -+ } -+ - uint32_t textId() { - return textId_; - } -@@ -166,7 +173,8 @@ class TraceLoggerThread - mozilla::UniquePtr graph; - - PointerHashMap pointerMap; -- TextIdHashMap extraTextId; -+ TextIdHashMap textIdPayloads; -+ uint32_t nextTextId; - - ContinuousSpace events; - -@@ -181,6 +189,7 @@ class TraceLoggerThread - : enabled(0), - failed(false), - graph(), -+ nextTextId(TraceLogger_Last), - iteration_(0), - top(nullptr) - { } -@@ -195,22 +204,22 @@ class TraceLoggerThread - bool enable(JSContext* cx); - bool disable(); - -- // Given the previous iteration and lastEntryId, return an array of events -+ // Given the previous iteration and size, return an array of events - // (there could be lost events). At the same time update the iteration and -- // lastEntry and gives back how many events there are. -- EventEntry* getEventsStartingAt(uint32_t* lastIteration, uint32_t* lastEntryId, size_t* num) { -+ // size and gives back how many events there are. -+ EventEntry* getEventsStartingAt(uint32_t* lastIteration, uint32_t* lastSize, size_t* num) { - EventEntry* start; - if (iteration_ == *lastIteration) { -- MOZ_ASSERT(events.lastEntryId() >= *lastEntryId); -- *num = events.lastEntryId() - *lastEntryId; -- start = events.data() + *lastEntryId + 1; -+ MOZ_ASSERT(*lastSize <= events.size()); -+ *num = events.size() - *lastSize; -+ start = events.data() + *lastSize; - } else { -- *num = events.lastEntryId() + 1; -+ *num = events.size(); - start = events.data(); - } - - *lastIteration = iteration_; -- *lastEntryId = events.lastEntryId(); -+ *lastSize = events.size(); - return start; - } - -@@ -220,16 +229,16 @@ class TraceLoggerThread - const char** lineno, size_t* lineno_len, const char** colno, - size_t* colno_len); - -- bool lostEvents(uint32_t lastIteration, uint32_t lastEntryId) { -+ bool lostEvents(uint32_t lastIteration, uint32_t lastSize) { - // If still logging in the same iteration, there are no lost events. - if (lastIteration == iteration_) { -- MOZ_ASSERT(lastEntryId <= events.lastEntryId()); -+ MOZ_ASSERT(lastSize <= events.size()); - return false; - } - -- // When proceeded to the next iteration and lastEntryId points to -- // the maximum capacity there are no logs that are lost. -- if (lastIteration + 1 == iteration_ && lastEntryId == events.capacity()) -+ // If we are in a consecutive iteration we are only sure we didn't lose any events, -+ // when the lastSize equals the maximum size 'events' can get. -+ if (lastIteration == iteration_ - 1 && lastSize == events.maxSize()) - return false; - - return true; -@@ -268,6 +277,7 @@ class TraceLoggerThread - void stopEvent(uint32_t id); - private: - void stopEvent(); -+ void log(uint32_t id); - - public: - static unsigned offsetOfEnabled() { -diff --git a/js/src/vm/TraceLoggingGraph.cpp b/js/src/vm/TraceLoggingGraph.cpp -index d1b7f2e..a4eb273 100644 ---- a/js/src/vm/TraceLoggingGraph.cpp -+++ b/js/src/vm/TraceLoggingGraph.cpp -@@ -276,7 +276,7 @@ TraceLoggerGraph::flush() - if (bytesWritten < tree.size()) - return false; - -- treeOffset += tree.lastEntryId(); -+ treeOffset += tree.size(); - tree.clear(); - } - -@@ -359,7 +359,7 @@ TraceLoggerGraph::startEventInternal(uint32_t id, uint64_t timestamp) - - if (parent.lastChildId() == 0) { - MOZ_ASSERT(!entry.hasChildren()); -- MOZ_ASSERT(parent.treeId() == tree.lastEntryId() + treeOffset); -+ MOZ_ASSERT(parent.treeId() == treeOffset + tree.size() - 1); - - if (!updateHasChildren(parent.treeId())) - return false; -diff --git a/js/src/vm/TraceLoggingTypes.h b/js/src/vm/TraceLoggingTypes.h -index f1c9d0c..10b76d6 100644 ---- a/js/src/vm/TraceLoggingTypes.h -+++ b/js/src/vm/TraceLoggingTypes.h -@@ -21,7 +21,6 @@ - _(Internal) \ - _(Interpreter) \ - _(InlinedScripts) \ -- _(Invalidation) \ - _(IonCompilation) \ - _(IonCompilationPaused) \ - _(IonLinking) \ -@@ -60,6 +59,7 @@ - - #define TRACELOGGER_LOG_ITEMS(_) \ - _(Bailout) \ -+ _(Invalidation) \ - _(Disable) \ - _(Enable) \ - _(Stop) -@@ -130,6 +130,9 @@ class ContinuousSpace { - uint32_t size_; - uint32_t capacity_; - -+ // The maximum amount of ram memory a continuous space structure can take (in bytes). -+ static const uint32_t LIMIT = 200 * 1024 * 1024; -+ - public: - ContinuousSpace () - : data_(nullptr) -@@ -151,6 +154,10 @@ class ContinuousSpace { - data_ = nullptr; - } - -+ static uint32_t maxSize() { -+ return LIMIT / sizeof(T); -+ } -+ - T* data() { - return data_; - } -@@ -187,11 +194,14 @@ class ContinuousSpace { - if (hasSpaceForAdd(count)) - return true; - -+ // Limit the size of a continuous buffer. -+ if (size_ + count > maxSize()) -+ return false; -+ - uint32_t nCapacity = capacity_ * 2; -- if (size_ + count > nCapacity) -- nCapacity = size_ + count; -- T* entries = (T*) js_realloc(data_, nCapacity * sizeof(T)); -+ nCapacity = (nCapacity < maxSize()) ? nCapacity : maxSize(); - -+ T* entries = (T*) js_realloc(data_, nCapacity * sizeof(T)); - if (!entries) - return false; - diff --git a/gnu/packages/patches/mozjs38-version-detection.patch b/gnu/packages/patches/mozjs38-version-detection.patch deleted file mode 100644 index ec2d264ccc..0000000000 --- a/gnu/packages/patches/mozjs38-version-detection.patch +++ /dev/null @@ -1,180 +0,0 @@ -Taken from -https://trac.wildfiregames.com/export/18656/ps/trunk/libraries/source/spidermonkey/FixVersionDetectionConfigure.diff. - -Fixes a version detection issue in 0ad. See -https://lists.gnu.org/archive/html/guix-devel/2017-01/msg00625.html. - -diff --git a/js/src/configure b/js/src/configure ---- a/js/src/configure -+++ b/js/src/configure -@@ -1662,70 +1662,6 @@ esac - - fi - --MOZILLA_VERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir` --MOZILLA_UAVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --uaversion` --MOZILLA_SYMBOLVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --symbolversion` -- --cat >> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> confdefs.pytmp <> confdefs.h <> $CONFIG_STATUS <> $CONFIG_STATUS < Date: Fri, 13 May 2022 14:56:29 -0400 Subject: gnu: Remove 4store. * gnu/packages/databases.scm (4store): Delete variable. * gnu/packages/patches/4store-fix-buildsystem.patch: Delete file. * gnu/packages/patches/4store-unset-preprocessor-directive.patch: Likewise. * gnu/local.mk (dist_patch_DATA): De-register them. --- gnu/local.mk | 2 - gnu/packages/databases.scm | 41 ---------------- gnu/packages/patches/4store-fix-buildsystem.patch | 56 ---------------------- .../4store-unset-preprocessor-directive.patch | 16 ------- 4 files changed, 115 deletions(-) delete mode 100644 gnu/packages/patches/4store-fix-buildsystem.patch delete mode 100644 gnu/packages/patches/4store-unset-preprocessor-directive.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 947669459e..06cf32b916 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -825,8 +825,6 @@ MODULES_NOT_COMPILED += \ patchdir = $(guilemoduledir)/%D%/packages/patches dist_patch_DATA = \ - %D%/packages/patches/4store-fix-buildsystem.patch \ - %D%/packages/patches/4store-unset-preprocessor-directive.patch \ %D%/packages/patches/a2ps-CVE-2001-1593.patch \ %D%/packages/patches/a2ps-CVE-2014-0466.patch \ %D%/packages/patches/a2ps-CVE-2015-8107.patch \ diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 56f6b92b4c..09d825af3e 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -177,47 +177,6 @@ #:use-module (srfi srfi-26) #:use-module (ice-9 match)) -(define-public 4store - (package - (name "4store") - (version "1.1.6") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/4store/4store") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1kzdfmwpzy64cgqlkcz5v4klwx99w0jk7afckyf7yqbqb4rydmpk")) - (patches (search-patches "4store-unset-preprocessor-directive.patch" - "4store-fix-buildsystem.patch")))) - (build-system gnu-build-system) - (native-inputs - (list perl - python-2 - autoconf - automake - gettext-minimal - libtool - `(,pcre "bin") ;for 'pcre-config' - pkg-config)) - (inputs - (list glib - rasqal - libxml2 - raptor2 - readline - avahi - cyrus-sasl - openssl - `(,util-linux "lib"))) - ;; http://www.4store.org has been down for a while now. - (home-page "https://github.com/4store/4store") - (synopsis "Clustered RDF storage and query engine") - (description "4store is a RDF/SPARQL store written in C, supporting -either single machines or networked clusters.") - (license license:gpl3+))) - (define-public ephemeralpg (package (name "ephemeralpg") diff --git a/gnu/packages/patches/4store-fix-buildsystem.patch b/gnu/packages/patches/4store-fix-buildsystem.patch deleted file mode 100644 index 383baa9461..0000000000 --- a/gnu/packages/patches/4store-fix-buildsystem.patch +++ /dev/null @@ -1,56 +0,0 @@ -This patch sets a fixed version to avoid needing Git and the .git/ folder. -It also removes the creation of "/var/lib/4store", which is not available -during the install phase in GNU Guix. - -Patch by Roel Janssen -*** a/configure.ac Wed Feb 4 19:05:24 2015 ---- b/configure.ac Wed Mar 23 11:20:38 2016 -*************** -*** 2,13 **** - # Process this file with autoconf to produce a configure script. - - AC_PREREQ([2.50]) -! AC_INIT([4store], m4_esyscmd([./version.sh .version]), [http://4store.org/support/], [4store]) - AC_CONFIG_SRCDIR([src/backend/backend-intl.h]) -! AM_INIT_AUTOMAKE([1.7 std-options -Wall]) - AC_CONFIG_HEADERS(4store-config.h) - - # Checks for programs. - AC_PROG_LIBTOOL - AC_PROG_AWK - AC_PROG_CC ---- 2,14 ---- - # Process this file with autoconf to produce a configure script. - - AC_PREREQ([2.50]) -! AC_INIT([4store], [1.1.6], [http://4store.org/support/], [4store]) - AC_CONFIG_SRCDIR([src/backend/backend-intl.h]) -! AM_INIT_AUTOMAKE([1.7 std-options foreign -Wall]) - AC_CONFIG_HEADERS(4store-config.h) - - # Checks for programs. -+ AM_PROG_AR - AC_PROG_LIBTOOL - AC_PROG_AWK - AC_PROG_CC - -*** a/src/utilities/Makefile.am Wed Feb 4 19:05:24 2015 ---- b/src/utilities/Makefile.am Wed Mar 23 14:05:56 2016 -*************** -*** 13,20 **** - noinst_PROGRAMS = lex-file-verify 4s-rid - - install-data-local: -! mkdir -p $(DESTDIR)@FS_STORE_ROOT@ -! chmod 1777 $(DESTDIR)@FS_STORE_ROOT@ - - 4s_backend_destroy_SOURCES = backend-destroy.c - 4s_backend_destroy_LDADD = ../common/lib4sintl.a ---- 13,19 ---- - noinst_PROGRAMS = lex-file-verify 4s-rid - - install-data-local: -! echo "Please create the following directory: " $(DESTDIR)@FS_STORE_ROOT@ - - 4s_backend_destroy_SOURCES = backend-destroy.c - 4s_backend_destroy_LDADD = ../common/lib4sintl.a diff --git a/gnu/packages/patches/4store-unset-preprocessor-directive.patch b/gnu/packages/patches/4store-unset-preprocessor-directive.patch deleted file mode 100644 index c4b1d6eda4..0000000000 --- a/gnu/packages/patches/4store-unset-preprocessor-directive.patch +++ /dev/null @@ -1,16 +0,0 @@ -This patch removes the _XOPEN_SOURCE preprocessor directive as it does not seem to be needed. -Setting it removes the definition of strdup, which is used in filter-datatypes.c. - -Patch by Roel Janssen -*** a/src/frontend/filter-datatypes.c 1970-01-01 01:00:00.000000000 +0100 ---- b/src/frontend/filter-datatypes.c 2018-04-03 17:39:23.177905592 +0200 -*************** -*** 18,24 **** - * Copyright (C) 2006 Steve Harris for Garlik - */ - -- #define _XOPEN_SOURCE - #include - #include - #include ---- 18,23 ---- -- cgit v1.2.3 From f451a8e80cf8d2da08bb65c4c07e3d41d7a17e58 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 13 May 2022 15:19:31 -0400 Subject: gnu: openbox: Patch for Python 3. * gnu/packages/patches/openbox-python3.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/openbox.scm (openbox)[source]: Apply it. [arguments]: New field. [propagated-inputs]: Replace python2-pyxdg with python-pyxdg. [native-inputs]: Replace python-2 with python-wrapper. Add autoconf, automake, gettext-minimal and libtool. --- gnu/local.mk | 1 + gnu/packages/openbox.scm | 20 +++- gnu/packages/patches/openbox-python3.patch | 165 +++++++++++++++++++++++++++++ 3 files changed, 182 insertions(+), 4 deletions(-) create mode 100644 gnu/packages/patches/openbox-python3.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 06cf32b916..af92253ddd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1561,6 +1561,7 @@ dist_patch_DATA = \ %D%/packages/patches/onnx-skip-model-downloads.patch \ %D%/packages/patches/openboardview-use-system-imgui.patch \ %D%/packages/patches/openboardview-use-system-utf8.patch \ + %D%/packages/patches/openbox-python3.patch \ %D%/packages/patches/opencascade-oce-glibc-2.26.patch \ %D%/packages/patches/openfoam-4.1-cleanup.patch \ %D%/packages/patches/openjdk-10-idlj-reproducibility.patch \ diff --git a/gnu/packages/openbox.scm b/gnu/packages/openbox.scm index 873592c19e..2dac9ec644 100644 --- a/gnu/packages/openbox.scm +++ b/gnu/packages/openbox.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014 Julien Lepiller ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2017 Nikita +;;; Copyright © 2022 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,6 +25,9 @@ #:use-module (guix download) #:use-module (guix utils) #:use-module (guix build-system gnu) + #:use-module (guix gexp) + #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages freedesktop) #:use-module (gnu packages gettext) #:use-module (gnu packages gnome) @@ -46,10 +50,18 @@ version ".tar.xz")) (sha256 (base32 - "0vg2y1qddsdxkjv806mzpvmkgzliab8ll4s7zm7ma5jnriamirxb")))) + "0vg2y1qddsdxkjv806mzpvmkgzliab8ll4s7zm7ma5jnriamirxb")) + (patches (search-patches "openbox-python3.patch")))) (build-system gnu-build-system) - (native-inputs (list pkg-config)) - (propagated-inputs (list python2-pyxdg)) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'force-reconfigure + ;; This is made necessary by the openbox-python3 patch. + (lambda _ + (delete-file "configure")))))) + (native-inputs (list autoconf automake gettext-minimal libtool pkg-config)) + (propagated-inputs (list python-pyxdg)) (inputs (list imlib2 libxml2 (librsvg-for-system) @@ -60,7 +72,7 @@ libxrandr libxft pango - python-2)) + python-wrapper)) (synopsis "Box style window manager") (description "Openbox is a highly configurable, next generation window manager with diff --git a/gnu/packages/patches/openbox-python3.patch b/gnu/packages/patches/openbox-python3.patch new file mode 100644 index 0000000000..782524d8a7 --- /dev/null +++ b/gnu/packages/patches/openbox-python3.patch @@ -0,0 +1,165 @@ +Retrieved from the openbox Debian package. + +From acfbbc4ea40932f183617bb7006700140fe5f61e Mon Sep 17 00:00:00 2001 +From: Troy Curtis Jr +Date: Wed, 13 Sep 2017 21:59:48 -0500 +Subject: [PATCH] Add python3 support to openbox-xdg-autostart. + +Updated syntax in openbox-xdg-autostart to support both python2 and +python3. + +Added a configure substitution to set the chosen python at build time. + +https://bugzilla.icculus.org/show_bug.cgi?id=6444 +--- + .gitignore | 1 + + configure.ac | 3 + + ...xdg-autostart => openbox-xdg-autostart.in} | 70 +++++++++---------- + 3 files changed, 38 insertions(+), 36 deletions(-) + rename data/autostart/{openbox-xdg-autostart => openbox-xdg-autostart.in} (77%) + +diff --git a/configure.ac b/configure.ac +index ca1602670..9a31e9845 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -103,6 +103,8 @@ AC_CHECK_HEADERS(ctype.h dirent.h errno.h fcntl.h grp.h locale.h pwd.h) + AC_CHECK_HEADERS(signal.h string.h stdio.h stdlib.h unistd.h sys/stat.h) + AC_CHECK_HEADERS(sys/select.h sys/socket.h sys/time.h sys/types.h sys/wait.h) + ++AM_PATH_PYTHON([2],,) ++ + AC_PATH_PROG([SED], [sed], [no]) + if test "$SED" = "no"; then + AC_MSG_ERROR([The program "sed" is not available. This program is required to build Openbox.]) +@@ -259,6 +261,7 @@ AC_CONFIG_FILES([ + obrender/version.h + obt/version.h + version.h ++ data/autostart/openbox-xdg-autostart + ]) + AC_CONFIG_COMMANDS([doc], + [test -d doc || mkdir doc]) +diff --git a/data/autostart/openbox-xdg-autostart b/data/autostart/openbox-xdg-autostart.in +similarity index 77% +rename from data/autostart/openbox-xdg-autostart +rename to data/autostart/openbox-xdg-autostart.in +index 04a17a199..3c365b112 100755 +--- a/data/autostart/openbox-xdg-autostart ++++ b/data/autostart/openbox-xdg-autostart.in +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!@PYTHON@ + + # openbox-xdg-autostart runs things based on the XDG autostart specification + # Copyright (C) 2008 Dana Jansens +@@ -28,9 +28,7 @@ try: + from xdg.DesktopEntry import DesktopEntry + from xdg.Exceptions import ParsingError + except ImportError: +- print +- print >>sys.stderr, "ERROR:", ME, "requires PyXDG to be installed" +- print ++ sys.stderr.write("\nERROR: %s requires PyXDG to be installed\n" % ME) + sys.exit(1) + + def main(argv=sys.argv): +@@ -51,7 +49,7 @@ def main(argv=sys.argv): + try: + autofile = AutostartFile(path) + except ParsingError: +- print "Invalid .desktop file: " + path ++ print("Invalid .desktop file: " + path) + else: + if not autofile in files: + files.append(autofile) +@@ -99,9 +97,9 @@ class AutostartFile: + + def _alert(self, str, info=False): + if info: +- print "\t ", str ++ print("\t ", str) + else: +- print "\t*", str ++ print("\t*", str) + + def _showInEnvironment(self, envs, verbose=False): + default = not self.de.getOnlyShowIn() +@@ -146,14 +144,14 @@ class AutostartFile: + + def display(self, envs): + if self._shouldRun(envs): +- print "[*] " + self.de.getName() ++ print("[*] " + self.de.getName()) + else: +- print "[ ] " + self.de.getName() ++ print("[ ] " + self.de.getName()) + self._alert("File: " + self.path, info=True) + if self.de.getExec(): + self._alert("Executes: " + self.de.getExec(), info=True) + self._shouldRun(envs, True) +- print ++ print() + + def run(self, envs): + here = os.getcwd() +@@ -165,34 +163,34 @@ class AutostartFile: + os.chdir(here) + + def show_help(): +- print "Usage:", ME, "[OPTION]... [ENVIRONMENT]..." +- print +- print "This tool will run xdg autostart .desktop files" +- print +- print "OPTIONS" +- print " --list Show a list of the files which would be run" +- print " Files which would be run are marked with an asterix" +- print " symbol [*]. For files which would not be run," +- print " information is given for why they are excluded" +- print " --help Show this help and exit" +- print " --version Show version and copyright information" +- print +- print "ENVIRONMENT specifies a list of environments for which to run autostart" +- print "applications. If none are specified, only applications which do not " +- print "limit themselves to certain environments will be run." +- print +- print "ENVIRONMENT can be one or more of:" +- print " GNOME Gnome Desktop" +- print " KDE KDE Desktop" +- print " ROX ROX Desktop" +- print " XFCE XFCE Desktop" +- print " Old Legacy systems" +- print ++ print("Usage:", ME, "[OPTION]... [ENVIRONMENT]...") ++ print() ++ print("This tool will run xdg autostart .desktop files") ++ print() ++ print("OPTIONS") ++ print(" --list Show a list of the files which would be run") ++ print(" Files which would be run are marked with an asterix") ++ print(" symbol [*]. For files which would not be run,") ++ print(" information is given for why they are excluded") ++ print(" --help Show this help and exit") ++ print(" --version Show version and copyright information") ++ print() ++ print("ENVIRONMENT specifies a list of environments for which to run autostart") ++ print("applications. If none are specified, only applications which do not ") ++ print("limit themselves to certain environments will be run.") ++ print() ++ print("ENVIRONMENT can be one or more of:") ++ print(" GNOME Gnome Desktop") ++ print(" KDE KDE Desktop") ++ print(" ROX ROX Desktop") ++ print(" XFCE XFCE Desktop") ++ print(" Old Legacy systems") ++ print() + + def show_version(): +- print ME, VERSION +- print "Copyright (c) 2008 Dana Jansens" +- print ++ print(ME, VERSION) ++ print("Copyright (c) 2008 Dana Jansens") ++ print() + + if __name__ == "__main__": + sys.exit(main()) -- cgit v1.2.3