source: BLFS/xsl/gen_config.xsl@ 4c36783

ablfs-more trunk
Last change on this file since 4c36783 was 2b3edd2, checked in by Pierre Labastie <pierre.labastie@…>, 3 years ago

[Remove BLFS envars.conf]: new gen_config.xsl

Now the variables previously defined into envars.conf are in Config.in

  • Property mode set to 100644
File size: 9.3 KB
RevLine 
[e576789]1<?xml version="1.0" encoding="ISO-8859-1"?>
2
3<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 version="1.0">
5
6 <xsl:output method="text"
7 encoding='ISO-8859-1'/>
8
9 <xsl:template match="/">
10 <xsl:apply-templates select="//list"/>
11 <xsl:text>comment ""
12
[2b3edd2]13menu "Build settings"
[e576789]14
[2b3edd2]15 choice
16 prompt "Mail server for resolving the MTA dependency"
[e576789]17 config MS_sendmail
18 bool "sendmail"
19 config MS_postfix
20 bool "postfix"
21 config MS_exim
22 bool "exim"
[2b3edd2]23 endchoice
24 config MAIL_SERVER
[e576789]25 string
[a4af6811]26 default "sendmail" if MS_sendmail
27 default "postfix" if MS_postfix
28 default "exim" if MS_exim
[e576789]29
[2b3edd2]30 choice
[e576789]31 prompt "Dependency level"
32 default DEPLVL_2
[2b3edd2]33 help
34 Packages included in the dependency graph. Note that the graph
35 itself contains all the dependency information relating those
36 packages.
[e576789]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
[2b3edd2]50 endchoice
51 config optDependency
[e576789]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
[2b3edd2]58 config LANGUAGE
[625cb14]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
[2b3edd2]63 mandatory. The @modifier is honoured if present.
[30732c6a]64
[2b3edd2]65 config SUDO
[e576789]66 bool "Build as User"
67 default y
68 help
[2b3edd2]69 Select if sudo will be used (you build as a normal user)
70 otherwise sudo is not needed (you build as root)
[945ccaa]71
[2b3edd2]72 config WRAP_INSTALL
[945ccaa]73 bool "Use `porg style' package management"
74 default n
75 help
[2b3edd2]76 Select if you want the installation commands to be wrapped
77 between "wrapInstall '" and "' ; packInstall" functions,
78 where wrapInstall is used to set up a LD_PRELOAD library (for
79 example using porg), and packInstall makes the package tarball
80
81 config PACK_INSTALL
82 string "Location of the packInstall.sh script"
83 default "/blfs_root/packInstall.sh" if !SUDO
84 default "$HOME/blfs_root/packInstall.sh" if SUDO
85 depends on WRAP_INSTALL
86 help
87 This script is needed for the proper operation of the
88 `porg style' package management. Provide an absolute
89 path.
90
91 config DEL_LA_FILES
[dc7fd7b]92 bool "Remove libtool .la files after package installation"
93 default y
94 help
[2b3edd2]95 This option should be active on any system mixing libtool
96 and meson build systems. ImageMagick .la files are preserved.
[67c3df4]97
[2b3edd2]98 config STATS
[67c3df4]99 bool "Generate statistics for the requested package(s)"
100 default n
101 help
[2b3edd2]102 If you want timing and memory footprint statistics to be
103 generated for the packages you build (not their dependencies),
104 set this option to y. Due to the book layout, several scripts
105 are not functional in this case. Please review them.
106
107endmenu
108
109menu "Build Layout"
110 config SRC_ARCHIVE
111 string "Directory of sources"
112 default "/sources"
113 config SRC_SUBDIRS
114 bool "Downloads sources to subdirectories"
115 default n
116 help
117 If this option is set, the sources will be downloaded and archived
118 into a subdirectory of the source directory, one for each page
119 of the book. Otherwise they are downloaded and archived directly
120 into the source directory
121 config BUILD_ROOT
122 string "Build directory"
123 default "/sources"
124 help
125 Directory where the build occurs. It can be the same as the
126 source directory, provided the setting of subdirectories is
127 different
128 config BUILD_SUBDIRS
129 bool "Build into subdirectories"
130 default y
131 help
132 If this option is set, the sources will be extracted into
133 subdirectories of the build directory. Otherwise, they will be
134 directly extracted into the build directory
135 config KEEP_FILES
136 bool "Keep source directory"
137 default n
138 help
139 Set this option if you want to keep the build directories
140 for further examination after installing the package
141endmenu
142
143menu "Optimization"
144 config JOBS
145 int "Number of parallel jobs"
146 default 0
147 help
148 This number will get passed to make or ninja, unless set
149 to 0, in which case, it is set to the number of processors
150 on line. Note that some packages do not respect this setting.
151 Also, "-j1" is always passed to make for install (and nothing
152 to ninja).
153 config CFG_CFLAGS
154 string "Content of variable CFLAGS"
155 default "EMPTY"
156 help
157 If set to the special string "EMPTY", then CFLAGS will be
158 unset before starting the script. Otherwise, there is no
159 content check for this variable. Double check for typos!
160 config CFG_CXXFLAGS
161 string "Content of variable CXXFLAGS"
162 default "EMPTY"
163 help
164 If set to the special string "EMPTY", then CXXFLAGS will be
165 unset before starting the script. Otherwise, there is no
166 content check for this variable. Double check for typos!
167 config CFG_LDFLAGS
168 string "Content of variable LDFLAGS"
169 default "EMPTY"
170 help
171 If set to the special string "EMPTY", then LDFLAGS will be
172 unset before starting the script. Otherwise, there is no
173 content check for this variable. Double check for typos!
174endmenu
[e576789]175</xsl:text>
176 </xsl:template>
177
178 <xsl:template match="list">
179 <xsl:if
180 test=".//*[self::package or self::module]
181 [(version and not(inst-version)) or
182 string(version) != string(inst-version)]">
[2b3edd2]183 <xsl:text>menuconfig&#9;MENU_</xsl:text>
[e576789]184 <xsl:value-of select="@id"/>
185 <xsl:text>
186bool&#9;"</xsl:text>
187 <xsl:value-of select="name"/>
188 <xsl:text>"
189default&#9;n
190
[2b3edd2]191if&#9;MENU_</xsl:text>
[e576789]192 <xsl:value-of select="@id"/>
193 <xsl:text>
194
195</xsl:text>
196 <xsl:apply-templates select="sublist"/>
[2b3edd2]197 <xsl:text>endif
[e576789]198
199</xsl:text>
200 </xsl:if>
201 </xsl:template>
202
203 <xsl:template match="sublist">
204 <xsl:if
205 test=".//*[self::package or self::module]
206 [(version and not(inst-version)) or
207 string(version) != string(inst-version)]">
[2b3edd2]208 <xsl:text>&#9;menuconfig&#9;MENU_</xsl:text>
[e576789]209 <xsl:value-of select="@id"/>
210 <xsl:text>
211&#9;bool&#9;"</xsl:text>
212 <xsl:value-of select="name"/>
213 <xsl:text>"
214&#9;default&#9;n
215
[2b3edd2]216&#9;if&#9;MENU_</xsl:text>
[e576789]217 <xsl:value-of select="@id"/>
218 <xsl:text>
219
220</xsl:text>
221 <xsl:apply-templates select="package"/>
[2b3edd2]222 <xsl:text>&#9;endif
[e576789]223
224</xsl:text>
225 </xsl:if>
226 </xsl:template>
227
228 <xsl:template match="package">
229 <xsl:if
230 test="(version and not(inst-version)) or
231 string(version) != string(inst-version)">
232 <xsl:text>&#9;&#9;config&#9;CONFIG_</xsl:text>
233 <xsl:value-of select="name"/>
234 <xsl:text>
235&#9;&#9;bool&#9;"</xsl:text>
236 <xsl:value-of select="name"/>
237 <xsl:text> </xsl:text>
238 <xsl:value-of select="version"/>
239 <xsl:if test="inst-version">
240 <xsl:text> [Installed </xsl:text>
241 <xsl:value-of select="inst-version"/>
242 <xsl:text>]</xsl:text>
243 </xsl:if>
244 <xsl:text>"
245&#9;&#9;default&#9;n
246
247</xsl:text>
248 </xsl:if>
249 <xsl:if
250 test="not(version) and ./module[not(inst-version) or
251 string(version) != string(inst-version)]">
[2b3edd2]252 <xsl:text>&#9;&#9;menuconfig&#9;MENU_</xsl:text>
[6e28f3c]253 <xsl:value-of select="translate(name,' ()','___')"/>
[e576789]254 <xsl:text>
255&#9;&#9;bool&#9;"</xsl:text>
256 <xsl:value-of select="name"/>
257 <xsl:text>"
258&#9;&#9;default&#9;n
259
[2b3edd2]260&#9;&#9;if&#9;MENU_</xsl:text>
[6e28f3c]261 <xsl:value-of select="translate(name,' ()','___')"/>
[e576789]262 <xsl:text>
263
264</xsl:text>
265 <xsl:apply-templates select="module"/>
[2b3edd2]266 <xsl:text>&#9;&#9;endif
[e576789]267
268</xsl:text>
269 </xsl:if>
270 </xsl:template>
271
272 <xsl:template match="module">
273 <xsl:if
274 test="not(inst-version) or
275 string(version) != string(inst-version)">
276 <xsl:text>&#9;&#9;&#9;config&#9;CONFIG_</xsl:text>
277 <xsl:value-of select="name"/>
278 <xsl:text>
279&#9;&#9;&#9;bool&#9;"</xsl:text>
280 <xsl:value-of select="name"/>
281 <xsl:text> </xsl:text>
282 <xsl:value-of select="version"/>
283 <xsl:if test="inst-version">
284 <xsl:text> [Installed </xsl:text>
285 <xsl:value-of select="inst-version"/>
286 <xsl:text>]</xsl:text>
287 </xsl:if>
288 <xsl:text>"
289&#9;&#9;&#9;default&#9;</xsl:text>
290 <xsl:choose>
291 <xsl:when test="contains(../name,'xorg')">
292 <xsl:text>y
293
294</xsl:text>
295 </xsl:when>
296 <xsl:otherwise>
297 <xsl:text>n
298
299</xsl:text>
300 </xsl:otherwise>
301 </xsl:choose>
302 </xsl:if>
303 </xsl:template>
304
305</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.