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 | |
| parent | 8c0146514298621b9307e7627839b2be80e46a26 (diff) | |
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>
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/docbook.scm | 2 | ||||
| -rw-r--r-- | gnu/packages/patches/transfig-gcc10-fno-common.patch | 33 | ||||
| -rw-r--r-- | gnu/packages/tex.scm | 2 | ||||
| -rw-r--r-- | gnu/packages/xfig.scm | 146 |
5 files changed, 65 insertions, 119 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 9d7b2692722..a25609209c7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -2029,7 +2029,6 @@ dist_patch_DATA = \ | |||
| 2029 | %D%/packages/patches/tootle-glib-object-naming.patch \ | 2029 | %D%/packages/patches/tootle-glib-object-naming.patch \ |
| 2030 | %D%/packages/patches/tootle-reason-phrase.patch \ | 2030 | %D%/packages/patches/tootle-reason-phrase.patch \ |
| 2031 | %D%/packages/patches/transcode-ffmpeg.patch \ | 2031 | %D%/packages/patches/transcode-ffmpeg.patch \ |
| 2032 | %D%/packages/patches/transfig-gcc10-fno-common.patch \ | ||
| 2033 | %D%/packages/patches/trytond-add-egg-modules-to-path.patch \ | 2032 | %D%/packages/patches/trytond-add-egg-modules-to-path.patch \ |
| 2034 | %D%/packages/patches/trytond-add-guix_trytond_path.patch \ | 2033 | %D%/packages/patches/trytond-add-guix_trytond_path.patch \ |
| 2035 | %D%/packages/patches/ttf2eot-cstddef.patch \ | 2034 | %D%/packages/patches/ttf2eot-cstddef.patch \ |
diff --git a/gnu/packages/docbook.scm b/gnu/packages/docbook.scm index ff6d32b168f..c47d3db2c04 100644 --- a/gnu/packages/docbook.scm +++ b/gnu/packages/docbook.scm | |||
| @@ -532,7 +532,7 @@ the in DocBook SGML DTDs.") | |||
| 532 | (base32 | 532 | (base32 |
| 533 | "0yd09nypswy3q4scri1dg7dr99d7gd6r2dwx0xm81l9f4y32gs0n")))) | 533 | "0yd09nypswy3q4scri1dg7dr99d7gd6r2dwx0xm81l9f4y32gs0n")))) |
| 534 | (build-system python-build-system) | 534 | (build-system python-build-system) |
| 535 | ;; TODO: Add xfig/transfig for fig2dev utility | 535 | ;; TODO: Add fig2dev for fig2dev utility. |
| 536 | (inputs | 536 | (inputs |
| 537 | `(("texlive" ,(texlive-updmap.cfg (list texlive-anysize | 537 | `(("texlive" ,(texlive-updmap.cfg (list texlive-anysize |
| 538 | texlive-appendix | 538 | texlive-appendix |
diff --git a/gnu/packages/patches/transfig-gcc10-fno-common.patch b/gnu/packages/patches/transfig-gcc10-fno-common.patch deleted file mode 100644 index ebe92365338..00000000000 --- a/gnu/packages/patches/transfig-gcc10-fno-common.patch +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | Fixes "multiple definition" errors when building with GCC 10+. | ||
| 2 | |||
| 3 | Based on <https://bugs.gentoo.org/show_bug.cgi?id=706706>. | ||
| 4 | --- a/fig2dev/dev/gensvg.c 2010-07-01 22:41:16.000000000 +0200 | ||
| 5 | +++ b/fig2dev/dev/gensvg.c 2022-02-27 20:02:33.379945500 +0100 | ||
| 6 | @@ -230,10 +230,12 @@ | ||
| 7 | }; | ||
| 8 | |||
| 9 | /* arrowhead arrays */ | ||
| 10 | -Point points[50], fillpoints[50], clippoints[50]; | ||
| 11 | -int npoints, nfillpoints, nclippoints; | ||
| 12 | -int arrowx1, arrowy1; /* first point of object */ | ||
| 13 | -int arrowx2, arrowy2; /* second point of object */ | ||
| 14 | +Point fillpoints[50]; | ||
| 15 | +int nfillpoints; | ||
| 16 | +extern Point points[50], clippoints[50]; | ||
| 17 | +extern int npoints, nclippoints; | ||
| 18 | +extern int arrowx1, arrowy1; /* first point of object */ | ||
| 19 | +extern int arrowx2, arrowy2; /* second point of object */ | ||
| 20 | |||
| 21 | static int tileno=0; /* number of current tile */ | ||
| 22 | |||
| 23 | --- a/fig2dev/fig2dev.h 2010-03-16 19:53:20.000000000 +0100 | ||
| 24 | +++ b/fig2dev/fig2dev.h 2022-02-27 19:56:06.072253991 +0100 | ||
| 25 | @@ -126,7 +126,7 @@ | ||
| 26 | extern char *prog, *from, *to; | ||
| 27 | extern char *name; | ||
| 28 | extern double font_size; | ||
| 29 | -Boolean correct_font_size; /* use correct font size */ | ||
| 30 | +extern Boolean correct_font_size; /* use correct font size */ | ||
| 31 | extern double mag, fontmag; | ||
| 32 | extern FILE *tfp; | ||
| 33 | |||
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index bd02190a510..b5da3393530 100644 --- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm | |||
| @@ -40434,7 +40434,7 @@ glossaries, ...) should be correctly managed. | |||
| 40434 | 40434 | ||
| 40435 | @item @file{figlatex.sty}: a LaTeX package to easily insert Xfig figures. It | 40435 | @item @file{figlatex.sty}: a LaTeX package to easily insert Xfig figures. It |
| 40436 | can interact with LaTeX.mk so that the latter automatically invokes | 40436 | can interact with LaTeX.mk so that the latter automatically invokes |
| 40437 | @command{transfig} if needed. | 40437 | @command{fig2dev} if needed. |
| 40438 | 40438 | ||
| 40439 | @end itemize") | 40439 | @end itemize") |
| 40440 | (license license:gpl3+))) | 40440 | (license license:gpl3+))) |
diff --git a/gnu/packages/xfig.scm b/gnu/packages/xfig.scm index f68ddb01f93..a9a86fc2ed8 100644 --- a/gnu/packages/xfig.scm +++ b/gnu/packages/xfig.scm | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | 23 | ||
| 24 | (define-module (gnu packages xfig) | 24 | (define-module (gnu packages xfig) |
| 25 | #:use-module (guix packages) | 25 | #:use-module (guix packages) |
| 26 | #:use-module ((guix licenses) #:select (bsd-2)) | 26 | #:use-module ((guix licenses) #:prefix license:) |
| 27 | #:use-module (guix download) | 27 | #:use-module (guix download) |
| 28 | #:use-module (guix gexp) | 28 | #:use-module (guix gexp) |
| 29 | #:use-module (guix build-system gnu) | 29 | #:use-module (guix build-system gnu) |
| @@ -32,8 +32,69 @@ | |||
| 32 | #:use-module (gnu packages ghostscript) | 32 | #:use-module (gnu packages ghostscript) |
| 33 | #:use-module (gnu packages xorg) | 33 | #:use-module (gnu packages xorg) |
| 34 | #:use-module (gnu packages image) | 34 | #:use-module (gnu packages image) |
| 35 | #:use-module (gnu packages ghostscript) | ||
| 36 | #:use-module (gnu packages imagemagick) | ||
| 37 | #:use-module (gnu packages netpbm) | ||
| 35 | #:use-module (gnu packages compression)) | 38 | #:use-module (gnu packages compression)) |
| 36 | 39 | ||
| 40 | (define-public fig2dev | ||
| 41 | (package | ||
| 42 | (name "fig2dev") | ||
| 43 | (version "3.2.9") | ||
| 44 | (source | ||
| 45 | (origin | ||
| 46 | (method url-fetch) | ||
| 47 | (uri (string-append "mirror://sourceforge/mcj/" | ||
| 48 | name "-" version ".tar.xz")) | ||
| 49 | (sha256 | ||
| 50 | (base32 | ||
| 51 | "1cch429zbmrg2zy1mkx9xwnpvkjhmlw40c88bvi2virws744dqhm")))) | ||
| 52 | (build-system gnu-build-system) | ||
| 53 | (arguments | ||
| 54 | (list | ||
| 55 | #:modules '((guix build gnu-build-system) | ||
| 56 | (guix build utils) | ||
| 57 | (srfi srfi-26)) | ||
| 58 | #:phases | ||
| 59 | #~(modify-phases %standard-phases | ||
| 60 | (add-after 'install 'wrap-program | ||
| 61 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 62 | (let ((programs | ||
| 63 | (find-files (string-append #$output "/bin"))) | ||
| 64 | (path | ||
| 65 | (search-path-as-list | ||
| 66 | '("bin") | ||
| 67 | (map (cut assoc-ref inputs <>) | ||
| 68 | (list "ghostscript" "imagemagick"))))) | ||
| 69 | (for-each (lambda (program) | ||
| 70 | (wrap-program program | ||
| 71 | `("PATH" ":" prefix ,path))) | ||
| 72 | programs))))))) | ||
| 73 | (inputs | ||
| 74 | (list libpng zlib | ||
| 75 | ;; Quoth INSTALL: | ||
| 76 | ;; “To run fig2dev, the packages | ||
| 77 | ;; ghostscript, and one out of | ||
| 78 | ;; netpbm | ImageMagick | GraphicsMagick | ||
| 79 | ;; are needed to produce various bitmap output formats, or process | ||
| 80 | ;; fig files with embedded images.” | ||
| 81 | ghostscript | ||
| 82 | imagemagick)) | ||
| 83 | (native-inputs | ||
| 84 | ;; XXX: Tests fail if netpbm is absent. | ||
| 85 | (list netpbm)) | ||
| 86 | (home-page "https://sourceforge.net/projects/mcj") | ||
| 87 | (synopsis "Translate Fig to other graphic description formats") | ||
| 88 | (description "Fig2dev is a set of tools for creating TeX documents with | ||
| 89 | graphics which are portable, in the sense that they can be printed in a wide | ||
| 90 | variety of environments.") | ||
| 91 | (license | ||
| 92 | (license:non-copyleft "file://Makefile.am" | ||
| 93 | "See <https://spdx.org/licenses/Xfig.html>.")))) | ||
| 94 | |||
| 95 | (define-public transfig | ||
| 96 | (deprecated-package "transfig" fig2dev)) | ||
| 97 | |||
| 37 | (define-public xfig | 98 | (define-public xfig |
| 38 | (package | 99 | (package |
| 39 | (name "xfig") | 100 | (name "xfig") |
| @@ -71,85 +132,4 @@ spline curves, text, etc. It is also possible to import images in formats | |||
| 71 | such as GIF, JPEG, EPSF (PostScript), etc. Those objects can be created, | 132 | such as GIF, JPEG, EPSF (PostScript), etc. Those objects can be created, |
| 72 | deleted, moved or modified. Attributes such as colors or line styles can be | 133 | deleted, moved or modified. Attributes such as colors or line styles can be |
| 73 | selected in various ways. For text, 35 fonts are available.") | 134 | selected in various ways. For text, 35 fonts are available.") |
| 74 | (license bsd-2))) | 135 | (license license:bsd-2))) |
| 75 | |||
| 76 | (define-public transfig | ||
| 77 | (package | ||
| 78 | (name "transfig") | ||
| 79 | (version "3.2.5e") | ||
| 80 | (source | ||
| 81 | (origin | ||
| 82 | (method url-fetch) | ||
| 83 | (uri (string-append "mirror://sourceforge/mcj/mcj-source/transfig." | ||
| 84 | version ".tar.gz")) | ||
| 85 | (sha256 | ||
| 86 | (base32 | ||
| 87 | "0i3p7qmg2w8qrad3pn42b0miwarql7yy0gpd49b1bpal6bqsiicf")) | ||
| 88 | (patches | ||
| 89 | (search-patches | ||
| 90 | "transfig-gcc10-fno-common.patch")))) ; fix GCC10 build | ||
| 91 | (build-system gnu-build-system) | ||
| 92 | (native-inputs | ||
| 93 | (list imake makedepend)) | ||
| 94 | (inputs | ||
| 95 | `(("xfig" ,xfig) | ||
| 96 | ("libjpeg" ,libjpeg-turbo) | ||
| 97 | ("libpng" ,libpng) | ||
| 98 | ("libxpm" ,libxpm) | ||
| 99 | ("libx11" ,libx11) | ||
| 100 | ("zlib" ,zlib))) | ||
| 101 | (arguments | ||
| 102 | `(#:tests? #f | ||
| 103 | #:phases | ||
| 104 | (modify-phases %standard-phases | ||
| 105 | (replace 'configure | ||
| 106 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 107 | (let ((imake (assoc-ref inputs "imake")) | ||
| 108 | (out (assoc-ref outputs "out"))) | ||
| 109 | (substitute* '("fig2dev/Imakefile" | ||
| 110 | "transfig/Imakefile") | ||
| 111 | (("XCOMM (BINDIR = )[[:graph:]]*" _ front) | ||
| 112 | (string-append front out "/bin")) | ||
| 113 | (("XCOMM USEINLINE") "USEINLINE") | ||
| 114 | ;; The variable name is deceptive. The directory is used as an | ||
| 115 | ;; installation path for bitmaps. | ||
| 116 | (("(XFIGLIBDIR =[[:blank:]]*)[[:graph:]]*" _ front) | ||
| 117 | (string-append front out "/lib")) | ||
| 118 | (("(XPMLIBDIR = )[[:graph:]]*" _ front) | ||
| 119 | (string-append front (assoc-ref inputs "libxpm") "/lib")) | ||
| 120 | (("(XPMINC = -I)[[:graph:]]*" _ front) | ||
| 121 | (string-append front (assoc-ref inputs "libxpm") "/include/X11")) | ||
| 122 | (("/usr/local/lib/fig2dev") (string-append out "/lib"))) | ||
| 123 | ;; The -a argument is required in order to pick up the correct paths | ||
| 124 | ;; to several X header files. | ||
| 125 | (invoke "xmkmf" "-a") | ||
| 126 | (substitute* '("Makefile" | ||
| 127 | "fig2dev/Makefile" | ||
| 128 | "fig2dev/dev/Makefile" | ||
| 129 | "transfig/Makefile") | ||
| 130 | ;; These imake variables somehow remain undefined | ||
| 131 | (("DefaultGcc2[[:graph:]]*Opt") "-O2") | ||
| 132 | ;; Reset a few variable defaults that are set in imake templates | ||
| 133 | ((imake) out) | ||
| 134 | (("(MANPATH = )[[:graph:]]*" _ front) | ||
| 135 | (string-append front out "/share/man")) | ||
| 136 | (("(CONFDIR = )([[:graph:]]*)" _ front default) | ||
| 137 | (string-append front out default)) | ||
| 138 | ;; The "l" option was silently ignored until binutils 2.36, | ||
| 139 | ;; where it got a different purpose. So remove it to avoid | ||
| 140 | ;; "ar: libdeps specified more than once". | ||
| 141 | (("((AR|MODAR) = ar )clq" _ front) | ||
| 142 | (string-append front "cq"))) | ||
| 143 | #t))) | ||
| 144 | (add-after 'install 'install/doc | ||
| 145 | (lambda _ | ||
| 146 | (invoke "make" "install.man")))))) | ||
| 147 | (home-page "https://mcj.sourceforge.net/") | ||
| 148 | (synopsis "Create portable LaTeX figures") | ||
| 149 | (description | ||
| 150 | "Transfig creates a makefile to translate figures described in Fig code | ||
| 151 | or PIC into a specified LaTeX graphics language. PIC files are identified by | ||
| 152 | the suffix \".pic\"; Fig files can be specified either with or without the | ||
| 153 | suffix \".fig\". Transfig also creates a TeX macro file appropriate to the | ||
| 154 | target language.") | ||
| 155 | (license bsd-2))) | ||
