##
## boost.spec -- OpenPKG RPM Package Specification
## Copyright (c) 2000-2005 OpenPKG Foundation e.V.
## Copyright (c) 2000-2005 Ralf S. Engelschall
##
## Permission to use, copy, modify, and distribute this software for
## any purpose with or without fee is hereby granted, provided that
## the above copyright notice and this permission notice appear in all
## copies.
##
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
## SUCH DAMAGE.
##
# package version
%define V_openpkg 1.33.0
%define V_dist 1_33_0
# package information
Name: boost
Summary: Peer-Reviewed Portable C++ Libraries
URL: http://www.boost.org/
Vendor: Boost Community
Packager: OpenPKG
Distribution: OpenPKG
Class: EVAL
Group: Language
License: Boost Software License
Version: %{V_openpkg}
Release: 20051110
# package options
%option with_debug yes
%option with_optimize yes
%option with_threads yes
# list of sources
Source0: http://osdn.dl.sourceforge.net/boost/boost_%{V_dist}.tar.bz2
Patch0: boost.patch
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20040130, gcc
PreReq: OpenPKG, openpkg >= 20040130
AutoReq: no
AutoReqProv: no
%description
Boost provides peer-reviewed portable C++ class libraries, placing
emphasis on libraries which work well with the C++ Standard
Library. The libraries are intended to be widely useful, and are in
regular use by thousands of programmers across a broad spectrum of
applications.
Aiming to provide missing functionality in current standards,
Boost was begun by members of the C++ Standards Committee Library
Working Group. Today, logic from a subset of the boost collection is
under review by the ISO C++ Standards Committee and considered for
inclusion in its future standards documents.
%track
prog boost = {
version = %{V_dist}
url = http://prdownloads.sourceforge.net/boost/
regex = boost_(\d+_\d+\_\d+)\.tar\.bz2
}
%prep
%setup -q -n boost_%{V_dist}
%patch -p0
rm -rf \
libs/python \
boost/python* \
tools/build/v1/python.jam
# accommodate platforms missing wide character support
case "%{l_platform -t}" in
*-freebsd4* )
%{l_shtool} subst \
-e 's;.*boost_wserialization.*;;' \
libs/serialization/build/Jamfile
;;
esac
%build
# bootstrap bjam(1), the boost build system
( cd tools/build/jam_src
./build.sh gcc
) || exit $?
# create build subdirectory, prepare to build
ln -s tools/build/jam_src/bin.*/bjam bjam
mkdir obj
# configure build options for bjam(1) -sBUILD parameter
debugopts="release"
optimizeopts="off"
threadopts="single"
%if "%{with_debug}" == "yes"
debugopts="$debugopts debug"
%endif
%if "%{with_optimize}" == "yes"
optimizeopts="speed full"
%endif
%if "%{with_threads}" == "yes"
threadopts="single/multi"
%endif
# build all libraries
./bjam --builddir=obj -sBUILD="$debugopts $optimizeopts $threadopts" stage
%install
rm -rf $RPM_BUILD_ROOT
./bjam --prefix=$RPM_BUILD_ROOT%{l_prefix} install
mv $RPM_BUILD_ROOT%{l_prefix}/include/boost-*/boost $RPM_BUILD_ROOT%{l_prefix}/include
rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/boost-*
find $RPM_BUILD_ROOT%{l_prefix}/lib/ \
-name "*.so" -print -o \
-name "libboost_*.so.%{V_openpkg}" \
-print | xargs rm -f
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/bin
%{l_shtool} install -c -m 755 \
tools/build/jam_src/bin.*/bjam \
$RPM_BUILD_ROOT%{l_prefix}/bin/
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
%files -f files
%clean
rm -rf $RPM_BUILD_ROOT