summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/boost/boost-36.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/boost/boost-36.inc')
-rw-r--r--meta/recipes-support/boost/boost-36.inc149
1 files changed, 149 insertions, 0 deletions
diff --git a/meta/recipes-support/boost/boost-36.inc b/meta/recipes-support/boost/boost-36.inc
new file mode 100644
index 0000000000..5d2d1280be
--- /dev/null
+++ b/meta/recipes-support/boost/boost-36.inc
@@ -0,0 +1,149 @@
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.
6DESCRIPTION = "Free peer-reviewed portable C++ source libraries"
7HOMEPAGE = "http://www.boost.org/"
8SECTION = "libs"
9DEPENDS = "boost-jam-native zlib"
10PRIORITY = "optional"
11LICENSE = "Boost Software License"
12PR = "r3"
13
14ARM_INSTRUCTION_SET = "arm"
15BOOST_VER = "${@"_".join(bb.data.getVar("PV",d,1).split("."))}"
16BOOST_MAJ = "${@"_".join(bb.data.getVar("PV",d,1).split(".")[0:2])}"
17BOOST_P = "boost_${BOOST_VER}"
18
19BOOST_LIBS = "\
20 date_time \
21 filesystem \
22 graph \
23 iostreams \
24 program_options \
25 regex \
26 signals \
27 system \
28 test \
29 thread \
30 "
31
32# FIXME: for some reason this fails on powerpc
33#BOOST_LIBS += "serialization"
34
35# To enable python, uncomment the following:
36#BOOST_LIBS += "python"
37#DEPENDS += "python"
38#PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}"
39#PYTHON_VERSION = "2.5"
40
41S = "${WORKDIR}/${BOOST_P}"
42
43# Make a package for each library, plus -dev
44PACKAGES = "${PN}-dbg ${BOOST_PACKAGES}"
45python __anonymous () {
46 import bb
47
48 packages = []
49 extras = []
50 for lib in bb.data.getVar('BOOST_LIBS', d, 1).split( ):
51 pkg = "boost-%s" % lib.replace("_", "-")
52 extras.append("--with-%s" % lib)
53 packages.append(pkg)
54 if not bb.data.getVar("FILES_%s" % pkg, d, 1):
55 bb.data.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s*.so.*" % lib, d)
56 bb.data.setVar("BOOST_PACKAGES", " ".join(packages), d)
57 bb.data.setVar("BJAM_EXTRA", " ".join(extras), d)
58}
59
60# Override the contents of specific packages
61FILES_boost-serialization = "${libdir}/libboost_serialization*.so.* \
62 ${libdir}/libboost_wserialization*.so.*"
63FILES_boost-test = "${libdir}/libboost_prg_exec_monitor*.so.* \
64 ${libdir}/libboost_unit_test_framework*.so.*"
65
66# -dev last to pick up the remaining stuff
67PACKAGES += "${PN}-dev"
68FILES_${PN}-dev = "${includedir} ${libdir}/libboost_*.so ${libdir}/libboost_*.a"
69
70# "boost" is a metapackage which pulls in all boost librabries
71PACKAGES += "${PN}"
72RRECOMMENDS_${PN} += "${BOOST_PACKAGES}"
73ALLOW_EMPTY_${PN} = "1"
74
75# to avoid GNU_HASH QA errors added LDFLAGS to ARCH; a little bit dirty but at least it works
76TARGET_CC_ARCH += " ${LDFLAGS}"
77
78# Oh yippee, a new build system, it's sooo cooool I could eat my own
79# foot. inlining=on lets the compiler choose, I think. At least this
80# stuff is documented...
81# NOTE: if you leave <debug-symbols>on then in a debug build the build sys
82# objcopy will be invoked, and that won't work. Building debug apparently
83# requires hacking gcc-tools.jam
84#
85# Sometimes I wake up screaming. Famous figures are gathered in the nightmare,
86# Steve Bourne, Larry Wall, the whole of the ANSI C committee. They're just
87# standing there, waiting, but the truely terrifying thing is what they carry
88# in their hands. At first sight each seems to bear the same thing, but it is
89# not so for the forms in their grasp are ever so slightly different one from
90# the other. Each is twisted in some grotesque way from the other to make each
91# an unspeakable perversion impossible to perceive without the onset of madness.
92# True insanity awaits anyone who perceives all of these horrors together.
93#
94# Quotation marks, there might be an easier way to do this, but I can't find
95# it. The problem is that the user.hpp configuration file must receive a
96# pre-processor macro defined as the appropriate string - complete with "'s
97# around it. (<> is a possibility here but the danger to that is that the
98# failure case interprets the < and > as shell redirections, creating
99# random files in the source tree.)
100#
101#bjam: '-DBOOST_PLATFORM_CONFIG=\"config\"'
102#do_compile: '-sGCC=... '"'-DBOOST_PLATFORM_CONFIG=\"config\"'"
103SQD = '"'
104EQD = '\"'
105#boost.bb: "... '-sGCC=... '${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}config${EQD}'${SQD} ..."
106BJAM_CONF = "${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}boost/config/platform/${TARGET_OS}.hpp${EQD}'${SQD}"
107
108# bzip2 and zip are disabled because... they're broken - the compilation simply
109# isn't working with bjam. I guess they will fix it, but who needs it? This
110# only affects the (new in 33) iostream library.
111BJAM_TOOLS = "-sTOOLS=gcc \
112 '-sGCC=${CC} '${BJAM_CONF} \
113 '-sGXX=${CXX} '${BJAM_CONF} \
114 '-sGCC_INCLUDE_DIRECTORY=${STAGING_INCDIR}' \
115 '-sGCC_STDLIB_DIRECTORY=${STAGING_LIBDIR}' \
116 '-sNO_BZIP2=1' \
117 '-sNO_ZLIB=1' \
118 '-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \
119 '-sPYTHON_VERSION=${PYTHON_VERSION}' \
120 '--layout=system' \
121 "
122
123BJAM_OPTS = '${BJAM_TOOLS} \
124 --builddir=${S}/${TARGET_SYS} \
125 --with-python-root=${PYTHON_ROOT} \
126 ${BJAM_EXTRA}'
127
128
129do_configure_prepend() {
130 cp -f boost/config/platform/linux.hpp boost/config/platform/linux-gnueabi.hpp
131
132 echo 'using gcc : 4.3.1 : ${CXX} : compileflags -DBOOST_SP_USE_PTHREADS -I${includedir} linkflags -L${libdir} ;' >> ${S}/tools/build/v2/user-config.jam
133}
134
135do_compile() {
136 set -ex
137 bjam ${BJAM_OPTS} --prefix=${prefix} \
138 --exec-prefix=${exec_prefix} \
139 --libdir=${libdir} \
140 --includedir=${includedir}
141}
142
143do_install() {
144 set -ex
145 bjam ${BJAM_OPTS} \
146 --libdir=${D}${libdir} \
147 --includedir=${D}${includedir} \
148 install
149}