/[gentoo]/xml/htdocs/doc/en/handbook/hb-working-use.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-working-use.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.46 Revision 1.53
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> 2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3 3
4<!-- The content of this document is licensed under the CC-BY-SA license --> 4<!-- The content of this document is licensed under the CC-BY-SA license -->
5<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 5<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-use.xml,v 1.46 2007/04/14 03:09:30 nightmorph Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-working-use.xml,v 1.53 2013/02/09 08:46:08 swift Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<abstract> 11<abstract>
12USE flags are a very important aspect of Gentoo. In this chapter, you learn to 12USE flags are a very important aspect of Gentoo. In this chapter, you learn to
13work with USE flags and understand how USE flags interact with your system. 13work with USE flags and understand how USE flags interact with your system.
14</abstract> 14</abstract>
15 15
16<version>1.36</version> 16<version>4</version>
17<date>2007-02-20</date> 17<date>2013-02-09</date>
18 18
19<section> 19<section>
20<title>What are USE flags?</title> 20<title>What are USE flags?</title>
21<subsection> 21<subsection>
22<title>The ideas behind USE flags</title> 22<title>The ideas behind USE flags</title>
126in the <path>make.defaults</path> files part of your profile. 126in the <path>make.defaults</path> files part of your profile.
127</p> 127</p>
128 128
129<p> 129<p>
130The profile your system listens to is pointed to by the 130The profile your system listens to is pointed to by the
131<path>/etc/make.profile</path> symlink. Each profile works on top of another, 131<path>/etc/portage/make.profile</path> symlink. Each profile works on top of
132larger profile, the end result is therefore the sum of all profiles. The top 132another, larger profile, the end result is therefore the sum of all profiles.
133profile is the <path>base</path> profile 133The top profile is the <path>base</path> profile
134(<path>/usr/portage/profiles/base</path>). 134(<path>/usr/portage/profiles/base</path>).
135</p> 135</p>
136 136
137<p> 137<p>
138Let us take a look at this default setting for the 2004.3 profile: 138Let us take a look at this default setting for the 13.0 profile:
139</p> 139</p>
140 140
141<pre caption="Cumulative make.defaults USE variable for the 2004.3 profile"> 141<pre caption="Cumulative make.defaults USE variable for the 13.0 profile">
142<comment>(This example is the sum of the settings in base, default-linux, 142<comment>(This example is the sum of the settings in base, default/linux,
143 default-linux/x86 and default-linux/x86/2004.3)</comment> 143 default/linux/x86 and default/linux/x86/13.0/)</comment>
144USE="x86 oss apm arts avi berkdb bitmap-fonts crypt cups encode fortran f77 144USE="a52 aac acpi alsa branding cairo cdr dbus dts dvd dvdr emboss encode exif
145 foomaticdb gdbm gif gpm gtk imlib jpeg kde gnome libg++ libwww mad 145fam firefox flac gif gpm gtk hal jpeg lcms ldap libnotify mad mikmod mng mp3
146 mikmod motif mpeg ncurses nls oggvorbis opengl pam pdflib png python qt 146mp4 mpeg ogg opengl pango pdf png ppds qt3support qt4 sdl spell
147 quicktime readline sdl spell ssl svga tcpd truetype X xml2 xmms xv zlib" 147startup-notification svg tiff truetype vorbis unicode usb X xcb x264 xml xv
148xvid"
148</pre> 149</pre>
149 150
150<p> 151<p>
151As you can see, this variable already contains quite a lot of keywords. Do 152As you can see, this variable already contains quite a lot of keywords. Do
152<b>not</b> alter any <path>make.defaults</path> file to tailor 153<b>not</b> alter any <path>make.defaults</path> file to tailor
155</p> 156</p>
156 157
157<p> 158<p>
158To change this default setting, you need to add or remove keywords to the 159To change this default setting, you need to add or remove keywords to the
159<c>USE</c> variable. This is done globally by defining the <c>USE</c> variable 160<c>USE</c> variable. This is done globally by defining the <c>USE</c> variable
160in <path>/etc/make.conf</path>. In this variable you add the extra USE flags you 161in <path>/etc/portage/make.conf</path>. In this variable you add the extra USE
161require, or remove the USE flags you don't want. This latter is done by 162flags you require, or remove the USE flags you don't want. This latter is done
162prefixing the keyword with the minus-sign ("-"). 163by prefixing the keyword with the minus-sign ("-").
163</p> 164</p>
164 165
165<p> 166<p>
166For instance, to remove support for KDE and QT but add support for ldap, the 167For instance, to remove support for KDE and QT but add support for ldap, the
167following <c>USE</c> can be defined in <path>/etc/make.conf</path>: 168following <c>USE</c> can be defined in <path>/etc/portage/make.conf</path>:
168</p> 169</p>
169 170
170<pre caption="An example USE setting in /etc/make.conf"> 171<pre caption="An example USE setting in /etc/portage/make.conf">
171USE="-kde -qt3 -qt4 ldap" 172USE="-kde -qt4 ldap"
172</pre> 173</pre>
173 174
174</body> 175</body>
175</subsection> 176</subsection>
176<subsection> 177<subsection>
179 180
180<p> 181<p>
181Sometimes you want to declare a certain USE flag for one (or a couple) of 182Sometimes you want to declare a certain USE flag for one (or a couple) of
182applications but not system-wide. To accomplish this, you will need to create 183applications but not system-wide. To accomplish this, you will need to create
183the <path>/etc/portage</path> directory (if it doesn't exist yet) and edit 184the <path>/etc/portage</path> directory (if it doesn't exist yet) and edit
184<path>/etc/portage/package.use</path>. 185<path>/etc/portage/package.use</path>. This is usually a single file, but can
186also be a directory; see <c>man portage</c> for more information. The following
187examples assume <path>package.use</path> is a single file.
185</p> 188</p>
186 189
187<p> 190<p>
188For instance, if you don't want <c>berkdb</c> support globally but you do want 191For instance, if you don't want <c>berkdb</c> support globally but you do want
189it for <c>mysql</c>, you would add: 192it for <c>mysql</c>, you would add:
208<title>Declare temporary USE flags</title> 211<title>Declare temporary USE flags</title>
209<body> 212<body>
210 213
211<p> 214<p>
212Sometimes you want to set a certain USE setting only once. Instead of editing 215Sometimes you want to set a certain USE setting only once. Instead of editing
213<path>/etc/make.conf</path> twice (to do and undo the USE changes) you can just 216<path>/etc/portage/make.conf</path> twice (to do and undo the USE changes) you
214declare the USE variable as environment variable. Remember that, when you 217can just declare the USE variable as environment variable. Remember that, when
215re-emerge or update this application (either explicitly or as part of a system 218you re-emerge or update this application (either explicitly or as part of a
216update) your changes will be lost! 219system update) your changes will be lost!
217</p> 220</p>
218 221
219<p> 222<p>
220As an example we will temporarily remove java from the USE setting 223As an example we will temporarily remove java from the USE setting
221during the installation of seamonkey. 224during the installation of seamonkey.
243 <li> 246 <li>
244 Default USE setting declared in the <path>make.defaults</path> files part of 247 Default USE setting declared in the <path>make.defaults</path> files part of
245 your profile 248 your profile
246 </li> 249 </li>
247 <li> 250 <li>
248 User-defined USE setting in <path>/etc/make.conf</path> 251 User-defined USE setting in <path>/etc/portage/make.conf</path>
249 </li> 252 </li>
250 <li> 253 <li>
251 User-defined USE setting in <path>/etc/portage/package.use</path> 254 User-defined USE setting in <path>/etc/portage/package.use</path>
252 </li> 255 </li>
253 <li> 256 <li>
351Now run <c>equery</c> with the <c>uses</c> argument to view the USE flags of a 354Now run <c>equery</c> with the <c>uses</c> argument to view the USE flags of a
352certain package. For instance, for the <c>gnumeric</c> package: 355certain package. For instance, for the <c>gnumeric</c> package:
353</p> 356</p>
354 357
355<pre caption="Using equery to view used USE flags"> 358<pre caption="Using equery to view used USE flags">
356# <i>equery uses =gnumeric-1.6.3 -a</i> 359# <i>equery --nocolor uses =gnumeric-1.6.3 -a</i>
357[ Searching for packages matching =gnumeric-1.6.3... ] 360[ Searching for packages matching =gnumeric-1.6.3... ]
358[ Colour Code : <comment>set</comment> <i>unset</i> ] 361[ Colour Code : set unset ]
359[ Legend : Left column (U) - USE flags from make.conf ] 362[ Legend : Left column (U) - USE flags from make.conf ]
360[ : Right column (I) - USE flags packages was installed with ] 363[ : Right column (I) - USE flags packages was installed with ]
361[ Found these USE variables for app-office/gnumeric-1.6.3 ] 364[ Found these USE variables for app-office/gnumeric-1.6.3 ]
362 U I 365 U I
363- - <i>debug</i> : Tells configure and the makefiles to build for debugging. 366 - - debug : Enable extra debug codepaths, like asserts and extra output.
364 Effects vary across packages, but generally it will at 367 If you want to get meaningful backtraces see
365 least add -g to CFLAGS. Remember to set FEATURES=nostrip too 368 http://www.gentoo.org/proj/en/qa/backtraces.xml .
366- - <i>gnome</i> : Adds GNOME support 369 + + gnome : Adds GNOME support
367+ + <comment>python</comment> : Adds support/bindings for the Python language 370 + + python : Adds support/bindings for the Python language
368- - <i>static</i> : !!do not set this during bootstrap!! Causes binaries to be 371 - - static : !!do not set this during bootstrap!! Causes binaries to be
369 statically linked instead of dynamically 372 statically linked instead of dynamically
370</pre> 373</pre>
371 374
372</body> 375</body>
373</subsection> 376</subsection>
374</section> 377</section>

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.53

  ViewVC Help
Powered by ViewVC 1.1.20