[gimp-help/wip/wormnest/quickreference-pdf] WIP: Test quickreference pdf creation




commit dcac12626dc6eb1124edb5a6d12d183c0f6580c9
Author: Jacob Boerema <jgboerema gmail com>
Date:   Sat Feb 19 10:00:56 2022 -0500

    WIP: Test quickreference pdf creation

 .gitlab-ci.yml             |  8 ++++++++
 quickreference/Makefile.am | 34 +++++++++++++++++++++++++++++++---
 2 files changed, 39 insertions(+), 3 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d5e1ee706..6f5e113e5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,6 +6,7 @@ stages:
 variables:
   INSTALL_DIR: "_install"
   INSTALL_PREFIX: "${CI_PROJECT_DIR}/${INSTALL_DIR}"
+  LINGUAS: "en"
 
 build-debian:
   stage: build
@@ -20,14 +21,20 @@ build-debian:
     - apt-get install -y --no-install-recommends
         automake
         build-essential
+        dblatex
         docbook-website
         docbook-xml
         docbook-xsl
+        fonts-freefont-otf
+        gettext
         pkg-config
         pngcrush
         pngnq
         python3
         python3-libxml2
+        texlive-fonts-recommended
+        texlive-lang-all
+        texlive-xetex
         xsltproc
   script:
     - mkdir _build
@@ -35,6 +42,7 @@ build-debian:
     - ../autogen.sh --prefix=${INSTALL_PREFIX} --without-gimp
     - make && make install
     - mv ${INSTALL_PREFIX}/share/gimp/2.0/help/ ../www/
+    - mv _build/quickreference/pdf/ ../www/
     - cd ../web
     - make
     - mv html/ ../html/
diff --git a/quickreference/Makefile.am b/quickreference/Makefile.am
index fbd04ef43..2945bc82c 100644
--- a/quickreference/Makefile.am
+++ b/quickreference/Makefile.am
@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
-ALL_LINGUAS ?= ca da de el en en_GB es fi fr hr it ja ko lt nl nn pt_BR ro ru sl sv zh_CN
-QUICKREFERENCE_ALL_LINGUAS ?= ca da de el es en fi fr it ja ko nl nn pl pt_BR ro ru sl sv zh_CN
+ALL_LINGUAS ?= en nl
+QUICKREFERENCE_ALL_LINGUAS ?= en nl
 QUICKREFERENCE_LINGUAS = $(filter $(ALL_LINGUAS), $(QUICKREFERENCE_ALL_LINGUAS))
 
 POT_FILES = $(srcdir)/po/gimp-keys.pot
@@ -66,6 +66,33 @@ svg/gimp-keys-%.svg: xml/gimp-keys-%.xml stylesheets/keys-svg.xsl
 
 svg: $(foreach lang,$(QUICKREFERENCE_LINGUAS),svg/gimp-keys-$(lang).svg)
 
+if HAVE_DBLATEX
+
+DBLATEXFLAGS="--verbose"
+
+pdf/gimp-keys-%.pdf: xml/gimp-keys-%.xml stylesheets/keys-docbook.xsl
+       @if test -f pdf/%.pdf; then rm -f pdf/%.pdf; fi
+       $(MKDIR_P) pdf
+       @echo "*** Making Quickreference PDF ($*) ..."
+       $(DBLATEX) \
+           --xsl-user=$(srcdir)/stylesheets/keys-docbook.xsl \
+           --output=$@ $<
+
+pdf: $(foreach lang,$(QUICKREFERENCE_ALL_LINGUAS),pdf/gimp-keys-$(lang).pdf)
+
+install-data-local:
+       $(MKDIR_P) $(DESTDIR)$(helpdir) || exit 77
+       @echo "*** Installing PDF:"
+       cd html && \
+       for lang in $(QUICKREFERENCE_LINGUAS); do \
+               @echo " $${lang}"; \
+               tar -chf- $${lang} | \
+               (cd $(DESTDIR)$(helpdir)/ && tar -xf-) || exit 70; \
+       done; \
+       echo .
+
+endif
+
 docbook/gimp-keys-%.xml: xml/gimp-keys-%.xml stylesheets/keys-docbook.xsl
        $(MKDIR_P) docbook
        $(XSLTPROC) \
@@ -75,11 +102,12 @@ docbook/gimp-keys-%.xml: xml/gimp-keys-%.xml stylesheets/keys-docbook.xsl
 
 docbook: $(foreach lang,$(QUICKREFERENCE_LINGUAS),docbook/gimp-keys-$(lang).xml)
 
-all-local: svg docbook
+all-local: svg pdf docbook
 
 clean-local:
        rm -rf docbook
        rm -rf svg
+       rm -rf pdf
        rm -rf xml
        rm -f .xml2po.mo
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]