Download OpenEmbedded User Manual

Transcript
Chapter 8. Recipes
The oe_libinstall method used in the bzip2 recipe is described in the methods section, and it takes care of
installing libraries (into the staging area in this case). The staging variables are automatically defined to
the correct staging location, in this case the main staging variables are used:
STAGING_INCDIR
The directory into which staged headers files should be installed. This is the equivalent of the
standard /usr/include directory.
STAGING_LIBDIR
The directory into which staged library files should be installed. This is the equivalent of the
standard /usr/lib directory.
Additional staging related variables are covered in the Staging directories section in Chapter 9.
Looking in the staging area under tmp you can see the result of the bzip2 recipes staging task:
%> find tmp/staging -name ’*bzlib*’
tmp/staging/sh4-linux/include/bzlib.h
%> find tmp/staging -name ’*libbz*’
tmp/staging/sh4-linux/lib/libbz2.so
tmp/staging/sh4-linux/lib/libbz2.so.1.0
tmp/staging/sh4-linux/lib/libbz2.so.1
tmp/staging/sh4-linux/lib/libbz2.so.1.0.2
tmp/staging/sh4-linux/lib/libbz2.a
As well as being used during the stage task the staging related variables are used when building other
packages. Looking at the gnupg recipe we see two bzip2 related items:
DEPENDS = "zlib bzip2"
...
EXTRA_OECONF = "--disable-ldap \
--with-zlib=${STAGING_LIBDIR}/.. \
--with-bzip2=${STAGING_LIBDIR}/.. \
--disable-selinux-support"
Bzip2 is referred to in two places in the recipe:
DEPENDS
Remember that DEPENDS defines the list of build time dependencies. In this case the staged
headers and libraries from bzip2 are required to build gnupg, and therefore we need to make sure
the bzip2 recipe has run and staging the headers and libraries. By adding the DEPENDS on bzip2
this ensures that this happens.
77