aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/boost
diff options
context:
space:
mode:
authorHenning Heinold <heinold@inf.fu-berlin.de>2009-11-03 23:01:31 +0100
committerHenning Heinold <heinold@inf.fu-berlin.de>2009-11-03 23:06:31 +0100
commitc0089b4e8124b757fd3f004b3a238c805469d38a (patch)
tree739c7d468411e439bef1b98d61963f027d8d6ff1 /recipes/boost
parent1aa6d29a4e291455b6d54a01c728e2193b1d2cc7 (diff)
downloadopenembedded-c0089b4e8124b757fd3f004b3a238c805469d38a.tar.gz
boost: add new version 1.4.0
* switch to cmake as buildsystem * enable serialization and python * make own .inc for 1.4.x versions * don't make default for now, needs more testing with apps that are using boost
Diffstat (limited to 'recipes/boost')
-rw-r--r--recipes/boost/boost-14x.inc83
-rw-r--r--recipes/boost/boost_1.40.0.bb10
-rw-r--r--recipes/boost/files/uclibc.patch13
3 files changed, 106 insertions, 0 deletions
diff --git a/recipes/boost/boost-14x.inc b/recipes/boost/boost-14x.inc
new file mode 100644
index 0000000000..b1a5f6bb65
--- /dev/null
+++ b/recipes/boost/boost-14x.inc
@@ -0,0 +1,83 @@
+# The Boost web site provides free peer-reviewed portable
+# C++ source libraries. The emphasis is on libraries which
+# work well with the C++ Standard Library. The libraries are
+# intended to be widely useful, and are in regular use by
+# thousands of programmers across a broad spectrum of applications.
+DESCRIPTION = "Free peer-reviewed portable C++ source libraries"
+HOMEPAGE = "http://www.boost.org/"
+SECTION = "libs"
+DEPENDS = "zlib bzip2 python expat"
+PRIORITY = "optional"
+LICENSE = "Boost Software License"
+PR = "r0"
+
+ARM_INSTRUCTION_SET = "arm"
+BOOST_VER = "${@"_".join(bb.data.getVar("PV",d,1).split("."))}"
+BOOST_MAJ = "${@"_".join(bb.data.getVar("PV",d,1).split(".")[0:2])}"
+BOOST_P = "boost_${BOOST_VER}"
+
+inherit cmake
+
+EXTRA_OECMAKE = "-DBUILD_SHARED=ON \
+ -DBUILD_MULTI_THREADED=ON \
+ -DBUILD_RELEASE=ON \
+ -DBUILD_DEBUG=OFF \
+ "
+
+BOOST_LIBS = "\
+ date_time \
+ filesystem \
+ graph \
+ iostreams \
+ program_options \
+ python \
+ regex \
+ serialization \
+ signals \
+ system \
+ test \
+ thread \
+ "
+
+# FIXME: for some reason this fails on powerpc
+#BOOST_LIBS += "serialization"
+
+# To enable python, uncomment the following:
+#BOOST_LIBS += "python"
+#DEPENDS += "python"
+#PYTHON_ROOT = "${STAGING_DIR_HOST}/${layout_prefix}"
+#PYTHON_VERSION = "2.5"
+
+S = "${WORKDIR}/${BOOST_P}"
+
+# Make a package for each library, plus -dev
+PACKAGES = "${PN}-dbg ${BOOST_PACKAGES}"
+python __anonymous () {
+ import bb
+
+ packages = []
+ extras = []
+ for lib in bb.data.getVar('BOOST_LIBS', d, 1).split( ):
+ pkg = "boost-%s" % lib.replace("_", "-")
+ extras.append("--with-%s" % lib)
+ packages.append(pkg)
+ if not bb.data.getVar("FILES_%s" % pkg, d, 1):
+ bb.data.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s*.so*" % lib, d)
+ bb.data.setVar("BOOST_PACKAGES", " ".join(packages), d)
+ bb.data.setVar("BJAM_EXTRA", " ".join(extras), d)
+}
+
+# Override the contents of specific packages
+FILES_boost-serialization = "${libdir}/libboost_serialization*.so* \
+ ${libdir}/libboost_wserialization*.so*"
+FILES_boost-test = "${libdir}/libboost_prg_exec_monitor*.so \
+ ${libdir}/libboost_unit_test_framework*.so*"
+
+# -dev last to pick up the remaining stuff
+PACKAGES += "${PN}-dev"
+FILES_${PN}-dev = "${includedir} ${libdir}/libboost_*.so ${libdir}/libboost_*.a"
+
+# "boost" is a metapackage which pulls in all boost librabries
+PACKAGES += "${PN}"
+RRECOMMENDS_${PN} += "${BOOST_PACKAGES}"
+
diff --git a/recipes/boost/boost_1.40.0.bb b/recipes/boost/boost_1.40.0.bb
new file mode 100644
index 0000000000..5db3b4a301
--- /dev/null
+++ b/recipes/boost/boost_1.40.0.bb
@@ -0,0 +1,10 @@
+require boost-14x.inc
+
+PR = "r0"
+
+SRC_URI = "http://sodium.resophonic.com/boost-cmake/1.40.0.cmake2/boost-1.40.0.cmake2.tar.gz \
+ file://uclibc.patch;patch=1 \
+ "
+S = "${WORKDIR}/boost-1.40.0.cmake2"
+
+DEFAULT_PREFERENCE = "-1"
diff --git a/recipes/boost/files/uclibc.patch b/recipes/boost/files/uclibc.patch
new file mode 100644
index 0000000000..738b8b947d
--- /dev/null
+++ b/recipes/boost/files/uclibc.patch
@@ -0,0 +1,13 @@
+Index: boost-1.40.0.cmake2/libs/thread/src/pthread/thread.cpp
+===================================================================
+--- boost-1.40.0.cmake2.orig/libs/thread/src/pthread/thread.cpp 2009-11-03 21:33:21.392444361 +0100
++++ boost-1.40.0.cmake2/libs/thread/src/pthread/thread.cpp 2009-11-03 21:36:04.748684550 +0100
+@@ -390,7 +390,7 @@
+ {
+ #if defined(PTW32_VERSION) || defined(__hpux)
+ return pthread_num_processors_np();
+-#elif defined(__linux__)
++#elif defined(__linux__) && !defined(__UCLIBC__)
+ return get_nprocs();
+ #elif defined(__APPLE__) || defined(__FreeBSD__)
+ int count;