[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/05: gnu: xfig: Use modify-phases.
From: |
John Darrington |
Subject: |
04/05: gnu: xfig: Use modify-phases. |
Date: |
Thu, 12 Jan 2017 16:42:02 +0000 (UTC) |
jmd pushed a commit to branch master
in repository guix.
commit 0eefac0f2f2c7b57471d352abfad7fa306a69df2
Author: John Darrington <address@hidden>
Date: Wed Jan 11 21:45:20 2017 +0100
gnu: xfig: Use modify-phases.
* gnu/packages/xfig.scm (xfig): Use modify-phases.
---
gnu/packages/xfig.scm | 159 ++++++++++++++++++++++++-------------------------
1 file changed, 79 insertions(+), 80 deletions(-)
diff --git a/gnu/packages/xfig.scm b/gnu/packages/xfig.scm
index 6436e52..27d9cf9 100644
--- a/gnu/packages/xfig.scm
+++ b/gnu/packages/xfig.scm
@@ -34,12 +34,12 @@
(version "3.2.5c")
(source
(origin
- (method url-fetch)
- (uri (string-append "mirror://sourceforge/mcj/mcj-source/xfig."
- version ".full.tar.gz"))
- (sha256
- (base32
- "1yd1jclvw5w3ja4jjzr1ysbn8iklh88wq84jn9d1gavrbfbqyqpa"))))
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/mcj/mcj-source/xfig."
+ version ".full.tar.gz"))
+ (sha256
+ (base32
+ "1yd1jclvw5w3ja4jjzr1ysbn8iklh88wq84jn9d1gavrbfbqyqpa"))))
(build-system gnu-build-system)
(native-inputs
`(("imake" ,imake)
@@ -59,51 +59,51 @@
(arguments
`(#:tests? #f
#:phases
- (alist-replace
- 'configure
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((imake (assoc-ref inputs "imake"))
- (out (assoc-ref outputs "out")))
- (substitute* "Imakefile"
- (("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.
- (zero? (system* "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)))))
- (alist-cons-after
- 'install 'install/libs
- (lambda _
- (zero? (system* "make" "install.libs")))
- (alist-cons-after
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((imake (assoc-ref inputs "imake"))
+ (out (assoc-ref outputs "out")))
+ (substitute* "Imakefile"
+ (("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.
+ (zero? (system* "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))))))
+ (add-after
+ 'install 'install/libs
+ (lambda _
+ (zero? (system* "make" "install.libs"))))
+ (add-after
'install 'install/doc
(lambda _
(begin
@@ -118,15 +118,14 @@
(dump-port in out)
(close-pipe in)
(close-port out)))
- (zero? (system* "make" "install.doc"))))
- (alist-cons-after
- 'install 'wrap-xfig
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (wrap-program (string-append out "/bin/xfig")
- `("XAPPLRESDIR" suffix
- (,(string-append out
"/etc/X11/app-defaults"))))))
- %standard-phases))))))
+ (zero? (system* "make" "install.doc")))))
+ (add-after
+ 'install 'wrap-xfig
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (wrap-program (string-append out "/bin/xfig")
+ `("XAPPLRESDIR" suffix
+ (,(string-append out "/etc/X11/app-defaults"))))))))))
(home-page "http://xfig.org/")
(synopsis "Interactive drawing tool")
(description
@@ -144,12 +143,12 @@ selected in various ways. For text, 35 fonts are
available.")
(version "3.2.5e")
(source
(origin
- (method url-fetch)
- (uri (string-append "mirror://sourceforge/mcj/mcj-source/transfig."
- version ".tar.gz"))
- (sha256
- (base32
- "0i3p7qmg2w8qrad3pn42b0miwarql7yy0gpd49b1bpal6bqsiicf"))))
+ (method url-fetch)
+ (uri (string-append "mirror://sourceforge/mcj/mcj-source/transfig."
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "0i3p7qmg2w8qrad3pn42b0miwarql7yy0gpd49b1bpal6bqsiicf"))))
(build-system gnu-build-system)
(native-inputs
`(("imake" ,imake)
@@ -183,20 +182,20 @@ selected in various ways. For text, 35 fonts are
available.")
(("(XPMINC = -I)[[:graph:]]*" _ front)
(string-append front (assoc-ref inputs "libxpm")
"/include/X11"))
(("/usr/local/lib/fig2dev") (string-append out "/lib")))
- ;; The -a argument is required in order to pick up the correct paths
- ;; to several X header files.
- (zero? (system* "xmkmf" "-a"))
- (substitute* '("Makefile"
- "fig2dev/Makefile"
- "transfig/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)))))
+ ;; The -a argument is required in order to pick up the correct
paths
+ ;; to several X header files.
+ (zero? (system* "xmkmf" "-a"))
+ (substitute* '("Makefile"
+ "fig2dev/Makefile"
+ "transfig/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)))))
(alist-cons-after
'install 'install/doc
(lambda _