From c5d837684359e3629c4ac96297a25d1165edcb39 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Fri, 25 Jul 2014 16:37:44 -0500 Subject: 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/packages/texinfo.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'gnu/packages/texinfo.scm') diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index 0f21ec3211..9388979a69 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 +;;; Copyright © 2014 Eric Bavier ;;; ;;; 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+))) -- cgit 1.4.1 From d759cf6774efd4f321efe78f0bfcfeaa33f30e79 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 12 Aug 2014 15:44:40 +0200 Subject: gnu: texi2html: Remove dependency on Gettext. Partly fixes . * gnu/packages/texinfo.scm (texi2html)[source]: Add 'snippet' field. --- gnu/packages/texinfo.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gnu/packages/texinfo.scm') diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index 9388979a69..c199fd66a7 100644 --- a/gnu/packages/texinfo.scm +++ b/gnu/packages/texinfo.scm @@ -24,7 +24,6 @@ #: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)) @@ -79,9 +78,15 @@ is on expressing the content semantically, avoiding physical markup commands.") (sha256 (base32 "1yprv64vrlcbksqv25asplnjg07mbq38lfclp1m5lj8cw878pag8")) - (patches (list (search-patch "texi2html-document-encoding.patch"))))) + (patches + (list (search-patch "texi2html-document-encoding.patch"))) + (snippet + ;; This file is modified by the patch above, but reset its + ;; timestamp so we don't trigger the rule to update PO files, + ;; which would require Gettext. + ;; See . + '(utime "texi2html.pl" 0 0 0 0)))) (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") -- cgit 1.4.1 From ffbf749e6a7ec48001bd4fefb0f6df193b6de7ab Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Sat, 16 Aug 2014 00:56:42 -0500 Subject: gnu: texi2html: Fix tests in the absense of gettext. * gnu/packages/patches/texi2html-i18n.patch: New patch. * gnu/packages/texinfo.scm (texi2html)[source]: Use it. * gnu-system.am (dist_patch_DATA): Add it. --- gnu-system.am | 1 + gnu/packages/patches/texi2html-i18n.patch | 50 +++++++++++++++++++++++++++++++ gnu/packages/texinfo.scm | 3 +- 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/texi2html-i18n.patch (limited to 'gnu/packages/texinfo.scm') diff --git a/gnu-system.am b/gnu-system.am index 66a1677c7e..f29f3f61ef 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -378,6 +378,7 @@ dist_patch_DATA = \ gnu/packages/patches/tcsh-fix-autotest.patch \ gnu/packages/patches/teckit-cstdio.patch \ gnu/packages/patches/texi2html-document-encoding.patch \ + gnu/packages/patches/texi2html-i18n.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-i18n.patch b/gnu/packages/patches/texi2html-i18n.patch new file mode 100644 index 0000000000..eba903d068 --- /dev/null +++ b/gnu/packages/patches/texi2html-i18n.patch @@ -0,0 +1,50 @@ +Do not try to regenerate po files; use the reference files that are packaged +in the tarball. + +--- a/Makefile.in 2010-06-30 17:02:28.000000000 -0500 ++++ b/Makefile.in 2014-08-16 00:22:38.447050269 -0500 +@@ -1022,15 +1022,7 @@ + + i18n/en.thl i18n/: $(po_document_dir)/po_document/$(PACKAGE)_document.pot + $(MKDIR_P) i18n +- if test '$(USE_NLS)' = 'yes'; then \ +- for file in "$(srcdir)/$(po_document_dir)/po_document/"*".po"; do lang=`basename "$$file" .po | sed 's/\..*//'`; \ +- test "$$lang" = 'en' && continue; \ +- msgexec -i "$$file" "$(srcdir)/gettext_to_separated.pl" | "$(srcdir)/separated_to_hash.pl" $$lang > i18n/$$lang.thl; \ +- done; \ +- msgexec -i $< "$(srcdir)/gettext_to_separated.pl" | "$(srcdir)/separated_to_hash.pl" en > i18n/en.thl; \ +- else \ +- cp -p i18n_ref/*.thl i18n; \ +- fi ++ cp -p i18n_ref/*.thl i18n + + i18n_ref: + $(MKDIR_P) i18n_ref + +Have install-sh install .mo files locally for in-source tests, so that msgfmt +is not needed. + +--- a/Makefile.in 2010-06-30 17:02:28.000000000 -0500 ++++ b/Makefile.in 2014-08-16 00:22:38.447050269 -0500 +@@ -1052,19 +1044,8 @@ + # update the po files, and install locally the .mo files for the in + # source tests + check-local: makeinfo.pl texi2any.pl +- if test '$(USE_NLS)' = 'yes'; then \ +- cd $(po_document_dir)/po_document && $(MAKE) $(AM_MAKEFLAGS) update-po; \ +- fi +- rm -rf locales +- for file in "$(srcdir)/$(po_document_dir)/po_document/"*.po; do \ +- basename=`basename "$$file" .po` ; \ +- $(MKDIR_P) "locales/$$basename/LC_MESSAGES/" ; \ +- if test '$(USE_NLS)' = 'yes'; then \ +- $(MSGFMT) "$$file" -o "locales/$$basename/LC_MESSAGES/texi2html_document.mo" ; \ +- else \ +- cp -p "$(srcdir)/$(po_document_dir)/po_document/$$basename.mo" "locales/$$basename/LC_MESSAGES/texi2html_document.mo" ; \ +- fi; \ +- done ++ $(MAKE) -C po_document localedir="$(abs_srcdir)/locales" install-data ++ $(MAKE) -C po_messages localedir="$(abs_srcdir)/locales" install-data + + makeinfo.pl texi2any.pl: + -$(LN_S) $(srcdir)/texi2html.pl $@ diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index c199fd66a7..0cce38bf8d 100644 --- a/gnu/packages/texinfo.scm +++ b/gnu/packages/texinfo.scm @@ -79,7 +79,8 @@ is on expressing the content semantically, avoiding physical markup commands.") (base32 "1yprv64vrlcbksqv25asplnjg07mbq38lfclp1m5lj8cw878pag8")) (patches - (list (search-patch "texi2html-document-encoding.patch"))) + (list (search-patch "texi2html-document-encoding.patch") + (search-patch "texi2html-i18n.patch"))) (snippet ;; This file is modified by the patch above, but reset its ;; timestamp so we don't trigger the rule to update PO files, -- cgit 1.4.1