mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-26 04:29:25 -05:00
gnu: xfig: Use modify-phases.
* gnu/packages/xfig.scm (xfig): Use modify-phases.
This commit is contained in:
parent
5aae77e44b
commit
0eefac0f2f
1 changed files with 79 additions and 80 deletions
|
@ -34,12 +34,12 @@ (define-public xfig
|
||||||
(version "3.2.5c")
|
(version "3.2.5c")
|
||||||
(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/mcj-source/xfig."
|
||||||
version ".full.tar.gz"))
|
version ".full.tar.gz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1yd1jclvw5w3ja4jjzr1ysbn8iklh88wq84jn9d1gavrbfbqyqpa"))))
|
"1yd1jclvw5w3ja4jjzr1ysbn8iklh88wq84jn9d1gavrbfbqyqpa"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("imake" ,imake)
|
`(("imake" ,imake)
|
||||||
|
@ -59,51 +59,51 @@ (define-public xfig
|
||||||
(arguments
|
(arguments
|
||||||
`(#:tests? #f
|
`(#:tests? #f
|
||||||
#:phases
|
#:phases
|
||||||
(alist-replace
|
(modify-phases %standard-phases
|
||||||
'configure
|
(replace 'configure
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(let ((imake (assoc-ref inputs "imake"))
|
(let ((imake (assoc-ref inputs "imake"))
|
||||||
(out (assoc-ref outputs "out")))
|
(out (assoc-ref outputs "out")))
|
||||||
(substitute* "Imakefile"
|
(substitute* "Imakefile"
|
||||||
(("XCOMM (BINDIR = )[[:graph:]]*" _ front)
|
(("XCOMM (BINDIR = )[[:graph:]]*" _ front)
|
||||||
(string-append front out "/bin"))
|
(string-append front out "/bin"))
|
||||||
(("(PNGLIBDIR = )[[:graph:]]*" _ front)
|
(("(PNGLIBDIR = )[[:graph:]]*" _ front)
|
||||||
(string-append front (assoc-ref inputs "libpng") "/lib"))
|
(string-append front (assoc-ref inputs "libpng") "/lib"))
|
||||||
(("(PNGINC = -I)[[:graph:]]*" _ front)
|
(("(PNGINC = -I)[[:graph:]]*" _ front)
|
||||||
(string-append front (assoc-ref inputs "libpng") "/include"))
|
(string-append front (assoc-ref inputs "libpng") "/include"))
|
||||||
(("(JPEGLIBDIR = )[[:graph:]]*" _ front)
|
(("(JPEGLIBDIR = )[[:graph:]]*" _ front)
|
||||||
(string-append front (assoc-ref inputs "libjpeg") "/lib"))
|
(string-append front (assoc-ref inputs "libjpeg") "/lib"))
|
||||||
(("(JPEGINC = -I)[[:graph:]]*" _ front)
|
(("(JPEGINC = -I)[[:graph:]]*" _ front)
|
||||||
(string-append front (assoc-ref inputs "libjpeg") "/include"))
|
(string-append front (assoc-ref inputs "libjpeg") "/include"))
|
||||||
(("(ZLIBDIR = )[[:graph:]]*" _ front)
|
(("(ZLIBDIR = )[[:graph:]]*" _ front)
|
||||||
(string-append front (assoc-ref inputs "zlib") "/lib"))
|
(string-append front (assoc-ref inputs "zlib") "/lib"))
|
||||||
(("(XPMLIBDIR = )[[:graph:]]*" _ front)
|
(("(XPMLIBDIR = )[[:graph:]]*" _ front)
|
||||||
(string-append front (assoc-ref inputs "libxpm") "/lib"))
|
(string-append front (assoc-ref inputs "libxpm") "/lib"))
|
||||||
(("(XPMINC = -I)[[:graph:]]*" _ front)
|
(("(XPMINC = -I)[[:graph:]]*" _ front)
|
||||||
(string-append front (assoc-ref inputs "libxpm") "/include"))
|
(string-append front (assoc-ref inputs "libxpm") "/include"))
|
||||||
(("(XFIGLIBDIR = )[[:graph:]]*" _ front)
|
(("(XFIGLIBDIR = )[[:graph:]]*" _ front)
|
||||||
(string-append front out "/lib"))
|
(string-append front out "/lib"))
|
||||||
(("(XFIGDOCDIR = )[[:graph:]]*" _ front)
|
(("(XFIGDOCDIR = )[[:graph:]]*" _ front)
|
||||||
(string-append front out "/share/doc"))
|
(string-append front out "/share/doc"))
|
||||||
(("XCOMM USEINLINE") "USEINLINE"))
|
(("XCOMM USEINLINE") "USEINLINE"))
|
||||||
;; The -a argument is required in order to pick up the correct paths
|
;; The -a argument is required in order to pick up the correct paths
|
||||||
;; to several X header files.
|
;; to several X header files.
|
||||||
(zero? (system* "xmkmf" "-a"))
|
(zero? (system* "xmkmf" "-a"))
|
||||||
;; Reset some variables that are inherited from imake templates
|
;; Reset some variables that are inherited from imake templates
|
||||||
(substitute* "Makefile"
|
(substitute* "Makefile"
|
||||||
;; These imake variables somehow remain undefined
|
;; These imake variables somehow remain undefined
|
||||||
(("DefaultGcc2[[:graph:]]*Opt") "-O2")
|
(("DefaultGcc2[[:graph:]]*Opt") "-O2")
|
||||||
;; Reset a few variable defaults that are set in imake templates
|
;; Reset a few variable defaults that are set in imake templates
|
||||||
((imake) out)
|
((imake) out)
|
||||||
(("(MANPATH = )[[:graph:]]*" _ front)
|
(("(MANPATH = )[[:graph:]]*" _ front)
|
||||||
(string-append front out "/share/man"))
|
(string-append front out "/share/man"))
|
||||||
(("(CONFDIR = )([[:graph:]]*)" _ front default)
|
(("(CONFDIR = )([[:graph:]]*)" _ front default)
|
||||||
(string-append front out default)))))
|
(string-append front out default))))))
|
||||||
(alist-cons-after
|
(add-after
|
||||||
'install 'install/libs
|
'install 'install/libs
|
||||||
(lambda _
|
(lambda _
|
||||||
(zero? (system* "make" "install.libs")))
|
(zero? (system* "make" "install.libs"))))
|
||||||
(alist-cons-after
|
(add-after
|
||||||
'install 'install/doc
|
'install 'install/doc
|
||||||
(lambda _
|
(lambda _
|
||||||
(begin
|
(begin
|
||||||
|
@ -118,15 +118,14 @@ (define-public xfig
|
||||||
(dump-port in out)
|
(dump-port in out)
|
||||||
(close-pipe in)
|
(close-pipe in)
|
||||||
(close-port out)))
|
(close-port out)))
|
||||||
(zero? (system* "make" "install.doc"))))
|
(zero? (system* "make" "install.doc")))))
|
||||||
(alist-cons-after
|
(add-after
|
||||||
'install 'wrap-xfig
|
'install 'wrap-xfig
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(wrap-program (string-append out "/bin/xfig")
|
(wrap-program (string-append out "/bin/xfig")
|
||||||
`("XAPPLRESDIR" suffix
|
`("XAPPLRESDIR" suffix
|
||||||
(,(string-append out "/etc/X11/app-defaults"))))))
|
(,(string-append out "/etc/X11/app-defaults"))))))))))
|
||||||
%standard-phases))))))
|
|
||||||
(home-page "http://xfig.org/")
|
(home-page "http://xfig.org/")
|
||||||
(synopsis "Interactive drawing tool")
|
(synopsis "Interactive drawing tool")
|
||||||
(description
|
(description
|
||||||
|
@ -144,12 +143,12 @@ (define-public transfig
|
||||||
(version "3.2.5e")
|
(version "3.2.5e")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (string-append "mirror://sourceforge/mcj/mcj-source/transfig."
|
(uri (string-append "mirror://sourceforge/mcj/mcj-source/transfig."
|
||||||
version ".tar.gz"))
|
version ".tar.gz"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0i3p7qmg2w8qrad3pn42b0miwarql7yy0gpd49b1bpal6bqsiicf"))))
|
"0i3p7qmg2w8qrad3pn42b0miwarql7yy0gpd49b1bpal6bqsiicf"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("imake" ,imake)
|
`(("imake" ,imake)
|
||||||
|
@ -183,20 +182,20 @@ (define-public transfig
|
||||||
(("(XPMINC = -I)[[:graph:]]*" _ front)
|
(("(XPMINC = -I)[[:graph:]]*" _ front)
|
||||||
(string-append front (assoc-ref inputs "libxpm") "/include/X11"))
|
(string-append front (assoc-ref inputs "libxpm") "/include/X11"))
|
||||||
(("/usr/local/lib/fig2dev") (string-append out "/lib")))
|
(("/usr/local/lib/fig2dev") (string-append out "/lib")))
|
||||||
;; The -a argument is required in order to pick up the correct paths
|
;; The -a argument is required in order to pick up the correct paths
|
||||||
;; to several X header files.
|
;; to several X header files.
|
||||||
(zero? (system* "xmkmf" "-a"))
|
(zero? (system* "xmkmf" "-a"))
|
||||||
(substitute* '("Makefile"
|
(substitute* '("Makefile"
|
||||||
"fig2dev/Makefile"
|
"fig2dev/Makefile"
|
||||||
"transfig/Makefile")
|
"transfig/Makefile")
|
||||||
;; These imake variables somehow remain undefined
|
;; These imake variables somehow remain undefined
|
||||||
(("DefaultGcc2[[:graph:]]*Opt") "-O2")
|
(("DefaultGcc2[[:graph:]]*Opt") "-O2")
|
||||||
;; Reset a few variable defaults that are set in imake templates
|
;; Reset a few variable defaults that are set in imake templates
|
||||||
((imake) out)
|
((imake) out)
|
||||||
(("(MANPATH = )[[:graph:]]*" _ front)
|
(("(MANPATH = )[[:graph:]]*" _ front)
|
||||||
(string-append front out "/share/man"))
|
(string-append front out "/share/man"))
|
||||||
(("(CONFDIR = )([[:graph:]]*)" _ front default)
|
(("(CONFDIR = )([[:graph:]]*)" _ front default)
|
||||||
(string-append front out default)))))
|
(string-append front out default)))))
|
||||||
(alist-cons-after
|
(alist-cons-after
|
||||||
'install 'install/doc
|
'install 'install/doc
|
||||||
(lambda _
|
(lambda _
|
||||||
|
|
Loading…
Reference in a new issue