aboutsummaryrefslogtreecommitdiffstats
path: root/packages/boost
diff options
context:
space:
mode:
authorPhilip Balister <philip@balister.org>2008-10-05 19:18:55 +0000
committerPhilip Balister <philip@balister.org>2008-10-05 19:18:55 +0000
commit74e7c9a96d176e32aac4791c7e308a0c904f735b (patch)
treedb657bce517a5f208bf1425e1c99897d2a1af061 /packages/boost
parent161f8ed7b53911a89a4bd8f2f75880e0a4cec44f (diff)
downloadopenembedded-74e7c9a96d176e32aac4791c7e308a0c904f735b.tar.gz
boost-1.36.0 : Add support for building boost-1.36.
* Not all libraries are built.
Diffstat (limited to 'packages/boost')
-rw-r--r--packages/boost/boost-36.inc165
-rw-r--r--packages/boost/boost_1.36.0.bb14
-rw-r--r--packages/boost/files/arm-intrinsics.patch51
3 files changed, 230 insertions, 0 deletions
diff --git a/packages/boost/boost-36.inc b/packages/boost/boost-36.inc
new file mode 100644
index 0000000000..e33190da2c
--- /dev/null
+++ b/packages/boost/boost-36.inc
@@ -0,0 +1,165 @@
+# 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 = "boost-jam-native zlib"
+PRIORITY = "optional"
+LICENSE = "Boost Software License"
+PR = "r1"
+
+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}"
+
+S = "${WORKDIR}/${BOOST_P}"
+
+# Make a package for each library, plus -dev and -python
+PACKAGES = "${PN}-dbg"
+BOOSTLIBS = ""
+
+PACKAGES += "boost-date-time"
+FILES_boost-date-time = "${libdir}/libboost_date_time*.so*"
+
+BOOSTLIBS += "boost-filesystem"
+FILES_boost-filesystem = "${libdir}/libboost_filesystem*.so*"
+
+BOOSTLIBS += "boost-prg-exec-monitor"
+FILES_boost-prg-exec-monitor = "${libdir}/libboost_prg_exec_monitor*.so*"
+
+BOOSTLIBS += "boost-program-options"
+FILES_boost-program-options = "${libdir}/libboost_program_options*.so*"
+
+BOOSTLIBS += "boost-regex"
+FILES_boost-regex = "${libdir}/libboost_regex*.so*"
+
+BOOSTLIBS += "boost-signals"
+FILES_boost-signals = "${libdir}/libboost_signals*.so*"
+
+BOOSTLIBS += "boost-test-exec-monitor"
+FILES_boost-test-exec-monitor = "${libdir}/libboost_test_exec_monitor*.so*"
+
+BOOSTLIBS += "boost-thread-mt"
+FILES_boost-thread-mt = "${libdir}/libboost_thread-mt.so*"
+
+BOOSTLIBS += "boost-unit-test-framework"
+FILES_boost-unit-test-framework = "${libdir}/libboost_unit_test_framework*.so*"
+
+BOOSTLIBS += "boost-iostreams"
+FILES_boost-iostreams = "${libdir}/libboost_iostreams*.so*"
+
+BOOSTLIBS += "boost-serialization"
+FILES_boost-serialization = "${libdir}/libboost_serialization*.so*"
+
+BOOSTLIBS += "boost-wserialization"
+FILES_boost-wserialization = "${libdir}/libboost_wserialization*.so*"
+
+# Python - remove this and set:
+#PYTHON_ROOT = "/dev/null"
+# to remove the python build
+DEPENDS += "python"
+PYTHON_ROOT = "${STAGING_DIR_HOST}/${layout_prefix}"
+PYTHON_VERSION = "2.5"
+
+BOOSTLIBS += "boost-python"
+FILES_boost-python = "${libdir}/libboost_python*.so*"
+
+PACKAGES += "${BOOSTLIBS}"
+
+# -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} += "${BOOSTLIBS}"
+
+# Oh yippee, a new build system, it's sooo cooool I could eat my own
+# foot. inlining=on lets the compiler choose, I think. At least this
+# stuff is documented...
+# NOTE: if you leave <debug-symbols>on then in a debug build the build sys
+# objcopy will be invoked, and that won't work. Building debug apparently
+# requires hacking gcc-tools.jam
+#
+# Sometimes I wake up screaming. Famous figures are gathered in the nightmare,
+# Steve Bourne, Larry Wall, the whole of the ANSI C committee. They're just
+# standing there, waiting, but the truely terrifying thing is what they carry
+# in their hands. At first sight each seems to bear the same thing, but it is
+# not so for the forms in their grasp are ever so slightly different one from
+# the other. Each is twisted in some grotesque way from the other to make each
+# an unspeakable perversion impossible to perceive without the onset of madness.
+# True insanity awaits anyone who perceives all of these horrors together.
+#
+# Quotation marks, there might be an easier way to do this, but I can't find
+# it. The problem is that the user.hpp configuration file must receive a
+# pre-processor macro defined as the appropriate string - complete with "'s
+# around it. (<> is a possibility here but the danger to that is that the
+# failure case interprets the < and > as shell redirections, creating
+# random files in the source tree.)
+#
+#bjam: '-DBOOST_PLATFORM_CONFIG=\"config\"'
+#do_compile: '-sGCC=... '"'-DBOOST_PLATFORM_CONFIG=\"config\"'"
+SQD = '"'
+EQD = '\"'
+#boost.bb: "... '-sGCC=... '${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}config${EQD}'${SQD} ..."
+BJAM_CONF = "${SQD}'-DBOOST_PLATFORM_CONFIG=${EQD}boost/config/platform/${TARGET_OS}.hpp${EQD}'${SQD}"
+
+# bzip2 and zip are disabled because... they're broken - the compilation simply
+# isn't working with bjam. I guess they will fix it, but who needs it? This
+# only affects the (new in 33) iostream library.
+BJAM_TOOLS = "-sTOOLS=gcc \
+ '-sGCC=${CC} '${BJAM_CONF} \
+ '-sGXX=${CXX} '${BJAM_CONF} \
+ '-sGCC_INCLUDE_DIRECTORY=${STAGING_INCDIR}' \
+ '-sGCC_STDLIB_DIRECTORY=${STAGING_LIBDIR}' \
+ '-sNO_BZIP2=1' \
+ '-sNO_ZLIB=1' \
+ '-sBUILD=release <optimization>space <inlining>on <debug-symbols>off' \
+ '-sPYTHON_VERSION=${PYTHON_VERSION}' \
+ '--layout=system' \
+ "
+
+BJAM_EXTRA = '\
+ --with-thread \
+ --with-date_time \
+ --with-filesystem \
+ '
+
+BJAM_OPTS = '${BJAM_TOOLS} \
+ --builddir=${S}/${TARGET_SYS} \
+ --with-python-root=${PYTHON_ROOT} \
+ ${BJAM_EXTRA}'
+
+
+do_configure_prepend() {
+ cp -f boost/config/platform/linux.hpp boost/config/platform/linux-gnueabi.hpp
+
+ echo 'using gcc : 4.3.1 : ${CXX} : compileflags -DBOOST_SP_USE_PTHREADS -I${includedir} linkflags -L${libdir} ;' >> ${S}/tools/build/v2/user-config.jam
+}
+
+do_compile() {
+ set -ex
+ bjam ${BJAM_OPTS} --prefix=${prefix} \
+ --exec-prefix=${exec_prefix} \
+ --libdir=${libdir} \
+ --includedir=${includedir}
+}
+
+do_stage() {
+ set -ex
+ bjam ${BJAM_OPTS} \
+ --libdir=${STAGING_LIBDIR} \
+ --includedir=${STAGING_INCDIR} \
+ install
+}
+
+do_install() {
+ set -ex
+ bjam ${BJAM_OPTS} \
+ --libdir=${D}${libdir} \
+ --includedir=${D}${includedir} \
+ install
+}
diff --git a/packages/boost/boost_1.36.0.bb b/packages/boost/boost_1.36.0.bb
new file mode 100644
index 0000000000..b5735eddeb
--- /dev/null
+++ b/packages/boost/boost_1.36.0.bb
@@ -0,0 +1,14 @@
+include boost-36.inc
+
+DEFAULT_PREFERENCE = "-1"
+
+PR = "r1"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2 \
+ file://arm-intrinsics.patch;patch=1 \
+ "
+
+BJAM_OPTS = '${BJAM_TOOLS} \
+ --builddir=${S}/${TARGET_SYS} \
+ ${BJAM_EXTRA}'
+
diff --git a/packages/boost/files/arm-intrinsics.patch b/packages/boost/files/arm-intrinsics.patch
new file mode 100644
index 0000000000..860b6df67c
--- /dev/null
+++ b/packages/boost/files/arm-intrinsics.patch
@@ -0,0 +1,51 @@
+diff -Nurd boost_1_36_0.orig/boost/detail/atomic_count_sync.hpp boost_1_36_0.arm/boost/detail/atomic_count_sync.hpp
+--- boost_1_36_0.orig/boost/detail/atomic_count_sync.hpp 2007-11-23 12:03:14.000000000 -0500
++++ boost_1_36_0.arm/boost/detail/atomic_count_sync.hpp 2008-09-09 13:15:21.000000000 -0400
+@@ -29,17 +29,46 @@
+
+ void operator++()
+ {
++#ifdef __ARM_ARCH_7A__
++ int v1, tmp;
++ asm volatile ("1: \n\t"
++ "ldrex %0, %1 \n\t"
++ "add %0 ,%0, #1 \n\t"
++ "strex %2, %0, %1 \n\t"
++ "cmp %2, #0 \n\t"
++ "bne 1b \n\t"
++ : "=&r" (v1), "+Q"(value_), "=&r"(tmp)
++ );
++#else
+ __sync_add_and_fetch( &value_, 1 );
++#endif
+ }
+
+ long operator--()
+ {
++#ifdef __ARM_ARCH_7A__
++ int v1, tmp;
++ asm volatile ("1: \n\t"
++ "ldrex %0, %1 \n\t"
++ "sub %0 ,%0, #1 \n\t"
++ "strex %2, %0, %1 \n\t"
++ "cmp %2, #0 \n\t"
++ "bne 1b \n\t"
++ : "=&r" (v1), "+Q"(value_), "=&r"(tmp)
++ );
++ return value_;
++#else
+ return __sync_add_and_fetch( &value_, -1 );
++#endif
+ }
+
+ operator long() const
+ {
++#if __ARM_ARCH_7A__
++ return value_;
++#else
+ return __sync_fetch_and_add( &value_, 0 );
++#endif
+ }
+
+ private:
+Binary files boost_1_36_0.orig/boost/detail/.atomic_count_sync.hpp.swp and boost_1_36_0.arm/boost/detail/.atomic_count_sync.hpp.swp differ