[arch-commits] Commit in boost/trunk (PKGBUILD)

Bartłomiej Piotrowski bpiotrowski at archlinux.org
Wed Oct 26 13:40:42 UTC 2016


    Date: Wednesday, October 26, 2016 @ 13:40:42
  Author: bpiotrowski
Revision: 279253

upgpkg: boost 1.62.0-2

build libboost_python3 separately due to issues with python= directive

http://svn.boost.org/trac/boost/ticket/12515

Modified:
  boost/trunk/PKGBUILD

----------+
 PKGBUILD |   39 +++++++++++++++++++++++++++++++++------
 1 file changed, 33 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-10-26 11:54:47 UTC (rev 279252)
+++ PKGBUILD	2016-10-26 13:40:42 UTC (rev 279253)
@@ -11,7 +11,7 @@
 pkgname=('boost-libs' 'boost')
 pkgver=1.62.0
 _boostver=${pkgver//./_}
-pkgrel=1
+pkgrel=2
 url='http://www.boost.org/'
 arch=('i686' 'x86_64')
 license=('custom')
@@ -31,11 +31,6 @@
    [[ "${CARCH}" = "x86_64" ]] && _bindir="bin.linuxx86_64"
    install -Dm755 tools/build/src/engine/$_bindir/b2 "${_stagedir}"/bin/b2
 
-   # Add an extra python version. This does not replace anything and python 2.x
-   # need to be the default.
-   echo "using python : 3.5 : /usr/bin/python3 : /usr/include/python3.5m : /usr/lib ;" \
-      >> project-config.jam
-
    # Support for OpenMPI
    echo "using mpi ;" >> project-config.jam
 
@@ -61,8 +56,36 @@
       cxxflags="${CPPFLAGS} ${CXXFLAGS} -std=c++14 -fPIC -O3" \
       linkflags="${LDFLAGS}" \
       --layout=system \
+      ${JOBS} \
+      \
       --prefix="${_stagedir}" \
+      install
+
+   # because b2 in boost 1.62.0 doesn't seem to respect python parameter, we
+   # need another run for liboost_python3.so
+   sed -e '/using python/ s@;@: /usr/include/python${PYTHON_VERSION/3*/${PYTHON_VERSION}m} ;@' \
+      -i bootstrap.sh
+
+   ./bootstrap.sh --with-toolset=gcc --with-icu --with-python=/usr/bin/python3 \
+      --with-libraries=python
+
+   "${_stagedir}"/bin/b2 clean
+   "${_stagedir}"/bin/b2 \
+      variant=release \
+      debug-symbols=off \
+      threading=multi \
+      runtime-link=shared \
+      link=shared,static \
+      toolset=gcc \
+      python=3.5 \
+      cflags="${CPPFLAGS} ${CFLAGS} -fPIC -O3" \
+      cxxflags="${CPPFLAGS} ${CXXFLAGS} -std=c++14 -fPIC -O3" \
+      linkflags="${LDFLAGS}" \
+      --layout=system \
       ${JOBS} \
+      \
+      --prefix="${_stagedir}/python3" \
+      --with-python \
       install
 }
 
@@ -82,6 +105,9 @@
    install -Dm644 "${srcdir}/"${pkgbase}_${_boostver}/LICENSE_1_0.txt \
       "${pkgdir}"/usr/share/licenses/boost/LICENSE_1_0.txt
 
+   install -Dm644 "${_stagedir}"/python3/lib/libboost_python3.a \
+      "${pkgdir}"/usr/lib/libboost_python3.a
+
    ln -s /usr/bin/b2 "$pkgdir"/usr/bin/bjam
 }
 
@@ -92,6 +118,7 @@
 
    install -dm755 "${pkgdir}"/usr
    cp -a "${_stagedir}"/lib "${pkgdir}"/usr
+   cp -a "${_stagedir}"/python3/lib/libboost_python3* "${pkgdir}"/usr/lib
    rm "${pkgdir}"/usr/lib/*.a
 
    install -Dm644 "${srcdir}/"${pkgbase}_${_boostver}/LICENSE_1_0.txt \



More information about the arch-commits mailing list