gnu: git-lfs: Support building on more systems.

* gnu/packages/version-control.scm (git-lfs)[arguments]: Only run
man-page related phases when ruby-asciidoctor is available.
[native-inputs]: Only include ronn-ng, ruby-asciidoctor when building on
a platform which has support for ruby-asciidoctor.

Change-Id: Icbf8416998dc5d1f9d7c8299b4f929380dc29165
This commit is contained in:
Efraim Flashner 2023-11-08 09:25:24 +02:00
parent 5da6e8961c
commit e8739da12e
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351

View File

@ -3188,7 +3188,9 @@ will reconstruct the object along its delta-base chain and return it.")
#$(file-append (this-package-input "go-golang-org-x-net") #$(file-append (this-package-input "go-golang-org-x-net")
"/src/golang.org/x/net/publicsuffix/data") "/src/golang.org/x/net/publicsuffix/data")
"src/golang.org/x/net/publicsuffix/data"))) "src/golang.org/x/net/publicsuffix/data")))
(add-before 'build 'man-gen ;; Only build the man pages if ruby-asciidoctor is available.
#$@(if (this-package-native-input "ruby-asciidoctor")
#~((add-before 'build 'man-gen
;; Without this, the binary generated in 'build ;; Without this, the binary generated in 'build
;; phase won't have any embedded usage-text. ;; phase won't have any embedded usage-text.
(lambda _ (lambda _
@ -3205,9 +3207,14 @@ will reconstruct the object along its delta-base chain and return it.")
(lambda (manpage) (lambda (manpage)
(install-file manpage (install-file manpage
(string-append #$output "/share/man/man1"))) (string-append #$output "/share/man/man1")))
(find-files "." "^git-lfs.*\\.1$")))))))) (find-files "." "^git-lfs.*\\.1$"))))))
#~()))))
;; make `ronn` available during build for man page generation ;; make `ronn` available during build for man page generation
(native-inputs (list ronn-ng git-minimal ruby-asciidoctor)) (native-inputs
(append (list git-minimal)
(if (supported-package? ruby-asciidoctor)
(list ronn-ng ruby-asciidoctor)
'())))
(propagated-inputs (propagated-inputs
(list go-github-com-xeipuuv-gojsonschema (list go-github-com-xeipuuv-gojsonschema
go-github-com-xeipuuv-gojsonreference go-github-com-xeipuuv-gojsonreference