updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / boost-log / PKGBUILD
blob7c7aa18264a744df07acd039579c75c749b2d349
1 # Maintainer: Dmitriy Morozov <archlinux@foxcub.org>
2 # Contributor: kevin <kevin@archlinux.org>
3 # Contributor: Giovanni Scafora <giovanni@archlinux.org>
4 # TU: Kritoke <kritoke@gamebox.net>
5 # Contributor: Luca Roccia <little_rock@users.sourceforge.net>
7 # This PKGBUILD is modified from Arch's official Boost PKGBUILD to build the
8 # Boost.Logging library
10 pkgname=boost-log
11 pkgver=1.0
12 _boostbase=boost
13 _boostver=1_45_0
14 pkgrel=1
15 arch=('i686' 'x86_64')
16 url="http://boost-log.sf.net"
17 makedepends=('python2' 'bzip2' 'zlib')
18 source=(http://downloads.sourceforge.net/sourceforge/${_boostbase}/${_boostbase}_${_boostver}.tar.gz
19         http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.zip)
20 license=('custom')
21 options=('!ccache')
22 md5sums=('739792c98fafb95e7a6b5da23a30062c'
23          '2a2f078399fe158495bd2347af6bdbc5')
25 _stagedir="${srcdir}/stagedir"
27 build() {
28   cp -a ${srcdir}/$pkgname-$pkgver/boost ${srcdir}/${_boostbase}_${_boostver}
29   cp -a ${srcdir}/$pkgname-$pkgver/libs ${srcdir}/${_boostbase}_${_boostver}
31   # set python path for bjam
32   cd "${srcdir}/${_boostbase}_${_boostver}/tools"
33   echo "using python : 2.7 : /usr/bin/python2 ;" >> build/v2/user-config.jam
34   echo "using mpi ;" >> build/v2/user-config.jam
36   # build bjam
37   cd "${srcdir}/${_boostbase}_${_boostver}/tools/build/v2/engine/src"
38   ./build.sh cc
40   _bindir="bin.linuxx86"
41   [ "${CARCH}" = "x86_64" ] && _bindir="bin.linuxx86_64"
43   install -m755 -d "${_stagedir}"/usr/bin
44   install -m755 ${_bindir}/bjam "${_stagedir}"/usr/bin/bjam
46   # build bcp
47   cd "${srcdir}/${_boostbase}_${_boostver}/tools/bcp"
48   ../build/v2/engine/src/${_bindir}/bjam --toolset=gcc
49   install -m755 "${srcdir}/${_boostbase}_${_boostver}/dist/bin/bcp" \
50                 ${_stagedir}/usr/bin/bcp
52   # build libs
53   cd "${srcdir}/${_boostbase}_${_boostver}"
54   # default "minimal" install: "release link=shared,static
55   # runtime-link=shared threading=multi"
56   # --layout=tagged will add the "-mt" suffix for multithreaded libraries
57   # and installs includes in /usr/include/boost.
58   # --layout=system no longer adds the -mt suffix for multi-threaded libs.
59   # install to ${_stagedir} in preparation for split packaging
61   ./tools/build/v2/engine/src/${_bindir}/bjam \
62       release debug-symbols=off threading=single,multi \
63       runtime-link=shared link=shared,static \
64       cflags=-fno-strict-aliasing \
65       toolset=gcc \
66       --prefix="${_stagedir}" \
67       -sTOOLS=gcc \
68       --layout=tagged \
69       --with-log \
70       ${MAKEFLAGS} \
71       install
73   # build pyste
74   cd "${srcdir}/${_boostbase}_${_boostver}/libs/python/pyste/install"
75   python2 setup.py install --root=${_stagedir}
78 package_boost() {
79     pkgdesc="Free peer-reviewed portable C++ source libraries - Development"
80     depends=("boost-libs=${pkgver}")
81     optdepends=('python2: for python bindings')
83     install -dm 755 "${pkgdir}"/usr/{include,lib}
84     # headers/source files
85     cp -r "${_stagedir}"/include/ "${pkgdir}"/usr/
87     # static libs
88     cp -r "${_stagedir}"/lib/*.a "${pkgdir}"/usr/lib/
90     # utilities (bjam, bcp, pyste)
91     cp -r "${_stagedir}"/usr/* "${pkgdir}"/usr/
93     # license
94     install -D -m644 "${srcdir}/${_boostbase}_${_boostver}/LICENSE_1_0.txt" \
95         "${pkgdir}"/usr/share/licenses/boost/LICENSE_1_0.txt
98 package_boost-libs() {
99     pkgdesc="Free peer-reviewed portable C++ source libraries - Runtime"
100     depends=('gcc-libs' 'bzip2' 'zlib')
102     install -dm 755 "${pkgdir}/usr/lib"
103     #shared libs
104     cp -r "${_stagedir}"/lib/*.so{,.*} "${pkgdir}/usr/lib/"
106     # license
107     install -D -m644 "${srcdir}/${_boostbase}_${_boostver}/LICENSE_1_0.txt" \
108         "${pkgdir}"/usr/share/licenses/boost-libs/LICENSE_1_0.txt
111 package_boost-log() {
112     pkgdesc="Logging library provisionally accepted to Boost"
113     depends=('boost')
114     
115     install -dm 755 "${pkgdir}"/usr/include/boost
116     install -dm 755 "${pkgdir}"/usr/lib
117     # headers/source files
118     cp -r "${_stagedir}"/include/boost/log "${pkgdir}"/usr/include/boost
120     # static libs
121     cp -r "${_stagedir}"/lib/*log*.a "${pkgdir}"/usr/lib/
122     cp -r "${_stagedir}"/lib/*log*.so{,.*} "${pkgdir}/usr/lib/"