source: BLFS/xsl/gen_config.xsl@ 84a3fda

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

Add .la file removal to LFS and BLFS scripts

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