cornucopia: bump SRCREV
[openembedded.git] / recipes / boost / boost.inc
blobe9dd61dad4a6eb7fb3864eb738eb7ab4d069aaa6
1 # The Boost web site provides free peer-reviewed portable
2 # C++ source libraries. The emphasis is on libraries which
3 # work well with the C++ Standard Library. The libraries are
4 # intended to be widely useful, and are in regular use by
5 # thousands of programmers across a broad spectrum of applications.
6 DESCRIPTION = "Free peer-reviewed portable C++ source libraries"
7 HOMEPAGE = "http://www.boost.org/"
8 SECTION = "libs"
9 DEPENDS = "boost-jam-native zlib"
10 PRIORITY = "optional"
11 LICENSE = "Boost Software License"
12 INC_PR = "r9"
14 BOOST_VER = "${@"_".join(bb.data.getVar("PV",d,1).split("."))}"
15 BOOST_MAJ = "${@"_".join(bb.data.getVar("PV",d,1).split(".")[0:2])}"
16 BOOST_P = "boost_${BOOST_VER}"
18 S = "${WORKDIR}/${BOOST_P}"
20 # Make a package for each library, plus -dev and -python
21 PACKAGES = "${PN}-dbg"
22 BOOSTLIBS = ""
24 PACKAGES += "boost-date-time"
25 FILES_boost-date-time = "${libdir}/libboost_date_time.so.${PV}"
27 BOOSTLIBS += "boost-filesystem"
28 FILES_boost-filesystem = "${libdir}/libboost_filesystem.so.${PV}"
30 BOOSTLIBS += "boost-prg-exec-monitor"
31 FILES_boost-prg-exec-monitor = "${libdir}/libboost_prg_exec_monitor.so.${PV}"
33 BOOSTLIBS += "boost-program-options"
34 FILES_boost-program-options = "${libdir}/libboost_program_options.so.${PV}"
36 BOOSTLIBS += "boost-regex"
37 FILES_boost-regex = "${libdir}/libboost_regex.so.${PV}"
39 BOOSTLIBS += "boost-signals"
40 FILES_boost-signals = "${libdir}/libboost_signals.so.${PV}"
42 BOOSTLIBS += "boost-test-exec-monitor"
43 FILES_boost-test-exec-monitor = "${libdir}/libboost_test_exec_monitor.so.${PV}"
45 BOOSTLIBS += "boost-thread-mt"
46 FILES_boost-thread-mt = "${libdir}/libboost_thread-mt.so.${PV}"
48 BOOSTLIBS += "boost-unit-test-framework"
49 FILES_boost-unit-test-framework = "${libdir}/libboost_unit_test_framework.so.${PV}"
51 BOOSTLIBS += "boost-iostreams"
52 FILES_boost-iostreams = "${libdir}/libboost_iostreams.so.${PV}"
54 BOOSTLIBS += "boost-serialization"
55 FILES_boost-serialization = "${libdir}/libboost_serialization.so.${PV}"
57 BOOSTLIBS += "boost-wserialization"
58 FILES_boost-wserialization = "${libdir}/libboost_wserialization.so.${PV}"
60 # Python - remove this and set:
61 #PYTHON_ROOT = "/dev/null"
62 # to remove the python build
63 DEPENDS += "python"
64 PYTHON_ROOT = "${STAGING_DIR_HOST}/${layout_prefix}"
65 PYTHON_VERSION = "2.5"
67 BOOSTLIBS += "boost-python"
68 FILES_boost-python = "${libdir}/libboost_python.so.${PV}"
70 PACKAGES += "${BOOSTLIBS}"
72 # -dev last to pick up the remaining stuff
73 PACKAGES += "${PN}-dev"
74 FILES_${PN}-dev = "${includedir} ${libdir}/libboost_*.so ${libdir}/libboost_*.a"
76 # "boost" is a metapackage which pulls in all boost librabries
77 PACKAGES += "${PN}"
78 RRECOMMENDS_${PN} += "${BOOSTLIBS}"
80 # to avoid GNU_HASH QA errors added LDFLAGS to ARCH; a little bit dirty but at least it works
81 TARGET_CC_ARCH += " ${LDFLAGS}" 
83 # Oh yippee, a new build system, it's sooo cooool I could eat my own
84 # foot.  inlining=on lets the compiler choose, I think.  At least this
85 # stuff is documented...
86 # NOTE: if you leave <debug-symbols>on then in a debug build the build sys
87 # objcopy will be invoked, and that won't work.  Building debug apparently
88 # requires hacking gcc-tools.jam
90 # Sometimes I wake up screaming.  Famous figures are gathered in the nightmare,
91 # Steve Bourne, Larry Wall, the whole of the ANSI C committee.  They're just
92 # standing there, waiting, but the truely terrifying thing is what they carry
93 # in their hands.  At first sight each seems to bear the same thing, but it is
94 # not so for the forms in their grasp are ever so slightly different one from
95 # the other.  Each is twisted in some grotesque way from the other to make each
96 # an unspeakable perversion impossible to perceive without the onset of madness.
97 # True insanity awaits anyone who perceives all of these horrors together.
99 # Quotation marks, there might be an easier way to do this, but I can't find
100 # it.  The problem is that the user.hpp configuration file must receive a
101 # pre-processor macro defined as the appropriate string - complete with "'s
102 # around it.  (<> is a possibility here but the danger to that is that the
103 # failure case interprets the < and > as shell redirections, creating
104 # random files in the source tree.)
106 #bjam: '-DBOOST_PLATFORM_CONFIG=\"config\"'
107 #do_compile: '-sGCC=... '"'-DBOOST_PLATFORM_CONFIG=\"config\"'"
108 SQD = '"'
109 EQD = '\"'
110 #boost.bb:   "...  '-sGCC=... '${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}config${EQD}'${SQD} ..."
111 BJAM_CONF = "${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}boost/config/platform/${TARGET_OS}.hpp${EQD}'${SQD}"
113 # bzip2 and zip are disabled because... they're broken - the compilation simply
114 # isn't working with bjam.  I guess they will fix it, but who needs it?  This
115 # only affects the (new in 33) iostream library.
116 BJAM_TOOLS   = "-sTOOLS=gcc \
117                 '-sGCC=${CC} '${BJAM_CONF} \
118                 '-sGXX=${CXX} '${BJAM_CONF} \
119                 '-sGCC_INCLUDE_DIRECTORY=${STAGING_INCDIR}' \
120                 '-sGCC_STDLIB_DIRECTORY=${STAGING_LIBDIR}' \
121                 '-sNO_BZIP2=1' \
122                 '-sNO_ZLIB=1' \
123                 '-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \
124                 '-sPYTHON_VERSION=${PYTHON_VERSION}' \
125                 '--layout=system' \
126                 "
128 BJAM_OPTS    = '${BJAM_TOOLS} \
129                 --builddir=${S}/${TARGET_SYS} \
130                 --with-python-root=${PYTHON_ROOT} \
131                 ${BJAM_EXTRA}'
134 do_configure_prepend() {
135         cp -f boost/config/platform/linux.hpp boost/config/platform/linux-gnueabi.hpp
138 do_compile() {
139         set -ex
140         bjam ${BJAM_OPTS} --prefix=${prefix} \
141                 --exec-prefix=${exec_prefix} \
142                 --libdir=${libdir} \
143                 --includedir=${includedir}
146 do_stage() {
147         set -ex
148         bjam ${BJAM_OPTS} \
149                 --libdir=${STAGING_LIBDIR} \
150                 --includedir=${STAGING_INCDIR} \
151                 install
154 do_install() {
155         set -ex
156         bjam ${BJAM_OPTS} \
157                 --libdir=${D}${libdir} \
158                 --includedir=${D}${includedir} \
159                 install