me
/
guix
Archived
1
0
Fork 0

gnu: ghostscript: Remove input labels.

* gnu/packages/ghostscript.scm (ghostscript)[native-inputs, inputs]: Remove
labels.
[arguments]: Use G-expression.
(ghostscript/x, ghostscript/cups)[inputs]: Use MODIFY-INPUTS.
master
Marius Bakke 2022-07-06 23:44:03 +02:00
parent 22b9a056ea
commit ff5b912c14
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
1 changed files with 110 additions and 110 deletions

View File

@ -174,20 +174,23 @@ printing, and psresize, for adjusting page sizes.")
(build-system gnu-build-system) (build-system gnu-build-system)
(outputs '("out" "doc")) ;19 MiB of HTML/PS doc + examples (outputs '("out" "doc")) ;19 MiB of HTML/PS doc + examples
(arguments (arguments
`(#:disallowed-references ("doc") (list
#:disallowed-references '("doc")
#:configure-flags #:configure-flags
(list (string-append "LDFLAGS=-Wl,-rpath=" #~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")
(assoc-ref %outputs "out") "/lib")
"--with-system-libtiff" "--with-system-libtiff"
"LIBS=-lz" "LIBS=-lz"
(string-append "ZLIBDIR=" (string-append "ZLIBDIR="
(assoc-ref %build-inputs "zlib") "/include") (dirname (search-input-file %build-inputs
"include/zlib.h")))
"--enable-dynamic" "--enable-dynamic"
"--disable-compile-inits" "--disable-compile-inits"
(string-append "--with-fontpath=" (string-append "--with-fontpath="
(assoc-ref %build-inputs "font-ghostscript") (search-input-directory
"/share/fonts/type1/ghostscript") %build-inputs
,@(if (%current-target-system) "share/fonts/type1/ghostscript"))
#$@(if (%current-target-system)
'(;; Specify the native compiler, which is used to build 'echogs' '(;; Specify the native compiler, which is used to build 'echogs'
;; and other intermediary tools when cross-compiling; see ;; and other intermediary tools when cross-compiling; see
;; <https://ghostscript.com/FAQ.html>. ;; <https://ghostscript.com/FAQ.html>.
@ -198,12 +201,12 @@ printing, and psresize, for adjusting page sizes.")
"--enable-save_confaux") "--enable-save_confaux")
'())) '()))
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-before 'configure 'create-output-directory (add-before 'configure 'create-output-directory
(lambda* (#:key outputs #:allow-other-keys) (lambda _
;; The configure script refuses to function if the directory ;; The configure script refuses to function if the directory
;; specified as -rpath does not already exist. ;; specified as -rpath does not already exist.
(mkdir-p (string-append (assoc-ref outputs "out") "/lib")))) (mkdir-p (string-append #$output "/lib"))))
(add-after 'configure 'remove-doc-reference (add-after 'configure 'remove-doc-reference
(lambda _ (lambda _
;; Don't retain a reference to the 'doc' output in 'gs'. ;; Don't retain a reference to the 'doc' output in 'gs'.
@ -216,8 +219,8 @@ printing, and psresize, for adjusting page sizes.")
(lambda _ (lambda _
(substitute* "base/unixhead.mak" (substitute* "base/unixhead.mak"
(("/bin/sh") (which "sh"))))) (("/bin/sh") (which "sh")))))
,@(if (%current-target-system) #$@(if (%current-target-system)
`((add-after 'configure 'add-native-lz '((add-after 'configure 'add-native-lz
(lambda _ (lambda _
;; Add missing '-lz' for native tools such as 'mkromfs'. ;; Add missing '-lz' for native tools such as 'mkromfs'.
(substitute* "Makefile" (substitute* "Makefile"
@ -234,32 +237,30 @@ printing, and psresize, for adjusting page sizes.")
(lambda _ (lambda _
(invoke "make" "soinstall"))) (invoke "make" "soinstall")))
(add-after 'install 'create-gs-symlink (add-after 'install 'create-gs-symlink
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(let ((out (assoc-ref outputs "out")))
;; Some programs depend on having a 'gs' binary available. ;; Some programs depend on having a 'gs' binary available.
(symlink "gsc" (string-append out "/bin/gs")))))))) (symlink "gsc" (string-append #$output "/bin/gs")))))))
(native-inputs (native-inputs
`(("perl" ,perl) (append
("pkg-config" ,pkg-config) ;needed for freetype (list perl
("python" ,python-minimal-wrapper) pkg-config ;needed for freetype
("tcl" ,tcl) python-minimal-wrapper
tcl)
;; When cross-compiling, some of the natively-built tools require all ;; When cross-compiling, some of the natively-built tools require all
;; these libraries. ;; these libraries.
,@(if (%current-target-system) (if (%current-target-system)
`(("zlib/native" ,zlib) (list zlib libjpeg-turbo)
("libjpeg/native" ,libjpeg-turbo))
'()))) '())))
(inputs (inputs
`(("fontconfig" ,fontconfig) (list fontconfig
("freetype" ,freetype) freetype
("font-ghostscript" ,font-ghostscript) font-ghostscript
("jbig2dec" ,jbig2dec) jbig2dec
("libjpeg" ,libjpeg-turbo) libjpeg-turbo
("libpaper" ,libpaper) libpaper
("libpng" ,libpng) libpng
("libtiff" ,libtiff) libtiff
("zlib" ,zlib))) zlib))
(synopsis "PostScript and PDF interpreter") (synopsis "PostScript and PDF interpreter")
(description (description
"Ghostscript is an interpreter for the PostScript language and the PDF "Ghostscript is an interpreter for the PostScript language and the PDF
@ -272,15 +273,14 @@ output file formats and printers.")
(define-public ghostscript/x (define-public ghostscript/x
(package/inherit ghostscript (package/inherit ghostscript
(name (string-append (package-name ghostscript) "-with-x")) (name (string-append (package-name ghostscript) "-with-x"))
(inputs `(("libxext" ,libxext) (inputs (modify-inputs (package-inputs ghostscript)
("libxt" ,libxt) (prepend libxext libxt)))))
,@(package-inputs ghostscript)))))
(define-public ghostscript/cups (define-public ghostscript/cups
(package/inherit ghostscript (package/inherit ghostscript
(name "ghostscript-with-cups") (name "ghostscript-with-cups")
(inputs `(("cups" ,cups-minimal) (inputs (modify-inputs (package-inputs ghostscript)
,@(package-inputs ghostscript))))) (prepend cups-minimal)))))
(define-public ijs (define-public ijs
(package (package