michael@496: ## michael@496: ## boost.spec -- OpenPKG RPM Package Specification michael@496: ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. michael@496: ## michael@496: ## Permission to use, copy, modify, and distribute this software for michael@496: ## any purpose with or without fee is hereby granted, provided that michael@496: ## the above copyright notice and this permission notice appear in all michael@496: ## copies. michael@496: ## michael@496: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@496: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@496: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@496: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@496: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@496: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@496: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@496: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@496: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@496: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@496: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@496: ## SUCH DAMAGE. michael@496: ## michael@496: michael@496: # package version michael@497: %define V_openpkg 1.50.0 michael@497: %define V_dist 1_50_0 michael@496: michael@496: # package information michael@496: Name: boost michael@496: Summary: Peer-Reviewed Portable C++ Libraries michael@496: URL: http://www.boost.org/ michael@496: Vendor: Boost Community michael@496: Packager: OpenPKG Foundation e.V. michael@496: Distribution: OpenPKG Community michael@496: Class: EVAL michael@496: Group: Language michael@496: License: Boost Software License michael@496: Version: %{V_openpkg} michael@497: Release: 20120800 michael@496: michael@496: # package options michael@496: %option with_debug yes michael@496: %option with_optimize yes michael@496: %option with_threads yes michael@496: %option with_zlib yes michael@496: %option with_bzip2 yes michael@496: michael@496: # list of sources michael@496: Source0: http://switch.dl.sourceforge.net/boost/boost_%{V_dist}.tar.bz2 michael@496: Patch0: boost.patch michael@496: michael@496: # build information michael@496: BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, gcc::with_cxx = yes michael@496: PreReq: OpenPKG, openpkg >= 20100101 michael@496: %if "%{with_zlib}" == "yes" michael@496: BuildPreReq: zlib michael@496: PreReq: zlib michael@496: %endif michael@496: %if "%{with_bzip2}" == "yes" michael@496: BuildPreReq: bzip2 michael@496: PreReq: bzip2 michael@496: %endif michael@496: michael@496: %description michael@496: Boost provides peer-reviewed portable C++ class libraries, placing michael@496: emphasis on libraries which work well with the C++ Standard michael@496: Library. The libraries are intended to be widely useful, and are in michael@496: regular use by thousands of programmers across a broad spectrum of michael@496: applications. michael@496: michael@496: Aiming to provide missing functionality in current standards, michael@496: Boost was begun by members of the C++ Standards Committee Library michael@496: Working Group. Today, logic from a subset of the boost collection is michael@496: under review by the ISO C++ Standards Committee and considered for michael@496: inclusion in its future standards documents. michael@496: michael@496: %track michael@496: prog boost = { michael@496: version = %{V_dist} michael@496: url = http://sourceforge.net/projects/boost/files/ michael@496: regex = boost_(\d+_\d+\_\d+)\.tar\.bz2 michael@496: } michael@496: michael@496: %prep michael@496: %setup -q -n boost_%{V_dist} michael@496: %patch -p0 michael@496: michael@496: %build michael@496: # bootstrap bjam(1), the boost build system michael@496: ./bootstrap.sh \ michael@496: --prefix=%{l_prefix} \ michael@496: --exec-prefix=%{l_prefix} \ michael@496: --includedir=%{l_prefix}/include \ michael@496: --libdir=%{l_prefix}/lib \ michael@496: --without-libraries=python michael@496: michael@497: %{l_shtool} mkdir -p objbld michael@496: michael@496: # configure build options for bjam(1) -sBUILD parameter michael@496: debugopts="release" michael@496: optimizeopts="off" michael@497: threadopts="threading=single" michael@496: %if "%{with_debug}" == "yes" michael@496: debugopts="$debugopts debug" michael@496: %endif michael@496: %if "%{with_optimize}" == "yes" michael@496: optimizeopts="speed full" michael@496: %endif michael@496: %if "%{with_threads}" == "yes" michael@497: threadopts="threading=single,multi" michael@496: %endif michael@497: cpusmp=`echo %{l_mflags -O} | %{l_shtool} subst -e 's;.*\(\-j *[1-9][0-9]*\).*;\1;'` michael@496: michael@496: # build all libraries michael@497: ./b2 --toolset=gcc --layout=tagged --builddir=objbld "-sBUILD=$debugopts $optimizeopts" \ michael@496: %if "%{with_zlib}" == "yes" michael@496: "-sNO_COMPRESSION=0" "-sZLIB_INCLUDE=%{l_prefix}/include" "-sZLIB_LIBPATH=%{l_prefix}/lib" \ michael@496: %else michael@496: "-sNOZLIB=1" \ michael@496: %endif michael@496: %if "%{with_bzip2}" == "yes" michael@496: "-sNO_COMPRESSION=0" "-sBZIP2_INCLUDE=%{l_prefix}/include" "-sBZIP2_LIBPATH=%{l_prefix}/lib" \ michael@496: %else michael@496: "-sNOBZIP2=1" \ michael@496: %endif michael@497: $threadopts link=static stage $cpusmp michael@496: michael@496: %install michael@497: threadopts="threading=single" michael@497: %if "%{with_threads}" == "yes" michael@497: threadopts="threading=single,multi" michael@496: %endif michael@497: ./bjam --toolset=gcc --layout=tagged --prefix=$RPM_BUILD_ROOT%{l_prefix} \ michael@497: $threadopts link=static install michael@496: %{l_shtool} mkdir -f -p -m 755 \ michael@496: $RPM_BUILD_ROOT%{l_prefix}/bin michael@496: %{l_shtool} install -c -m 755 \ michael@496: bjam $RPM_BUILD_ROOT%{l_prefix}/bin/ michael@496: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} michael@496: michael@496: %files -f files michael@496: michael@496: %clean michael@496: