X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/cf3d1763ede1a329c2bc932c84591ab594bb6c96..281456b421216e3bfe709eaa0ba939aab019b596:/gnu/packages/groff.scm diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm index 98f17914bf..ae896cf9fd 100644 --- a/gnu/packages/groff.scm +++ b/gnu/packages/groff.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2017 Ludovic Courtès ;;; Copyright © 2019 Efraim Flashner ;;; Copyright © 2019 Eric Bavier +;;; Copyright © 2019 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -55,12 +56,28 @@ ;; from 'inputs'. (inputs `(("ghostscript" ,ghostscript))) - (native-inputs `(("bison" ,bison) + + ;; When cross-compiling, this package depends upon a native install of + ;; itself. + (native-inputs `(,@(if (%current-target-system) + `(("self" ,this-package)) + '()) + ("bison" ,bison) ("perl" ,perl) ("psutils" ,psutils) ("texinfo" ,texinfo))) (arguments `(#:parallel-build? #f ; parallel build fails + ,@(if (%current-target-system) + `(#:make-flags + ;; In groff-minimal package, that inherits from this package, + ;; we'll need to locate "groff" instead of "self". + (let ((groff (or (assoc-ref %build-host-inputs "groff") + (assoc-ref %build-host-inputs "self")))) + (list + (string-append "GROFF_BIN_PATH=" groff) + (string-append "GROFFBIN=" groff "/bin/groff")))) + '()) #:phases (modify-phases %standard-phases (add-after 'unpack 'disable-relocatability @@ -115,7 +132,8 @@ is usually the formatter of \"man\" documentation pages.") ;; Omit the DVI, PS, PDF, and HTML backends. (inputs '()) (native-inputs `(("bison" ,bison) - ("perl" ,perl))) + ("perl" ,perl) + ("groff" ,groff))) (arguments `(#:disallowed-references (,perl) @@ -159,7 +177,7 @@ is usually the formatter of \"man\" documentation pages.") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/bagder/roffit.git") + (url "https://github.com/bagder/roffit") (commit commit))) (file-name (string-append "roffit-" commit "-checkout")) (sha256