diff options
author | Bruno Victal <mirai@makinata.eu> | 2023-09-24 16:30:26 +0100 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-10-01 08:14:55 +0200 |
commit | dd36ca07f0f6ee5adf1629f4dd56702755683e72 (patch) | |
tree | 91356090b684dee478c178bb3a07d6180ef2626b /gnu/packages/xfig.scm | |
parent | 8c0146514298621b9307e7627839b2be80e46a26 (diff) | |
download | guix-dd36ca07f0f6ee5adf1629f4dd56702755683e72.tar.gz guix-dd36ca07f0f6ee5adf1629f4dd56702755683e72.zip |
gnu: Add fig2dev.
The source used by the transfig package is outdated and its development
was moved into the repository used by fig2dev though the utility
`transfig' is considered obsolete and not built by default in the
fig2dev package. In practice, this is not a problem since the user is
generally after the `fig2dev' utility which was also provided in the
(now obsolete) transfig package.
Descriptions and comments pointing to the now obsolete packages are
adjusted accordingly. For texlive-latex-make, this follow upstream at
<https://gitlab.inria.fr/latex-utils/latex-make/-/commit/1dcc04aaa860b123924ae83fc30a47d6f7179f7a>.
* gnu/packages/xfig.scm: Import all of (guix licenses).
(xfig)[license]: Adjust accordingly.
(fig2dev): New variable.
(transfig): Deprecate in favor of fig2dev.
* gnu/packages/patches/transfig-gcc10-fno-common.patch: Removed file.
* gnu/local.mk (dist_patch_DATA): Unregister it.
* gnu/packages/docbook.scm (dblatex): Update comment.
* gnu/packages/tex.scm (texlive-latex-make)[description]: Update description.
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu/packages/xfig.scm')
-rw-r--r-- | gnu/packages/xfig.scm | 146 |
1 files changed, 63 insertions, 83 deletions
diff --git a/gnu/packages/xfig.scm b/gnu/packages/xfig.scm index f68ddb01f9..a9a86fc2ed 100644 --- a/gnu/packages/xfig.scm +++ b/gnu/packages/xfig.scm @@ -23,7 +23,7 @@ (define-module (gnu packages xfig) #:use-module (guix packages) - #:use-module ((guix licenses) #:select (bsd-2)) + #:use-module ((guix licenses) #:prefix license:) #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix build-system gnu) @@ -32,8 +32,69 @@ #:use-module (gnu packages ghostscript) #:use-module (gnu packages xorg) #:use-module (gnu packages image) + #:use-module (gnu packages ghostscript) + #:use-module (gnu packages imagemagick) + #:use-module (gnu packages netpbm) #:use-module (gnu packages compression)) +(define-public fig2dev + (package + (name "fig2dev") + (version "3.2.9") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/mcj/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "1cch429zbmrg2zy1mkx9xwnpvkjhmlw40c88bvi2virws744dqhm")))) + (build-system gnu-build-system) + (arguments + (list + #:modules '((guix build gnu-build-system) + (guix build utils) + (srfi srfi-26)) + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'wrap-program + (lambda* (#:key inputs #:allow-other-keys) + (let ((programs + (find-files (string-append #$output "/bin"))) + (path + (search-path-as-list + '("bin") + (map (cut assoc-ref inputs <>) + (list "ghostscript" "imagemagick"))))) + (for-each (lambda (program) + (wrap-program program + `("PATH" ":" prefix ,path))) + programs))))))) + (inputs + (list libpng zlib + ;; Quoth INSTALL: + ;; “To run fig2dev, the packages + ;; ghostscript, and one out of + ;; netpbm | ImageMagick | GraphicsMagick + ;; are needed to produce various bitmap output formats, or process + ;; fig files with embedded images.” + ghostscript + imagemagick)) + (native-inputs + ;; XXX: Tests fail if netpbm is absent. + (list netpbm)) + (home-page "https://sourceforge.net/projects/mcj") + (synopsis "Translate Fig to other graphic description formats") + (description "Fig2dev is a set of tools for creating TeX documents with +graphics which are portable, in the sense that they can be printed in a wide +variety of environments.") + (license + (license:non-copyleft "file://Makefile.am" + "See <https://spdx.org/licenses/Xfig.html>.")))) + +(define-public transfig + (deprecated-package "transfig" fig2dev)) + (define-public xfig (package (name "xfig") @@ -71,85 +132,4 @@ spline curves, text, etc. It is also possible to import images in formats such as GIF, JPEG, EPSF (PostScript), etc. Those objects can be created, deleted, moved or modified. Attributes such as colors or line styles can be selected in various ways. For text, 35 fonts are available.") - (license bsd-2))) - -(define-public transfig - (package - (name "transfig") - (version "3.2.5e") - (source - (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/mcj/mcj-source/transfig." - version ".tar.gz")) - (sha256 - (base32 - "0i3p7qmg2w8qrad3pn42b0miwarql7yy0gpd49b1bpal6bqsiicf")) - (patches - (search-patches - "transfig-gcc10-fno-common.patch")))) ; fix GCC10 build - (build-system gnu-build-system) - (native-inputs - (list imake makedepend)) - (inputs - `(("xfig" ,xfig) - ("libjpeg" ,libjpeg-turbo) - ("libpng" ,libpng) - ("libxpm" ,libxpm) - ("libx11" ,libx11) - ("zlib" ,zlib))) - (arguments - `(#:tests? #f - #:phases - (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* '("fig2dev/Imakefile" - "transfig/Imakefile") - (("XCOMM (BINDIR = )[[:graph:]]*" _ front) - (string-append front out "/bin")) - (("XCOMM USEINLINE") "USEINLINE") - ;; The variable name is deceptive. The directory is used as an - ;; installation path for bitmaps. - (("(XFIGLIBDIR =[[:blank:]]*)[[:graph:]]*" _ front) - (string-append front out "/lib")) - (("(XPMLIBDIR = )[[:graph:]]*" _ front) - (string-append front (assoc-ref inputs "libxpm") "/lib")) - (("(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. - (invoke "xmkmf" "-a") - (substitute* '("Makefile" - "fig2dev/Makefile" - "fig2dev/dev/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 "l" option was silently ignored until binutils 2.36, - ;; where it got a different purpose. So remove it to avoid - ;; "ar: libdeps specified more than once". - (("((AR|MODAR) = ar )clq" _ front) - (string-append front "cq"))) - #t))) - (add-after 'install 'install/doc - (lambda _ - (invoke "make" "install.man")))))) - (home-page "https://mcj.sourceforge.net/") - (synopsis "Create portable LaTeX figures") - (description - "Transfig creates a makefile to translate figures described in Fig code -or PIC into a specified LaTeX graphics language. PIC files are identified by -the suffix \".pic\"; Fig files can be specified either with or without the -suffix \".fig\". Transfig also creates a TeX macro file appropriate to the -target language.") - (license bsd-2))) + (license license:bsd-2))) |