source: BLFS/xsl/gen_config.xsl@ 2758d94

ablfs-more legacy trunk
Last change on this file since 2758d94 was 6e28f3c, checked in by Pierre Labastie <pierre@…>, 6 years ago

Translate parentheses to "_" in the module page names. Otherwise there are errors when displaying the
menu

  • Property mode set to 100644
File size: 6.1 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2
3<!-- $Id$ -->
4
5<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 version="1.0">
7
8 <xsl:output method="text"
9 encoding='ISO-8859-1'/>
10
11 <xsl:template match="/">
12 <xsl:apply-templates select="//list"/>
13 <xsl:text>comment ""
14
15menu "Default package for resolving MTA dependency"
16
17choice
18 prompt "Mail server"
19 config MS_sendmail
20 bool "sendmail"
21 config MS_postfix
22 bool "postfix"
23 config MS_exim
24 bool "exim"
25endchoice
26config MAIL_SERVER
27 string
28 default sendmail if MS_sendmail
29 default postfix if MS_postfix
30 default exim if MS_exim
31
32endmenu
33
34choice
35 prompt "Dependency level"
36 default DEPLVL_2
37
38 config DEPLVL_1
39 bool "Required dependencies only"
40
41 config DEPLVL_2
42 bool "Required plus recommended dependencies"
43
44 config DEPLVL_3
45 bool "Req/rec plus optional dependencies of requested package(s)"
46
47 config DEPLVL_4
48 bool "All non external dependencies"
49
50endchoice
51config optDependency
52 int
53 default 1 if DEPLVL_1
54 default 2 if DEPLVL_2
55 default 3 if DEPLVL_3
56 default 4 if DEPLVL_4
57
58config LANGUAGE
59 string "LANG variable in the form ll_CC.charmap[@modifiers]"
60 default "en_US.UTF-8"
61 help
62 Because of the book layout, the 3 fields, ll, CC and charmap are
63 mandatory. The @modfier is honoured if present.
64
65config SUDO
66 bool "Build as User"
67 default y
68 help
69 Select if sudo will be used (you build as a normal user)
70 otherwise sudo is not needed (you build as root)
71
72
73config WRAP_INSTALL
74 bool "Use `porg style' package management"
75 default n
76 help
77 Select if you want the installation commands to be wrapped
78 between "wrapInstall '" and "' ; packInstall" functions,
79 where wrapInstall is used to set up a LD_PRELOAD library (for
80 example using porg), and packInstall makes the package tarball
81
82config DEL_LA_FILES
83 bool "Remove libtool .la files after package installation"
84 default y
85 help
86 This option should be active on any system mixing libtool
87 and meson build systems. ImageMagick .la files are preserved.
88
89config STATS
90 bool "Generate statistics for the requested package(s)"
91 default n
92 help
93 If you want timing and memory footprint statistics to be
94 generated for the packages you build (not their dependencies),
95 set this option to y.
96</xsl:text>
97 </xsl:template>
98
99 <xsl:template match="list">
100 <xsl:if
101 test=".//*[self::package or self::module]
102 [(version and not(inst-version)) or
103 string(version) != string(inst-version)]">
104 <xsl:text>config&#9;MENU_</xsl:text>
105 <xsl:value-of select="@id"/>
106 <xsl:text>
107bool&#9;"</xsl:text>
108 <xsl:value-of select="name"/>
109 <xsl:text>"
110default&#9;n
111
112menu "</xsl:text>
113 <xsl:value-of select="name"/>
114 <xsl:text>"
115depends MENU_</xsl:text>
116 <xsl:value-of select="@id"/>
117 <xsl:text>
118
119</xsl:text>
120 <xsl:apply-templates select="sublist"/>
121 <xsl:text>endmenu
122
123</xsl:text>
124 </xsl:if>
125 </xsl:template>
126
127 <xsl:template match="sublist">
128 <xsl:if
129 test=".//*[self::package or self::module]
130 [(version and not(inst-version)) or
131 string(version) != string(inst-version)]">
132 <xsl:text>&#9;config&#9;MENU_</xsl:text>
133 <xsl:value-of select="@id"/>
134 <xsl:text>
135&#9;bool&#9;"</xsl:text>
136 <xsl:value-of select="name"/>
137 <xsl:text>"
138&#9;default&#9;n
139
140&#9;menu "</xsl:text>
141 <xsl:value-of select="name"/>
142 <xsl:text>"
143&#9;depends MENU_</xsl:text>
144 <xsl:value-of select="@id"/>
145 <xsl:text>
146
147</xsl:text>
148 <xsl:apply-templates select="package"/>
149 <xsl:text>&#9;endmenu
150
151</xsl:text>
152 </xsl:if>
153 </xsl:template>
154
155 <xsl:template match="package">
156 <xsl:if
157 test="(version and not(inst-version)) or
158 string(version) != string(inst-version)">
159 <xsl:text>&#9;&#9;config&#9;CONFIG_</xsl:text>
160 <xsl:value-of select="name"/>
161 <xsl:text>
162&#9;&#9;bool&#9;"</xsl:text>
163 <xsl:value-of select="name"/>
164 <xsl:text> </xsl:text>
165 <xsl:value-of select="version"/>
166 <xsl:if test="inst-version">
167 <xsl:text> [Installed </xsl:text>
168 <xsl:value-of select="inst-version"/>
169 <xsl:text>]</xsl:text>
170 </xsl:if>
171 <xsl:text>"
172&#9;&#9;default&#9;n
173
174</xsl:text>
175 </xsl:if>
176 <xsl:if
177 test="not(version) and ./module[not(inst-version) or
178 string(version) != string(inst-version)]">
179 <xsl:text>&#9;&#9;config&#9;MENU_</xsl:text>
180 <xsl:value-of select="translate(name,' ()','___')"/>
181 <xsl:text>
182&#9;&#9;bool&#9;"</xsl:text>
183 <xsl:value-of select="name"/>
184 <xsl:text>"
185&#9;&#9;default&#9;n
186
187&#9;&#9;menu "</xsl:text>
188 <xsl:value-of select="name"/>
189 <xsl:text>"
190&#9;&#9;depends MENU_</xsl:text>
191 <xsl:value-of select="translate(name,' ()','___')"/>
192 <xsl:text>
193
194</xsl:text>
195 <xsl:apply-templates select="module"/>
196 <xsl:text>&#9;&#9;endmenu
197
198</xsl:text>
199 </xsl:if>
200 </xsl:template>
201
202 <xsl:template match="module">
203 <xsl:if
204 test="not(inst-version) or
205 string(version) != string(inst-version)">
206 <xsl:text>&#9;&#9;&#9;config&#9;CONFIG_</xsl:text>
207 <xsl:value-of select="name"/>
208 <xsl:text>
209&#9;&#9;&#9;bool&#9;"</xsl:text>
210 <xsl:value-of select="name"/>
211 <xsl:text> </xsl:text>
212 <xsl:value-of select="version"/>
213 <xsl:if test="inst-version">
214 <xsl:text> [Installed </xsl:text>
215 <xsl:value-of select="inst-version"/>
216 <xsl:text>]</xsl:text>
217 </xsl:if>
218 <xsl:text>"
219&#9;&#9;&#9;default&#9;</xsl:text>
220 <xsl:choose>
221 <xsl:when test="contains(../name,'xorg')">
222 <xsl:text>y
223
224</xsl:text>
225 </xsl:when>
226 <xsl:otherwise>
227 <xsl:text>n
228
229</xsl:text>
230 </xsl:otherwise>
231 </xsl:choose>
232 </xsl:if>
233 </xsl:template>
234
235</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.