Ignore:
Timestamp:
09/19/2023 08:11:11 PM (12 months ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
ablfs-more, trunk
Children:
e6a1ec3
Parents:
b39f283
Message:

Add automation for kf5 and plasma5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BLFS/xsl/make_book.xsl

    rb39f283 r0cd09c6  
    5858     Normally, those items are id of nodes.
    5959     Those nodes can be sect1 (normal case),
    60      sect2 (python modules or DBus bindings)
    61      bridgehead (perl modules)
    62      para (dependency of perl modules).
     60     sect2 (python/perl modules/dependencies )
    6361     The templates after this one treat each of those cases.
    6462     However, some items are xorg package names, and not id.
     
    6664     The difficulty is that some of those names *are* id's,
    6765     because they are referenced in the index.
    68      Hopefully, none of those id's are sect{1,2}, bridgehead or para...-->
     66     Hopefully, none of those id's are sect{1,2}...-->
    6967  <xsl:template name="apply-list">
    7068    <xsl:param name="list" select="''"/>
     
    10199            </xsl:when>
    102100            <xsl:when test="contains(concat($list,' '),'-pass1 ')">
    103 <!-- We need to do it only for sect1 and sect2, because of libva -->
     101<!-- We need to do it for both sect1 and sect2, because of libva -->
    104102              <xsl:variable
    105103                   name="real-id"
     
    114112            <xsl:when test="not(id($list)[self::sect1 or self::sect2 or self::para or self::bridgehead])">
    115113              <xsl:apply-templates
    116                    select="//sect1[contains(@id,'xorg7')
    117                                and contains(string(.//userinput),
    118                                             concat($list,'-'))]"
     114                select="//sect1[(contains(@id,'xorg7') or
     115                                 contains(@id,'frameworks') or
     116                                 contains(@id,'plasma5'))
     117                                 and .//userinput/literal[contains(string(),
     118                                            concat($list,'-'))]]"
    119119                   mode="xorg">
    120120                <xsl:with-param name="package" select="$list"/>
     
    498498  <xsl:template match="sect1" mode="xorg">
    499499    <xsl:param name="package"/>
     500    <!--DEBUG
     501    <xsl:message>
     502      <xsl:text>Entering sect1 template in xorg mode:
     503- page id:</xsl:text>
     504      <xsl:value-of select="@id"/>
     505      <xsl:text>
     506- package:</xsl:text>
     507      <xsl:value-of select="$package"/>
     508      <xsl:text>
     509</xsl:text>
     510    </xsl:message> END DEBUG -->
    500511    <xsl:variable name="tarball">
    501512      <xsl:call-template name="tarball">
     
    522533      <xsl:call-template name="inst-instr">
    523534        <xsl:with-param name="inst-instr"
    524                         select=".//userinput[starts-with(string(),'for ')]"/>
     535          select=
     536            "substring-after(
     537               substring-after(.//userinput[starts-with(string(),'for ') or
     538                                            starts-with(string(),'while ')],
     539                               'pushd'),
     540               '&#xA;')"/>
     541        <xsl:with-param name="package" select="$package"/>
    525542      </xsl:call-template>
    526543    </xsl:variable>
     
    541558                   select=".//para[contains(string(),'(HTTP)')]/ulink/@url"/>
    542559                <xsl:value-of select="$download-dir"/>
     560                <xsl:if test="contains(@id,'frameworks') or
     561                              contains(@id,'plasma5')">
     562                  <xsl:text>/</xsl:text>
     563                </xsl:if>
    543564                <xsl:value-of select="$tarball"/>
    544565              </xsl:attribute>
     
    547568          </listitem>
    548569          <listitem>
    549             <para>Download (FTP): <xsl:element name="ulink">
    550               <xsl:attribute name="url">
    551                 <xsl:value-of
    552                    select=".//para[contains(string(),'(FTP)')]/ulink/@url"/>
    553                 <xsl:value-of select="$download-dir"/>
    554                 <xsl:value-of select="$tarball"/>
    555               </xsl:attribute>
    556              </xsl:element>
     570            <para>Download (FTP): <ulink url=" "/>
    557571            </para>
    558572          </listitem>
     
    582596        <screen><userinput>packagedir=<xsl:value-of
    583597                    select="substring-before($tarball,'.tar.')"/>
    584           <xsl:text>&#xA;</xsl:text>
     598          <xsl:text>
     599     name=$(echo $pkg | sed 's/-[[:digit:]].*//')
     600          </xsl:text>
    585601          <xsl:value-of select="substring-before($install-instructions,
    586602                                                 'as_root')"/>
     
    681697  <xsl:template name="inst-instr">
    682698    <xsl:param name="inst-instr"/>
    683     <xsl:choose>
    684       <xsl:when test="contains($inst-instr,'pushd')">
    685         <xsl:call-template name="inst-instr">
    686           <xsl:with-param name="inst-instr"
    687                           select="substring-after(
    688                                    substring-after($inst-instr,'pushd'),
    689                                    '&#xA;')"/>
    690         </xsl:call-template>
     699    <xsl:param name="package"/>
     700    <xsl:choose>
     701      <xsl:when test="contains(substring-after($inst-instr,'popd'),'popd')">
     702        <xsl:choose>
     703          <xsl:when test="$package='kapidox'">
     704            <xsl:copy-of select="substring-after(substring-before($inst-instr,'popd'),'kapidox)')"/>
     705          </xsl:when>
     706          <xsl:otherwise>
     707            <xsl:copy-of select="substring-before($inst-instr,'kapidox)')"/>
     708            <xsl:call-template name="inst-instr">
     709              <xsl:with-param name="inst-instr"
     710                              select="substring-after($inst-instr,';;')"/>
     711            </xsl:call-template>
     712          </xsl:otherwise>
     713        </xsl:choose>
    691714      </xsl:when>
    692715      <xsl:otherwise>
Note: See TracChangeset for help on using the changeset viewer.