gnu: python-pandas: Fix build on 32-bit.
[jackhill/guix/guix.git] / gnu / packages / unrtf.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages unrtf)
21 #:use-module (guix licenses)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (guix gexp)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages autotools)
28 #:use-module (gnu packages m4)
29 #:use-module (gnu packages base))
30
31 (define-public unrtf
32 (package
33 (name "unrtf")
34 (version "0.21.9")
35 (source (origin
36 (method url-fetch)
37 (uri (string-append "mirror://gnu/unrtf/unrtf-"
38 version ".tar.gz"))
39 (patches (search-patches "unrtf-CVE-2016-10091.patch"))
40 (sha256
41 (base32
42 "1pcdzf2h1prn393dkvg93v80vh38q0v817xnbwrlwxbdz4k7i8r2"))
43 (modules '((guix build utils)))
44 (snippet
45 #~(begin
46 ;; The tarball includes site-specific generated files.
47 ;; Remove them.
48 (for-each delete-file '("config.log" "config.h"))
49 (for-each delete-file
50 (find-files "." "^Makefile$"))
51
52 ;; The config/ directory contains dangling symlinks to
53 ;; /usr/share/automake.
54 (for-each delete-file (find-files "config"))
55
56 ;; Regenerate the whole thing.
57 (setenv "PATH"
58 (string-append #$autoconf "/bin:"
59 #$automake "/bin:"
60 #$m4 "/bin:"
61 #$grep "/bin:" #$sed "/bin:"
62 #$coreutils "/bin:"
63 (getenv "PATH")))
64 (zero? (system* "autoreconf" "-vfi"))))))
65 (build-system gnu-build-system)
66 (home-page "http://www.gnu.org/software/unrtf")
67 (synopsis "Convert Rich Text Format documents to other formats")
68 (description
69 "GNU UnRTF converts text documents from RTF to HTML, LaTeX, or troff.
70 It supports changes in font characteristics, underlines and strikethroughs,
71 superscripts and subscripts, and more.")
72 (license gpl2+)))