File 0490-Support-fop-2.1-in-the-build-support-for-the-documen.patch of Package erlang

From 5db01188caa25d643b801cea35a0cb2d602eafa7 Mon Sep 17 00:00:00 2001
From: Lars Thorsen <lars@erlang.org>
Date: Wed, 31 Jul 2019 14:35:46 +0200
Subject: [PATCH] Support fop 2.1 in the build support for the documentation

---
 lib/erl_docgen/priv/xsl/db_pdf.xsl | 6 +++---
 make/otp.mk.in                     | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/erl_docgen/priv/xsl/db_pdf.xsl b/lib/erl_docgen/priv/xsl/db_pdf.xsl
index 1b91d768e3..7080394298 100644
--- a/lib/erl_docgen/priv/xsl/db_pdf.xsl
+++ b/lib/erl_docgen/priv/xsl/db_pdf.xsl
@@ -662,7 +662,7 @@
 
       <fo:flow flow-name="xsl-region-body">
         <fo:block xsl:use-attribute-sets="cover.logo">
-          <fo:external-graphic src="{$logo}"/>
+          <fo:external-graphic src="url('{$logo}')"/>
         </fo:block>
         <fo:block xsl:use-attribute-sets="cover.title" id="cover-page">
           <xsl:apply-templates/>
@@ -1658,10 +1658,10 @@
     <fo:block xsl:use-attribute-sets="image">
       <xsl:choose>
 	<xsl:when test="@width">
-	  <fo:external-graphic content-width="scale-to-fit" width="{@width}" inline-progression-dimension.maximum="100%" src="{@file}"/>
+	  <fo:external-graphic content-width="scale-to-fit" width="{@width}" inline-progression-dimension.maximum="100%" src="url('{@file}')"/>
 	</xsl:when>
 	<xsl:otherwise>
-	   <fo:external-graphic content-width="scale-down-to-fit" inline-progression-dimension.maximum="100%" src="{@file}"/>
+	   <fo:external-graphic content-width="scale-down-to-fit" inline-progression-dimension.maximum="100%" src="url('{@file}')"/>
 	</xsl:otherwise>
       </xsl:choose>
       <xsl:apply-templates>
diff --git a/make/otp.mk.in b/make/otp.mk.in
index cc76f00e7e..63748c2f2b 100644
--- a/make/otp.mk.in
+++ b/make/otp.mk.in
@@ -321,5 +321,5 @@ $(MAN6DIR)/%.6 $(MAN6DIR)/%.7: $(XMLDIR)/%_app.xml
 $(XMLDIR)/%.xml: $(XMLDIR)/%.xmlsrc
 	$(gen_verbose)escript $(DOCGEN)/priv/bin/codeline_preprocessing.escript $(shell pwd) $< $@
 
-.fo.pdf:
+$(PDFDIR)/%.pdf: %.fo
 	$(FOP) -c $(FOP_CONFIG) -cache $(ERL_TOP)/make/$(TARGET)/fop-fonts.cache -fo $< -pdf $@
-- 
2.16.4

openSUSE Build Service is sponsored by