|
|
|
|
##
|
|
|
|
|
## boost.spec -- OpenPKG RPM Package Specification
|
|
|
|
|
## Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
|
|
|
|
|
##
|
|
|
|
|
## 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.39.0
|
|
|
|
|
%define V_dist 1_39_0
|
|
|
|
|
|
|
|
|
|
# package information
|
|
|
|
|
Name: boost
|
|
|
|
|
Summary: Peer-Reviewed Portable C++ Libraries
|
|
|
|
|
URL: http://www.boost.org/
|
|
|
|
|
Vendor: Boost Community
|
|
|
|
|
Packager: OpenPKG Foundation e.V.
|
|
|
|
|
Distribution: OpenPKG Community
|
|
|
|
|
Class: EVAL
|
|
|
|
|
Group: Language
|
|
|
|
|
License: Boost Software License
|
|
|
|
|
Version: %{V_openpkg}
|
|
|
|
|
Release: 20090608
|
|
|
|
|
|
|
|
|
|
# package options
|
|
|
|
|
%option with_debug yes
|
|
|
|
|
%option with_optimize yes
|
|
|
|
|
%option with_threads yes
|
|
|
|
|
%option with_zlib yes
|
|
|
|
|
%option with_bzip2 yes
|
|
|
|
|
|
|
|
|
|
# list of sources
|
|
|
|
|
Source0: http://switch.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, gcc::with_cxx = yes
|
|
|
|
|
PreReq: OpenPKG, openpkg >= 20040130
|
|
|
|
|
%if "%{with_zlib}" == "yes"
|
|
|
|
|
BuildPreReq: zlib
|
|
|
|
|
PreReq: zlib
|
|
|
|
|
%endif
|
|
|
|
|
%if "%{with_bzip2}" == "yes"
|
|
|
|
|
BuildPreReq: bzip2
|
|
|
|
|
PreReq: bzip2
|
|
|
|
|
%endif
|
|
|
|
|
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/v2/tools/python.jam
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
# bootstrap bjam(1), the boost build system
|
|
|
|
|
( cd tools/jam/src
|
|
|
|
|
./build.sh gcc
|
|
|
|
|
) || exit $?
|
|
|
|
|
|
|
|
|
|
# create build subdirectory, prepare to build
|
|
|
|
|
ln -sf tools/jam/src/bin.*/bjam bjam
|
|
|
|
|
%{l_shtool} mkdir -p obj
|
|
|
|
|
|
|
|
|
|
# configure build options for bjam(1) -sBUILD parameter
|
|
|
|
|
debugopts="release"
|
|
|
|
|
optimizeopts="<optimization>off"
|
|
|
|
|
threadopts="<threading>single"
|
|
|
|
|
%if "%{with_debug}" == "yes"
|
|
|
|
|
debugopts="$debugopts debug"
|
|
|
|
|
%endif
|
|
|
|
|
%if "%{with_optimize}" == "yes"
|
|
|
|
|
optimizeopts="<optimization>speed <inlining>full"
|
|
|
|
|
%endif
|
|
|
|
|
%if "%{with_threads}" == "yes"
|
|
|
|
|
threadopts="<threading>single/multi"
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# build all libraries
|
|
|
|
|
./bjam --toolset=gcc --layout=system --builddir=obj "-sBUILD=$debugopts $optimizeopts $threadopts" \
|
|
|
|
|
%if "%{with_zlib}" == "yes"
|
|
|
|
|
"-sNO_COMPRESSION=0" "-sZLIB_INCLUDE=%{l_prefix}/include" "-sZLIB_LIBPATH=%{l_prefix}/lib" \
|
|
|
|
|
%else
|
|
|
|
|
"-sNOZLIB=1" \
|
|
|
|
|
%endif
|
|
|
|
|
%if "%{with_bzip2}" == "yes"
|
|
|
|
|
"-sNO_COMPRESSION=0" "-sBZIP2_INCLUDE=%{l_prefix}/include" "-sBZIP2_LIBPATH=%{l_prefix}/lib" \
|
|
|
|
|
%else
|
|
|
|
|
"-sNOBZIP2=1" \
|
|
|
|
|
%endif
|
|
|
|
|
stage
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
./bjam --toolset=gcc --layout=system --prefix=$RPM_BUILD_ROOT%{l_prefix} \
|
|
|
|
|
%if "%{with_zlib}" == "yes"
|
|
|
|
|
"-sNO_COMPRESSION=0" "-sZLIB_INCLUDE=%{l_prefix}/include" "-sZLIB_LIBPATH=%{l_prefix}/lib" \
|
|
|
|
|
%else
|
|
|
|
|
"-sNOZLIB=1" \
|
|
|
|
|
%endif
|
|
|
|
|
%if "%{with_bzip2}" == "yes"
|
|
|
|
|
"-sNO_COMPRESSION=0" "-sBZIP2_INCLUDE=%{l_prefix}/include" "-sBZIP2_LIBPATH=%{l_prefix}/lib" \
|
|
|
|
|
%else
|
|
|
|
|
"-sNOBZIP2=1" \
|
|
|
|
|
%endif
|
|
|
|
|
install
|
|
|
|
|
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/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
|
|
|
|
|
|