all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add texi2html.
@ 2014-07-26  5:52 Eric Bavier
  2014-07-26 21:02 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Bavier @ 2014-07-26  5:52 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: 0001-gnu-Add-texi2html.patch --]
[-- Type: text/x-diff, Size: 5010 bytes --]

From e2a9c7cd9015e0ff09b5b3918797b3a64394fea2 Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Fri, 25 Jul 2014 16:37:44 -0500
Subject: [PATCH] gnu: Add texi2html.

* gnu/packages/texinfo.scm (texi2html): New variable.
* gnu/packages/patches/texi2html-document-encoding.patch: New patch.
* gnu-system.am (dist_patch_DATA): Add it.
---
 gnu-system.am                                      |    1 +
 .../patches/texi2html-document-encoding.patch      |   31 +++++++++++++++++
 gnu/packages/texinfo.scm                           |   35 ++++++++++++++++++++
 3 files changed, 67 insertions(+)
 create mode 100644 gnu/packages/patches/texi2html-document-encoding.patch

diff --git a/gnu-system.am b/gnu-system.am
index 0423d14..32d0c53 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -371,6 +371,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/superlu-dist-scotchmetis.patch		\
   gnu/packages/patches/tcsh-fix-autotest.patch			\
   gnu/packages/patches/teckit-cstdio.patch			\
+  gnu/packages/patches/texi2html-document-encoding.patch	\
   gnu/packages/patches/udev-gir-libtool.patch			\
   gnu/packages/patches/util-linux-perl.patch			\
   gnu/packages/patches/valgrind-glibc.patch			\
diff --git a/gnu/packages/patches/texi2html-document-encoding.patch b/gnu/packages/patches/texi2html-document-encoding.patch
new file mode 100644
index 0000000..1469b67
--- /dev/null
+++ b/gnu/packages/patches/texi2html-document-encoding.patch
@@ -0,0 +1,31 @@
+Patch derived from discussion at https://savannah.nongnu.org/bugs/?37503
+
+--- texi2html-5.0/texi2html.pl	2010-06-30 17:01:27.000000000 -0500
++++ texi2html-5.0/texi2html.pl	2014-07-09 01:17:57.062990582 -0500
+@@ -2589,7 +2589,12 @@
+     my $state = shift;
+ 
+     # FIXME this should be done only once, for @documentencoding
+-    my $encoding = lc(Texi2HTML::Config::get_conf('DOCUMENT_ENCODING'));
++    my $encoding;
++    my $input_encoding = Texi2HTML::Config::get_conf('documentencoding');
++    if (defined($input_encoding))
++    {
++      $encoding = lc($input_encoding);
++    }
+     if (defined($encoding) and $encoding ne '' and exists($Texi2HTML::Config::t2h_encoding_aliases{$encoding}))
+     {
+        $encoding = $Texi2HTML::Config::t2h_encoding_aliases{$encoding};
+
+Fix failures in test/encodings.
+
+--- texi2html-5.0/texi2html.pl	2014-07-09 01:22:06.000000000 -0500
++++ texi2html-5.0/texi2html.pl	2014-07-10 23:23:47.182097602 -0500
+@@ -53,6 +53,7 @@
+ # for translations
+ #use encoding 'utf8';
+ #use utf8;
++binmode STDERR, ':encoding(utf8)';
+ 
+ #
+ # According to
diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm
index 0f21ec3..9388979 100644
--- a/gnu/packages/texinfo.scm
+++ b/gnu/packages/texinfo.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,7 +22,9 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (gnu packages)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages ncurses))
 
@@ -64,3 +67,35 @@ is on expressing the content semantically, avoiding physical markup commands.")
                (base32
                 "1rf9ckpqwixj65bw469i634897xwlgkm5i9g2hv3avl6mv7b0a3d"))))
     (inputs `(("ncurses" ,ncurses) ("xz" ,xz)))))
+
+(define-public texi2html
+  (package
+    (name "texi2html")
+    (version "5.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://savannah/" name "/" name "-"
+                                  version ".tar.bz2"))
+              (sha256
+               (base32
+                "1yprv64vrlcbksqv25asplnjg07mbq38lfclp1m5lj8cw878pag8"))
+              (patches (list (search-patch "texi2html-document-encoding.patch")))))
+    (build-system gnu-build-system)
+    (native-inputs `(("gettext" ,gnu-gettext)))
+    (inputs `(("perl" ,perl)))
+    (home-page "http://www.nongnu.org/texi2html/")
+    (synopsis "Convert Texinfo to HTML")
+    (description
+     "Texi2HTML is a Perl script which converts Texinfo source files to HTML
+output.  It now supports many advanced features, such as internationalization
+and extremely configurable output formats.
+
+Development of Texi2HTML moved to the GNU Texinfo repository in 2010, since it
+was meant to replace the makeinfo implementation in GNU Texinfo.  The route
+forward for authors is, in most cases, to alter manuals and build processes as
+necessary to use the new features of the makeinfo/texi2any implementation of
+GNU Texinfo.  The Texi2HTML maintainers (one of whom is the principal author
+of the GNU Texinfo implementation) do not intend to make further releases of
+Texi2HTML.")
+    ;; Files in /lib under lgpl2.1+ and x11
+    (license gpl2+)))
-- 
1.7.9.5


[-- Attachment #2: Type: text/plain, Size: 17 bytes --]


-- 
Eric Bavier

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gnu: Add texi2html.
  2014-07-26  5:52 [PATCH] gnu: Add texi2html Eric Bavier
@ 2014-07-26 21:02 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2014-07-26 21:02 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

Eric Bavier <ericbavier@gmail.com> skribis:

> From e2a9c7cd9015e0ff09b5b3918797b3a64394fea2 Mon Sep 17 00:00:00 2001
> From: Eric Bavier <bavier@member.fsf.org>
> Date: Fri, 25 Jul 2014 16:37:44 -0500
> Subject: [PATCH] gnu: Add texi2html.
>
> * gnu/packages/texinfo.scm (texi2html): New variable.
> * gnu/packages/patches/texi2html-document-encoding.patch: New patch.
> * gnu-system.am (dist_patch_DATA): Add it.

LGTM.

Does it provide any features, or does it have any uses not covered by
Texinfo 5.x?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-26 21:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-26  5:52 [PATCH] gnu: Add texi2html Eric Bavier
2014-07-26 21:02 ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.