| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 |
|
| 29 | (define-module (gnu packages texinfo)
|
| 30 | #:use-module (gnu packages autotools)
|
| 31 | #:use-module (guix gexp)
|
| 32 | #:use-module (guix licenses)
|
| 33 | #:use-module (guix packages)
|
| 34 | #:use-module (guix utils)
|
| 35 | #:use-module (guix download)
|
| 36 | #:use-module (guix utils)
|
| 37 | #:use-module (guix git-download)
|
| 38 | #:use-module (guix build-system gnu)
|
| 39 | #:use-module (gnu packages)
|
| 40 | #:use-module (gnu packages autotools)
|
| 41 | #:use-module (gnu packages bash)
|
| 42 | #:use-module (gnu packages base)
|
| 43 | #:use-module (gnu packages compression)
|
| 44 | #:use-module (gnu packages gawk)
|
| 45 | #:use-module (gnu packages gettext)
|
| 46 | #:use-module (gnu packages gperf)
|
| 47 | #:use-module (gnu packages man)
|
| 48 | #:use-module (gnu packages ncurses)
|
| 49 | #:use-module (gnu packages perl)
|
| 50 | #:use-module (gnu packages perl-compression)
|
| 51 | #:use-module (gnu packages readline))
|
| 52 |
|
| 53 | (define-public texinfo
|
| 54 | (package
|
| 55 | (name "texinfo")
|
| 56 | (version "6.8")
|
| 57 | (source (origin
|
| 58 | (method url-fetch)
|
| 59 | (uri (string-append "mirror://gnu/texinfo/texinfo-"
|
| 60 | version ".tar.xz"))
|
| 61 | (patches (search-patches "texinfo-headings-single.patch"))
|
| 62 | (sha256
|
| 63 | (base32
|
| 64 | "1i7yb7mrp3inz25zbzv2pllr4y7d58v818f1as7iz8mw53nm7dwf"))))
|
| 65 | (build-system gnu-build-system)
|
| 66 | (arguments
|
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | `(#:phases
|
| 73 | (if ,(%current-target-system)
|
| 74 | (modify-phases %standard-phases
|
| 75 | (add-before 'configure 'fix-cross-configure
|
| 76 | (lambda _
|
| 77 | (substitute* "configure"
|
| 78 | (("env -i")
|
| 79 | "env "))
|
| 80 | #t)))
|
| 81 | %standard-phases)
|
| 82 |
|
| 83 | ,@(if (%current-target-system)
|
| 84 | (list #:configure-flags #~'("texinfo_cv_sys_iconv_converts_euc_cn=yes"))
|
| 85 | '())
|
| 86 |
|
| 87 | |
| 88 | #:tests? ,(and (not (target-hurd?))
|
| 89 | (not (%current-target-system)))))
|
| 90 | (inputs (list ncurses perl))
|
| 91 |
|
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | (native-inputs (list perl ncurses (libc-utf8-locales-for-target)))
|
| 97 |
|
| 98 | (native-search-paths
|
| 99 | |
| 100 | (list (search-path-specification
|
| 101 | (variable "INFOPATH")
|
| 102 | (files '("share/info")))))
|
| 103 |
|
| 104 | (home-page "https://www.gnu.org/software/texinfo/")
|
| 105 | (synopsis "The GNU documentation format")
|
| 106 | (description
|
| 107 | "Texinfo is the official documentation format of the GNU project. It
|
| 108 | uses a single source file using explicit commands to produce a final document
|
| 109 | in any of several supported output formats, such as HTML or PDF. This
|
| 110 | package includes both the tools necessary to produce Info documents from
|
| 111 | their source and the command-line Info reader. The emphasis of the language
|
| 112 | is on expressing the content semantically, avoiding physical markup commands.")
|
| 113 | (license gpl3+)))
|
| 114 |
|
| 115 | (define-public texinfo-7
|
| 116 | (package
|
| 117 | (inherit texinfo)
|
| 118 | (version "7.3")
|
| 119 | (source (origin
|
| 120 | (method git-fetch)
|
| 121 | (uri (git-reference
|
| 122 | (url "https://git.savannah.gnu.org/git/texinfo.git")
|
| 123 | (commit (string-append "texinfo-" version))))
|
| 124 | (file-name (git-file-name "texinfo" version))
|
| 125 | (sha256
|
| 126 | (base32
|
| 127 | "1ln3rr34b9k9m8mhg01ygifj945610cn5qk11mfvgzpavyy5rghg"))))
|
| 128 | (native-inputs (list autoconf
|
| 129 | automake
|
| 130 | bash-minimal
|
| 131 | coreutils-minimal
|
| 132 | gawk
|
| 133 | gettext-minimal
|
| 134 | gperf
|
| 135 | help2man
|
| 136 | (libc-utf8-locales-for-target)
|
| 137 | libtool
|
| 138 | ncurses
|
| 139 | perl
|
| 140 | perl-text-unidecode
|
| 141 | perl-unicode-eastasianwidth))
|
| 142 | (inputs (modify-inputs inputs
|
| 143 | (append perl-archive-zip |
| 144 | perl-unicode-eastasianwidth perl-text-unidecode
|
| 145 | perl-libintl-perl)))
|
| 146 | (arguments
|
| 147 | (substitute-keyword-arguments arguments
|
| 148 | ((#:modules modules `((guix build utils)
|
| 149 | (guix build gnu-build-system)))
|
| 150 | `((srfi srfi-26)
|
| 151 | ,@modules))
|
| 152 | ((#:configure-flags flags
|
| 153 | ''())
|
| 154 | #~(cons* "--with-external-Unicode-EastAsianWidth"
|
| 155 | "--with-external-Text-Unidecode"
|
| 156 | "--with-external-libintl-perl"
|
| 157 | #$@(if (%current-target-system)
|
| 158 | |
| 159 | '("--disable-perl-xs")
|
| 160 | '())
|
| 161 | #$flags))
|
| 162 | ((#:phases phases #~%standard-phases)
|
| 163 | #~(modify-phases #$phases
|
| 164 | (add-after 'unpack 'patch-bootstrap-shebangs
|
| 165 | (lambda* (#:key native-inputs inputs #:allow-other-keys)
|
| 166 | (let ((sh (search-input-file (or native-inputs inputs)
|
| 167 | "/bin/sh"))
|
| 168 | (perl (search-input-file (or native-inputs inputs)
|
| 169 | "/bin/perl")))
|
| 170 | (for-each
|
| 171 | (cute patch-shebang <> (list (dirname sh)))
|
| 172 | (find-files "." ".*[.]sh"))
|
| 173 | (for-each
|
| 174 | (cute patch-shebang <> (list (dirname perl)))
|
| 175 | (find-files "." ".*[.]pl")))))
|
| 176 | #$@(if (%current-target-system)
|
| 177 | |
| 178 | #~((add-after 'configure 'fixup-texindex-building-from-git
|
| 179 | (lambda _
|
| 180 | (symlink "../../texindex/texindex"
|
| 181 | "tools/texindex/texindex"))))
|
| 182 | #~())
|
| 183 | (add-after 'configure 'patch-jrtangle
|
| 184 | (lambda* (#:key native-inputs inputs #:allow-other-keys)
|
| 185 | (let ((mv (search-input-file (or native-inputs inputs)
|
| 186 | "/bin/mv")))
|
| 187 | (substitute* "texindex/jrtangle"
|
| 188 | (("mv") mv)))))
|
| 189 | (add-after 'install 'wrap-program
|
| 190 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 191 | (let* ((out (assoc-ref outputs "out"))
|
| 192 | (bin (string-append out "/bin"))
|
| 193 | (program (string-append bin "/texi2any"))
|
| 194 | (zip (car (find-files
|
| 195 | (assoc-ref inputs "perl-archive-zip")
|
| 196 | (lambda (file stat)
|
| 197 | (and (eq? 'directory (stat:type stat))
|
| 198 | (string=? (basename file)
|
| 199 | "Archive")))
|
| 200 | #:directories? #t)))
|
| 201 | (mods (map (lambda (mod)
|
| 202 | (string-append (assoc-ref inputs mod)
|
| 203 | "/lib/perl5/site_perl"))
|
| 204 | '("perl-unicode-eastasianwidth"
|
| 205 | "perl-text-unidecode" "perl-libintl-perl"))))
|
| 206 | (wrap-program program
|
| 207 | `("PERL5LIB" prefix
|
| 208 | ,(cons* (dirname zip) mods))))))))))))
|
| 209 |
|
| 210 | (define-public texinfo-5
|
| 211 | (package (inherit texinfo)
|
| 212 | (version "5.2")
|
| 213 | (source (origin
|
| 214 | (method url-fetch)
|
| 215 | (uri (string-append "mirror://gnu/texinfo/texinfo-"
|
| 216 | version ".tar.xz"))
|
| 217 | (patches (search-patches "texinfo-5-perl-compat.patch"))
|
| 218 | (sha256
|
| 219 | (base32
|
| 220 | "1njfwh2z34r2c4r0iqa7v24wmjzvsfyz4vplzry8ln3479lfywal"))))))
|
| 221 |
|
| 222 | (define-public info-reader
|
| 223 | |
| 224 | |
| 225 | |
| 226 | |
| 227 | (package/inherit texinfo-7
|
| 228 | (name "info-reader")
|
| 229 | (arguments
|
| 230 | (append
|
| 231 | (substitute-keyword-arguments arguments
|
| 232 | ((#:modules modules `((guix build utils)
|
| 233 | (guix build gnu-build-system)))
|
| 234 | `((srfi srfi-1)
|
| 235 | (ice-9 ftw)
|
| 236 | ,@modules))
|
| 237 | ((#:phases phases)
|
| 238 | #~(modify-phases #$phases
|
| 239 | |
| 240 | |
| 241 | |
| 242 | |
| 243 | |
| 244 | |
| 245 | (add-after 'unpack 'absolute-binary-path
|
| 246 | (lambda* (#:key inputs #:allow-other-keys)
|
| 247 | (substitute* "info/filesys.c"
|
| 248 | (("gunzip") (search-input-file inputs "/bin/gunzip"))
|
| 249 | (("gzip") (search-input-file inputs "/bin/gzip")))))
|
| 250 | (add-after 'install 'keep-only-info-reader
|
| 251 | (lambda* (#:key outputs #:allow-other-keys)
|
| 252 | |
| 253 | |
| 254 | (define (files)
|
| 255 | (scandir "." (lambda (file)
|
| 256 | (not (member file '("." ".."))))))
|
| 257 |
|
| 258 | (let ((out (assoc-ref outputs "out")))
|
| 259 | (with-directory-excursion out
|
| 260 | (for-each delete-file-recursively
|
| 261 | (fold delete (files) '("bin" "share"))))
|
| 262 | (with-directory-excursion (string-append out "/bin")
|
| 263 | (for-each delete-file (delete "info" (files))))
|
| 264 | (with-directory-excursion (string-append out "/share")
|
| 265 | (for-each delete-file-recursively
|
| 266 | (fold delete (files)
|
| 267 | '("info" "locale")))))))
|
| 268 | (delete 'wrap-program))))
|
| 269 | (list
|
| 270 | #:disallowed-references (list (this-package-input "perl")))))
|
| 271 | (synopsis "Standalone Info documentation reader")
|
| 272 | (inputs (modify-inputs inputs
|
| 273 | (prepend gzip)))))
|
| 274 |
|
| 275 | (define-public texi2html
|
| 276 | (package
|
| 277 | (name "texi2html")
|
| 278 | (version "5.0")
|
| 279 | (source (origin
|
| 280 | (method url-fetch)
|
| 281 | (uri (string-append "mirror://savannah/" name "/" name "-"
|
| 282 | version ".tar.bz2"))
|
| 283 | (sha256
|
| 284 | (base32
|
| 285 | "1yprv64vrlcbksqv25asplnjg07mbq38lfclp1m5lj8cw878pag8"))
|
| 286 | (patches
|
| 287 | (search-patches "texi2html-document-encoding.patch"
|
| 288 | "texi2html-i18n.patch"))
|
| 289 | (snippet
|
| 290 | |
| 291 | |
| 292 | |
| 293 | |
| 294 | '(begin
|
| 295 | (utime "texi2html.pl" 0 0 0 0)
|
| 296 | #t))))
|
| 297 | (build-system gnu-build-system)
|
| 298 | (inputs (list perl))
|
| 299 | (arguments
|
| 300 | |
| 301 | |
| 302 | |
| 303 | '(#:tests? #f))
|
| 304 | (home-page "https://www.nongnu.org/texi2html/")
|
| 305 | (synopsis "Convert Texinfo to HTML")
|
| 306 | (description
|
| 307 | "Texi2HTML is a Perl script which converts Texinfo source files to HTML
|
| 308 | output. It now supports many advanced features, such as internationalization
|
| 309 | and extremely configurable output formats.
|
| 310 |
|
| 311 | Development of Texi2HTML moved to the GNU Texinfo repository in 2010, since it
|
| 312 | was meant to replace the makeinfo implementation in GNU Texinfo. The route
|
| 313 | forward for authors is, in most cases, to alter manuals and build processes as
|
| 314 | necessary to use the new features of the makeinfo/texi2any implementation of
|
| 315 | GNU Texinfo. The Texi2HTML maintainers (one of whom is the principal author
|
| 316 | of the GNU Texinfo implementation) do not intend to make further releases of
|
| 317 | Texi2HTML.")
|
| 318 | |
| 319 | (license gpl2+)))
|
| 320 |
|
| 321 | (define-public texi2html-1.82
|
| 322 | (package
|
| 323 | (inherit texi2html)
|
| 324 | (version "1.82")
|
| 325 | (source
|
| 326 | (origin
|
| 327 | (method url-fetch)
|
| 328 | (uri (string-append "mirror://savannah/texi2html/"
|
| 329 | "texi2html-" version ".tar.bz2"))
|
| 330 | (sha256
|
| 331 | (base32 "1wdli2szkgm3l0vx8rf6lylw0b0m47dlz9iy004n928nqkzix76n"))))))
|
| 332 |
|
| 333 | (define-public pinfo
|
| 334 | (let ((commit "3d76eecde211e41ccc28b04e229f159b3f924399")
|
| 335 | (revision "0"))
|
| 336 | (package
|
| 337 | (name "pinfo")
|
| 338 | |
| 339 | (version (git-version "0.6.13" revision commit))
|
| 340 | (source (origin
|
| 341 | (method git-fetch)
|
| 342 | (uri (git-reference
|
| 343 | (url "https://github.com/baszoetekouw/pinfo")
|
| 344 | (commit commit)))
|
| 345 | (file-name (git-file-name name version))
|
| 346 | (sha256
|
| 347 | (base32 "0qym323d9my5l4bhw9vry453hhlxhjjvy8mcdi38sk0bqqid0vd1"))))
|
| 348 | (build-system gnu-build-system)
|
| 349 | (arguments
|
| 350 | (list #:phases
|
| 351 | #~(modify-phases %standard-phases
|
| 352 | (add-after 'unpack 'embed-reference-to-clear
|
| 353 | (lambda* (#:key inputs #:allow-other-keys)
|
| 354 | (let ((ncurses (assoc-ref inputs "ncurses")))
|
| 355 | (substitute* (list "src/manual.c"
|
| 356 | "src/mainfunction.c"
|
| 357 | "src/utils.c")
|
| 358 | (("\"clear\"")
|
| 359 | (string-append "\"" ncurses "/bin/clear\"")))))))))
|
| 360 | (inputs
|
| 361 | (list ncurses readline))
|
| 362 | (native-inputs
|
| 363 | (list autoconf automake gettext-minimal libtool texinfo))
|
| 364 | (home-page "https://github.com/baszoetekouw/pinfo")
|
| 365 | (synopsis "Lynx-style Info file and man page reader")
|
| 366 | (description
|
| 367 | "Pinfo is an Info file viewer. Pinfo is similar in use to the Lynx web
|
| 368 | browser. You just move across info nodes, and select links, follow them, etc.
|
| 369 | It supports many colors. Pinfo also supports viewing of manual pages -- they
|
| 370 | are colorized like in the midnight commander's viewer, and additionally they
|
| 371 | are hypertextualized.")
|
| 372 | (license gpl2+))))
|