source: stylesheets/patcheslist.xsl@ 7e8964e

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 7e8964e was 333a1e69, checked in by Bruce Dubbs <bdubbs@…>, 8 years ago

Extract x265 patch correctly

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@16567 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 3.6 KB
Line 
1<?xml version='1.0' encoding='ISO-8859-1'?>
2<!DOCTYPE xsl:stylesheet [
3 <!ENTITY % general-entities SYSTEM "../general.ent">
4 %general-entities;
5]>
6
7<!--
8$LastChangedBy$
9$Date$
10-->
11
12<!--
13 This stylesheet creates a script to copy the patches referenced
14 in the BLFS book from the patches repository to the blfs
15 download area. It is very specific to the installation on
16 the home server.
17-->
18
19<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
20 version="1.0">
21
22 <xsl:output method="text"/>
23
24 <!-- Allow select the dest dir at runtime -->
25 <xsl:param name="dest.dir">
26 <xsl:value-of select="concat('/srv/www/', substring-after('&patch-root;', 'http://'))"/>
27 </xsl:param>
28
29 <xsl:template match="/">
30 <xsl:text>#! /bin/bash&#x0a;&#x0a;</xsl:text>
31 <xsl:text>function copy
32{
33 cp $1 $2 >>copyerrs 2>&amp;1
34}&#x0a;&#x0a;</xsl:text>
35 <!-- Create dest.dir if it don't exist -->
36 <xsl:text>mkdir -p </xsl:text>
37 <xsl:value-of select="$dest.dir"/>
38 <xsl:text> &amp;&amp;&#x0a;</xsl:text>
39 <xsl:text>cd </xsl:text>
40 <xsl:value-of select="$dest.dir"/>
41 <xsl:text> &amp;&amp;&#x0a;&#x0a;</xsl:text>
42 <!-- Remove old patches and possible list of missing patches-->
43 <xsl:text>rm -f *.patch copyerrs &amp;&amp;&#x0a;&#x0a;</xsl:text>
44 <xsl:apply-templates/>
45 <!-- Ensure correct ownership -->
46 <xsl:text>&#x0a;chgrp lfswww *.patch &amp;&amp;&#x0a;</xsl:text>
47 <xsl:text>if [ `wc -l copyerrs|sed 's/ *//' |cut -f1 -d' '` -gt 0 ]; then
48 mail -s "Missing BLFS patches" blfs-book@linuxfromscratch.org &lt; copyerrs
49fi</xsl:text>
50 <xsl:text>&#x0a;exit&#x0a;</xsl:text>
51 </xsl:template>
52
53 <xsl:template match="//text()"/>
54
55 <xsl:template match="//ulink">
56 <!-- Match only local patches links and skip duplicated URLs splitted for PDF output-->
57 <xsl:if test="contains(@url, '.patch') and contains(@url, '&patch-root;')
58 and not(ancestor-or-self::*/@condition = 'pdf')">
59 <xsl:variable name="patch.name" select="substring-after(@url, '&patch-root;')"/>
60 <xsl:text>copy /srv/www/www.linuxfromscratch.org/patches/downloads</xsl:text>
61 <xsl:choose>
62 <!-- cdparanoia -->
63 <xsl:when test="contains($patch.name, '-III')">
64 <xsl:text>/cdparanoia</xsl:text>
65 </xsl:when>
66 <!-- Open Office -->
67 <xsl:when test="contains($patch.name, 'OOo')">
68 <xsl:text>/OOo</xsl:text>
69 </xsl:when>
70 <!-- QT -->
71 <xsl:when test="contains($patch.name, 'qt-x')">
72 <xsl:text>/qt</xsl:text>
73 </xsl:when>
74 <!-- XOrg -->
75 <xsl:when test="contains($patch.name, 'X11R6')">
76 <xsl:text>/xorg</xsl:text>
77 </xsl:when>
78 <!-- net-tools -->
79 <xsl:when test="contains($patch.name, 'net-tools')">
80 <xsl:text>/net-tools</xsl:text>
81 </xsl:when>
82 <!-- x265 -->
83 <xsl:when test="contains($patch.name, 'x265')">
84 <xsl:text>/x265</xsl:text>
85 </xsl:when>
86 <!-- General rule -->
87 <xsl:otherwise>
88 <xsl:variable name="cut"
89 select="translate(substring-after($patch.name, '-'), '0123456789', '0000000000')"/>
90 <xsl:variable name="patch.name2">
91 <xsl:value-of select="substring-before($patch.name, '-')"/>
92 <xsl:text>-</xsl:text>
93 <xsl:value-of select="$cut"/>
94 </xsl:variable>
95 <xsl:value-of select="substring-before($patch.name2, '-0')"/>
96 </xsl:otherwise>
97 </xsl:choose>
98 <xsl:value-of select="$patch.name"/>
99 <xsl:text> . &#x0a;</xsl:text>
100 </xsl:if>
101 </xsl:template>
102
103</xsl:stylesheet>
104
Note: See TracBrowser for help on using the repository browser.