blob: 25f3685aadec48870147a6ca906b99749e3e6005 (
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
<?xml version="1.0" encoding="UTF-8"?>
<section id="directories_staging" xreflabel="Staging directories">
<title>Directories: Staging variables</title>
<para>The following table provides a list of the variables that are used to
control the directories into which files are staged.</para>
<para>Staging is used for headers, libraries and binaries that are generated
by packages and are to be used in the generation of other packages. For
example the libpcre recipe needs to make the include files and libraries for
the target available on the host for other applications that depend on
libpcre. So in addition to packaging these files up for use in the binary
package they are need to be installed in the staging are for use by other
packages.</para>
<para>There are two common situations in which you will need to directly
refer to the staging directories:</para>
<orderedlist>
<listitem>
<para>To specify where headers and libraries are to be found for
libraries that your package depends on. In some cases these will be
found automatically due to the default compiler settings used by OE, but
in other cases you will need to explicitly tell your package to look in
the staging area. This is more commonly needed with autoconf based
packages that check for the presence of a specific package during the
<emphasis>configure</emphasis> task.</para>
</listitem>
<listitem>
<para>In the <emphasis>stage</emphasis> task for libraries to specify
where to install the headers and libraries.</para>
</listitem>
</orderedlist>
<para>The following example from libpcre shows the installation of the
libraries and headers from the package into the staging area. Note the use
of the <emphasis>oe_libinstall</emphasis> helper function for installation
of the libraries:<screen>do_stage () {
oe_libinstall -a -so libpcre ${STAGING_LIBDIR}
oe_libinstall -a -so libpcreposix ${STAGING_LIBDIR}
install -m 0644 pcre.h ${STAGING_INCDIR}/
install -m 0644 pcreposix.h ${STAGING_INCDIR}/
}</screen></para>
<para>The following example from the flac recipe shows the location of the
ogg libraries and included before explicitly passed to the configured script
via EXTRA_OECONF so that it will correctly find ogg and enable support for
it:<screen>EXTRA_OECONF = "--disable-oggtest --disable-id3libtest \
--with-ogg-libraries=${STAGING_LIBDIR} \
--with-ogg-includes=${STAGING_INCDIR} \
--without-xmms-prefix \
--without-xmms-exec-prefix \
--without-libiconv-prefix \
--without-id3lib"</screen>The following table lists the available
variables for referring to the staging area:</para>
<informaltable>
<tgroup cols="2">
<colspec colnum="0" colwidth="1*" />
<colspec colnum="1" colwidth="1*" />
<thead>
<row>
<entry>Directory</entry>
<entry>Definition</entry>
</row>
</thead>
<tbody>
<row>
<entry>STAGING_DIR</entry>
<entry>${TMPDIR}/staging</entry>
</row>
<row>
<entry>STAGING_BINDIR</entry>
<entry>${STAGING_DIR}/${HOST_SYS}/bin</entry>
</row>
<row>
<entry>STAGING_BINDIR_CROSS</entry>
<entry>${STAGING_DIR}/${BUILD_SYS}/bin/${HOST_SYS}</entry>
</row>
<row>
<entry>STAGING_BINDIR_NATIVE</entry>
<entry>${STAGING_DIR}/${BUILD_SYS}/bin</entry>
</row>
<row>
<entry>STAGING_LIBDIR</entry>
<entry>${STAGING_DIR}/${HOST_SYS}/lib</entry>
</row>
<row>
<entry>STAGING_INCDIR</entry>
<entry>${STAGING_DIR}/${HOST_SYS}/include</entry>
</row>
<row>
<entry>STAGING_DATADIR</entry>
<entry>${STAGING_DIR}/${HOST_SYS}/share</entry>
</row>
<row>
<entry>STAGING_LOADER_DIR</entry>
<entry>${STAGING_DIR}/${HOST_SYS}/loader</entry>
</row>
<row>
<entry>STAGING_FIRMWARE_DIR</entry>
<entry>${STAGING_DIR}/${HOST_SYS}/firmware</entry>
</row>
<row>
<entry>STAGING_PYDIR</entry>
<entry>${STAGING_DIR}/lib/python2.4</entry>
</row>
<row>
<entry>STAGING_KERNEL_DIR</entry>
<entry>${STAGING_DIR}/${HOST_SYS}/kernel</entry>
</row>
<row>
<entry>PKG_CONFIG_PATH</entry>
<entry>${STAGING_LIBDIR}/pkgconfig</entry>
</row>
<row>
<entry>QTDIR</entry>
<entry>${STAGING_DIR}/${HOST_SYS}/qt2</entry>
</row>
<row>
<entry>QPEDIR</entry>
<entry>${STAGING_DIR}/${HOST_SYS}</entry>
</row>
<row>
<entry>OPIEDIR</entry>
<entry>${STAGING_DIR}/${HOST_SYS}</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para></para>
<para></para>
</section>
|