Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/doc/guide doc/guide: generate pkgsrc.pdf directly



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c92bf05c8189
branches:  trunk
changeset: 434732:c92bf05c8189
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun Jun 21 04:45:36 2020 +0000

description:
doc/guide: generate pkgsrc.pdf directly

The generated PDF file takes only 700 kB disk space instead of the
previous 1700 kB.

diffstat:

 doc/guide/Makefile                           |   4 ++--
 doc/guide/Makefile.common                    |   8 ++++++--
 doc/guide/distinfo                           |   4 +++-
 doc/guide/patches/patch-doc_docbook_dsssl_mk |  28 ++++++++++++++++++++++++++++
 doc/guide/patches/patch-doc_docbook_mk       |  15 +++++++++++++++
 5 files changed, 54 insertions(+), 5 deletions(-)

diffs (111 lines):

diff -r 7542e503b97f -r c92bf05c8189 doc/guide/Makefile
--- a/doc/guide/Makefile        Sun Jun 21 04:32:36 2020 +0000
+++ b/doc/guide/Makefile        Sun Jun 21 04:45:36 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.63 2020/06/20 14:55:06 rillig Exp $
+# $NetBSD: Makefile,v 1.64 2020/06/21 04:45:36 rillig Exp $
 
 DISTNAME=              pkgsrc-guide-${PKGVERSION}
 CATEGORIES=            # empty
@@ -26,7 +26,7 @@
 HTDOCSDIR?=            ${.CURDIR}/../../../htdocs
 
 BUILD_DEFS+=           OUTPUTS
-OUTPUTS?=              lint html html-split ascii pdf
+OUTPUTS?=              lint html html-split ascii ps pdf
 
 INSTALLATION_DIRS=     ${DOCDIR}
 
diff -r 7542e503b97f -r c92bf05c8189 doc/guide/Makefile.common
--- a/doc/guide/Makefile.common Sun Jun 21 04:32:36 2020 +0000
+++ b/doc/guide/Makefile.common Sun Jun 21 04:45:36 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.9 2020/01/04 12:14:22 ryoon Exp $
+# $NetBSD: Makefile.common,v 1.10 2020/06/21 04:45:36 rillig Exp $
 #
 # This is included by doc/guide and meta-pkgs/pkgsrc-guide-tools.
 #
@@ -10,7 +10,7 @@
 # used by meta-pkgs/pkgsrc-guide-tools/Makefile
 
 _GUIDE_DEPTYPE?=       build
-_GUIDE_OUTPUTS?=       lint html html-split ascii pdf
+_GUIDE_OUTPUTS?=       lint html html-split ascii ps pdf
 
 # html output
 _GUIDE_DEPENDS+=       docbook>=4.5:../../textproc/docbook
@@ -48,6 +48,10 @@
 .  endif
 .endif
 
+.if ${_GUIDE_OUTPUTS:Mpdf}
+_GUIDE_DEPENDS+=       tex-epstopdf-pkg>=2.11:../../print/tex-epstopdf-pkg
+.endif
+
 .if ${_GUIDE_DEPTYPE} == "run"
 DEPENDS+=              ${_GUIDE_DEPENDS}
 .else
diff -r 7542e503b97f -r c92bf05c8189 doc/guide/distinfo
--- a/doc/guide/distinfo        Sun Jun 21 04:32:36 2020 +0000
+++ b/doc/guide/distinfo        Sun Jun 21 04:45:36 2020 +0000
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.26 2020/04/02 20:39:10 leot Exp $
+$NetBSD: distinfo,v 1.27 2020/06/21 04:45:36 rillig Exp $
 
 SHA1 (pkgsrc-guide/htdocs-share-20200402.tar.gz) = 76c9b35da01fa0813ada265a6f952f7a7b7b8b13
 RMD160 (pkgsrc-guide/htdocs-share-20200402.tar.gz) = 56cc703b3e611047c0d9e5d43dcc08cf17bec2dc
 SHA512 (pkgsrc-guide/htdocs-share-20200402.tar.gz) = f1a72fe1d5576c7811dfd21173bb1fca9363af1993e7debaed67ba62b50d86f093f11360a7901918e7b3f8c92e59a14ebd082476844a76713c07d4b52859bebd
 Size (pkgsrc-guide/htdocs-share-20200402.tar.gz) = 107075 bytes
+SHA1 (patch-doc_docbook_dsssl_mk) = bacba56dd8bb0ecc7f3c76a09403e61db7dc5446
+SHA1 (patch-doc_docbook_mk) = 9486eb302cb4bdfcbd30d7231dac896da0807bd1
diff -r 7542e503b97f -r c92bf05c8189 doc/guide/patches/patch-doc_docbook_dsssl_mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/guide/patches/patch-doc_docbook_dsssl_mk      Sun Jun 21 04:45:36 2020 +0000
@@ -0,0 +1,28 @@
+$NetBSD: patch-doc_docbook_dsssl_mk,v 1.1 2020/06/21 04:45:37 rillig Exp $
+
+Generate PDF directly, without an intermediate PostScript file.
+
+--- ../htdocs/share/mk/doc.docbook.dsssl.mk.orig       2005-10-13 09:24:33.000000000 +0000
++++ ../htdocs/share/mk/doc.docbook.dsssl.mk
+@@ -7,6 +7,7 @@
+ JADE?=                env ${JADE_ENV} ${JADE_BIN} 
+ JADETEX_BIN?= jadetex
+ JADETEX?=     ${JADETEX_BIN}
++PDFJADETEX?=  ${PREFIX}/bin/pdfjadetex
+ JADE_ENV?=    SP_ENCODING=${SP_ENCODING} \
+               SGML_CATALOG_FILES= 
+ 
+@@ -113,8 +114,11 @@
+       ${DVIPS} -f $*.dvi > $@
+       rm -f *.log *.aux
+ 
+-.ps.pdf:
+-      $(PS2PDF) $<
++.tex.pdf:
++      -${PDFJADETEX} $*.tex
++      -${PDFJADETEX} $*.tex
++      -${PDFJADETEX} $*.tex
++      rm -f *.log *.aux
+ 
+ # w3m doesn't render &#8220 or &#8221 properly, so just replace them
+ # with normal double quotes.
diff -r 7542e503b97f -r c92bf05c8189 doc/guide/patches/patch-doc_docbook_mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/guide/patches/patch-doc_docbook_mk    Sun Jun 21 04:45:36 2020 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-doc_docbook_mk,v 1.1 2020/06/21 04:45:37 rillig Exp $
+
+Generate PDF directly instead of via PostScript.
+
+--- ../htdocs/share/mk/doc.docbook.mk.orig     2020-01-06 21:20:54.000000000 +0000
++++ ../htdocs/share/mk/doc.docbook.mk  2020-06-21 04:26:47.777577392 +0000
+@@ -146,7 +146,7 @@
+ 
+ .MAIN: all
+ 
+-all pdf html html-split ascii epub: build
++all ps pdf html html-split ascii epub: build
+ 
+ .if make(html)
+ FORMATS?=     html



Home | Main Index | Thread Index | Old Index