updated on Tue Jan 24 00:00:24 UTC 2012
[aur-mirror.git] / mingw32-boost-static / PKGBUILD
blobda50869df1f5751700141cd46c73402ec294c1e7
1 # Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
2 # Contributor: Jaroslaw Rosiek (jaroslaw.rosiek@interia.pl)
3 # Contributor: kevin <kevin@archlinux.org>
4 # Contributor: Luca Roccia <little_rock@users.sourceforge.net>
5 # Based on mingw32-boost
6  
7 pkgname=mingw32-boost-static
8 pkgver=1.48.0
9 _boostver=${pkgver//./_}
10 pkgrel=1
11 pkgdesc="Free peer-reviewed portable C++ source libraries (mingw32)"
12 arch=(any)
13 url="http://www.boost.org/"
14 license=('custom')
15 provides=('mingw32-boost')
16 conflicts=('mingw32-boost')
17 depends=('mingw32-bzlib-static' 'mingw32-zlib-static' 'mingw32-gcc')
18 makedepends=('patch')
19 #optdepends=('python: for python bindings')
20 options=(!strip)
21 source=(http://downloads.sourceforge.net/sourceforge/boost/boost_${_boostver}.tar.gz
22         user-config.jam
23         boost_thread_win32.patch)
24 md5sums=('313a11e97eb56eb7efd18325354631be'
25          '930ff541235abd3c62095e29395c22ca'
26          '5506dcd1ab03b9dd1fc21cbfaef18969')
28 build() {
29   # need this file for telling bjam to build for mingw32
30   echo "using python : 2.7 : /usr/bin/python2 ;" >> ${srcdir}/usr-config.jam
31   cp ${srcdir}/user-config.jam ${srcdir}/boost_${_boostver}/
32   
33   cd ${srcdir}/boost_${_boostver} 
34   patch -p1 < ../boost_thread_win32.patch
36   # build bjam
37   cd ${srcdir}/boost_${_boostver}/tools/build/v2/engine
38   ./build.sh cc
40   _bindir="bin.linuxx86"
41   [ "${CARCH}" = "x86_64" ] && _bindir="bin.linuxx86_64"
43   install -m755 -d ${pkgdir}/usr/bin
44   install -m755 ${_bindir}/bjam ${pkgdir}/usr/bin/bjam
46   # build bcp
47   cd ${srcdir}/boost_${_boostver}/tools/bcp
48   ../build/v2/engine/${_bindir}/bjam --toolset=gcc
49   install -m755 ${srcdir}/boost_${_boostver}/dist/bin/bcp \
50                 ${pkgdir}/usr/bin/bcp
52   # build libs
53   cd ${srcdir}/boost_${_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.
60   cp ${srcdir}/user-config.jam ${srcdir}/boost_${_boostver}/
61   ./tools/build/v2/engine/${_bindir}/bjam \
62         --user-config=user-config.jam \
63         release debug-symbols=off threading=single,multi \
64         runtime-link=static link=static threadapi=win32 target-os=windows \
65         cflags=-fno-strict-aliasing \
66         toolset=gcc \
67         --prefix=${pkgdir}/usr/i486-mingw32 \
68         -sTOOLS=gcc \
69         --layout=tagged \
70         --without-python \
71         ${MAKEFLAGS} \
72           install
73            
74         #--with-date_time          \
75         #--with-filesystem         \
76         #--with-graph              \
77         #--with-graph_parallel     \
78         #--with-iostreams          \
79         #--with-math               \
80         #--with-mpi                \
81         #--with-program_options    \
82         #--with-random             \
83         #--with-regex              \
84         #--with-serialization      \
85         #--with-signals            \
86         #--with-system             \
87         #--with-test               \
88         #--with-thread             \
89         #--with-wave               \
91         #--with-python             \
93   find ${pkgdir}/usr/i486-mingw32 -name *.a | xargs i486-mingw32-ranlib
95   # build pyste (won't work yet)
96   #cd ${srcdir}/boost_${_boostver}/libs/python/pyste/install
97   #python2 setup.py install --root=${pkgdir}/i486-minw32 || return 1
99   # clean up stuff we don't need
100   rm -rf ${pkgdir}/usr/bin