Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Aug 2004 15:41:54 +0400
From:      Denis Peplin <den@FreeBSD.org>
To:        freebsd-doc@FreeBSD.org
Subject:   [patch] SP_ENCODING support in doc.docbook.mk
Message-ID:  <4110CB82.8000204@FreeBSD.org>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------090103090207050009070703
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hello!

Patch in attacment can fix encoding of printed
formats, at least for KOI8-R (and for encodings,
supported by jade).

Please, review it.

Thanks!

--------------090103090207050009070703
Content-Type: text/plain;
 name="db_j.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="db_j.diff"

Index: share/mk/doc.docbook.mk
===================================================================
RCS file: /home/ncvs/doc/share/mk/doc.docbook.mk,v
retrieving revision 1.108
diff -u -r1.108 doc.docbook.mk
--- share/mk/doc.docbook.mk	14 Jul 2004 05:28:11 -0000	1.108
+++ share/mk/doc.docbook.mk	4 Aug 2004 10:21:48 -0000
@@ -119,6 +119,9 @@
 
 MASTERDOC?=	${.CURDIR}/${DOC}.${DOCBOOKSUFFIX}
 
+# List of supported SP_ENCODINGs
+SP_ENCODING_LIST?=	"KOI8-R"
+
 # Which stylesheet type to use.  'dsssl' or 'xsl'
 STYLESHEET_TYPE?=	dsssl
 
@@ -447,6 +450,18 @@
 
 all: ${_docs}
 
+#
+# SP_ENCODING support
+#
+CUR_ENCODING!= 	${ECHO} ${LANGCODE} | ${SED} 's/^.*\.//'
+.for _sp_encoding in ${SP_ENCODING_LIST}
+.if (${CUR_ENCODING} == ${_sp_encoding})
+JADE_CMD=	env -i SP_ENCODING=${CUR_ENCODING} ${JADE}
+.else
+JADE_CMD=	${JADE}
+.endif
+.endfor
+
 # XML --------------------------------------------------------------------
 
 # sx generates a lot of (spurious) errors of the form "reference to
@@ -465,7 +480,7 @@
 .if ${STYLESHEET_TYPE} == "dsssl"
 index.html HTML.manifest: ${SRCS} ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
 			  ${LOCAL_IMAGES_TXT} ${INDEX_SGML} ${HTML_SPLIT_INDEX} ${LOCAL_CSS_SHEET}
-	${JADE} -V html-manifest ${HTMLOPTS} -ioutput.html.images \
+	${JADE_CMD} -V html-manifest ${HTMLOPTS} -ioutput.html.images \
 		${JADEOPTS} -t sgml ${MASTERDOC}
 .elif ${STYLESHEET_TYPE} == "xsl"
 index.html: ${DOC}.xml ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
@@ -482,7 +497,7 @@
 .if ${STYLESHEET_TYPE} == "dsssl"
 ${DOC}.html: ${SRCS} ${LOCAL_IMAGES_LIB} ${LOCAL_IMAGES_PNG} \
 	     ${LOCAL_IMAGES_TXT} ${INDEX_SGML} ${HTML_INDEX} ${LOCAL_CSS_SHEET}
-	${JADE} -V nochunks ${HTMLOPTS} -ioutput.html.images \
+	${JADE_CMD} -V nochunks ${HTMLOPTS} -ioutput.html.images \
 		${JADEOPTS} -t sgml ${MASTERDOC} > ${.TARGET} || \
 		(${RM} -f ${.TARGET} && false)
 .elif ${STYLESHEET_TYPE} == "xsl"
@@ -500,7 +515,7 @@
 # Special target to produce HTML with no images in it.
 .if ${STYLESHEET_TYPE} == "dsssl"
 ${DOC}.html-text: ${SRCS} ${INDEX_SGML} ${HTML_INDEX} ${LOCAL_IMAGES_TXT}
-	${JADE} -V nochunks ${HTMLTXTOPTS} \
+	${JADE_CMD} -V nochunks ${HTMLTXTOPTS} \
 		${JADEOPTS} -t sgml ${MASTERDOC} > ${.TARGET} || \
 		(${RM} -f ${.TARGET} && false)
 .elif ${STYLESHEET_TYPE} == "xsl"
@@ -548,7 +563,7 @@
 # RTF --------------------------------------------------------------------
 
 ${DOC}.rtf: ${SRCS} ${LOCAL_IMAGES_EPS} ${LOCAL_IMAGES_TXT}
-	${JADE} -V rtf-backend ${PRINTOPTS} \
+	${JADE_CMD} -V rtf-backend ${PRINTOPTS} \
 		${JADEOPTS} -t rtf -o ${.TARGET} ${MASTERDOC}
 
 #
@@ -560,7 +575,7 @@
 
 ${DOC}.tex: ${SRCS} ${LOCAL_IMAGES_EPS} ${INDEX_SGML} ${PRINT_INDEX} \
 		${LOCAL_IMAGES_TXT} ${LOCAL_IMAGES_EN}
-	${JADE} -V tex-backend ${PRINTOPTS} \
+	${JADE_CMD} -V tex-backend ${PRINTOPTS} \
 		${JADEOPTS} -t tex -o ${.TARGET} ${MASTERDOC}
 
 ${DOC}.tex-ps: ${DOC}.tex
@@ -571,7 +586,7 @@
 		${LOCAL_IMAGES_TXT}
 	${RM} -f ${.TARGET}
 	${CAT} ${PDFTEX_DEF} > ${.TARGET}
-	${JADE} -V tex-backend ${PRINTOPTS} -ioutput.print.pdf \
+	${JADE_CMD} -V tex-backend ${PRINTOPTS} -ioutput.print.pdf \
 		${JADEOPTS} -t tex -o /dev/stdout ${MASTERDOC} >> ${.TARGET}
 .endif
 
@@ -647,12 +662,12 @@
 	${PERL} ${COLLATEINDEX} -N -o ${.TARGET}
 
 ${HTML_INDEX}:
-	${JADE} -V html-index -V nochunks ${HTMLOPTS} -ioutput.html.images \
+	${JADE_CMD} -V html-index -V nochunks ${HTMLOPTS} -ioutput.html.images \
 		${JADEOPTS} -t sgml ${MASTERDOC} > /dev/null
 	${PERL} ${COLLATEINDEX} -g -o ${INDEX_SGML} ${.TARGET}
 
 ${HTML_SPLIT_INDEX}:
-	${JADE} -V html-index ${HTMLOPTS} -ioutput.html.images \
+	${JADE_CMD} -V html-index ${HTMLOPTS} -ioutput.html.images \
 		${JADEOPTS} -t sgml ${MASTERDOC} > /dev/null
 	${PERL} ${COLLATEINDEX} -g -o ${INDEX_SGML} ${.TARGET}
 

--------------090103090207050009070703--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4110CB82.8000204>