aboutsummaryrefslogtreecommitdiff
path: root/contrib/packages/guix
diff options
context:
space:
mode:
authorng0 <ng0@infotropique.org>2017-09-26 12:22:58 +0000
committerng0 <ng0@infotropique.org>2017-09-26 12:22:58 +0000
commit72e116bbf82953534d5f0bfb307e1ecd662a5fe8 (patch)
tree768b92ba245eb61a99af4cd63dedb64dbc0b59b8 /contrib/packages/guix
parentfce0277df0380f3758749c84222f0d76b612385b (diff)
downloadgnunet-72e116bbf82953534d5f0bfb307e1ecd662a5fe8.tar.gz
gnunet-72e116bbf82953534d5f0bfb307e1ecd662a5fe8.zip
contrib/packages/guix: use texinfo-5.2 for some packages. Start backporting Texlive-2012.
Diffstat (limited to 'contrib/packages/guix')
-rw-r--r--contrib/packages/guix/gnunet-doc.scm3
-rw-r--r--contrib/packages/guix/guix-env.scm2
-rw-r--r--contrib/packages/guix/packages/gnunet/packages/texlive.scm182
3 files changed, 185 insertions, 2 deletions
diff --git a/contrib/packages/guix/gnunet-doc.scm b/contrib/packages/guix/gnunet-doc.scm
index 9b3293a17..d12de10a2 100644
--- a/contrib/packages/guix/gnunet-doc.scm
+++ b/contrib/packages/guix/gnunet-doc.scm
@@ -64,6 +64,7 @@
64 (gnu packages video) 64 (gnu packages video)
65 (gnu packages web) 65 (gnu packages web)
66 (gnu packages xiph) 66 (gnu packages xiph)
67 ;;(gnunet packages texlive) ;GNUnet module including texlive-2012 WIP
67 ((guix licenses) #:prefix license:)) 68 ((guix licenses) #:prefix license:))
68 69
69(define %source-dir (string-append (current-source-directory) 70(define %source-dir (string-append (current-source-directory)
@@ -115,7 +116,7 @@
115 ("bluez" ,bluez) ; for optional bluetooth feature 116 ("bluez" ,bluez) ; for optional bluetooth feature
116 ("glib" ,glib) 117 ("glib" ,glib)
117 ;;("texlive-minimal" ,texlive-minimal) ; optional. 118 ;;("texlive-minimal" ,texlive-minimal) ; optional.
118 ("texlive" ,texlive) 119 ("texlive" ,texlive) ;TODO: Stabilize Texlive-2012 package
119 ("libogg" ,libogg))) 120 ("libogg" ,libogg)))
120 (native-inputs 121 (native-inputs
121 `(("pkg-config" ,pkg-config) 122 `(("pkg-config" ,pkg-config)
diff --git a/contrib/packages/guix/guix-env.scm b/contrib/packages/guix/guix-env.scm
index 6946fee57..1182eb08d 100644
--- a/contrib/packages/guix/guix-env.scm
+++ b/contrib/packages/guix/guix-env.scm
@@ -146,7 +146,7 @@
146 ("autoconf" ,autoconf) 146 ("autoconf" ,autoconf)
147 ("automake" ,automake) 147 ("automake" ,automake)
148 ("gnu-gettext" ,gnu-gettext) 148 ("gnu-gettext" ,gnu-gettext)
149 ("texinfo" ,texinfo) 149 ("texinfo" ,texinfo-5.2) ; Debian stable.
150 ("libtool" ,libtool))) 150 ("libtool" ,libtool)))
151 ;; TODO: To make use of out:debug, which carries the symbols, 151 ;; TODO: To make use of out:debug, which carries the symbols,
152 ;; this file needs to fixed. 152 ;; this file needs to fixed.
diff --git a/contrib/packages/guix/packages/gnunet/packages/texlive.scm b/contrib/packages/guix/packages/gnunet/packages/texlive.scm
new file mode 100644
index 000000000..65430d693
--- /dev/null
+++ b/contrib/packages/guix/packages/gnunet/packages/texlive.scm
@@ -0,0 +1,182 @@
1;;; This file is part of GNUnet.
2;;; Copyright (C) 2017 GNUnet e.V.
3;;;
4;;; GNUnet is free software; you can redistribute it and/or modify
5;;; it under the terms of the GNU General Public License as published
6;;; by the Free Software Foundation; either version 3, or (at your
7;;; option) any later version.
8;;;
9;;; GNUnet is distributed in the hope that it will be useful, but
10;;; WITHOUT ANY WARRANTY; without even the implied warranty of
11;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12;;; General Public License for more details.
13;;;
14;;; You should have received a copy of the GNU General Public License
15;;; along with GNUnet; see the file COPYING. If not, write to the
16;;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17;;; Boston, MA 02110-1301, USA.
18
19;; Initially based on Guix commit eb0119efde826590a13973ab928c173780a7f257
20
21(define-module (gnunet packages texlive)
22 #:use-module ((guix licenses)
23 #:renamer (symbol-prefix-proc 'license:))
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages fontutils)
30 #:use-module (gnu packages ghostscript)
31 #:use-module (gnu packages icu4c)
32 #:use-module (gnu packages image)
33 #:use-module (gnu packages pdf)
34 #:use-module (gnu packages perl)
35 #:use-module (gnu packages pkg-config)
36 #:use-module (gnu packages python)
37 #:use-module (gnu packages compression))
38
39(define texlive-extra-src
40 (origin
41 (method url-fetch)
42 (uri "http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2012/texlive-20120701-extra.tar.xz")
43 ;;(uri "ftp://tug.org/historic/systems/texlive/2012/texlive-20120701-extra.tar.xz")
44 (sha256 (base32
45 "0cb8fnv4x281gy5ka779f00ssdmdpjj4x3pkh9j9vq45hrwg3522"))))
46
47(define texlive-texmf-src
48 (origin
49 (method url-fetch)
50 (uri "http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2012/texlive-20120701-texmf.tar.xz")
51 ;;(uri "ftp://tug.org/historic/systems/texlive/2012/texlive-20120701-texmf.tar.xz")
52 (sha256 (base32
53 "1fn1dg9k7pnh8a80j23zfkbrfnqyc4c2w4ss30dpkqj490nxsywq"))))
54
55;; Note that right now this does not include security fixes!
56;; FIXME: Needs more fixes, currently this fails building!
57
58(define-public texlive
59 (package
60 (name "texlive")
61 (version "2012")
62 (source (origin
63 (method url-fetch)
64 (uri "http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/2012/texlive-20120701-source.tar.xz")
65 ;;(uri "ftp://tug.org/historic/systems/texlive/2012/texlive-20120701-source.tar.xz")
66 (sha256 (base32
67 "10bcrdfsqnc6y3gqcb8ndnjy07i5kz63as39irbq4gmcbmyn2rln"))))
68 (build-system gnu-build-system)
69 (inputs `(("texlive-extra-src" ,texlive-extra-src)
70 ("texlive-texmf-src" ,texlive-texmf-src)
71 ("fontconfig" ,fontconfig)
72 ("freetype" ,freetype)
73 ("icu4c" ,icu4c)
74 ("ghostscript" ,ghostscript)
75 ("libpng" ,libpng)
76 ("perl" ,perl)
77 ("poppler" ,poppler)
78 ("pkg-config" ,pkg-config)
79 ;; FIXME: Add interpreters csh, fontforge and ruby,
80 ;; once they are available.
81 ("python" ,python)
82 ("teckit" ,teckit)
83 ("t1lib" ,t1lib)
84 ("zlib" ,zlib)
85 ("zziplib" ,zziplib)))
86 (outputs '("out" "data"))
87 (arguments
88 `(#:out-of-source? #t
89 #:configure-flags
90 `("--disable-native-texlive-build"
91 ;; Although the texmf and texmf-dist data is taken from
92 ;; texlive-texmf, setting datarootdir is still useful:
93 ;; "make install" creates symbolic links to scripts in this place.
94 ,(string-append "--datarootdir=" (assoc-ref %outputs "data"))
95 ,(string-append "--infodir=" (assoc-ref %outputs "out") "/share/info")
96 ,(string-append "--mandir=" (assoc-ref %outputs "out") "/share/man")
97 "--without-x" ; FIXME: Drop as soon as X is available.
98 "--with-system-freetype2"
99 ;; "--with-system-gd"
100 ;; "--with-system-graphite"
101 "--with-system-icu"
102 "--with-system-libgs"
103 "--with-system-libpng"
104 "--with-system-poppler"
105 "--with-system-t1lib"
106 "--with-system-teckit"
107 "--with-system-xpdf"
108 "--with-system-zlib"
109 "--with-system-zziplib")
110 #:phases
111 (alist-replace
112 'configure
113 (lambda* (#:key outputs #:allow-other-keys #:rest args)
114 (let ((configure (assoc-ref %standard-phases 'configure)))
115 (substitute* "utils/psutils/Makefile.in"
116 (("/usr/bin/env perl") (which "perl")))
117 (apply configure args)))
118 (alist-cons-after
119 'install 'postinst
120 (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
121 (let ((texlive-extra (assoc-ref inputs "texlive-extra-src"))
122 (texlive-texmf (assoc-ref inputs "texlive-texmf-src"))
123 (out (assoc-ref outputs "out"))
124 (data (assoc-ref outputs "data"))
125 (unpack (assoc-ref %standard-phases 'unpack))
126 (patch-source-shebangs
127 (assoc-ref %standard-phases 'patch-source-shebangs)))
128 ;; Create symbolic links for the latex variants and their
129 ;; man pages.
130 (with-directory-excursion (string-append out "/bin/")
131 (for-each symlink
132 '("pdftex" "pdftex" "xetex" "luatex")
133 '("latex" "pdflatex" "xelatex" "lualatex")))
134 (with-directory-excursion (string-append out "/share/man/man1/")
135 (symlink "luatex.1" "lualatex.1"))
136 ;; Delete texmf and texmf-dist from "data", since they
137 ;; will be reinstalled from texlive-texmf.
138 (system* "rm" "-r" (string-append data "/texmf"))
139 (system* "rm" "-r" (string-append data "/texmf-dist"))
140 ;; Unpack texlive-extra and install tlpkg.
141 (mkdir "texlive-extra")
142 (with-directory-excursion "texlive-extra"
143 (apply unpack (list #:source texlive-extra))
144 (apply patch-source-shebangs (list #:source texlive-extra))
145 (system* "mv" "tlpkg" data)
146 (chdir ".."))
147 ;; Unpack and install texlive-texmf.
148 (mkdir "texlive-texmf")
149 (with-directory-excursion "texlive-texmf"
150 (apply unpack (list #:source texlive-texmf))
151 (apply patch-source-shebangs (list #:source texlive-texmf))
152 ;; Register "data" for kpathsea in texmf.cnf.
153 (substitute* "texmf/web2c/texmf.cnf"
154 (("TEXMFROOT = \\$SELFAUTOPARENT")
155 (string-append "TEXMFROOT = " data)))
156 (system* "mv" "texmf" data)
157 (system* "mv" "texmf-dist" data)
158 (chdir ".."))
159 ;; texmf.cnf must also be placed in "out", since kpsewhich does
160 ;; not know about "data" until it has found this file.
161 (mkdir (string-append out "/share/texmf"))
162 (mkdir (string-append out "/share/texmf/web2c"))
163 (copy-file (string-append data "/texmf/web2c/texmf.cnf")
164 (string-append out "/share/texmf/web2c/texmf.cnf"))))
165 (alist-cons-after 'patch-shebangs 'texconfig
166 (lambda* (#:key outputs #:allow-other-keys)
167 (let ((out (assoc-ref outputs "out")))
168 ;; Configure the texlive system; inspired from
169 ;; http://slackbuilds.org/repository/13.37/office/texlive/
170 (setenv "PATH" (string-append (getenv "PATH") ":" out "/bin"))
171 (system* "updmap-sys" "--nohash" "--syncwithtrees")
172 (system* "mktexlsr")
173 (system* "fmtutil-sys" "--all")))
174 %standard-phases)))))
175 (synopsis "Tex Live, a package of the TeX typesetting system")
176 (description
177 "TeX Live provides a comprehensive TeX document production system.
178It includes all the major TeX-related programs, macro packages, and fonts
179that are free software, including support for many languages around the
180world.")
181 (license (license:fsf-free "http://tug.org/texlive/copying.html"))
182 (home-page "http://www.tug.org/texlive/")))