freesmartphone: bump cornucopia, msmcomm, libfso-glib, fso-specs, libgisi SRCREV
[openembedded.git] / recipes / boost / boost-with-bjam.inc
blob68d9e748edad09c4956c4e7e5894ef35049ae730
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.
7 # This recipe is for building Boost versions > 1.45, where bjam has been merged
8 # into the Boost tree.
10 DESCRIPTION = "Free peer-reviewed portable C++ source libraries"
11 HOMEPAGE = "http://www.boost.org/"
12 SECTION = "libs"
13 DEPENDS = "zlib bzip2 icu"
14 PRIORITY = "optional"
15 LICENSE = "Boost Software License"
16 INC_PR = "r10"
18 BOOST_VER = "${@"_".join(bb.data.getVar("PV",d,1).split("."))}"
19 BOOST_MAJ = "${@"_".join(bb.data.getVar("PV",d,1).split(".")[0:2])}"
20 BOOST_P = "boost_${BOOST_VER}"
22 S = "${WORKDIR}/${BOOST_P}"
24 # Make a package for each library, plus -dev and -python
25 PACKAGES = "${PN}-dbg"
26 BOOSTLIBS = ""
28 PACKAGES += "boost-date-time"
29 FILES_boost-date-time = "${libdir}/libboost_date_time.so.${PV}"
31 BOOSTLIBS += "boost-filesystem"
32 FILES_boost-filesystem = "${libdir}/libboost_filesystem.so.${PV}"
34 BOOSTLIBS += "boost-prg-exec-monitor"
35 FILES_boost-prg-exec-monitor = "${libdir}/libboost_prg_exec_monitor.so.${PV}"
37 BOOSTLIBS += "boost-program-options"
38 FILES_boost-program-options = "${libdir}/libboost_program_options.so.${PV}"
40 BOOSTLIBS += "boost-regex"
41 FILES_boost-regex = "${libdir}/libboost_regex.so.${PV}"
43 BOOSTLIBS += "boost-signals"
44 FILES_boost-signals = "${libdir}/libboost_signals.so.${PV}"
46 BOOSTLIBS += "boost-test-exec-monitor"
47 FILES_boost-test-exec-monitor = "${libdir}/libboost_test_exec_monitor.so.${PV}"
49 BOOSTLIBS += "boost-thread-mt"
50 FILES_boost-thread-mt = "${libdir}/libboost_thread-mt.so.${PV}"
52 BOOSTLIBS += "boost-unit-test-framework"
53 FILES_boost-unit-test-framework = "${libdir}/libboost_unit_test_framework.so.${PV}"
55 BOOSTLIBS += "boost-iostreams"
56 FILES_boost-iostreams = "${libdir}/libboost_iostreams.so.${PV}"
58 BOOSTLIBS += "boost-serialization"
59 FILES_boost-serialization = "${libdir}/libboost_serialization.so.${PV}"
61 BOOSTLIBS += "boost-wserialization"
62 FILES_boost-wserialization = "${libdir}/libboost_wserialization.so.${PV}"
64 # Python - remove this and set:
65 #PYTHON_ROOT = "/dev/null"
66 # to remove the python build
67 DEPENDS += "python"
68 PYTHON_ROOT = "${STAGING_DIR_HOST}/${layout_prefix}"
69 PYTHON_VERSION = "2.6"
71 BOOSTLIBS += "boost-python"
72 FILES_boost-python = "${libdir}/libboost_python.so.${PV}"
74 PACKAGES += "${BOOSTLIBS}"
76 # -dev last to pick up the remaining stuff
77 PACKAGES += "${PN}-dev"
78 FILES_${PN}-dev = "${includedir} ${libdir}/libboost_*.so ${libdir}/libboost_*.a"
80 # "boost" is a metapackage which pulls in all boost librabries
81 PACKAGES += "${PN}"
82 RRECOMMENDS_${PN} += "${BOOSTLIBS}"
84 # to avoid GNU_HASH QA errors added LDFLAGS to ARCH; a little bit dirty but at least it works
85 TARGET_CC_ARCH += " ${LDFLAGS}" 
87 # Oh yippee, a new build system, it's sooo cooool I could eat my own
88 # foot.  inlining=on lets the compiler choose, I think.  At least this
89 # stuff is documented...
90 # NOTE: if you leave <debug-symbols>on then in a debug build the build sys
91 # objcopy will be invoked, and that won't work.  Building debug apparently
92 # requires hacking gcc-tools.jam
94 # Sometimes I wake up screaming.  Famous figures are gathered in the nightmare,
95 # Steve Bourne, Larry Wall, the whole of the ANSI C committee.  They're just
96 # standing there, waiting, but the truely terrifying thing is what they carry
97 # in their hands.  At first sight each seems to bear the same thing, but it is
98 # not so for the forms in their grasp are ever so slightly different one from
99 # the other.  Each is twisted in some grotesque way from the other to make each
100 # an unspeakable perversion impossible to perceive without the onset of madness.
101 # True insanity awaits anyone who perceives all of these horrors together.
103 # Quotation marks, there might be an easier way to do this, but I can't find
104 # it.  The problem is that the user.hpp configuration file must receive a
105 # pre-processor macro defined as the appropriate string - complete with "'s
106 # around it.  (<> is a possibility here but the danger to that is that the
107 # failure case interprets the < and > as shell redirections, creating
108 # random files in the source tree.)
110 #bjam: '-DBOOST_PLATFORM_CONFIG=\"config\"'
111 #do_compile: '-sGCC=... '"'-DBOOST_PLATFORM_CONFIG=\"config\"'"
112 SQD = '"'
113 EQD = '\"'
114 #boost.bb:   "...  '-sGCC=... '${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}config${EQD}'${SQD} ..."
115 BJAM_CONF = "${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}boost/config/platform/${TARGET_OS}.hpp${EQD}'${SQD}"
117 BJAM_TOOLS   = "--layout=system \
118                 --toolset=gcc-target \
119                 -sICU_PATH=${STAGING_DIR_TARGET} \
120                 '-sGCC_INCLUDE_DIRECTORY=${STAGING_INCDIR}' \
121                 '-sGCC_STDLIB_DIRECTORY=${STAGING_LIBDIR}' \
122                 "
124 BJAM_OPTS    = '${BJAM_TOOLS} \
125                 --builddir=${S}/${TARGET_SYS} \
126                 ${BJAM_EXTRA} \
127                 ${PARALLEL_MAKE}'
130 do_configure_prepend() {
131         cp -f boost/config/platform/linux.hpp boost/config/platform/linux-gnueabi.hpp
132         echo "using gcc : host : ${HOST_CXX} : <cxxflags>${HOST_CFLAGS} ${HOST_CXXFLAGS} <linkflags>${HOST_LDFLAGS} ;" >> tools/build/v2/user-config.jam
133         echo "using gcc : target : ${CXX} : <cxxflags>${CFLAGS} ${CXXFLAGS} <linkflags>${LDFLAGS} ;" >> tools/build/v2/user-config.jam
134         echo "using python : ${PYTHON_VERSION} : : ${STAGING_INCDIR}/python${PYTHON_VERSION} ;" >> tools/build/v2/user-config.jam
136         CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-toolset=gcc
137         sed -i '/^using python/d' project-config.jam
140 do_compile() {
141         set -ex
142         ./bjam -d2 ${BJAM_OPTS} --prefix=${prefix} \
143                 --exec-prefix=${exec_prefix} \
144                 --libdir=${libdir} \
145                 --includedir=${includedir} \
146                 --include=${STAGING_INCDIR} \
147                 --debug-configuration
150 do_stage() {
151         set -ex
152         ./bjam ${BJAM_OPTS} \
153                 --libdir=${STAGING_LIBDIR} \
154                 --includedir=${STAGING_INCDIR} \
155                 install
158 do_install() {
159         set -ex
160         ./bjam ${BJAM_OPTS} \
161                 --libdir=${D}${libdir} \
162                 --includedir=${D}${includedir} \
163                 install