From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: Re: [PATCH] gnu: unison: Add "doc" output. Date: Sun, 17 Jan 2016 00:28:39 -0600 Message-ID: <20160117002839.5e2e00bd@openmailbox.org> References: <20151218194215.50af651c@openmailbox.org> <8737uwu5xg.fsf@gnu.org> <20151220220138.1346f5b5@PocketWee> <8760zsozld.fsf@gnu.org> <20160108011341.263e863a@openmailbox.org> <87oacwl6fd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKgpv-0004AM-L6 for guix-devel@gnu.org; Sun, 17 Jan 2016 01:29:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aKgpr-0007V0-DT for guix-devel@gnu.org; Sun, 17 Jan 2016 01:29:15 -0500 Received: from smtp22.openmailbox.org ([62.4.1.56]:53102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aKgpq-0007Ub-4I for guix-devel@gnu.org; Sun, 17 Jan 2016 01:29:11 -0500 In-Reply-To: <87oacwl6fd.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?UTF-8?B?Q291cnTDqHM=?= Cc: guix-devel@gnu.org On Fri, 08 Jan 2016 11:19:34 +0100 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > Eric Bavier skribis: >=20 > > From c8a0086db4d78091e06326a5ffe55a7bf2543091 Mon Sep 17 00:00:00 2001 > > From: Eric Bavier > > Date: Fri, 18 Dec 2015 19:29:22 -0600 > > Subject: [PATCH] gnu: unison: Add "doc" output. > > > > * gnu/packages/ocaml.scm (unison)[source]: Use svn-fetch with snippet. > > [outputs]: New field. > > [native-inputs]: Add ghostscript, texlive, hevea, and lynx. > > [arguments]: Add 'install-doc phase. =20 >=20 > [...] >=20 > > + (snippet > > + `(begin > > + ;; The svn revision in the release tarball appears to be > > + ;; artificially manipulated in order to set the desired po= int > > + ;; version number. Because the point version is calculate= d during > > + ;; the build, we can offset pointVersionOrigin by the desi= red > > + ;; point version and write that into "Rev: %d". We do thi= s rather > > + ;; than hardcoding the necessary revision number, for > > + ;; maintainability. =20 >=20 > Fun. :-) >=20 > > + (with-atomic-file-replacement "src/mkProjectInfo.ml" > > + (lambda (in out) > > + (let ((pt-ver (string->number (third (string-split ,ve= rsion #\.)))) > > + (pt-rx (make-regexp "^let pointVersionOrigin = =3D ([0-9]+)")) > > + (rev-rx (make-regexp "Rev: [0-9]+"))) > > + (let loop ((pt-origin #f)) > > + (let ((line (read-line in 'concat))) > > + (cond > > + ((regexp-exec pt-rx line) > > + =3D> (lambda (m) > > + (begin =20 >=20 > =E2=80=98begin=E2=80=99 can be omitted here=E2=80=A6 >=20 > > + ((regexp-exec rev-rx line) > > + =3D> (lambda (m) > > + (begin =20 >=20 > =E2=80=A6 and here. >=20 > > + (for-each (lambda (f) > > + (install-file f doc)) > > + (map (lambda (ext) > > + (string-append > > + "doc/unison-manual." ext)) > > + '("ps" "pdf" "dvi" "html"))) =20 >=20 > What about installing only HTML? >=20 > I find that HTML (and Info, and man) is more convenient to read on-line > than PDFs. We rarely include PDF documentation in packages. I sometimes find PDF documentation more visually appealing, but only if they having functioning hyperlinks. Which unison's pdf docs lack, so yes, I think we can install just the HTML. > Of course, avoiding PDF/PS/DVI allows us to remove the dependency on > TeX=C2=A0Live. Last, from discussions I heard at the Reproducible Build > Summit, I think DVIs and maybe PS/PDFs are not bit-reproducible > out-of-the-box. However, it appears the unison-manual.tex needs to be run through LaTeX at least once in order to get a TOC for hevea to include in the html output. So it seems we can't remove TeX Live. Sigh... =20 > WDYT? I don't want to spend much more time on this, so I think I'll push a slight modification of this patch that just doesn't install the pdf, ps, and dvi output for the sake a reproducibility. > Maybe we should have a policy on how to choose the installed > documentation formats. Info > HTML > man > txt > PDF > PS ? > Thanks for finding out how to build documentation from source! No problem; kinda fun. :) `~Eric