PKGBUILD 4.36 KB
Newer Older
phil's avatar
phil committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#
# Core Packages for Chakra, part of chakra-project.org
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
# Contributor: Artyom Smirnov <smirnoffjr@gmail.com>

# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf

# Note: you have to rebuild those pkgs
# Core: repo-clean
# Platform: akonadi (exempi uses boost just as makedep)
# Desktop: kdeedu (kdenetwork, kdepimlibs, kdepim, kdesdk and koffice using boost just as makedep)
Jan Mette's avatar
Jan Mette committed
15
 
abveritas's avatar
abveritas committed
16 17
pkgbase=boost
pkgname=('boost-libs' 'boost')
18
pkgver=1.46.1
abveritas's avatar
abveritas committed
19
_boostver=${pkgver//./_}
20
pkgrel=2
Jan Mette's avatar
Jan Mette committed
21 22 23
pkgdesc="Free peer-reviewed portable C++ source libraries"
arch=('i686' 'x86_64')
url="http://www.boost.org/"
24
license=('custom')
Jan Mette's avatar
Jan Mette committed
25
depends=('bzip2' 'zlib')
26
makedepends=('icu' 'python2' 'bzip2' 'zlib') # Add Python (3) whenever it is added to our repos.
Jan Mette's avatar
Jan Mette committed
27
optdepends=('python: for python bindings')
phil's avatar
phil committed
28
options=('!ccache')
abveritas's avatar
abveritas committed
29 30 31 32
source=(http://downloads.sourceforge.net/sourceforge/${pkgbase}/${pkgbase}_${_boostver}.tar.gz
       boost-1.46.0-spirit.patch)
md5sums=('341e5d993b19d099bf1a548495ea91ec'
         '9d6e2f13fef23bf27d7bdddc104e182a')
Jan Mette's avatar
Jan Mette committed
33

abveritas's avatar
abveritas committed
34
_stagedir="${srcdir}/stagedir"
Jan Mette's avatar
Jan Mette committed
35

abveritas's avatar
abveritas committed
36 37 38
build() {
  # set python path for bjam
  cd "${srcdir}/${pkgbase}_${_boostver}/tools"
39
  echo "using python : 2.7 : /usr/bin/python2 ;" >> build/v2/user-config.jam
abveritas's avatar
abveritas committed
40 41
  #echo "using python : 3.2 : /usr/bin/python : /usr/include/python3.2mu : /usr/lib ;" >> build/v2/user-config.jam
  #echo "using mpi ;" >> build/v2/user-config.jam
42

abveritas's avatar
abveritas committed
43 44
  # build bjam
  cd "${srcdir}/${pkgbase}_${_boostver}/tools/build/v2/engine/src"
45
  ./build.sh cc
Jan Mette's avatar
Jan Mette committed
46 47 48 49

  _bindir="bin.linuxx86"
  [ "${CARCH}" = "x86_64" ] && _bindir="bin.linuxx86_64"

abveritas's avatar
abveritas committed
50 51
  install -d "${_stagedir}"/usr/bin
  install ${_bindir}/bjam "${_stagedir}"/usr/bin/bjam
52

abveritas's avatar
abveritas committed
53 54 55
  # build tools
  cd "${srcdir}/${pkgbase}_${_boostver}/tools/"
  "${_stagedir}"/usr/bin/bjam --toolset=gcc
56

abveritas's avatar
abveritas committed
57 58 59 60
  # copy the tools
  cd "${srcdir}/${pkgbase}_${_boostver}/dist/bin"
  for i in *;do
      install -m755 "${i}" "${_stagedir}/usr/bin/${i}"
61
  done
Jan Mette's avatar
Jan Mette committed
62

abveritas's avatar
abveritas committed
63 64 65
  #boostbook needed by quickbook
  cd "${srcdir}/${pkgbase}_${_boostver}/dist/"
  cp -r share "${_stagedir}"
Jan Mette's avatar
Jan Mette committed
66

abveritas's avatar
abveritas committed
67 68
  # build libs
  cd "${srcdir}/${pkgbase}_${_boostver}"
69
  
abveritas's avatar
abveritas committed
70 71 72
  #https://svn.boost.org/trac/boost/ticket/4994
  patch -Np0 -i "${srcdir}/boost-1.46.0-spirit.patch"

Jan Mette's avatar
Jan Mette committed
73
  # default "minimal" install: "release link=shared,static
74
  # runtime-link=shared threading=single,multi"
Jan Mette's avatar
Jan Mette committed
75 76 77
  # --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.
78
  # install to ${_stagedir} in preparation for split packaging
Jan Mette's avatar
Jan Mette committed
79

abveritas's avatar
abveritas committed
80
  "${_stagedir}"/usr/bin/bjam \
81 82 83 84
      release debug-symbols=off threading=multi \
      runtime-link=shared link=shared,static \
      cflags=-fno-strict-aliasing \
      toolset=gcc \
abveritas's avatar
abveritas committed
85
      --prefix="${_stagedir}" \
86
      -sTOOLS=gcc \
87
      --without-mpi \
88
      --layout=system \
abveritas's avatar
abveritas committed
89
      ${MAKEFLAGS} \
90
      install
Jan Mette's avatar
Jan Mette committed
91

abveritas's avatar
abveritas committed
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
  # pyste is unmaintained: http://www.boost.org/doc/libs/1_46_0/libs/python/doc/index.html
  # build pyste
  #cd "${srcdir}/${pkgbase}_${_boostver}/libs/python/pyste/install"
  #python2 setup.py install --root=${_stagedir} --optimize=1
}

package_boost() {
    pkgdesc="Free peer-reviewed portable C++ source libraries - Development"
    depends=("boost-libs=${pkgver}")
    optdepends=('python: for python bindings'
                'python2: for python2 bindings')

    install -d "${pkgdir}"/usr/{include,lib,share}
    # headers/source files
    cp -r "${_stagedir}"/include/ "${pkgdir}"/usr/

    # static libs
    cp -r "${_stagedir}"/lib/*.a "${pkgdir}"/usr/lib/

    # utilities (bjam, bcp, pyste)
    cp -r "${_stagedir}"/usr/* "${pkgdir}"/usr/

    #boostbook
    cp -r "${_stagedir}"/share/* "${pkgdir}"/usr/share

    # license
    install -D -m644 "${srcdir}/${pkgbase}_${_boostver}/LICENSE_1_0.txt" \
        "${pkgdir}"/usr/share/licenses/boost/LICENSE_1_0.txt
}

package_boost-libs() {
    pkgdesc="Free peer-reviewed portable C++ source libraries - Runtime"
    depends=('gcc-libs' 'bzip2' 'zlib' 'icu')
    optdepends=('openmpi: for mpi support')

    install -d "${pkgdir}/usr/lib"
    #shared libs
    cp -r "${_stagedir}"/lib/*.so{,.*} "${pkgdir}/usr/lib/"

    # license
    install -D -m644 "${srcdir}/${pkgbase}_${_boostver}/LICENSE_1_0.txt" \
        "${pkgdir}"/usr/share/licenses/boost-libs/LICENSE_1_0.txt
Jan Mette's avatar
Jan Mette committed
134
}