gnu: xfig: Update to 3.2.6a.
* gnu/packages/xfig.scm (xfig): Update to 3.2.6a. [native-inputs]: Remove groff, imake, makedepend. Add desktop-file-utils. [inputs]: Remove libxmu and zlib. [arguments]: Remove custom phases. Add a ‘strip-bogus-exec-prefix’ phase. Run the rudimentary test suite.
This commit is contained in:
parent
64bae7237c
commit
a7ebe9dc39
|
@ -1,6 +1,7 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
|
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
|
||||||
;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
|
;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
|
||||||
|
;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -23,105 +24,43 @@
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
#:use-module (gnu packages)
|
#:use-module (gnu packages)
|
||||||
|
#:use-module (gnu packages freedesktop)
|
||||||
#:use-module (gnu packages xorg)
|
#:use-module (gnu packages xorg)
|
||||||
#:use-module (gnu packages image)
|
#:use-module (gnu packages image)
|
||||||
#:use-module (gnu packages groff)
|
|
||||||
#:use-module (gnu packages compression))
|
#:use-module (gnu packages compression))
|
||||||
|
|
||||||
(define-public xfig
|
(define-public xfig
|
||||||
(package
|
(package
|
||||||
(name "xfig")
|
(name "xfig")
|
||||||
(version "3.2.5c")
|
(version "3.2.6a")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "mirror://sourceforge/mcj/mcj-source/xfig."
|
(uri (string-append "mirror://sourceforge/mcj/"
|
||||||
version ".full.tar.gz"))
|
name "-" version ".tar.xz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1yd1jclvw5w3ja4jjzr1ysbn8iklh88wq84jn9d1gavrbfbqyqpa"))))
|
"0z1636w27hvgjpq98z40k8h535b4x2xr2whkvr7bibaa89fynym8"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("imake" ,imake)
|
;; For tests.
|
||||||
("makedepend" ,makedepend)
|
`(("desktop-file-utils" ,desktop-file-utils)))
|
||||||
("groff" ,groff))) ;for creating some doc
|
|
||||||
(inputs
|
(inputs
|
||||||
`(("libxaw3d" ,libxaw3d)
|
`(("libxaw3d" ,libxaw3d)
|
||||||
;; Requires libjpeg>=9a, otherwise jmorecfg.h define an enum FALSE that
|
|
||||||
;; conflicts with the FALSE macro from X11/Intrinsic.h
|
|
||||||
("libjpeg" ,libjpeg)
|
("libjpeg" ,libjpeg)
|
||||||
("libpng" ,libpng)
|
("libpng" ,libpng)
|
||||||
("libxpm" ,libxpm)
|
("libxpm" ,libxpm)
|
||||||
("libx11" ,libx11)
|
("libx11" ,libx11)
|
||||||
("libxmu" ,libxmu)
|
("libxt" ,libxt)))
|
||||||
("libxt" ,libxt)
|
|
||||||
("zlib" ,zlib)))
|
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f
|
`(#:phases
|
||||||
#:phases
|
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(replace 'configure
|
(add-before 'install 'strip-bogus-exec-prefix
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let ((imake (assoc-ref inputs "imake"))
|
(substitute* "xfig.desktop"
|
||||||
(out (assoc-ref outputs "out")))
|
;; The patch-dot-desktop-files phase requires a relative name.
|
||||||
(substitute* "Imakefile"
|
(("Exec=/usr/bin/xfig") "Exec=xfig"))
|
||||||
(("XCOMM XAPPLOADDIR = /home/user/xfig *")
|
#t)))))
|
||||||
(string-append "XAPPLOADDIR = " out ,%app-defaults-dir))
|
|
||||||
(("XCOMM (BINDIR = )[[:graph:]]*" _ front)
|
|
||||||
(string-append front out "/bin"))
|
|
||||||
(("(PNGLIBDIR = )[[:graph:]]*" _ front)
|
|
||||||
(string-append front (assoc-ref inputs "libpng") "/lib"))
|
|
||||||
(("(PNGINC = -I)[[:graph:]]*" _ front)
|
|
||||||
(string-append front (assoc-ref inputs "libpng") "/include"))
|
|
||||||
(("(JPEGLIBDIR = )[[:graph:]]*" _ front)
|
|
||||||
(string-append front (assoc-ref inputs "libjpeg") "/lib"))
|
|
||||||
(("(JPEGINC = -I)[[:graph:]]*" _ front)
|
|
||||||
(string-append front (assoc-ref inputs "libjpeg") "/include"))
|
|
||||||
(("(ZLIBDIR = )[[:graph:]]*" _ front)
|
|
||||||
(string-append front (assoc-ref inputs "zlib") "/lib"))
|
|
||||||
(("(XPMLIBDIR = )[[:graph:]]*" _ front)
|
|
||||||
(string-append front (assoc-ref inputs "libxpm") "/lib"))
|
|
||||||
(("(XPMINC = -I)[[:graph:]]*" _ front)
|
|
||||||
(string-append front (assoc-ref inputs "libxpm") "/include"))
|
|
||||||
(("(XFIGLIBDIR = )[[:graph:]]*" _ front)
|
|
||||||
(string-append front out "/lib"))
|
|
||||||
(("(XFIGDOCDIR = )[[:graph:]]*" _ front)
|
|
||||||
(string-append front out "/share/doc"))
|
|
||||||
(("XCOMM USEINLINE") "USEINLINE"))
|
|
||||||
;; The -a argument is required in order to pick up the correct paths
|
|
||||||
;; to several X header files.
|
|
||||||
(invoke "xmkmf" "-a")
|
|
||||||
;; Reset some variables that are inherited from imake templates
|
|
||||||
(substitute* "Makefile"
|
|
||||||
;; These imake variables somehow remain undefined
|
|
||||||
(("DefaultGcc2[[:graph:]]*Opt") "-O2")
|
|
||||||
;; Reset a few variable defaults that are set in imake templates
|
|
||||||
((imake) out)
|
|
||||||
(("(MANPATH = )[[:graph:]]*" _ front)
|
|
||||||
(string-append front out "/share/man"))
|
|
||||||
(("(CONFDIR = )([[:graph:]]*)" _ front default)
|
|
||||||
(string-append front out default))))
|
|
||||||
#t))
|
|
||||||
(add-after
|
|
||||||
'install 'install/libs
|
|
||||||
(lambda _
|
|
||||||
(zero? (system* "make" "install.libs"))))
|
|
||||||
(add-after
|
|
||||||
'install 'install/doc
|
|
||||||
(lambda _
|
|
||||||
(begin
|
|
||||||
;; The Doc/xfig_man.html file is expected by the install.html
|
|
||||||
;; target, but is not present in the tarball, so generate it.
|
|
||||||
(use-modules (ice-9 popen))
|
|
||||||
(let* ((in (open-pipe* OPEN_READ
|
|
||||||
"groff" "-mandoc" "-Thtml"
|
|
||||||
"Doc/xfig.man"))
|
|
||||||
(out (open-output-file "Doc/xfig_man.html")))
|
|
||||||
(begin
|
|
||||||
(dump-port in out)
|
|
||||||
(close-pipe in)
|
|
||||||
(close-port out)))
|
|
||||||
(zero? (system* "make" "install.doc"))))))))
|
|
||||||
(home-page "http://mcj.sourceforge.net/")
|
(home-page "http://mcj.sourceforge.net/")
|
||||||
(synopsis "Interactive drawing tool")
|
(synopsis "Interactive drawing tool")
|
||||||
(description
|
(description
|
||||||
|
|
Loading…
Reference in New Issue