diff options
Diffstat (limited to 'gnu/packages/base.scm')
-rw-r--r-- | gnu/packages/base.scm | 141 |
1 files changed, 103 insertions, 38 deletions
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 4e8121ae2c..87c7568ef2 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -108,7 +108,7 @@ (base32 "086vqwk2wl8zfs47sq2xpjc9k066ilmb8z6dn0q6ymwjzlm196cd")))) (build-system gnu-build-system) - (synopsis "Hello, GNU world: An example GNU package") + (synopsis "Example GNU package") (description "GNU Hello prints the message \"Hello, world!\" and then exits. It serves as an example of standard GNU coding practices. As such, it supports @@ -154,6 +154,13 @@ command-line arguments, multiple languages, and so on.") (string-append bin "/fgrep")) (("^exec grep") (string-append "exec " bin "/grep")))))) + #$@(if (target-hurd64?) + #~((add-after 'unpack 'patch-sigsegv + (lambda _ + ;; Stack overflow recovery does not compile + (substitute* "lib/sigsegv.in.h" + (("__GNU__") "__XGNU__"))))) + #~()) #$@(if (system-hurd?) #~((add-before 'check 'skip-test (lambda _ @@ -163,6 +170,13 @@ command-line arguments, multiple languages, and so on.") "tests/file") (("^#!.*" all) (string-append all "exit 77;\n")))))) + #~()) + #$@(if (system-hurd64?) + #~((add-before 'check 'skip-test + (lambda _ + (substitute* "tests/stack-overflow" ;This test hangs + (("^#!.*" all) + (string-append all "exit 77;\n")))))) #~())))) (synopsis "Print lines matching a pattern") (description @@ -332,27 +346,34 @@ differences.") "1bk38169c0xh01b0q0zmnrjqz8k9byz3arp4q7q66sn6xwf94nvz")) (patches (search-patches "patch-hurd-path-max.patch")))) (arguments - (substitute-keyword-arguments (package-arguments base) - ((#:phases phases '%standard-phases) - #~(modify-phases #$phases - (add-after 'unpack 'copy-gnulib-sources - (lambda _ - ;; XXX: We copy the source instead of using 'gnulib' as a - ;; native input to avoid introducing a dependency cycle. - (copy-recursively #+gnulib "gnulib") - (setenv "GNULIB_SRCDIR" - (string-append (getcwd) "/gnulib/src/gnulib")))) - (add-after 'copy-gnulib-sources 'update-bootstrap-script - (lambda _ - (copy-file "gnulib/src/gnulib/build-aux/bootstrap" - "bootstrap"))) - (add-after 'unpack 'patch-configure.ac - (lambda _ - (substitute* "configure.ac" - ;; The gnulib-provided git-version-gen script has a plain - ;; shebang of #!/bin/sh; avoid using it. - (("build-aux/git-version-gen" all) - (string-append "sh " all))))))))) + (let ((arguments + (substitute-keyword-arguments (package-arguments base) + ((#:phases phases '%standard-phases) + #~(modify-phases #$phases + (add-after 'unpack 'copy-gnulib-sources + (lambda _ + ;; XXX: We copy the source instead of using 'gnulib' as a + ;; native input to avoid introducing a dependency cycle. + (copy-recursively #+gnulib "gnulib") + (setenv "GNULIB_SRCDIR" + (string-append (getcwd) "/gnulib/src/gnulib")))) + (add-after 'copy-gnulib-sources 'update-bootstrap-script + (lambda _ + (copy-file "gnulib/src/gnulib/build-aux/bootstrap" + "bootstrap"))) + (add-after 'unpack 'patch-configure.ac + (lambda _ + (substitute* "configure.ac" + ;; The gnulib-provided git-version-gen script has a plain + ;; shebang of #!/bin/sh; avoid using it. + (("build-aux/git-version-gen" all) + (string-append "sh " all)))))))))) + (if (target-hurd64?) + (substitute-keyword-arguments arguments + ((#:configure-flags flags '()) + #~(list "--disable-threads" + "gl_cv_func_working_mktime=yes"))) + arguments))) (native-inputs (list autoconf automake bison ed)) (properties '())))) @@ -384,7 +405,15 @@ differences.") (lambda _ (substitute* "tests/large-subopt" (("^#!.*" all) - (string-append all "exit 77;\n")))))) + (string-append all "exit 77;\n"))) + #$@(if (system-hurd64?) + #~((substitute* + ;; These tests hang. + '("gnulib-tests/test-c-stack.sh" + "gnulib-tests/test-c-stack2.sh") + (("^#!.*" all) + (string-append all "exit 77;\n")))) + #~())))) #~%standard-phases))) (native-inputs (list perl)) (synopsis "Comparing and merging files") @@ -535,6 +564,22 @@ used to apply commands with arbitrarily long arguments.") ;; here ((" test-tls\\$\\(EXEEXT\\) ") " "))) '()) + ,@(if (system-hurd64?) + '((substitute* + ;; These tests fail + '("tests/misc/sort-NaN-infloop.sh" + "tests/misc/wc-parallel.sh") + (("^#!.*" all) + (string-append all "exit 77;\n"))) + (substitute* '("gnulib-tests/test-fdutimensat.c" + "gnulib-tests/test-futimens.c" + "gnulib-tests/test-linkat.c" + "gnulib-tests/test-renameat.c" + "gnulib-tests/test-renameatu.c" + "gnulib-tests/test-utimensat.c") + (("(^| )main *\\(.*" all) + (string-append all "{\n exit (77);//")))) + '()) (substitute* "Makefile.in" ;; fails on filesystems where inotify cannot be used, ;; more info in #47935 @@ -1079,7 +1124,7 @@ the store.") (string-append locale "/C.UTF-8"))))) ,@(if (target-hurd?) - '((add-after 'install 'augment-libc.so + `((add-after 'install 'augment-libc.so (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (substitute* (string-append out "/lib/libc.so") @@ -1088,11 +1133,17 @@ the store.") " libmachuser.so libhurduser.so")))))) (add-after 'install 'create-machine-symlink (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (cpu "i386")) - (symlink cpu - (string-append out - "/include/mach/machine")))))) + (let* ((out (assoc-ref outputs "out")) + (cpu ,(match (or (%current-target-system) + (%current-system)) + ((? target-x86-32?) + "i386") + ((? target-x86-64?) + "x86_64"))) + (machine (string-append + out "/include/mach/machine"))) + (unless (file-exists? machine) + (symlink cpu machine)))))) '())))) (inputs `(("static-bash" ,static-bash))) @@ -1568,7 +1619,18 @@ variety of options. It is an alternative to the shell \"type\" built-in command.") (license gpl3+))) ; some files are under GPLv2+ -(define-public glibc/hurd glibc) +(define-public glibc/hurd + (package/inherit glibc + (source + (origin + (inherit (package-source glibc)) + (patches + (append (origin-patches (package-source glibc)) + (search-patches "glibc-hurd-pthread_setcancelstate.patch" + "glibc-hurd64-fault.patch" + "glibc-hurd64-intr-msg-clobber.patch" + "glibc-hurd64-sgms-context.patch" + "glibc-hurd64-gcc-14.2-tls-bug.patch"))))))) (define-public glibc/hurd-headers (package/inherit glibc/hurd @@ -1716,14 +1778,17 @@ command.") (delete-file-recursively (string-append out "/share/zoneinfo-leaps"))))) (delete 'configure)))) - (inputs (list (origin - (method url-fetch) - (uri (string-append - "https://data.iana.org/time-zones/releases/tzcode" - version ".tar.gz")) - (sha256 - (base32 - "07hn7hn2klw4dfyr673ril2nrk18198hbfv25gljsvc833hzk9g9"))))) + (inputs `(("_" + ;; Note: The "_" label above is here to avoid a full rebuild. + ;; TODO: Remove it on next rebuild cycle. + ,(origin + (method url-fetch) + (uri (string-append + "https://data.iana.org/time-zones/releases/tzcode" + version ".tar.gz")) + (sha256 + (base32 + "07hn7hn2klw4dfyr673ril2nrk18198hbfv25gljsvc833hzk9g9")))))) (home-page "https://www.iana.org/time-zones") (synopsis "Database of current and historical time zones") (description "The Time Zone Database (often called tz or zoneinfo) |