aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Labastie <pierre.labastie@neuf.fr>2023-10-21 21:50:29 +0200
committerPierre Labastie <pierre.labastie@neuf.fr>2023-10-21 21:50:29 +0200
commitbacbb075bef607cbcbe4a3cd41d41afcb1018503 (patch)
tree59f4049155406e27b11c746a28468f15198066c5
parentddb0feba47fa9419afa9c7cfd254a6f9691e3320 (diff)
Comments for the inst-instr template
kf5 has one push and to popd in its instructions. We used to just use what was between push and popd. But now, we need to only use what is in the case instruction for one package, and what is after the esac for all the others.
-rw-r--r--BLFS/xsl/make_book.xsl18
1 files changed, 15 insertions, 3 deletions
diff --git a/BLFS/xsl/make_book.xsl b/BLFS/xsl/make_book.xsl
index 42b268a623..cacdc12972 100644
--- a/BLFS/xsl/make_book.xsl
+++ b/BLFS/xsl/make_book.xsl
@@ -704,24 +704,36 @@ name=$(echo $packagedir | sed 's/-[[:digit:]].*//')
</xsl:template>
<xsl:template name="inst-instr">
+ <!-- This template is necessary because of the "kapidox" case in kf5:
+ Normally, the general instructions extract the package and change
+ to the extracted dir for running the installation instructions.
+ When installing a sub-package of a compound package, the installation
+ instructions to be run are located between a pushd and a popd,
+ *except* for kf5, where a popd occurs inside a case for kapidox...
+ So we call this template with a "inst-instr" string that contains
+ everything after the pushd.-->
<xsl:param name="inst-instr"/>
<xsl:param name="package"/>
<xsl:choose>
+ <!-- first the case of kf5: there are two "popd"-->
<xsl:when test="contains(substring-after($inst-instr,'popd'),'popd')">
<xsl:choose>
<xsl:when test="$package='kapidox'">
+ <!-- only the instructions inside the "case" and before popd -->
<xsl:copy-of select="substring-after(substring-before($inst-instr,'popd'),'kapidox)')"/>
</xsl:when>
<xsl:otherwise>
- <xsl:copy-of select="substring-before($inst-instr,'kapidox)')"/>
+ <!-- all what is after the esac -->
<xsl:call-template name="inst-instr">
- <xsl:with-param name="inst-instr"
- select="substring-after($inst-instr,';;')"/>
+ <xsl:with-param
+ name="inst-instr"
+ select="substring-after($inst-instr,'esac&#xA;')"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
+ <!-- normal case: everything that is before popd -->
<xsl:copy-of select="substring-before($inst-instr,'popd')"/>
</xsl:otherwise>
</xsl:choose>