1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2018 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
4 ;;; Copyright © 2017, 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
5 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
6 ;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
7 ;;; Copyright © 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; This file is part of GNU Guix.
11 ;;; GNU Guix is free software; you can redistribute it and/or modify it
12 ;;; under the terms of the GNU General Public License as published by
13 ;;; the Free Software Foundation; either version 3 of the License, or (at
14 ;;; your option) any later version.
16 ;;; GNU Guix is distributed in the hope that it will be useful, but
17 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;;; GNU General Public License for more details.
21 ;;; You should have received a copy of the GNU General Public License
22 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24 (define-module (gnu packages scribus)
25 #:use-module (guix packages)
26 #:use-module (guix download)
27 #:use-module (guix utils)
28 #:use-module ((guix licenses) #:prefix license:)
29 #:use-module (guix build-system cmake)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages boost)
32 #:use-module (gnu packages compression)
33 #:use-module (gnu packages cups)
34 #:use-module (gnu packages fontutils)
35 #:use-module (gnu packages ghostscript)
36 #:use-module (gnu packages gtk)
37 #:use-module (gnu packages icu4c)
38 #:use-module (gnu packages image)
39 #:use-module (gnu packages imagemagick)
40 #:use-module (gnu packages libreoffice)
41 #:use-module (gnu packages linux)
42 #:use-module (gnu packages pdf)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages python)
45 #:use-module (gnu packages qt)
46 #:use-module (gnu packages tls)
47 #:use-module (gnu packages xml))
49 (define podofo-for-scribus
56 (uri (string-append "mirror://sourceforge/podofo/podofo/" version
57 "/podofo-" version ".tar.gz"))
59 (base32 "0wj0y4zcmj4q79wrn3vv3xq4bb0vhhxs8yifafwy9f2sjm83c5p9"))
60 (modules '((guix build utils)))
63 ;; Fix the build with CMake 3.12.0.
64 (substitute* "test/TokenizerTest/CMakeLists.txt"
65 (("\\$\\{CMAKE_COMMAND\\}")
69 (define-public scribus
76 (uri (string-append "mirror://sourceforge/scribus/scribus-devel/"
77 version "/scribus-" version ".tar.xz"))
79 (base32 "1axp8ffnx3nh6k4s5mfa9gbx8d0yql2azgcampg41ylwafapc9fl"))))
80 (build-system cmake-build-system)
82 `(#:tests? #f ;no test target
84 '("-DWANT_GRAPHICSMAGICK=1")
86 (modify-phases %standard-phases
87 (add-after 'install 'wrap-program
88 (lambda* (#:key inputs outputs #:allow-other-keys)
89 ;; Fix "ImportError: No module named _sysconfigdata_nd"
90 ;; runtime error where Scribus checks PATH and eventually
91 ;; runs system's Python instead of package's.
92 (let* ((out (assoc-ref outputs "out"))
93 (py2 (assoc-ref inputs "python")))
94 (wrap-program (string-append out "/bin/scribus")
95 `("PATH" ":" prefix (,(string-append py2 "/bin")))))
101 ("fontconfig" ,fontconfig)
102 ("freetype" ,freetype)
103 ("graphicsmagick" ,graphicsmagick)
104 ("harfbuzz" ,harfbuzz)
105 ("hunspell" ,hunspell)
109 ("libfreehand" ,libfreehand)
110 ("libjpeg" ,libjpeg-turbo)
111 ("libmspub" ,libmspub)
112 ("libpagemaker" ,libpagemaker)
113 ("librevenge" ,librevenge)
115 ("libvisio" ,libvisio)
119 ;; Scribus 1.5.6.1 does not build with later versions, see
120 ;; <https://bugs.scribus.net/view.php?id=16427>.
121 ("podofo" ,podofo-for-scribus)
123 ("python" ,python) ; need Python library
125 ("qtdeclarative" ,qtdeclarative)
128 `(("pkg-config" ,pkg-config)
130 ("util-linux" ,util-linux)))
131 (home-page "https://www.scribus.net")
132 (synopsis "Desktop publishing and page layout program")
134 "Scribus is a @dfn{desktop publishing} (DTP) application and can
135 be used for many tasks; from brochure design to newspapers, magazines,
136 newsletters and posters to technical documentation. Scribus supports
137 professional DTP features, such as CMYK color and a color management
138 system to soft proof images for high quality color printing, flexible
139 PDF creation options, Encapsulated PostScript import/export and
140 creation of four color separations, import of EPS/PS and SVG as native
141 vector graphics, Unicode text including right to left scripts such as
142 Arabic and Hebrew via FreeType.")
143 (license license:gpl2+)))