aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2010-05-13 11:58:23 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2010-05-13 11:58:23 +0000
commit0ada67ec8947b79b168c1d717e5ccd939eb29f59 (patch)
tree437f2c9cc74fac9ba15ae19c7bcb17bf6803cc38 /testing
parent861cf340e330410e66a48e220ecb13734a8c3eae (diff)
downloadaports-0ada67ec8947b79b168c1d717e5ccd939eb29f59.tar.bz2
aports-0ada67ec8947b79b168c1d717e5ccd939eb29f59.tar.xz
testing/boost: new aport
Free peer-reviewed portable C++ source libraries http://www.boost.org/
Diffstat (limited to 'testing')
-rw-r--r--testing/boost/APKBUILD147
-rw-r--r--testing/boost/boost-1.41.0-parameter-needs-python.patch106
-rw-r--r--testing/boost/boost-uclibc-thread.patch11
-rw-r--r--testing/boost/random-Jamfile15
4 files changed, 279 insertions, 0 deletions
diff --git a/testing/boost/APKBUILD b/testing/boost/APKBUILD
new file mode 100644
index 0000000000..1c40e470ad
--- /dev/null
+++ b/testing/boost/APKBUILD
@@ -0,0 +1,147 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=boost
+pkgver=1.43.0
+
+_x=${pkgver%%.*} # strip .y.z
+_y=${pkgver%.*} # strip .z
+_y=${_y#*.} # strip x.
+_z=${pkgver##*.} # strip x.y.
+_ver=${_x}_${_y}_${_z}
+
+pkgrel=0
+pkgdesc="Free peer-reviewed portable C++ source libraries"
+url="http://www.boost.org/"
+license="custom"
+depends=
+makedepends="python-dev>=2.6 flex bison bzip2-dev zlib-dev"
+subpackages="$pkgname-dev $pkgname-doc
+$pkgname-date_time
+$pkgname-filesystem
+$pkgname-graph
+$pkgname-iostreams
+$pkgname-math
+$pkgname-prg_exec_monitor
+$pkgname-program_options
+$pkgname-python:py
+$pkgname-random
+$pkgname-regex
+$pkgname-serialization
+$pkgname-signals
+$pkgname-system
+$pkgname-thread
+$pkgname-unit_test_framework
+$pkgname-wave
+$pkgname-wserialization
+"
+source="http://downloads.sourceforge.net/$pkgname/${pkgname}_$_ver.tar.gz
+ boost-1.41.0-parameter-needs-python.patch
+ boost-uclibc-thread.patch
+ random-Jamfile"
+
+_builddir="$srcdir"/${pkgname}_${_ver}
+prepare() {
+ cd "$_builddir"
+ for i in "$srcdir"/*.patch; do
+ [ -r "$i" ] || continue
+ msg "Applying $i"
+ patch -p1 -i "$i" || return 1
+ done
+
+ # add support for /dev/urandom
+ mkdir -p libs/random/build
+ cp "$srcdir"/random-Jamfile libs/random/build/Jamfile.2
+ sed -i -e 's/#ifdef __linux__/#if 1/' \
+ libs/random/src/random_device.cpp \
+ || return 1
+
+ # create user-config.jam
+ cat > user-config.jam <<__EOF__
+
+using gcc : : $CC : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;
+
+__EOF__
+}
+
+_options="--user-config=\"$_builddir/user-config.jam\"
+ --prefix=\"$pkgdir/usr\"
+ release
+ debug-symbols=off
+ threading=single,multi
+ runtime-link=shared
+ link=shared,static
+ cflags=-fno-strict-aliasing
+ -sPYTHON_ROOT=/usr
+ -sPYTHON_VERSION=2.6
+ -sTOOLS=gcc
+ --layout=tagged
+ -q
+ -j${JOBS:-2}
+"
+
+build() {
+ msg "Building bjam"
+ export BOOST_ROOT="$_builddir"
+ cd "$_builddir"/tools/jam/src
+ CC= ./build.sh cc || return 1
+ _bindir="bin.linuxx86"
+ [ "${CARCH}" = "x86_64" ] && _bindir="bin.linuxx86_64"
+ install -m755 -d "$pkgdir"/usr/bin
+ install -m755 ${_bindir}/bjam "$pkgdir"/usr/bin/bjam || return 1
+ _bjam="$pkgdir"/usr/bin/bjam
+
+ msg "Building bcp"
+ cd "${_builddir}"/tools/bcp
+ "${_bjam}" -j${JOBS:-2} || return 1
+ install -m755 "$srcdir"/${pkgname}_${_ver}/dist/bin/bcp \
+ "$pkgdir"/usr/bin/bcp || return 1
+
+ msg "Building boost"
+ cd "$_builddir"
+ "${_bjam}" $_options
+}
+
+package() {
+ cd "$_builddir"
+ export BOOST_ROOT="$_builddir"
+ _bjam="$pkgdir"/usr/bin/bjam
+ "${_bjam}" $_options \
+ --includedir="$pkgdir"/usr/include \
+ --libdir="$pkgdir"/usr/lib \
+ install || return 1
+
+ cd "$srcdir"/${pkgname}_${_ver}/libs/python/pyste/install
+ python setup.py install --root="$pkgdir" || return 1
+ install -m755 -d "$pkgdir"/usr/share/licenses/$pkgname
+ install -m644 "$srcdir"/${pkgname}_${_ver}/LICENSE_1_0.txt \
+ "$pkgdir"/usr/share/licenses/$pkgname/ || return 1
+}
+
+_mvlib() {
+ pkgdesc="Boost $1 library"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/libboost_$1* "$subpkgdir"/usr/lib/
+}
+
+date_time() { _mvlib date_time; }
+filesystem() { _mvlib filesystem; }
+graph() { _mvlib graph; }
+iostreams() { _mvlib iostreams; }
+math() { _mvlib math; }
+prg_exec_monitor() { _mvlib prg_exec_monitor; }
+program_options() { _mvlib program_options; }
+py() { _mvlib python; }
+random() { _mvlib random; }
+regex() { _mvlib regex; }
+serialization() { _mvlib serialization; }
+signals() { _mvlib signals; }
+system() { _mvlib system; }
+thread() { _mvlib thread; }
+unit_test_framework() { _mvlib unit_test_framework; }
+wave() { _mvlib wave; }
+wserialization() { _mvlib wserialization; }
+
+
+md5sums="734565ca4819bf04bd8e903e116c3fb1 boost_1_43_0.tar.gz
+83dbee9d7291a0f322fd2b8936aeace7 boost-1.41.0-parameter-needs-python.patch
+7ea3caa231764eca4522ae303939214d boost-uclibc-thread.patch
+1d43f6ee1fc426f1ddcb4aafc6b77b9b random-Jamfile"
diff --git a/testing/boost/boost-1.41.0-parameter-needs-python.patch b/testing/boost/boost-1.41.0-parameter-needs-python.patch
new file mode 100644
index 0000000000..016995fccc
--- /dev/null
+++ b/testing/boost/boost-1.41.0-parameter-needs-python.patch
@@ -0,0 +1,106 @@
+--- a/boost/parameter/aux_/maybe.hpp 2008-03-22 21:45:55.000000000 +0000
++++ b/boost/parameter/aux_/maybe.hpp.new 2009-10-22 03:55:24.000000000 +0000
+@@ -2,20 +2,41 @@
+ // subject to the Boost Software License, Version 1.0. (See accompanying
+ // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+-#ifndef BOOST_PARAMETER_MAYBE_060211_HPP
+-# define BOOST_PARAMETER_MAYBE_060211_HPP
++//
++// 2009.10.21 TDS remove depenency on boost::python::detail::referent_storage
++//
++#ifndef BOOST_PARAMETER_MAYBE_091021_HPP
++# define BOOST_PARAMETER_MAYBE_091021_HPP
+
+ # include <boost/mpl/if.hpp>
+ # include <boost/mpl/identity.hpp>
+ # include <boost/type_traits/is_reference.hpp>
+ # include <boost/type_traits/add_reference.hpp>
+ # include <boost/optional.hpp>
+-# include <boost/python/detail/referent_storage.hpp>
++# include <boost/aligned_storage.hpp>
+ # include <boost/type_traits/remove_cv.hpp>
+ # include <boost/type_traits/add_const.hpp>
+
+ namespace boost { namespace parameter { namespace aux {
+
++template <class T> struct referent_size;
++
++template <class T>
++struct referent_size<T&>
++{
++ BOOST_STATIC_CONSTANT(std::size_t, value = sizeof(T));
++};
++
++// A metafunction returning a POD type which can store U, where T ==
++// U&. If T is not a reference type, returns a POD which can store T.
++template <class T>
++struct referent_storage
++{
++ typedef typename boost::aligned_storage<
++ referent_size<T>::value
++ >::type type;
++};
++
+ struct maybe_base {};
+
+ template <class T>
+@@ -33,8 +54,8 @@
+ BOOST_DEDUCED_TYPENAME remove_reference<reference>::type
+ >::type non_cv_value;
+
+- explicit maybe(T value)
+- : value(value)
++ explicit maybe(T value_)
++ : value(value_)
+ , constructed(false)
+ {}
+
+@@ -48,28 +69,28 @@
+ this->destroy();
+ }
+
+- reference construct(reference value) const
++ reference construct(reference value_) const
+ {
+- return value;
++ return value_;
+ }
+
+ template <class U>
+- reference construct2(U const& value) const
++ reference construct2(U const& value_) const
+ {
+- new (m_storage.bytes) non_cv_value(value);
++ new (m_storage.address()) non_cv_value(value_);
+ constructed = true;
+- return *(non_cv_value*)m_storage.bytes;
++ return *(non_cv_value*)m_storage.address();
+ }
+
+ template <class U>
+- reference construct(U const& value) const
++ reference construct(U const& value_) const
+ {
+- return this->construct2(value);
++ return this->construct2(value_);
+ }
+
+ void destroy()
+ {
+- ((non_cv_value*)m_storage.bytes)->~non_cv_value();
++ ((non_cv_value*)m_storage.address())->~non_cv_value();
+ }
+
+ typedef reference(maybe<T>::*safe_bool)() const;
+@@ -87,7 +108,9 @@
+ private:
+ boost::optional<T> value;
+ mutable bool constructed;
+- mutable typename boost::python::detail::referent_storage<
++
++
++ mutable typename referent_storage<
+ reference
+ >::type m_storage;
+ };
diff --git a/testing/boost/boost-uclibc-thread.patch b/testing/boost/boost-uclibc-thread.patch
new file mode 100644
index 0000000000..e9e6b79e10
--- /dev/null
+++ b/testing/boost/boost-uclibc-thread.patch
@@ -0,0 +1,11 @@
+--- ./libs/thread/src/pthread/thread.cpp.orig
++++ ./libs/thread/src/pthread/thread.cpp
+@@ -380,7 +380,7 @@
+ {
+ #if defined(PTW32_VERSION) || defined(__hpux)
+ return pthread_num_processors_np();
+-#elif defined(_GNU_SOURCE)
++#elif defined(_GNU_SOURCE) && !defined(__UCLIBC__)
+ return get_nprocs();
+ #elif defined(__APPLE__) || defined(__FreeBSD__)
+ int count;
diff --git a/testing/boost/random-Jamfile b/testing/boost/random-Jamfile
new file mode 100644
index 0000000000..5cb6f6bcd9
--- /dev/null
+++ b/testing/boost/random-Jamfile
@@ -0,0 +1,15 @@
+# Copyright (c) 2006 Tiziano Mueller
+#
+# Use, modification and distribution of the file is subject to the
+# Boost Software License, Version 1.0.
+# (See at http://www.boost.org/LICENSE_1_0.txt)
+
+
+project boost/random
+ : source-location ../ ;
+
+SOURCES = random_device ;
+
+lib boost_random
+ : $(SOURCES).cpp
+ : <link>shared:<define>BOOST_RANDOM_DYN_LINK=1 ;