Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 346157
Collapse All | Expand All

(-)a/ebuild-writing/functions/src_compile/build-environment/text.xml (-1 / +1 lines)
Lines 141-147 functions can be used here. Link Here
141
</codesample>
141
</codesample>
142
142
143
<p>
143
<p>
144
See <uri link="::eclass-reference/flag-o-matic.eclass/"/> for a full reference.
144
See the <c>flag-o-matic.eclass</c><!-- TODO: fix the link: <uri link="::eclass-reference/flag-o-matic.eclass/"/>--> for a full reference.
145
</p>
145
</p>
146
</body>
146
</body>
147
</section>
147
</section>
(-)a/ebuild-writing/functions/src_compile/text.xml (-2 / +2 lines)
Lines 11-17 Link Here
11
  </tr>
11
  </tr>
12
  <tr>
12
  <tr>
13
    <th>Purpose</th>
13
    <th>Purpose</th>
14
    <ti>Configure and build the package.<important>the configure parts of <c>src_compile</c> have been splitted out in EAPI=2 to <c>src_configure</c>. see <uri link="::ebuild-writing/functions/src_configure"/></important></ti>
14
    <ti>Configure and build the package.<important> The configure parts of <c>src_compile</c> have been splitted out in EAPI=2 to <c>src_configure</c>. See <uri link="::ebuild-writing/functions/src_configure"/>.</important></ti>
15
  </tr>
15
  </tr>
16
  <tr>
16
  <tr>
17
    <th>Sandbox</th>
17
    <th>Sandbox</th>
Lines 85-91 src_compile() { Link Here
85
<title>with EAPI=2</title>
85
<title>with EAPI=2</title>
86
<body>
86
<body>
87
<p>
87
<p>
88
porting the above example to EAPI=2, you won't need to define an extra
88
Porting the above example to EAPI=2, you don't need to define an extra
89
<c>src_compile</c>, as it only calls <c>emake</c> (which is the default
89
<c>src_compile</c>, as it only calls <c>emake</c> (which is the default
90
<c>src_compile</c> function).
90
<c>src_compile</c> function).
91
</p>
91
</p>
(-)a/ebuild-writing/functions/src_configure/configuring/text.xml (-1 / +1 lines)
Lines 63-69 src_configure() { Link Here
63
    # ...
63
    # ...
64
}
64
}
65
65
66
src_compile() {
66
src_configure() {
67
    econf $(use_with X x11 )
67
    econf $(use_with X x11 )
68
}
68
}
69
</codesample>
69
</codesample>
(-)a/ebuild-writing/functions/src_prepare/epatch/text.xml (-4 / +7 lines)
Lines 8-14 Link Here
8
The canonical way of applying patches in ebuilds is to
8
The canonical way of applying patches in ebuilds is to
9
use <c>epatch</c> (from <c>eutils.eclass</c>, which you must make sure
9
use <c>epatch</c> (from <c>eutils.eclass</c>, which you must make sure
10
to import!) inside <c>src_prepare</c>. This function automatically
10
to import!) inside <c>src_prepare</c>. This function automatically
11
handles <c>-p</c> levels, <c>gunzip</c> and so on as necessary. Also note that olds ebuild may still use src_unpack to apply patches. This is because those ebuilds are based in EAPI="1". You are advised to use EAPI="2" and apply your patches in src_prepare function instead.
11
handles <c>-p</c> levels, <c>gunzip</c> and so on as necessary. Also note
12
that older ebuilds may still use <c>src_unpack</c> to apply patches. This is because
13
those ebuilds are based in EAPI="1". You are advised to use EAPI="2" and
14
apply your patches in <c>src_prepare</c> function instead.
12
</p>
15
</p>
13
16
14
<p>
17
<p>
Lines 87-93 manually, or mirror the file. Link Here
87
<p>
90
<p>
88
epatch can also apply multiple patches (which can be selectively based
91
epatch can also apply multiple patches (which can be selectively based
89
upon arch) from a single directory. This can be useful if upstream
92
upon arch) from a single directory. This can be useful if upstream
90
have releases that need more patches.
93
has releases that need more patches.
91
</p>
94
</p>
92
95
93
<p>
96
<p>
Lines 145-152 Variables which may be defined include: Link Here
145
<p>
148
<p>
146
Bulk patches should be named in the form
149
Bulk patches should be named in the form
147
<c>??_${ARCH}_foo.${EPATCH_SUFFIX}</c>. If they are
150
<c>??_${ARCH}_foo.${EPATCH_SUFFIX}</c>. If they are
148
not, <c>EPATCH_FORCE="yes"</c> must be set. To apply a patch on <c>all</c>
151
not, <c>EPATCH_FORCE="yes"</c> must be set. To apply a patch on all
149
archs, use all for the <c>${ARCH}</c> part.
152
archs, use <c>all</c> for the <c>${ARCH}</c> part.
150
</p>
153
</p>
151
154
152
</body>
155
</body>
(-)a/ebuild-writing/functions/src_prepare/text.xml (-2 / +2 lines)
Lines 32-39 Link Here
32
<title>Default <c>src_prepare</c></title>
32
<title>Default <c>src_prepare</c></title>
33
<body>
33
<body>
34
<p>
34
<p>
35
Starting from EAPI="2", the src_prepare function is the appropriate area to perform
35
Starting from EAPI="2", the src_prepare function is the appropriate place to
36
any kind of patching and source code manipulation, instead of src_unpack.
36
perform any kind of patching and source code manipulation, instead of src_unpack.
37
</p>
37
</p>
38
<codesample lang="ebuild">
38
<codesample lang="ebuild">
39
src_prepare() {
39
src_prepare() {
(-)a/ebuild-writing/functions/src_unpack/svn-sources/text.xml (-2 / +1 lines)
Lines 82-88 following variables are also noteworthy: Link Here
82
</table>
82
</table>
83
83
84
<p>
84
<p>
85
See the eclass itself and <uri link="eclass-reference/subversion.eclass/"/>
85
See the <c>subversion.eclass</c> itself <!-- TODO: and <uri link="eclass-reference/subversion.eclass/"/> -->
86
for the full range of options. To perform the actual checkout, use
86
for the full range of options. To perform the actual checkout, use
87
the <c>subversion_src_unpack</c> function, which calls
87
the <c>subversion_src_unpack</c> function, which calls
88
both <c>subversion_svn_fetch</c> and <c>subversion_bootstrap</c>
88
both <c>subversion_svn_fetch</c> and <c>subversion_bootstrap</c>
89
- 

Return to bug 346157