diff options
Diffstat (limited to 'main/boost')
-rw-r--r-- | main/boost/APKBUILD | 163 |
1 files changed, 72 insertions, 91 deletions
diff --git a/main/boost/APKBUILD b/main/boost/APKBUILD index 24d67c92df..6b41bfb666 100644 --- a/main/boost/APKBUILD +++ b/main/boost/APKBUILD @@ -1,68 +1,61 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=boost pkgver=1.60.0 - -_x=${pkgver%%.*} # strip .y.z -_y=${pkgver%.*} # strip .z -_y=${_y#*.} # strip x. -_z=${pkgver##*.} # strip x.y. -_ver=${_x}_${_y}_${_z} - +_pkgver="${pkgver//./_}" pkgrel=3 pkgdesc="Free peer-reviewed portable C++ source libraries" url="http://www.boost.org/" arch="all" license="custom" -depends= +depends="" depends_dev="linux-headers" -makedepends="$depends_dev python-dev>=2.6 python3-dev 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-python3:py3 -$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 +makedepends="$depends_dev python2-dev>=2.6 python3-dev flex bison bzip2-dev zlib-dev" +subpackages="$pkgname-dev $pkgname-doc" +source="http://downloads.sourceforge.net/$pkgname/${pkgname}_$_pkgver.tar.gz" +builddir="$srcdir/${pkgname}_${_pkgver}" + +_libs="date_time + filesystem + graph + iostreams + math + prg_exec_monitor + program_options + python3 + python + random + regex + serialization + signals + system + thread + unit_test_framework + wave + wserialization " +for _lib in $_libs; do + subpackages="$subpackages $pkgname-$_lib:_boostlib" +done -_builddir="$srcdir"/${pkgname}_${_ver} prepare() { - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir/$i" || return 1;; - esac - done + default_prepare || return 1 - PY2_VERSION=$(python -c 'import sys; print("%i.%i" % (sys.version_info.major, sys.version_info.minor))') + cd "$builddir" - PY3_VERSION=$(python3 -c 'import sys; print("%i.%i" % (sys.version_info.major, sys.version_info.minor))') + PY2_VERSION="$(_pyversion python)" + PY3_VERSION="$(_pyversion python3)" # create user-config.jam - cat > user-config.jam <<__EOF__ + cat > user-config.jam <<-__EOF__ -using gcc : : $CC : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ; -using python : ${PY2_VERSION} : /usr/bin/python : /usr/include/python${PY2_VERSION} : /usr/lib ; -using python : ${PY3_VERSION} : /usr/bin/python3 : /usr/include/python${PY3_VERSION}m : /usr/lib ; + using gcc : : $CC : <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ; + using python : ${PY2_VERSION} : /usr/bin/python : /usr/include/python${PY2_VERSION} : /usr/lib ; + using python : ${PY3_VERSION} : /usr/bin/python3 : /usr/include/python${PY3_VERSION}m : /usr/lib ; -__EOF__ + __EOF__ } -_options="--user-config=\"$_builddir/user-config.jam\" +_options="--user-config=\"$builddir/user-config.jam\" --prefix=\"$pkgdir/usr\" release debug-symbols=off @@ -71,12 +64,12 @@ _options="--user-config=\"$_builddir/user-config.jam\" link=shared,static cflags=-fno-strict-aliasing -sPYTHON_ROOT=/usr - -sPYTHON_VERSION=${PY2_VERSION} + -sPYTHON_VERSION=$PY2_VERSION -sTOOLS=gcc --layout=tagged -q -j${JOBS:-2} -" + " case "$CARCH" in armhf|aarch64) _boostarch=arm;; @@ -85,69 +78,57 @@ esac _enginedir=tools/build/src/engine build() { + export BOOST_ROOT="$builddir" + msg "Building bjam" - export BOOST_ROOT="$_builddir" - cd "$_builddir"/$_enginedir + cd "$builddir"/$_enginedir CC= ./build.sh cc || return 1 - _bindir="$PWD/bin.linux$_boostarch" - _bjam="$_bindir"/bjam + local _bjam="$PWD/bin.linux$_boostarch/bjam" msg "Building bcp" - cd "${_builddir}"/tools/bcp - "${_bjam}" -j${JOBS:-2} || return 1 + cd "$builddir"/tools/bcp + "$_bjam" -j${JOBS:-2} || return 1 msg "Building boost" - cd "$_builddir" - "${_bjam}" $_options + cd "$builddir" + "$_bjam" $_options } package() { - cd "$_builddir" - export BOOST_ROOT="$_builddir" - local _bindir="$_builddir"/$_enginedir/bin.linux${_boostarch} - install -m755 -d "$pkgdir"/usr/bin - install -m755 ${_bindir}/bjam "$pkgdir"/usr/bin/bjam || return 1 - install -m755 "$srcdir"/${pkgname}_${_ver}/dist/bin/bcp \ - "$pkgdir"/usr/bin/bcp || return 1 - _bjam="$pkgdir"/usr/bin/bjam - "${_bjam}" $_options \ + export BOOST_ROOT="$builddir" + cd "$builddir" + + install -Dm755 $_enginedir/bin.linux${_boostarch}/bjam \ + "$pkgdir"/usr/bin/bjam || return 1 + + install -Dm755 dist/bin/bcp "$pkgdir"/usr/bin/bcp || return 1 + + install -Dm644 LICENSE_1_0.txt \ + "$pkgdir"/usr/share/licenses/$pkgname/LICENSE_1_0.txt || return 1 + + "$pkgdir"/usr/bin/bjam $_options \ --includedir="$pkgdir"/usr/include \ --libdir="$pkgdir"/usr/lib \ install || return 1 - cd "$srcdir"/${pkgname}_${_ver}/libs/python/pyste/install + cd 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" - [ -n "$2" ] && depends="$depends $2" +_boostlib() { + local name="${subpkgname#$pkgname-}" + pkgdesc="Boost $name library" + case "$name" in + python*) depends="$depends $name" + esac + mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/lib/libboost_$1* "$subpkgdir"/usr/lib/ + mv "$pkgdir"/usr/lib/libboost_$name* "$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; } -py3() { _mvlib python3 python3; } -py() { _mvlib python 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; } - +_pyversion() { + $1 -c 'import sys; print("%i.%i" % (sys.version_info.major, sys.version_info.minor))' +} md5sums="28f58b9a33469388302110562bdf6188 boost_1_60_0.tar.gz" sha256sums="21ef30e7940bc09a0b77a6e59a8eee95f01a766aa03cdfa02f8e167491716ee4 boost_1_60_0.tar.gz" |