1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-13 18:40:57 +02:00

gnu: bash: Fix package indentation.

* gnu/packages/bash.scm (bash): Fix indentation.

Change-Id: I5d370ec90dcfcb7d78611809ef42da0f642212f5
This commit is contained in:
Maxim Cournoyer 2025-05-06 16:34:45 +09:00
parent 10cb04d8ac
commit a897159a7c
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -136,123 +136,123 @@ number/base32-hash tuples, directly usable in the 'patch-series' form."
"/lib"))) "/lib")))
(version "5.1")) (version "5.1"))
(package (package
(name "bash") (name "bash")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"mirror://gnu/bash/bash-" version ".tar.gz")) "mirror://gnu/bash/bash-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1alv68wplnfdm6mh39hm57060xgssb9vqca4yr1cyva0c342n0fc")) "1alv68wplnfdm6mh39hm57060xgssb9vqca4yr1cyva0c342n0fc"))
(patch-flags '("-p0")) (patch-flags '("-p0"))
(patches (cons (search-patch "bash-linux-pgrp-pipe.patch") (patches (cons (search-patch "bash-linux-pgrp-pipe.patch")
%patch-series-5.1)))) %patch-series-5.1))))
(version (string-append version "." (number->string (length %patch-series-5.1)))) (version (string-append version "." (number->string (length %patch-series-5.1))))
(build-system gnu-build-system) (build-system gnu-build-system)
(outputs '("out" (outputs '("out"
"doc" ;1.7 MiB of HTML and extra files "doc" ;1.7 MiB of HTML and extra files
"include")) ;headers used by extensions "include")) ;headers used by extensions
(native-inputs (if (target-loongarch64?) (native-inputs (if (target-loongarch64?)
(list config) (list config)
'())) '()))
(inputs (list readline ncurses)) ;TODO: add texinfo (inputs (list readline ncurses)) ;TODO: add texinfo
(arguments (arguments
`(;; When cross-compiling, `configure' incorrectly guesses that job `( ;; When cross-compiling, `configure' incorrectly guesses that job
;; control is missing. ;; control is missing.
#:configure-flags ,(if (%current-target-system) #:configure-flags ,(if (%current-target-system)
`(cons* "bash_cv_job_control_missing=no" `(cons* "bash_cv_job_control_missing=no"
,configure-flags) ,configure-flags)
configure-flags) configure-flags)
;; Bash is reportedly not parallel-safe. See, for instance, ;; Bash is reportedly not parallel-safe. See, for instance,
;; <http://patches.openembedded.org/patch/32745/> and ;; <http://patches.openembedded.org/patch/32745/> and
;; <http://git.buildroot.net/buildroot/commit/?h=79e2d802a>. ;; <http://git.buildroot.net/buildroot/commit/?h=79e2d802a>.
#:parallel-build? #f #:parallel-build? #f
#:parallel-tests? #f #:parallel-tests? #f
;; XXX: The tests have a lot of hard-coded paths, so disable them ;; XXX: The tests have a lot of hard-coded paths, so disable them
;; for now. ;; for now.
#:tests? #f #:tests? #f
#:modules ((srfi srfi-26) #:modules ((srfi srfi-26)
(guix build utils) (guix build utils)
(guix build gnu-build-system)) (guix build gnu-build-system))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
,@(if (and (target-hurd?) (not (system-hurd?))) ,@(if (and (target-hurd?) (not (system-hurd?)))
`((add-after 'configure 'create-pipesize.h `((add-after 'configure 'create-pipesize.h
;; The Bash Makefile mentions how PIPESIZE calculation is ;; The Bash Makefile mentions how PIPESIZE calculation is
;; "technically wrong" when cross-compiling, and offers no ;; "technically wrong" when cross-compiling, and offers no
;; way to override it. On the 64bit Hurd, it can make ;; way to override it. On the 64bit Hurd, it can make
;; bash hang. ;; bash hang.
(lambda _ (lambda _
(with-directory-excursion "builtins" (with-directory-excursion "builtins"
(with-output-to-file "psize.aux" (with-output-to-file "psize.aux"
(lambda _ (display "dummy to pacify make\n"))) (lambda _ (display "dummy to pacify make\n")))
(with-output-to-file "pipesize.h" (with-output-to-file "pipesize.h"
(lambda _ (display "#define PIPESIZE 16384\n"))))))) (lambda _ (display "#define PIPESIZE 16384\n")))))))
'()) '())
(add-after 'install 'install-sh-symlink (add-after 'install 'install-sh-symlink
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
;; Add a `sh' -> `bash' link. ;; Add a `sh' -> `bash' link.
(let ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))
(with-directory-excursion (string-append out "/bin") (with-directory-excursion (string-append out "/bin")
(symlink "bash" "sh") (symlink "bash" "sh")
#t)))) #t))))
(add-after 'install 'move-development-files (add-after 'install 'move-development-files
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
;; Move 'Makefile.inc' and 'bash.pc' to "include" to avoid ;; Move 'Makefile.inc' and 'bash.pc' to "include" to avoid
;; circular references among the outputs. ;; circular references among the outputs.
(let ((out (assoc-ref outputs "out")) (let ((out (assoc-ref outputs "out"))
(include (assoc-ref outputs "include")) (include (assoc-ref outputs "include"))
(lib (cut string-append <> "/lib/bash"))) (lib (cut string-append <> "/lib/bash")))
(mkdir-p (lib include)) (mkdir-p (lib include))
(rename-file (string-append (lib out) (rename-file (string-append (lib out)
"/Makefile.inc") "/Makefile.inc")
(string-append (lib include) (string-append (lib include)
"/Makefile.inc")) "/Makefile.inc"))
(rename-file (string-append out "/lib/pkgconfig") (rename-file (string-append out "/lib/pkgconfig")
(string-append include (string-append include
"/lib/pkgconfig")) "/lib/pkgconfig"))
;; Don't capture the absolute file name of 'install' to avoid ;; Don't capture the absolute file name of 'install' to avoid
;; retaining a dependency on Coreutils. ;; retaining a dependency on Coreutils.
(substitute* (string-append (lib include) (substitute* (string-append (lib include)
"/Makefile.inc") "/Makefile.inc")
(("^INSTALL =.*") (("^INSTALL =.*")
"INSTALL = install -c\n")) "INSTALL = install -c\n"))
#t))) #t)))
,@(if (target-loongarch64?) ,@(if (target-loongarch64?)
`((add-after 'unpack 'update-config-scripts `((add-after 'unpack 'update-config-scripts
(lambda* (#:key inputs native-inputs #:allow-other-keys) (lambda* (#:key inputs native-inputs #:allow-other-keys)
;; Replace outdated config.guess and config.sub. ;; Replace outdated config.guess and config.sub.
(for-each (lambda (file) (for-each (lambda (file)
(install-file (install-file
(search-input-file (search-input-file
(or native-inputs inputs) (or native-inputs inputs)
(string-append "/bin/" file)) "./support")) (string-append "/bin/" file)) "./support"))
'("config.guess" "config.sub"))))) '("config.guess" "config.sub")))))
'())))) '()))))
(native-search-paths (native-search-paths
(list (search-path-specification ;new in 4.4 (list (search-path-specification ;new in 4.4
(variable "BASH_LOADABLES_PATH") (variable "BASH_LOADABLES_PATH")
(files '("lib/bash"))))) (files '("lib/bash")))))
(synopsis "The GNU Bourne-Again SHell") (synopsis "The GNU Bourne-Again SHell")
(description (description
"Bash is the shell, or command-line interpreter, of the GNU system. It "Bash is the shell, or command-line interpreter, of the GNU system. It
is compatible with the Bourne Shell, but it also integrates useful features is compatible with the Bourne Shell, but it also integrates useful features
from the Korn Shell and the C Shell and new improvements of its own. It from the Korn Shell and the C Shell and new improvements of its own. It
allows command-line editing, unlimited command history, shell functions and allows command-line editing, unlimited command history, shell functions and
aliases, and job control while still allowing most sh scripts to be run aliases, and job control while still allowing most sh scripts to be run
without modification.") without modification.")
(license license:gpl3+) (license license:gpl3+)
(home-page "https://www.gnu.org/software/bash/")))) (home-page "https://www.gnu.org/software/bash/"))))
(define-public bash-minimal (define-public bash-minimal
;; A stripped-down Bash for non-interactive use. ;; A stripped-down Bash for non-interactive use.