Created
October 28, 2010 01:23
-
-
Save ajashton/650407 to your computer and use it in GitHub Desktop.
Arch Linux PKGBUILD for boost with ICU support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: kevin <[email protected]> | |
# Contributor: Giovanni Scafora <[email protected]> | |
# TU: Kritoke <[email protected]> | |
# Contributor: Luca Roccia <[email protected]> | |
# Contributor: AJ Ashton <[email protected]> | |
pkgbase=boost-icu | |
pkgname=('boost-icu-libs' 'boost-icu') | |
pkgver=1.43.0 | |
_boostver=1_43_0 | |
pkgrel=2 | |
arch=('i686' 'x86_64') | |
url="http://www.boost.org/" | |
makedepends=('python2' 'bzip2' 'zlib' 'icu>=4.2') | |
source=(http://downloads.sourceforge.net/sourceforge/boost/boost_${_boostver}.tar.gz) | |
license=('custom') | |
options=('!ccache') | |
md5sums=('734565ca4819bf04bd8e903e116c3fb1') | |
_stagedir="${srcdir}/stagedir" | |
build() { | |
# set python path for bjam | |
cd "${srcdir}/boost_${_boostver}/tools" | |
echo "using python : 2.7 : /usr/bin/python2 ;" >> build/v2/user-config.jam | |
# build bjam | |
cd "${srcdir}/boost_${_boostver}/tools/jam/src" | |
./build.sh cc || return 1 | |
_bindir="bin.linuxx86" | |
[ "${CARCH}" = "x86_64" ] && _bindir="bin.linuxx86_64" | |
install -m755 -d "${_stagedir}"/usr/bin | |
install -m755 ${_bindir}/bjam "${_stagedir}"/usr/bin/bjam || return 1 | |
# build bcp | |
cd "${srcdir}/boost_${_boostver}/tools/bcp" | |
../jam/src/${_bindir}/bjam --toolset=gcc || return 1 | |
install -m755 "${srcdir}/boost_${_boostver}/dist/bin/bcp" \ | |
${_stagedir}/usr/bin/bcp || return 1 | |
# build libs | |
cd "${srcdir}/boost_${_boostver}" | |
# default "minimal" install: "release link=shared,static | |
# runtime-link=shared threading=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 | |
./tools/jam/src/${_bindir}/bjam \ | |
release debug-symbols=off threading=single,multi \ | |
runtime-link=shared link=shared,static \ | |
cflags=-fno-strict-aliasing \ | |
toolset=gcc \ | |
-sHAVE_ICU=1 \ | |
-sICU_PATH=/usr \ | |
--prefix="${_stagedir}" \ | |
-sTOOLS=gcc \ | |
--layout=tagged \ | |
install || return 1 | |
# build pyste | |
cd "${srcdir}/boost_${_boostver}/libs/python/pyste/install" | |
python2 setup.py install --root=${_stagedir} || return 1 | |
} | |
package_boost-icu() { | |
pkgdesc="Free peer-reviewed portable C++ source libraries - Development" | |
depends=("boost-icu-libs=${pkgver}") | |
optdepends=('python2: for python bindings') | |
conflicts=('boost') | |
provides=('boost') | |
install -dm 755 "${pkgdir}"/usr/{include,lib} | |
# 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/ | |
# license | |
install -D -m644 "${srcdir}/boost_${_boostver}/LICENSE_1_0.txt" \ | |
"${pkgdir}"/usr/share/licenses/boost/LICENSE_1_0.txt || return 1 | |
} | |
package_boost-icu-libs() { | |
pkgdesc="Free peer-reviewed portable C++ source libraries - Runtime" | |
depends=('gcc-libs' 'bzip2' 'zlib' 'icu>=4.2') | |
conflicts=('boost-libs') | |
provides=('boost-libs') | |
install -dm 755 "${pkgdir}/usr/lib" | |
#shared libs | |
cp -r "${_stagedir}"/lib/*.so{,.*} "${pkgdir}/usr/lib/" | |
# license | |
install -D -m644 "${srcdir}/boost_${_boostver}/LICENSE_1_0.txt" \ | |
"${pkgdir}"/usr/share/licenses/boost-libs/LICENSE_1_0.txt || return 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment