| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 |
|
| 24 | (define-module (gnu packages xfig)
|
| 25 | #:use-module (guix packages)
|
| 26 | #:use-module ((guix licenses) #:prefix license:)
|
| 27 | #:use-module (guix download)
|
| 28 | #:use-module (guix gexp)
|
| 29 | #:use-module (guix build-system gnu)
|
| 30 | #:use-module (gnu packages)
|
| 31 | #:use-module (gnu packages autotools)
|
| 32 | #:use-module (gnu packages freedesktop)
|
| 33 | #:use-module (gnu packages ghostscript)
|
| 34 | #:use-module (gnu packages xorg)
|
| 35 | #:use-module (gnu packages pkg-config)
|
| 36 | #:use-module (gnu packages image)
|
| 37 | #:use-module (gnu packages ghostscript)
|
| 38 | #:use-module (gnu packages imagemagick)
|
| 39 | #:use-module (gnu packages netpbm)
|
| 40 | #:use-module (gnu packages compression))
|
| 41 |
|
| 42 | (define-public fig2dev
|
| 43 | (package
|
| 44 | (name "fig2dev")
|
| 45 | (version "3.2.9")
|
| 46 | (source
|
| 47 | (origin
|
| 48 | (method url-fetch)
|
| 49 | (uri (string-append "mirror://sourceforge/mcj/"
|
| 50 | name "-" version ".tar.xz"))
|
| 51 | (sha256
|
| 52 | (base32
|
| 53 | "1cch429zbmrg2zy1mkx9xwnpvkjhmlw40c88bvi2virws744dqhm"))))
|
| 54 | (build-system gnu-build-system)
|
| 55 | (arguments
|
| 56 | (list
|
| 57 | #:modules '((guix build gnu-build-system)
|
| 58 | (guix build utils)
|
| 59 | (srfi srfi-26))
|
| 60 | #:phases
|
| 61 | #~(modify-phases %standard-phases
|
| 62 | (add-after 'install 'wrap-program
|
| 63 | (lambda* (#:key inputs #:allow-other-keys)
|
| 64 | (let ((programs
|
| 65 | (find-files (string-append #$output "/bin")))
|
| 66 | (path
|
| 67 | (search-path-as-list
|
| 68 | '("bin")
|
| 69 | (map (cut assoc-ref inputs <>)
|
| 70 | (list "ghostscript" "imagemagick")))))
|
| 71 | (for-each (lambda (program)
|
| 72 | (wrap-program program
|
| 73 | `("PATH" ":" prefix ,path)))
|
| 74 | programs)))))))
|
| 75 | (inputs
|
| 76 | (list libpng zlib
|
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | ghostscript
|
| 84 | imagemagick))
|
| 85 | (native-inputs
|
| 86 | |
| 87 | (list netpbm))
|
| 88 | (home-page "https://sourceforge.net/projects/mcj")
|
| 89 | (synopsis "Translate Fig to other graphic description formats")
|
| 90 | (description "Fig2dev is a set of tools for creating TeX documents with
|
| 91 | graphics which are portable, in the sense that they can be printed in a wide
|
| 92 | variety of environments.")
|
| 93 | (license
|
| 94 | (license:non-copyleft "file://Makefile.am"
|
| 95 | "See <https://spdx.org/licenses/Xfig.html>."))))
|
| 96 |
|
| 97 | (define-public xfig
|
| 98 | (package
|
| 99 | (name "xfig")
|
| 100 | (version "3.2.9")
|
| 101 | (source
|
| 102 | (origin
|
| 103 | (method url-fetch)
|
| 104 | (uri (string-append "mirror://sourceforge/mcj/"
|
| 105 | name "-" version ".tar.xz"))
|
| 106 | (sha256
|
| 107 | (base32
|
| 108 | "1xy2zqbd1wn2fij95kgnj39850r7xk74kvx7kp0dxhmvs429vv8k"))
|
| 109 | |
| 110 | |
| 111 | (patches
|
| 112 | (search-patches "xfig-Enable-error-message-for-missing-libraries.patch"
|
| 113 | "xfig-Use-pkg-config-to-set-fontconfig-CFLAGS-and-LIBS.patch"
|
| 114 | "xfig-Fix-double-free-when-requesting-MediaBox.patch"))
|
| 115 | (modules '((guix build utils)))
|
| 116 | (snippet
|
| 117 | |
| 118 | #~(begin
|
| 119 | (substitute* "xfig.desktop"
|
| 120 | (("^(Exec=)/usr/bin/" _ key) key))
|
| 121 | |
| 122 | |
| 123 | (delete-file "configure")))))
|
| 124 | (build-system gnu-build-system)
|
| 125 | (arguments
|
| 126 | (list
|
| 127 | #:modules '((guix build gnu-build-system)
|
| 128 | (guix build utils)
|
| 129 | (srfi srfi-26))
|
| 130 | #:phases
|
| 131 | #~(modify-phases %standard-phases
|
| 132 | (add-after 'install 'wrap-program
|
| 133 | (lambda* (#:key inputs #:allow-other-keys)
|
| 134 | (let ((path
|
| 135 | (search-path-as-list
|
| 136 | '("bin")
|
| 137 | (map (cut assoc-ref inputs <>)
|
| 138 | (list "ghostscript" "fig2dev")))))
|
| 139 | (wrap-program (string-append #$output "/bin/xfig")
|
| 140 | `("PATH" ":" prefix ,path))))))))
|
| 141 | (native-inputs
|
| 142 | (list pkg-config
|
| 143 | |
| 144 | |
| 145 | autoconf automake libtool
|
| 146 | |
| 147 | desktop-file-utils))
|
| 148 | (inputs
|
| 149 | (list ghostscript
|
| 150 | fig2dev
|
| 151 | libxaw3d
|
| 152 | libjpeg-turbo
|
| 153 | libpng
|
| 154 | libxpm
|
| 155 | libx11
|
| 156 | libxft
|
| 157 | libxt))
|
| 158 | (home-page "https://mcj.sourceforge.net/")
|
| 159 | (synopsis "Interactive drawing tool")
|
| 160 | (description
|
| 161 | "Xfig is an interactive drawing tool which runs under X Window System.
|
| 162 | In xfig, figures may be drawn using objects such as circles, boxes, lines,
|
| 163 | spline curves, text, etc. It is also possible to import images in formats
|
| 164 | such as GIF, JPEG, EPSF (PostScript), etc. Those objects can be created,
|
| 165 | deleted, moved or modified. Attributes such as colors or line styles can be
|
| 166 | selected in various ways. For text, 35 fonts are available.")
|
| 167 | (license
|
| 168 | (license:non-copyleft "file://Makefile.am"
|
| 169 | "See <https://spdx.org/licenses/Xfig.html>."))))
|