aboutsummaryrefslogtreecommitdiff
blob: ab90afd6363cf222c74e0622265ca788d5f47f19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
.TH "EUTILS" "5" "Jun 2003" "Portage 2.0.48" "portage"
.SH "NAME"
eutils \- many extra (but common) functions that are used in ebuilds
.SH "DESCRIPTION"
The \fBeutils\fR eclass contains a suite of functions that complement
the ones that ebuild.sh already contain.  The idea is that the functions
are not required in all ebuilds but enough utilize them to have a common
home.
.SH "FUNCTIONS"
.TP
.BR "draw_line"
Simple function to draw a line consisting of '=' the same length as $*.  So
if you run `draw_line 1234 5678` you will get back 9 '=' characters in a line.
.TP
.BR "edos2unix " "\fI<files>\fR"
A handy replacement for dos2unix, recode, fixdos, etc...  This allows you
to remove all of these text utilities from DEPEND variables because this
is a script based solution.  Just give it a list of files to convert and
they will all be changed from the DOS CRLF format to the UNIX LF format.
.TP
.BR "enewgroup " "\fI<group>\fR \fI[gid]\fR"
This function does not require you to understand how to properly add a 
group to the system.  Just give it a \fIgroup name\fR to add and \fBenewgroup\fR will
do the rest.  You may specify the \fIgid\fR for the group or allow the group to
allocate the next available one.
.TP
.BR "enewuser " "\fI<user>\fR \fI[uid]\fR \fI[shell]\fR \fI[homedir]\fR \fI[groups]\fR \fI[params]\fR"
Same as \fBenewgroup\fR, you are not required to understand how to properly add
a user to the system.  The only required parameter is the \fIusername\fR.
.br
.BR "Default Values"
.br
\fIuid\fR: next available (pass -1 to get default behavior)
.br
\fIshell\fR: /bin/false
.br
\fIhomedir\fR: /dev/null
.br
\fIgroups\fR: no groups
.br
\fIparams\fR: any other parameters \fBuseradd\fR(8) accepts; see the manpage for more details
.TP
.BR "epatch"
See the section on \fBepatch\fR below.
.TP
.BR "gen_usr_ldscript"
Generate linker scripts in /usr/lib for dynamic libs in /lib.  This is to fix linking
problems when you have the .so in /lib, and the .a in /usr/lib.  What happens is that
in some cases when linking dynamic, the .a in /usr/lib is used instead of the .so in
/lib due to gcc/libtool tweaking ld's library search path.
.TP
.BR "get_number_of_jobs"
Checks how many cpu's are present in the system and then sets -j in MAKEOPTS accordingly.
.TP
.BR "have_NPTL"
This function return true if we are using the NPTL pthreads implementation of glibc.
.SH "EPATCH"
.TP
.B "ABOUT"
\fBepatch\fR is designed to make patching easy.  It does all the common checks that
a developer would do with the \fBpatch\fR(1) command and then some.  It will attempt
to apply the patch for a range of offset values (-p0 to -p5, all relative to the working
directory when \fBepatch\fR was called).  If the patch fails to apply (by testing via
dryruns), then \fBpatch\fR will stop the emerge process by calling \fBdie\fR.  You will
be given a log file of the output of the patch attempt so as to ease debugging.  The
output of a successful patch is a pretty formatted message showing what patches were
applied.  \fBepatch\fR can be used for bulk patching or for just one or two patches.  
Additionally, it can handle patches in bzip2, gzip, compress (Z), and zip formats.
.TP
.B "USAGE"
.RS
.TP
.B "epatch " "\fI<patch file>\fR"
The most common and easiest way to use \fBepatch\fR is by just giving it the full path
to a patch file.
.TP
.B "epatch " "\fI<directory>\fR"
A more powerful use is to fill a directory with patches and then let \fBepatch\fR apply
all the patches inside it.  The patches must be in the format ??_${\fBARCH\fR}_foo.${\fBEPATCH_SUFFIX\fR}.  
This ensures that there are a set order, and you can have \fBARCH\fR specific patches.  

.br
01_all_misc-fix.patch.bz2
.br
   apply the misc-fix patch first for all arches
.br
02_sparc_another-fix.patch.bz2
.br
   apply the another-fix patch second but only on sparc
.RE
.TP
.B VARIABLES
.RS
.TP
.B "EPATCH_SOURCE" = \fI"${WORKDIR}/patch"\fR
The patch or directory of patches for \fBepatch\fR to apply.  This is set
automatically if you call \fBepatch\fR with a parameter.
.TP
.B "EPATCH_SUFFIX" = \fI"patch.bz2"\fR
When applying bulk patches this is the suffix that all patches will have.  
.TP
.B "EPATCH_OPTS" = \fI""\fR
Any extra options you may want to pass to \fBpatch\fR(1).  We can't think
of everything so why restrict you :).  The default is "" of course.
.TP
.B "EPATCH_EXCLUDE" = \fI""\fR
A space delimited list (well, actually \fB$IFS\fR delimited ...) of patch
files to skip while bulk patching.  Use only file names, not full paths.
.TP
.B "EPATCH_SINGLE_MSG" = \fI"Applying <patch name>"\fR
If you only apply a single patch, then instead of displaying the default
message you can change it to say anything you want, even 'Dont call me Radio Unit 51',
if you are so inclined of course.
.TP
.B "EPATCH_FORCE" = \fI"[yes|no]"\fR
This allows you to apply all patches in \fBEPATCH_SOURCE\fR even if they
dont match the ??_${\fBARCH\fR}_foo.${\fBEPATCH_SUFFIX\fR} file naming
convention.  By default we want you to use the above convention.
.RE
.SH "REPORTING BUGS"
Please report bugs via http://bugs.gentoo.org/
.SH "SEE ALSO"
.BR ebuild (5)
.SH "FILES"
.BR /usr/portage/eclass/eutils.eclass
.SH "AUTHORS"
Mike Frysinger <vapier@gentoo.org>
.SH "CVS HEADER"
$Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/man/Attic/eutils.5,v 1.1 2003/06/25 14:01:16 vapier Exp $