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/"
9 DEPENDS = "boost-jam-native zlib"
11 LICENSE = "Boost Software License"
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}"
31 # FIXME: for some reason this fails on powerpc
32 #BOOST_LIBS += "serialization"
34 # To enable python, uncomment the following:
35 #BOOST_LIBS += "python"
37 #PYTHON_ROOT = "${STAGING_DIR_HOST}/${layout_prefix}"
38 #PYTHON_VERSION = "2.5"
40 S = "${WORKDIR}/${BOOST_P}"
42 # Make a package for each library, plus -dev
43 PACKAGES = "${PN}-dbg ${BOOST_PACKAGES}"
44 python __anonymous () {
49 for lib in bb.data.getVar('BOOST_LIBS', d, 1).split( ):
50 pkg = "boost-%s" % lib.replace("_", "-")
51 extras.append("--with-%s" % lib)
53 if not bb.data.getVar("FILES_%s" % pkg, d, 1):
54 bb.data.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s*.so*" % lib, d)
55 bb.data.setVar("BOOST_PACKAGES", " ".join(packages), d)
56 bb.data.setVar("BJAM_EXTRA", " ".join(extras), d)
59 # Override the contents of specific packages
60 FILES_boost-serialization = "${libdir}/libboost_serialization*.so* \
61 ${libdir}/libboost_wserialization*.so*"
62 FILES_boost-test = "${libdir}/libboost_prg_exec_monitor*.so \
63 ${libdir}/libboost_unit_test_framework*.so*"
65 # -dev last to pick up the remaining stuff
66 PACKAGES += "${PN}-dev"
67 FILES_${PN}-dev = "${includedir} ${libdir}/libboost_*.so ${libdir}/libboost_*.a"
69 # "boost" is a metapackage which pulls in all boost librabries
71 RRECOMMENDS_${PN} += "${BOOST_PACKAGES}"
73 # to avoid GNU_HASH QA errors added LDFLAGS to ARCH; a little bit dirty but at least it works
74 TARGET_CC_ARCH += " ${LDFLAGS}"
76 # Oh yippee, a new build system, it's sooo cooool I could eat my own
77 # foot. inlining=on lets the compiler choose, I think. At least this
78 # stuff is documented...
79 # NOTE: if you leave <debug-symbols>on then in a debug build the build sys
80 # objcopy will be invoked, and that won't work. Building debug apparently
81 # requires hacking gcc-tools.jam
83 # Sometimes I wake up screaming. Famous figures are gathered in the nightmare,
84 # Steve Bourne, Larry Wall, the whole of the ANSI C committee. They're just
85 # standing there, waiting, but the truely terrifying thing is what they carry
86 # in their hands. At first sight each seems to bear the same thing, but it is
87 # not so for the forms in their grasp are ever so slightly different one from
88 # the other. Each is twisted in some grotesque way from the other to make each
89 # an unspeakable perversion impossible to perceive without the onset of madness.
90 # True insanity awaits anyone who perceives all of these horrors together.
92 # Quotation marks, there might be an easier way to do this, but I can't find
93 # it. The problem is that the user.hpp configuration file must receive a
94 # pre-processor macro defined as the appropriate string - complete with "'s
95 # around it. (<> is a possibility here but the danger to that is that the
96 # failure case interprets the < and > as shell redirections, creating
97 # random files in the source tree.)
99 #bjam: '-DBOOST_PLATFORM_CONFIG=\"config\"'
100 #do_compile: '-sGCC=... '"'-DBOOST_PLATFORM_CONFIG=\"config\"'"
103 #boost.bb: "... '-sGCC=... '${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}config${EQD}'${SQD} ..."
104 BJAM_CONF = "${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}boost/config/platform/${TARGET_OS}.hpp${EQD}'${SQD}"
106 # bzip2 and zip are disabled because... they're broken - the compilation simply
107 # isn't working with bjam. I guess they will fix it, but who needs it? This
108 # only affects the (new in 33) iostream library.
109 BJAM_TOOLS = "-sTOOLS=gcc \
110 '-sGCC=${CC} '${BJAM_CONF} \
111 '-sGXX=${CXX} '${BJAM_CONF} \
112 '-sGCC_INCLUDE_DIRECTORY=${STAGING_INCDIR}' \
113 '-sGCC_STDLIB_DIRECTORY=${STAGING_LIBDIR}' \
116 '-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \
117 '-sPYTHON_VERSION=${PYTHON_VERSION}' \
121 BJAM_OPTS = '${BJAM_TOOLS} \
122 --builddir=${S}/${TARGET_SYS} \
123 --with-python-root=${PYTHON_ROOT} \
127 do_configure_prepend() {
128 cp -f boost/config/platform/linux.hpp boost/config/platform/linux-gnueabi.hpp
130 echo 'using gcc : 4.3.1 : ${CXX} : compileflags -DBOOST_SP_USE_PTHREADS -I${includedir} linkflags -L${libdir} ;' >> ${S}/tools/build/v2/user-config.jam
135 bjam ${BJAM_OPTS} --prefix=${prefix} \
136 --exec-prefix=${exec_prefix} \
138 --includedir=${includedir}
144 --libdir=${STAGING_LIBDIR} \
145 --includedir=${STAGING_INCDIR} \
152 --libdir=${D}${libdir} \
153 --includedir=${D}${includedir} \