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