Commit 78f60e53 authored by Holger Wansing's avatar Holger Wansing

Get rid of xmlroff dependency; unfortunately this removes ar, he and ml from the build

parent 30400ca9
......@@ -2,13 +2,12 @@
# See COPYING for the license status of this software.
# You need to install the build dependencies ('apt-get build-dep refcard'):
# docbook-xsl texlive-extra-utils pdftk po4a xmlroff dblatex poppler-utils xsltproc
# docbook-xsl texlive-extra-utils pdftk po4a dblatex poppler-utils xsltproc
# The "--keep 0" can be removed when the translations are ready
TRANSLATE=po4a-translate --format docbook --keep 0
UPDATEPO=po4a-updatepo --format docbook
XP=xsltproc --nonet --novalid
XMLROFF=xmlroff --backend cairo --continue
DIA=dia
PDFJOIN=pdfjoin --vanilla
......@@ -21,28 +20,17 @@ PDFNUP=pdfnup --vanilla
# ad=
#endif
# space separated list of languages to ignore
DISABLE=ml
# space separated list of languages to ignore.
# disable RTL languages, currently unable to built them with dblatex
DISABLE=ar he ml
PO_FILES=$(sort $(filter-out $(patsubst %,po4a/%.po,$(DISABLE)), $(wildcard po4a/*.po)))
# international standard format
A4_LANGS=en $(patsubst po4a/%.po,%,$(PO_FILES))
# non-standard format for north america
LT_LANGS=en es fr
# Because of current limitations of xmlroff in respect to layout, we
# can also use dblatex. Some languages don't work well:
# See #492365 (he), #492366 (el), #492350 (ja), # #482857 (zh_CN)
XMLROFF_LANGS=$(A4_LANGS)
# dblatex to be used by default.
DBLATEX=dblatex --backend=xetex --texstyle=refcard.sty --xsl-user=dblatex.xsl
ifdef USE_DBLATEX
ifeq ($(USE_DBLATEX),2)
XMLROFF_LANGS=
else
XMLROFF_LANGS=ar he ml
endif
else
XMLROFF_LANGS=$(A4_LANGS)
endif
ENTRIES=$(patsubst %,entries-%.dbk,$(A4_LANGS))
......@@ -62,16 +50,9 @@ refcard-%-lt.fo: refcard-%.dbk fo.xsl
# the .fo is not used for dblatex, but I don't care
refcard-%.s.pdf: refcard-%.fo dblatex.xsl refcard.sty
L=$$(echo $@ | sed 's/.*-\(.*\)-.*/\1/'); \
USE_XR=$$(echo " $(XMLROFF_LANGS) " | grep " $$L "); \
if [ -n "$$USE_XR" ]; then \
$(XMLROFF) -o $@ $<; \
else \
if [ -n "$$USE_DBLATEX" ]; then \
SRC=$$(echo $<|sed 's/-\(a4\|lt\).fo/.dbk/'); \
FMT=$$(echo $<|sed 's/.*-\(a4\|lt\).fo/\1/'); \
$(DBLATEX) --output=$@ --param=format=$$FMT $$SRC; \
fi; \
fi
$(DBLATEX) --output=$@ --param=format=$$FMT $$SRC
refcard-%-a4.t.pdf: refcard-%-a4.s.pdf empty.pdf
$(PDFJOIN) --fitpaper true --outfile $<.x.pdf $< empty.pdf empty.pdf
......@@ -102,13 +83,6 @@ tidypo:
msgcat $$po > $$po.tmp && mv $$po.tmp $$po; \
done
# make sure, we have always at least six pages for pdfnup
empty.fo: empty.dbk fo.xsl
$(XP) fo.xsl $< > $@
empty.pdf: empty.fo
$(XMLROFF) -o $@ $<
.PHONY: all clean count mrproper
entries-en.dbk: entries.dbk
......@@ -169,8 +143,7 @@ count:
clean:
-rm -f *~ refcard-*.dbk refcard-*.fo refcard-*.[st].pdf \
$(ENTRIES) statistics.xml statistics.txt messages.mo \
empty.fo empty.pdf
$(ENTRIES) statistics.xml statistics.txt messages.mo
mrproper: clean
-rm -f index.html refcard.png $(PDFS) entries-*.dbk
......@@ -33,7 +33,6 @@ Build-Depends: dblatex,
texlive-lang-portuguese,
texlive-lang-spanish,
texlive-xetex,
xmlroff,
xsltproc
Vcs-Git: https://salsa.debian.org/ddp-team/refcard.git
Vcs-Browser: https://salsa.debian.org/ddp-team/refcard
......
#!/usr/bin/make -f
export USE_DBLATEX=1
%:
dh $@
......
File added
......@@ -60,7 +60,7 @@ InfoKey: Creator
InfoValue: docbook-xsl, xsltproc
InfoBegin
InfoKey: Producer
InfoValue: DBLaTeX|xmlroff
InfoValue: DBLaTeX
</xsl:text>
</xsl:template>
......
......@@ -65,7 +65,9 @@
<revnumber>10.0 - Debian 10 'Buster' -- </revnumber>
<date>2018-12-25</date>
<revremark>Update refcard for Buster; source repository moved
from svn (Alioth) to git (Salsa); updated translations.</revremark>
from svn (Alioth) to git (Salsa); remove dependency to xmlroff
(unfortunately ar, he and ml cannot be built now anymore);
updated translations.</revremark>
</revision>
<revision>
<revnumber>9.0 - Debian 9 'Stretch' -- </revnumber>
......@@ -300,22 +302,6 @@
</row>
</thead>
<tbody>
<row valign="top">
<entry>Arabic (ar)</entry>
<entry><ulink url="refcard-ar-a4.pdf">A4</ulink></entry>
<entry><xi:include href="entries-ar.dbk"
xmlns:xi="http://www.w3.org/2003/XInclude"
xpointer="xpointer(/article/title/child::text()[1])"/> -
<xi:include href="entries-ar.dbk"
xmlns:xi="http://www.w3.org/2003/XInclude"
xpointer="xpointer(/article/subtitle/child::text()[1])"/></entry>
<entry><xi:include href="statistics.xml"
xmlns:xi="http://www.w3.org/2003/XInclude"
xpointer="xpointer(/statistics/t[@l='ar']/child::text()[1])"/></entry>
<entry><xi:include href="statistics.xml"
xmlns:xi="http://www.w3.org/2003/XInclude"
xpointer="xpointer(/statistics/s[@l='ar']/child::text()[1])"/></entry>
</row>
<row valign="top">
<entry>Bulgarian (bg)</entry>
<entry><ulink url="refcard-bg-a4.pdf">A4</ulink></entry>
......@@ -507,23 +493,6 @@
xmlns:xi="http://www.w3.org/2003/XInclude"
xpointer="xpointer(/statistics/s[@l='gl']/child::text()[1])"/></entry>
</row>
<row valign="top">
<entry>Hebrew (he)</entry>
<entry><ulink
url="refcard-he-a4.pdf">A4</ulink></entry>
<entry><xi:include href="entries-he.dbk"
xmlns:xi="http://www.w3.org/2003/XInclude"
xpointer="xpointer(/article/title/child::text()[1])"/> -
<xi:include href="entries-he.dbk"
xmlns:xi="http://www.w3.org/2003/XInclude"
xpointer="xpointer(/article/subtitle/child::text()[1])"/></entry>
<entry><xi:include href="statistics.xml"
xmlns:xi="http://www.w3.org/2003/XInclude"
xpointer="xpointer(/statistics/t[@l='he']/child::text()[1])"/></entry>
<entry><xi:include href="statistics.xml"
xmlns:xi="http://www.w3.org/2003/XInclude"
xpointer="xpointer(/statistics/s[@l='he']/child::text()[1])"/></entry>
</row>
<row valign="top">
<entry>Hindi (hi)</entry>
<entry><ulink
......@@ -917,7 +886,6 @@
<literal>texlive-extra-utils</literal>,
<literal>pdftk</literal>,
<literal>po4a</literal>,
<literal>xmlroff</literal>,
<literal>dblatex</literal>,
<literal>poppler-utils</literal>, and
<literal>xsltproc</literal>.</para>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment