source: BLFS/xsl/gen_config.xsl@ 6613034

ablfs-more legacy trunk
Last change on this file since 6613034 was 2140f22, checked in by Pierre Labastie <pierre@…>, 7 years ago

New management of dependencies:

  • Even if only required or recommended deps only are requested and built, account for optional deps to build the pacakge order
  • build "runtime" deps after the pacakge dependening on them, but before any other package
  • using the "first" role in the book, implement pass1 pacakges when there are circular dependencies
  • Documentation has still to be written
  • There must be bugs, thank you for testing...
  • Property mode set to 100644
File size: 5.6 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.
[e576789]82</xsl:text>
83 </xsl:template>
84
85 <xsl:template match="list">
86 <xsl:if
87 test=".//*[self::package or self::module]
88 [(version and not(inst-version)) or
89 string(version) != string(inst-version)]">
90 <xsl:text>config&#9;MENU_</xsl:text>
91 <xsl:value-of select="@id"/>
92 <xsl:text>
93bool&#9;"</xsl:text>
94 <xsl:value-of select="name"/>
95 <xsl:text>"
96default&#9;n
97
98menu "</xsl:text>
99 <xsl:value-of select="name"/>
100 <xsl:text>"
101depends MENU_</xsl:text>
102 <xsl:value-of select="@id"/>
103 <xsl:text>
104
105</xsl:text>
106 <xsl:apply-templates select="sublist"/>
107 <xsl:text>endmenu
108
109</xsl:text>
110 </xsl:if>
111 </xsl:template>
112
113 <xsl:template match="sublist">
114 <xsl:if
115 test=".//*[self::package or self::module]
116 [(version and not(inst-version)) or
117 string(version) != string(inst-version)]">
118 <xsl:text>&#9;config&#9;MENU_</xsl:text>
119 <xsl:value-of select="@id"/>
120 <xsl:text>
121&#9;bool&#9;"</xsl:text>
122 <xsl:value-of select="name"/>
123 <xsl:text>"
124&#9;default&#9;n
125
126&#9;menu "</xsl:text>
127 <xsl:value-of select="name"/>
128 <xsl:text>"
129&#9;depends MENU_</xsl:text>
130 <xsl:value-of select="@id"/>
131 <xsl:text>
132
133</xsl:text>
134 <xsl:apply-templates select="package"/>
135 <xsl:text>&#9;endmenu
136
137</xsl:text>
138 </xsl:if>
139 </xsl:template>
140
141 <xsl:template match="package">
142 <xsl:if
143 test="(version and not(inst-version)) or
144 string(version) != string(inst-version)">
145 <xsl:text>&#9;&#9;config&#9;CONFIG_</xsl:text>
146 <xsl:value-of select="name"/>
147 <xsl:text>
148&#9;&#9;bool&#9;"</xsl:text>
149 <xsl:value-of select="name"/>
150 <xsl:text> </xsl:text>
151 <xsl:value-of select="version"/>
152 <xsl:if test="inst-version">
153 <xsl:text> [Installed </xsl:text>
154 <xsl:value-of select="inst-version"/>
155 <xsl:text>]</xsl:text>
156 </xsl:if>
157 <xsl:text>"
158&#9;&#9;default&#9;n
159
160</xsl:text>
161 </xsl:if>
162 <xsl:if
163 test="not(version) and ./module[not(inst-version) or
164 string(version) != string(inst-version)]">
165 <xsl:text>&#9;&#9;config&#9;MENU_</xsl:text>
166 <xsl:value-of select="translate(name,' ','_')"/>
167 <xsl:text>
168&#9;&#9;bool&#9;"</xsl:text>
169 <xsl:value-of select="name"/>
170 <xsl:text>"
171&#9;&#9;default&#9;n
172
173&#9;&#9;menu "</xsl:text>
174 <xsl:value-of select="name"/>
175 <xsl:text>"
176&#9;&#9;depends MENU_</xsl:text>
177 <xsl:value-of select="translate(name,' ','_')"/>
178 <xsl:text>
179
180</xsl:text>
181 <xsl:apply-templates select="module"/>
182 <xsl:text>&#9;&#9;endmenu
183
184</xsl:text>
185 </xsl:if>
186 </xsl:template>
187
188 <xsl:template match="module">
189 <xsl:if
190 test="not(inst-version) or
191 string(version) != string(inst-version)">
192 <xsl:text>&#9;&#9;&#9;config&#9;CONFIG_</xsl:text>
193 <xsl:value-of select="name"/>
194 <xsl:text>
195&#9;&#9;&#9;bool&#9;"</xsl:text>
196 <xsl:value-of select="name"/>
197 <xsl:text> </xsl:text>
198 <xsl:value-of select="version"/>
199 <xsl:if test="inst-version">
200 <xsl:text> [Installed </xsl:text>
201 <xsl:value-of select="inst-version"/>
202 <xsl:text>]</xsl:text>
203 </xsl:if>
204 <xsl:text>"
205&#9;&#9;&#9;default&#9;</xsl:text>
206 <xsl:choose>
207 <xsl:when test="contains(../name,'xorg')">
208 <xsl:text>y
209
210</xsl:text>
211 </xsl:when>
212 <xsl:otherwise>
213 <xsl:text>n
214
215</xsl:text>
216 </xsl:otherwise>
217 </xsl:choose>
218 </xsl:if>
219 </xsl:template>
220
221</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.