aboutsummaryrefslogblamecommitdiffstats
path: root/main/boost/APKBUILD
blob: 34d4242fd9b7bd5cb670199221eff5563b8b1361 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                                                   
             






                                    
        

                                                          
          






















                                                                         
         









                                             


























                                                                     
                                                 


























































                                                                        
                                                               
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=boost
pkgver=1.46.1

_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/"
arch="all"
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
	"

_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

	# 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/build/v2/engine/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="341e5d993b19d099bf1a548495ea91ec  boost_1_46_1.tar.gz"