Changeset 0cd09c6


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

Add automation for kf5 and plasma5

Location:
BLFS
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • BLFS/gen-special.sh

    rb39f283 r0cd09c6  
    9999    <xsl:choose>
    100100EOF
    101 for file in $(ls ${BLFS_DIR}/x/installing/x7* | grep -v x7driver); do
     101for file in $(ls ${BLFS_DIR}/x/installing/x7* | grep -v x7driver) \
     102            ${BLFS_DIR}/kde/kf5/kf5-frameworks.xml                \
     103            ${BLFS_DIR}/kde/plasma5/plasma-all.xml; do
    102104  id=$(grep xreflabel $file | sed 's@.*id="\([^"]*\).*@\1@')
    103105  cat >>$SPECIAL_FILE << EOF
     
    117119# that the preceding package is a dependency of the following,
    118120# except the first.
    119   list_cat="$(sed -n '/>cat/,/EOF</p' $file | grep -v 'cat\|EOF\|#' |
     121list_cat="$(sed -n '/>cat.*\.\(md5\|dat\)/,/EOF</p' $file | grep -v 'cat\|EOF\|#' |
    120122              awk '{ print $NF }' | sed 's/-&.*//')"
    121123
    122 # Rationale for the sed below: the following for breaks words at spaces (unless
    123 # we tweak IFS). So replace spaces with commas in lines so that only newlines
    124 # are separators.
    125   for pack in \
    126       $(grep 'ENTITY.*version' $file | sed 's/[ ]\+/,/g'); do
    127     packname=$(echo $pack | sed s'@.*ENTITY,\(.*\)-version.*@\1@')
    128     packversion=$(echo $pack | sed 's@[^"]*"\([^"]*\).*@\1@')
    129     precpack=NONE
    130     for i in $list_cat; do
    131       if [ "$i" = "$packname" ]; then break; fi
    132       precpack=$i
    133     done
    134 # It may happen that packname is not in list_cat, because its entity
    135 # is commented out in the xml, but we do not check that (too complicated).
    136 # In that case, the whole list is scanned, and $precpack=$i at the end.
    137 # when packname is found in the list $precpack!=$i.
    138     if [ "$precpack" = "$i" ]; then continue; fi
     124  precpack=NONE
     125  for pack in $list_cat; do
     126    if grep -q x7 $file; then # this is an xorg package
     127      packname=$pack
     128      packversion=$(grep "ENTITY ${pack}-version" $file | \
     129                    sed 's@[^"]*"\([^"]*\).*@\1@')
     130    else
     131      packname=${pack%%-[[:digit:]]*}
     132      packversion=$(echo $pack | sed 's/[^.]*-\([.[:digit:]]*\)\.tar.*/\1/')
     133    fi
     134## Rationale for the sed below: the following for breaks words at spaces (unless
     135## we tweak IFS). So replace spaces with commas in lines so that only newlines
     136## are separators.
     137#  for pack in \
     138#      $(grep 'ENTITY.*version' $file | sed 's/[ ]\+/,/g'); do
     139#    packname=$(echo $pack | sed s'@.*ENTITY,\(.*\)-version.*@\1@')
     140#    packversion=$(echo $pack | sed 's@[^"]*"\([^"]*\).*@\1@')
     141#    for i in $list_cat; do
     142#      if [ "$i" = "$packname" ]; then break; fi
     143#      precpack=$i
     144#    done
     145## It may happen that packname is not in list_cat, because its entity
     146## is commented out in the xml, but we do not check that (too complicated).
     147## In that case, the whole list is scanned, and $precpack=$i at the end.
     148## when packname is found in the list $precpack!=$i.
     149#    if [ "$precpack" = "$i" ]; then continue; fi
    139150    cat >>$SPECIAL_FILE << EOF
    140151        <module><xsl:text>&#xA;          </xsl:text>
     
    183194        </xsl:element>
    184195EOF
     196    precpack=$packname
    185197  done
    186198  cat >>$SPECIAL_FILE << EOF
  • BLFS/xsl/gen_config.xsl

    rb39f283 r0cd09c6  
    310310&#9;&#9;&#9;default&#9;</xsl:text>
    311311      <xsl:choose>
    312         <xsl:when test="contains(../name,'xorg')">
     312        <xsl:when test="contains(../name,'xorg') or
     313                        contains(../name,'plasma') or
     314                        contains(../name,'kf5')">
    313315          <xsl:text>y
    314316
  • BLFS/xsl/gen_pkg_list.xsl

    rb39f283 r0cd09c6  
    360360        <xsl:when test="@role='nodep'"/>
    361361<!-- Call list expansion when we have an xorg7 series of packages -->
    362         <xsl:when test="contains(@linkend,'xorg7-')">
     362        <xsl:when test="contains(@linkend,'xorg7-') or
     363                        @linkend='kf5-frameworks' or
     364                        @linkend='plasma5-build'">
    363365          <xsl:call-template name="expand-deps">
    364366            <xsl:with-param name="section">
  • 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.