diff options
author | Henning Heinold <heinold@inf.fu-berlin.de> | 2009-11-03 23:01:31 +0100 |
---|---|---|
committer | Henning Heinold <heinold@inf.fu-berlin.de> | 2009-11-03 23:06:31 +0100 |
commit | c0089b4e8124b757fd3f004b3a238c805469d38a (patch) | |
tree | 739c7d468411e439bef1b98d61963f027d8d6ff1 | |
parent | 1aa6d29a4e291455b6d54a01c728e2193b1d2cc7 (diff) |
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
-rw-r--r-- | conf/checksums.ini | 4 | ||||
-rw-r--r-- | recipes/boost/boost-14x.inc | 83 | ||||
-rw-r--r-- | recipes/boost/boost_1.40.0.bb | 10 | ||||
-rw-r--r-- | recipes/boost/files/uclibc.patch | 13 |
4 files changed, 110 insertions, 0 deletions
diff --git a/conf/checksums.ini b/conf/checksums.ini index 6e76e669e5..cc93b8957c 100644 --- a/conf/checksums.ini +++ b/conf/checksums.ini @@ -3322,6 +3322,10 @@ sha256=9a4a0cfbbd227c20a13519a2c41f2e707dc0d89e518a3c7bfcd381f7b7fbcdef md5=328bfec66c312150e4c2a78dcecb504b sha256=9a4a0cfbbd227c20a13519a2c41f2e707dc0d89e518a3c7bfcd381f7b7fbcdef +[http://sodium.resophonic.com/boost-cmake/1.40.0.cmake2/boost-1.40.0.cmake2.tar.gz] +md5=1a0926fe4c8228f14a2622b4182b801e +sha256=ce6e6c3a6b9a3e7695cb7a0f83d4dbb58f1fb246eb706e3caf3fce3b77e186c0 + [http://downloads.sourceforge.net/asio/boost_asio_0_3_7.tar.bz2] md5=e006cde4b4a28cfce95e43710cd126a9 sha256=ade3663edc611d558f5a383abccd0a9ab87d6168f422ef4c2a38775e8b7ca575 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; |