From c6e6cfb592cc955cbf46b2860696626477eac790 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Mon, 19 Oct 2009 06:30:49 +0200 Subject: [PATCH] new package: - add boost - add boost-jam --- packages/devel/boost-jam/build | 12 ++++++ packages/devel/boost/build | 39 +++++++++++++++++++ packages/devel/boost/patches/patch.txt | 1 + .../boost/patches/pthread-prefer-posix.diff | 20 ++++++++++ packages/devel/boost/url | 1 + 5 files changed, 73 insertions(+) create mode 100755 packages/devel/boost-jam/build create mode 100755 packages/devel/boost/build create mode 100644 packages/devel/boost/patches/patch.txt create mode 100644 packages/devel/boost/patches/pthread-prefer-posix.diff create mode 100644 packages/devel/boost/url diff --git a/packages/devel/boost-jam/build b/packages/devel/boost-jam/build new file mode 100755 index 0000000000..0a986db535 --- /dev/null +++ b/packages/devel/boost-jam/build @@ -0,0 +1,12 @@ +#!/bin/sh + +. config/options + +$SCRIPTS/build toolchain +$SCRIPTS/unpack boost + +setup_toolchain host + +cd $BUILD/boost*/tools/jam/src + sh build.sh + cp bin.*/bjam $ROOT/$TOOLCHAIN/bin diff --git a/packages/devel/boost/build b/packages/devel/boost/build new file mode 100755 index 0000000000..f5fd58785b --- /dev/null +++ b/packages/devel/boost/build @@ -0,0 +1,39 @@ +#!/bin/sh + +. config/options + +$SCRIPTS/build toolchain +$SCRIPTS/build boost-jam +$SCRIPTS/build Python + +cd $PKG_BUILD +sh bootstrap.sh \ + --prefix=/usr \ + --with-bjam=$ROOT/$TOOLCHAIN/bin/bjam \ + --with-python=$ROOT/$TOOLCHAIN/bin/python \ + +echo "using gcc : `$TARGET_CC -v 2>&1 | tail -n 1 |awk '{print $3}'` : $TARGET_CC ; " \ + > tools/build/v2/user-config.jam + +$ROOT/$TOOLCHAIN/bin/bjam -d2 --toolset=gcc \ + link=static \ + --prefix=$SYSROOT_PREFIX/usr \ + --layout=system \ + --with-thread \ + install + + +# this are code for an alternative build with cmake (not done) +# remove this after testing + +# $SCRIPTS/build cmake + +# mkdir -p .build +# cd .build + +# cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr \ +# -D CMAKE_FIND_ROOT_PATH:PATH=$SYSROOT_PREFIX \ +# -D CMAKE_IS_EXPERIMENTAL=YES_I_KNOW \ +# .. + +# make diff --git a/packages/devel/boost/patches/patch.txt b/packages/devel/boost/patches/patch.txt new file mode 100644 index 0000000000..012bfc7d4b --- /dev/null +++ b/packages/devel/boost/patches/patch.txt @@ -0,0 +1 @@ +https://svn.boost.org/trac/boost/ticket/2053 diff --git a/packages/devel/boost/patches/pthread-prefer-posix.diff b/packages/devel/boost/patches/pthread-prefer-posix.diff new file mode 100644 index 0000000000..901adb4ba3 --- /dev/null +++ b/packages/devel/boost/patches/pthread-prefer-posix.diff @@ -0,0 +1,20 @@ +--- a/libs/thread/src/pthread/thread.cpp ++++ b/libs/thread/src/pthread/thread.cpp +@@ -388,8 +388,6 @@ namespace boost + { + #if defined(PTW32_VERSION) || defined(__hpux) + return pthread_num_processors_np(); +-#elif defined(__linux__) +- return get_nprocs(); + #elif defined(__APPLE__) || defined(__FreeBSD__) + int count; + size_t size=sizeof(count); +@@ -397,6 +395,8 @@ namespace boost + #elif defined(BOOST_HAS_UNISTD_H) && defined(_SC_NPROCESSORS_ONLN) + int const count=sysconf(_SC_NPROCESSORS_ONLN); + return (count>0)?count:0; ++#elif defined(__linux__) ++ return get_nprocs(); + #else + return 0; + #endif diff --git a/packages/devel/boost/url b/packages/devel/boost/url new file mode 100644 index 0000000000..3f41ed1d2c --- /dev/null +++ b/packages/devel/boost/url @@ -0,0 +1 @@ +http://switch.dl.sourceforge.net/sourceforge/boost/boost_1_40_0.tar.bz2 \ No newline at end of file