summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 60502be7cc5b1da682e2b6c283ee243c4c2b640e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Maintainer: Frederik “Freso” S. Olesen <freso.dk@gmail.com>
# Contributor: Jan Was < janek.jan@gmail.com >
# Contributor: Dan Vratil <dan@progdan.cz>
# Contributor: andy123 < ajs AT online DOT de >
pkgname=lib32-boost-libs
pkgver=1.62.0
_boostver=${pkgver//./_}
pkgrel=1
url='http://www.boost.org'
arch=('x86_64')
pkgdesc='Free peer-reviewed portable C++ source libraries - Runtime (32 bit)'
license=('custom')
groups=('lib32')
depends=('lib32-bzip2' 'lib32-zlib' 'lib32-icu' 'lib32-gcc-libs')
makedepends=('lib32-icu>=51.1' 'lib32-bzip2' 'lib32-zlib' 'gcc-multilib' 'python' 'python2')
source=("https://sourceforge.net/projects/boost/files/boost/${pkgver}/boost_${_boostver}.tar.bz2")
sha256sums=('36c96b0f6155c98404091d8ceb48319a28279ca0333fba1ad8611eb90afb2ca0')

build() {
  export CC='gcc'
  export CFLAGS='-m32'
  export CXX='g++'
  export CXXFLAGS='-m32'
  export LDFLAGS='-m32'
  export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'

  export _stagedir="${srcdir}/stagedir"
  local JOBS="$(sed -e 's/.*\(-j *[0-9]\+\).*/\1/' <<< ${MAKEFLAGS})"

  cd "${srcdir}/boost_${_boostver}"

  ./bootstrap.sh --with-toolset=gcc --with-icu --with-python=
  # --with-python=/usr/bin/python2

  _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.4 : /usr/bin/python3 : /usr/include/python3.4m : /usr/lib ;" >> project-config.jam

  # Support for OpenMPI
  #echo "using mpi ;" >> project-config.jam

  # boostbook is needed by quickbook
  install -d -m 755 "${_stagedir}"/share/boostbook
  cp -a tools/boostbook/{xsl,dtd} "${_stagedir}"/share/boostbook/

  # default "minimal" install: "release link=shared,static
  # runtime-link=shared threading=single,multi"
  # --layout=tagged will add the "-mt" suffix for multithreaded libraries
  # and installs includes in /usr/include/boost.
  # --layout=system no longer adds the -mt suffix for multi-threaded libs.
  # install to ${_stagedir} in preparation for split packaging
  "${_stagedir}"/bin/b2 \
    variant=release \
    debug-symbols=off \
    threading=multi \
    runtime-link=shared \
    link=shared,static \
    toolset=gcc \
    address-model=32 \
    --without-python \
    --without-mpi \
        cflags="${CPPFLAGS} ${CFLAGS} -O3" linkflags="${LDFLAGS}" \
    --layout=system \
    --prefix="${_stagedir}" \
    ${JOBS} \
    install

  #find ${_stagedir} -name \*.a -exec rm -f {} \;
}

package() {
  _stagedir="${srcdir}/stagedir"

  install -d -m 755 "${pkgdir}/usr/lib32"
  cp -a "${_stagedir}"/lib/*.so{,.*} "${pkgdir}/usr/lib32/"
  cp -a "${_stagedir}"/lib/*.a "${pkgdir}/usr/lib32/"

  install -D -m 644 "${srcdir}/boost_${_boostver}/LICENSE_1_0.txt" \
    "${pkgdir}"/usr/share/licenses/lib32-boost-libs/LICENSE_1_0.txt
}