source: BLFS/xsl/gen_config.xsl@ 2b67b9b

ablfs-more legacy trunk
Last change on this file since 2b67b9b was 67c3df4, checked in by Pierre Labastie <pierre@…>, 7 years ago

Add stats to jhalfs-blfs. NB: due to book layout, far from perfect...

  • Property mode set to 100644
File size: 5.9 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
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
[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
58
59config SUDO
60 bool "Build as User"
61 default y
62 help
63 Select if sudo will be used (you build as a normal user)
64 otherwise sudo is not needed (you build as root)
[945ccaa]65
66
67config WRAP_INSTALL
68 bool "Use `porg style' package management"
69 default n
70 help
71 Select if you want the installation commands to be wrapped
72 between "wrapInstall '" and "' ; packInstall" functions,
73 where wrapInstall is used to set up a LD_PRELOAD library (for
74 example using porg), and packInstall makes the package tarball
[dc7fd7b]75
76config DEL_LA_FILES
77 bool "Remove libtool .la files after package installation"
78 default y
79 help
80 This option should be active on any system mixing libtool
81 and meson build systems. ImageMagick .la files are preserved.
[67c3df4]82
83config STATS
84 bool "Generate statistics for the requested package(s)"
85 default n
86 help
87 If you want timing and memory footprint statistics to be
88 generated for the packages you build (not their dependencies),
89 set this option to y.
[e576789]90</xsl:text>
91 </xsl:template>
92
93 <xsl:template match="list">
94 <xsl:if
95 test=".//*[self::package or self::module]
96 [(version and not(inst-version)) or
97 string(version) != string(inst-version)]">
98 <xsl:text>config&#9;MENU_</xsl:text>
99 <xsl:value-of select="@id"/>
100 <xsl:text>
101bool&#9;"</xsl:text>
102 <xsl:value-of select="name"/>
103 <xsl:text>"
104default&#9;n
105
106menu "</xsl:text>
107 <xsl:value-of select="name"/>
108 <xsl:text>"
109depends MENU_</xsl:text>
110 <xsl:value-of select="@id"/>
111 <xsl:text>
112
113</xsl:text>
114 <xsl:apply-templates select="sublist"/>
115 <xsl:text>endmenu
116
117</xsl:text>
118 </xsl:if>
119 </xsl:template>
120
121 <xsl:template match="sublist">
122 <xsl:if
123 test=".//*[self::package or self::module]
124 [(version and not(inst-version)) or
125 string(version) != string(inst-version)]">
126 <xsl:text>&#9;config&#9;MENU_</xsl:text>
127 <xsl:value-of select="@id"/>
128 <xsl:text>
129&#9;bool&#9;"</xsl:text>
130 <xsl:value-of select="name"/>
131 <xsl:text>"
132&#9;default&#9;n
133
134&#9;menu "</xsl:text>
135 <xsl:value-of select="name"/>
136 <xsl:text>"
137&#9;depends MENU_</xsl:text>
138 <xsl:value-of select="@id"/>
139 <xsl:text>
140
141</xsl:text>
142 <xsl:apply-templates select="package"/>
143 <xsl:text>&#9;endmenu
144
145</xsl:text>
146 </xsl:if>
147 </xsl:template>
148
149 <xsl:template match="package">
150 <xsl:if
151 test="(version and not(inst-version)) or
152 string(version) != string(inst-version)">
153 <xsl:text>&#9;&#9;config&#9;CONFIG_</xsl:text>
154 <xsl:value-of select="name"/>
155 <xsl:text>
156&#9;&#9;bool&#9;"</xsl:text>
157 <xsl:value-of select="name"/>
158 <xsl:text> </xsl:text>
159 <xsl:value-of select="version"/>
160 <xsl:if test="inst-version">
161 <xsl:text> [Installed </xsl:text>
162 <xsl:value-of select="inst-version"/>
163 <xsl:text>]</xsl:text>
164 </xsl:if>
165 <xsl:text>"
166&#9;&#9;default&#9;n
167
168</xsl:text>
169 </xsl:if>
170 <xsl:if
171 test="not(version) and ./module[not(inst-version) or
172 string(version) != string(inst-version)]">
173 <xsl:text>&#9;&#9;config&#9;MENU_</xsl:text>
174 <xsl:value-of select="translate(name,' ','_')"/>
175 <xsl:text>
176&#9;&#9;bool&#9;"</xsl:text>
177 <xsl:value-of select="name"/>
178 <xsl:text>"
179&#9;&#9;default&#9;n
180
181&#9;&#9;menu "</xsl:text>
182 <xsl:value-of select="name"/>
183 <xsl:text>"
184&#9;&#9;depends MENU_</xsl:text>
185 <xsl:value-of select="translate(name,' ','_')"/>
186 <xsl:text>
187
188</xsl:text>
189 <xsl:apply-templates select="module"/>
190 <xsl:text>&#9;&#9;endmenu
191
192</xsl:text>
193 </xsl:if>
194 </xsl:template>
195
196 <xsl:template match="module">
197 <xsl:if
198 test="not(inst-version) or
199 string(version) != string(inst-version)">
200 <xsl:text>&#9;&#9;&#9;config&#9;CONFIG_</xsl:text>
201 <xsl:value-of select="name"/>
202 <xsl:text>
203&#9;&#9;&#9;bool&#9;"</xsl:text>
204 <xsl:value-of select="name"/>
205 <xsl:text> </xsl:text>
206 <xsl:value-of select="version"/>
207 <xsl:if test="inst-version">
208 <xsl:text> [Installed </xsl:text>
209 <xsl:value-of select="inst-version"/>
210 <xsl:text>]</xsl:text>
211 </xsl:if>
212 <xsl:text>"
213&#9;&#9;&#9;default&#9;</xsl:text>
214 <xsl:choose>
215 <xsl:when test="contains(../name,'xorg')">
216 <xsl:text>y
217
218</xsl:text>
219 </xsl:when>
220 <xsl:otherwise>
221 <xsl:text>n
222
223</xsl:text>
224 </xsl:otherwise>
225 </xsl:choose>
226 </xsl:if>
227 </xsl:template>
228
229</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.