r2964 - jhalfs/trunk/BLFS/libs

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Tue Aug 15 10:00:44 PDT 2006


Author: manuel
Date: 2006-08-15 11:00:43 -0600 (Tue, 15 Aug 2006)
New Revision: 2964

Modified:
   jhalfs/trunk/BLFS/libs/scripts.xsl
Log:
Trying to fix Xorg7 build scripts.

Modified: jhalfs/trunk/BLFS/libs/scripts.xsl
===================================================================
--- jhalfs/trunk/BLFS/libs/scripts.xsl	2006-08-15 14:54:30 UTC (rev 2963)
+++ jhalfs/trunk/BLFS/libs/scripts.xsl	2006-08-15 17:00:43 UTC (rev 2964)
@@ -19,10 +19,11 @@
 <!--=================== Master chunks code ======================-->
 
   <xsl:template match="sect1">
-    <xsl:if test="@id != 'locale-issues' and
-                  (count(descendant::screen/userinput) > 0 and
+    <xsl:if test="(count(descendant::screen/userinput) > 0 and
                   count(descendant::screen/userinput) >
-                  count(descendant::screen[@role='nodump']))">
+                  count(descendant::screen[@role='nodump'])) and
+                  @id != 'locale-issues' and @id != 'xorg7' and
+                  @id != 'x-setup'">
 
         <!-- The file names -->
       <xsl:variable name="pi-file" select="processing-instruction('dbhtml')"/>
@@ -90,7 +91,10 @@
         <xsl:text>#!/bin/sh&#xA;set -e&#xA;&#xA;</xsl:text>
         <xsl:choose>
           <!-- Package page -->
-          <xsl:when test="sect2[@role='package']">
+          <xsl:when test="sect2[@role='package'] and not(@id = 'xorg7-app' or
+                          @id = 'xorg7-data' or @id = 'xorg7-driver' or
+                          @id = 'xorg7-font' or @id = 'xorg7-lib' or
+                          @id = 'xorg7-proto' or @id = 'xorg7-util')">
             <!-- Variables -->
             <xsl:text>SRC_ARCHIVE=$SRC_ARCHIVE&#xA;</xsl:text>
             <xsl:text>FTP_SERVER=$FTP_SERVER&#xA;&#xA;PACKAGE=</xsl:text>
@@ -107,6 +111,15 @@
             <xsl:text>cd $SRC_DIR/$PKG_DIR&#xA;</xsl:text>
             <xsl:text>rm -rf $UNPACKDIR unpacked&#xA;&#xA;</xsl:text>
           </xsl:when>
+          <!-- Xorg7 pseudo-packages -->
+          <xsl:when test="contains(@id,'xorg7') and not(@id = 'xorg7-server')">
+            <xsl:text>SRC_DIR=$SRC_DIR
+
+cd $SRC_DIR
+mkdir -p xc
+cd xc&#xA;</xsl:text>
+            <xsl:apply-templates select="sect2" mode="xorg7"/>
+          </xsl:when>
           <!-- Non-package page -->
           <xsl:otherwise>
             <xsl:apply-templates select=".//screen"/>
@@ -155,6 +168,32 @@
     </xsl:choose>
   </xsl:template>
 
+  <xsl:template match="sect2" mode="xorg7">
+    <xsl:choose>
+      <xsl:when test="@role = 'package'"/>
+      <xsl:when test="not(@role)">
+        <xsl:apply-templates select=".//screen"/>
+        <xsl:text>WGET_LST=</xsl:text>
+        <xsl:apply-templates select=".//screen" mode="wget_lst"/>
+        <xsl:text>&#xA;</xsl:text>
+      </xsl:when>
+      <xsl:when test="@role = 'installation'">
+        <xsl:text>for package in $(cat $WGET_LST) ; do
+  packagedir=$(echo $package | sed 's/.tar.bz2//')
+  tar -xf $package
+  cd $packagedir&#xA;</xsl:text>
+        <xsl:apply-templates select=".//screen | .//para/command"/>
+        <xsl:text>cd ..
+  rm -rf $packagedir
+done&#xA;</xsl:text>
+        <xsl:if test="$sudo = 'y'">
+          <xsl:text>sudo </xsl:text>
+        </xsl:if>
+        <xsl:text>ldconfig&#xA;&#xA;</xsl:text>
+      </xsl:when>
+    </xsl:choose>
+  </xsl:template>
+
 <!--==================== Download code =======================-->
 
   <xsl:template name="package_name">
@@ -360,6 +399,10 @@
     </xsl:if>
   </xsl:template>
 
+  <xsl:template match="screen" mode="wget_lst">
+    <xsl:value-of select="substring-after(string(),' -i ')"/>
+  </xsl:template>
+
   <xsl:template match="para/command">
     <xsl:if test="(contains(string(),'test') or
             contains(string(),'check'))">




More information about the alfs-log mailing list