source: BLFS/xsl/gen_config.xsl@ 323ae3e

ablfs-more legacy trunk
Last change on this file since 323ae3e was 30732c6a, checked in by Pierre Labastie <pierre@…>, 5 years ago

Process layout replaceable

  • Property mode set to 100644
File size: 6.4 KB
RevLine 
[e576789]1<?xml version="1.0" encoding="ISO-8859-1"?>
2
[56178ba]3<!-- $Id$ -->
[e576789]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
[a4af6811]28 default "sendmail" if MS_sendmail
29 default "postfix" if MS_postfix
30 default "exim" if MS_exim
[e576789]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
[2140f22]42 bool "Required plus recommended dependencies"
[e576789]43
44 config DEPLVL_3
[2140f22]45 bool "Req/rec plus optional dependencies of requested package(s)"
46
47 config DEPLVL_4
48 bool "All non external dependencies"
[e576789]49
50endchoice
51config optDependency
52 int
53 default 1 if DEPLVL_1
54 default 2 if DEPLVL_2
55 default 3 if DEPLVL_3
[2140f22]56 default 4 if DEPLVL_4
[e576789]57
[625cb14]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.
[e576789]64
[30732c6a]65config KBLAYOUT
66 string "Keyboard layout (to be used in GDM)"
67 default "us"
68 help
69 Used in GDM for setting the login screen keyboard layout.
70 See the GDM page in the book for what to put into this field
71
[e576789]72config SUDO
73 bool "Build as User"
74 default y
75 help
76 Select if sudo will be used (you build as a normal user)
77 otherwise sudo is not needed (you build as root)
[945ccaa]78
79
80config WRAP_INSTALL
81 bool "Use `porg style' package management"
82 default n
83 help
84 Select if you want the installation commands to be wrapped
85 between "wrapInstall '" and "' ; packInstall" functions,
86 where wrapInstall is used to set up a LD_PRELOAD library (for
87 example using porg), and packInstall makes the package tarball
[dc7fd7b]88
89config DEL_LA_FILES
90 bool "Remove libtool .la files after package installation"
91 default y
92 help
93 This option should be active on any system mixing libtool
94 and meson build systems. ImageMagick .la files are preserved.
[67c3df4]95
96config STATS
97 bool "Generate statistics for the requested package(s)"
98 default n
99 help
100 If you want timing and memory footprint statistics to be
101 generated for the packages you build (not their dependencies),
102 set this option to y.
[e576789]103</xsl:text>
104 </xsl:template>
105
106 <xsl:template match="list">
107 <xsl:if
108 test=".//*[self::package or self::module]
109 [(version and not(inst-version)) or
110 string(version) != string(inst-version)]">
111 <xsl:text>config&#9;MENU_</xsl:text>
112 <xsl:value-of select="@id"/>
113 <xsl:text>
114bool&#9;"</xsl:text>
115 <xsl:value-of select="name"/>
116 <xsl:text>"
117default&#9;n
118
119menu "</xsl:text>
120 <xsl:value-of select="name"/>
121 <xsl:text>"
[f596dde]122depends on MENU_</xsl:text>
[e576789]123 <xsl:value-of select="@id"/>
124 <xsl:text>
125
126</xsl:text>
127 <xsl:apply-templates select="sublist"/>
128 <xsl:text>endmenu
129
130</xsl:text>
131 </xsl:if>
132 </xsl:template>
133
134 <xsl:template match="sublist">
135 <xsl:if
136 test=".//*[self::package or self::module]
137 [(version and not(inst-version)) or
138 string(version) != string(inst-version)]">
139 <xsl:text>&#9;config&#9;MENU_</xsl:text>
140 <xsl:value-of select="@id"/>
141 <xsl:text>
142&#9;bool&#9;"</xsl:text>
143 <xsl:value-of select="name"/>
144 <xsl:text>"
145&#9;default&#9;n
146
147&#9;menu "</xsl:text>
148 <xsl:value-of select="name"/>
149 <xsl:text>"
[f596dde]150&#9;depends on MENU_</xsl:text>
[e576789]151 <xsl:value-of select="@id"/>
152 <xsl:text>
153
154</xsl:text>
155 <xsl:apply-templates select="package"/>
156 <xsl:text>&#9;endmenu
157
158</xsl:text>
159 </xsl:if>
160 </xsl:template>
161
162 <xsl:template match="package">
163 <xsl:if
164 test="(version and not(inst-version)) or
165 string(version) != string(inst-version)">
166 <xsl:text>&#9;&#9;config&#9;CONFIG_</xsl:text>
167 <xsl:value-of select="name"/>
168 <xsl:text>
169&#9;&#9;bool&#9;"</xsl:text>
170 <xsl:value-of select="name"/>
171 <xsl:text> </xsl:text>
172 <xsl:value-of select="version"/>
173 <xsl:if test="inst-version">
174 <xsl:text> [Installed </xsl:text>
175 <xsl:value-of select="inst-version"/>
176 <xsl:text>]</xsl:text>
177 </xsl:if>
178 <xsl:text>"
179&#9;&#9;default&#9;n
180
181</xsl:text>
182 </xsl:if>
183 <xsl:if
184 test="not(version) and ./module[not(inst-version) or
185 string(version) != string(inst-version)]">
186 <xsl:text>&#9;&#9;config&#9;MENU_</xsl:text>
[6e28f3c]187 <xsl:value-of select="translate(name,' ()','___')"/>
[e576789]188 <xsl:text>
189&#9;&#9;bool&#9;"</xsl:text>
190 <xsl:value-of select="name"/>
191 <xsl:text>"
192&#9;&#9;default&#9;n
193
194&#9;&#9;menu "</xsl:text>
195 <xsl:value-of select="name"/>
196 <xsl:text>"
[f596dde]197&#9;&#9;depends on MENU_</xsl:text>
[6e28f3c]198 <xsl:value-of select="translate(name,' ()','___')"/>
[e576789]199 <xsl:text>
200
201</xsl:text>
202 <xsl:apply-templates select="module"/>
203 <xsl:text>&#9;&#9;endmenu
204
205</xsl:text>
206 </xsl:if>
207 </xsl:template>
208
209 <xsl:template match="module">
210 <xsl:if
211 test="not(inst-version) or
212 string(version) != string(inst-version)">
213 <xsl:text>&#9;&#9;&#9;config&#9;CONFIG_</xsl:text>
214 <xsl:value-of select="name"/>
215 <xsl:text>
216&#9;&#9;&#9;bool&#9;"</xsl:text>
217 <xsl:value-of select="name"/>
218 <xsl:text> </xsl:text>
219 <xsl:value-of select="version"/>
220 <xsl:if test="inst-version">
221 <xsl:text> [Installed </xsl:text>
222 <xsl:value-of select="inst-version"/>
223 <xsl:text>]</xsl:text>
224 </xsl:if>
225 <xsl:text>"
226&#9;&#9;&#9;default&#9;</xsl:text>
227 <xsl:choose>
228 <xsl:when test="contains(../name,'xorg')">
229 <xsl:text>y
230
231</xsl:text>
232 </xsl:when>
233 <xsl:otherwise>
234 <xsl:text>n
235
236</xsl:text>
237 </xsl:otherwise>
238 </xsl:choose>
239 </xsl:if>
240 </xsl:template>
241
242</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.