Thu, 09 Aug 2012 18:53:48 +0200
Correct threading, static linking, use parallel build, and update version.
boost/boost.spec | file | annotate | diff | comparison | revisions |
1.1 --- a/boost/boost.spec Thu Aug 09 18:52:06 2012 +0200 1.2 +++ b/boost/boost.spec Thu Aug 09 18:53:48 2012 +0200 1.3 @@ -22,8 +22,8 @@ 1.4 ## 1.5 1.6 # package version 1.7 -%define V_openpkg 1.49.0 1.8 -%define V_dist 1_49_0 1.9 +%define V_openpkg 1.50.0 1.10 +%define V_dist 1_50_0 1.11 1.12 # package information 1.13 Name: boost 1.14 @@ -36,7 +36,7 @@ 1.15 Group: Language 1.16 License: Boost Software License 1.17 Version: %{V_openpkg} 1.18 -Release: 20120722 1.19 +Release: 20120800 1.20 1.21 # package options 1.22 %option with_debug yes 1.23 @@ -94,12 +94,12 @@ 1.24 --libdir=%{l_prefix}/lib \ 1.25 --without-libraries=python 1.26 1.27 - %{l_shtool} mkdir -p obj 1.28 + %{l_shtool} mkdir -p objbld 1.29 1.30 # configure build options for bjam(1) -sBUILD parameter 1.31 debugopts="release" 1.32 optimizeopts="<optimization>off" 1.33 - threadopts="<threading>single" 1.34 + threadopts="threading=single" 1.35 %if "%{with_debug}" == "yes" 1.36 debugopts="$debugopts debug" 1.37 %endif 1.38 @@ -107,11 +107,12 @@ 1.39 optimizeopts="<optimization>speed <inlining>full" 1.40 %endif 1.41 %if "%{with_threads}" == "yes" 1.42 - threadopts="<threading>single/multi" 1.43 + threadopts="threading=single,multi" 1.44 %endif 1.45 + cpusmp=`echo %{l_mflags -O} | %{l_shtool} subst -e 's;.*\(\-j *[1-9][0-9]*\).*;\1;'` 1.46 1.47 # build all libraries 1.48 - ./b2 --toolset=gcc --layout=system --builddir=obj "-sBUILD=$debugopts $optimizeopts $threadopts" \ 1.49 + ./b2 --toolset=gcc --layout=tagged --builddir=objbld "-sBUILD=$debugopts $optimizeopts" \ 1.50 %if "%{with_zlib}" == "yes" 1.51 "-sNO_COMPRESSION=0" "-sZLIB_INCLUDE=%{l_prefix}/include" "-sZLIB_LIBPATH=%{l_prefix}/lib" \ 1.52 %else 1.53 @@ -122,26 +123,15 @@ 1.54 %else 1.55 "-sNOBZIP2=1" \ 1.56 %endif 1.57 - link=static stage 1.58 + $threadopts link=static stage $cpusmp 1.59 1.60 %install 1.61 - ./bjam --toolset=gcc --layout=system --prefix=$RPM_BUILD_ROOT%{l_prefix} \ 1.62 -%if "%{with_zlib}" == "yes" 1.63 - "-sNO_COMPRESSION=0" "-sZLIB_INCLUDE=%{l_prefix}/include" "-sZLIB_LIBPATH=%{l_prefix}/lib" \ 1.64 -%else 1.65 - "-sNOZLIB=1" \ 1.66 + threadopts="threading=single" 1.67 +%if "%{with_threads}" == "yes" 1.68 + threadopts="threading=single,multi" 1.69 %endif 1.70 -%if "%{with_bzip2}" == "yes" 1.71 - "-sNO_COMPRESSION=0" "-sBZIP2_INCLUDE=%{l_prefix}/include" "-sBZIP2_LIBPATH=%{l_prefix}/lib" \ 1.72 -%else 1.73 - "-sNOBZIP2=1" \ 1.74 -%endif 1.75 - install 1.76 - rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/boost-* 1.77 - find $RPM_BUILD_ROOT%{l_prefix}/lib/ \ 1.78 - -name "*.so" -print -o \ 1.79 - -name "libboost_*.so.%{V_openpkg}" \ 1.80 - -print | xargs rm -f 1.81 + ./bjam --toolset=gcc --layout=tagged --prefix=$RPM_BUILD_ROOT%{l_prefix} \ 1.82 + $threadopts link=static install 1.83 %{l_shtool} mkdir -f -p -m 755 \ 1.84 $RPM_BUILD_ROOT%{l_prefix}/bin 1.85 %{l_shtool} install -c -m 755 \