| 92 --exec-prefix=%{l_prefix} \ |
92 --exec-prefix=%{l_prefix} \ |
| 93 --includedir=%{l_prefix}/include \ |
93 --includedir=%{l_prefix}/include \ |
| 94 --libdir=%{l_prefix}/lib \ |
94 --libdir=%{l_prefix}/lib \ |
| 95 --without-libraries=python |
95 --without-libraries=python |
| 96 |
96 |
| 97 %{l_shtool} mkdir -p obj |
97 %{l_shtool} mkdir -p objbld |
| 98 |
98 |
| 99 # configure build options for bjam(1) -sBUILD parameter |
99 # configure build options for bjam(1) -sBUILD parameter |
| 100 debugopts="release" |
100 debugopts="release" |
| 101 optimizeopts="<optimization>off" |
101 optimizeopts="<optimization>off" |
| 102 threadopts="<threading>single" |
102 threadopts="threading=single" |
| 103 %if "%{with_debug}" == "yes" |
103 %if "%{with_debug}" == "yes" |
| 104 debugopts="$debugopts debug" |
104 debugopts="$debugopts debug" |
| 105 %endif |
105 %endif |
| 106 %if "%{with_optimize}" == "yes" |
106 %if "%{with_optimize}" == "yes" |
| 107 optimizeopts="<optimization>speed <inlining>full" |
107 optimizeopts="<optimization>speed <inlining>full" |
| 108 %endif |
108 %endif |
| 109 %if "%{with_threads}" == "yes" |
109 %if "%{with_threads}" == "yes" |
| 110 threadopts="<threading>single/multi" |
110 threadopts="threading=single,multi" |
| 111 %endif |
111 %endif |
| |
112 cpusmp=`echo %{l_mflags -O} | %{l_shtool} subst -e 's;.*\(\-j *[1-9][0-9]*\).*;\1;'` |
| 112 |
113 |
| 113 # build all libraries |
114 # build all libraries |
| 114 ./b2 --toolset=gcc --layout=system --builddir=obj "-sBUILD=$debugopts $optimizeopts $threadopts" \ |
115 ./b2 --toolset=gcc --layout=tagged --builddir=objbld "-sBUILD=$debugopts $optimizeopts" \ |
| 115 %if "%{with_zlib}" == "yes" |
116 %if "%{with_zlib}" == "yes" |
| 116 "-sNO_COMPRESSION=0" "-sZLIB_INCLUDE=%{l_prefix}/include" "-sZLIB_LIBPATH=%{l_prefix}/lib" \ |
117 "-sNO_COMPRESSION=0" "-sZLIB_INCLUDE=%{l_prefix}/include" "-sZLIB_LIBPATH=%{l_prefix}/lib" \ |
| 117 %else |
118 %else |
| 118 "-sNOZLIB=1" \ |
119 "-sNOZLIB=1" \ |
| 119 %endif |
120 %endif |
| 120 %if "%{with_bzip2}" == "yes" |
121 %if "%{with_bzip2}" == "yes" |
| 121 "-sNO_COMPRESSION=0" "-sBZIP2_INCLUDE=%{l_prefix}/include" "-sBZIP2_LIBPATH=%{l_prefix}/lib" \ |
122 "-sNO_COMPRESSION=0" "-sBZIP2_INCLUDE=%{l_prefix}/include" "-sBZIP2_LIBPATH=%{l_prefix}/lib" \ |
| 122 %else |
123 %else |
| 123 "-sNOBZIP2=1" \ |
124 "-sNOBZIP2=1" \ |
| 124 %endif |
125 %endif |
| 125 link=static stage |
126 $threadopts link=static stage $cpusmp |
| 126 |
127 |
| 127 %install |
128 %install |
| 128 ./bjam --toolset=gcc --layout=system --prefix=$RPM_BUILD_ROOT%{l_prefix} \ |
129 threadopts="threading=single" |
| 129 %if "%{with_zlib}" == "yes" |
130 %if "%{with_threads}" == "yes" |
| 130 "-sNO_COMPRESSION=0" "-sZLIB_INCLUDE=%{l_prefix}/include" "-sZLIB_LIBPATH=%{l_prefix}/lib" \ |
131 threadopts="threading=single,multi" |
| 131 %else |
|
| 132 "-sNOZLIB=1" \ |
|
| 133 %endif |
132 %endif |
| 134 %if "%{with_bzip2}" == "yes" |
133 ./bjam --toolset=gcc --layout=tagged --prefix=$RPM_BUILD_ROOT%{l_prefix} \ |
| 135 "-sNO_COMPRESSION=0" "-sBZIP2_INCLUDE=%{l_prefix}/include" "-sBZIP2_LIBPATH=%{l_prefix}/lib" \ |
134 $threadopts link=static install |
| 136 %else |
|
| 137 "-sNOBZIP2=1" \ |
|
| 138 %endif |
|
| 139 install |
|
| 140 rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/boost-* |
|
| 141 find $RPM_BUILD_ROOT%{l_prefix}/lib/ \ |
|
| 142 -name "*.so" -print -o \ |
|
| 143 -name "libboost_*.so.%{V_openpkg}" \ |
|
| 144 -print | xargs rm -f |
|
| 145 %{l_shtool} mkdir -f -p -m 755 \ |
135 %{l_shtool} mkdir -f -p -m 755 \ |
| 146 $RPM_BUILD_ROOT%{l_prefix}/bin |
136 $RPM_BUILD_ROOT%{l_prefix}/bin |
| 147 %{l_shtool} install -c -m 755 \ |
137 %{l_shtool} install -c -m 755 \ |
| 148 bjam $RPM_BUILD_ROOT%{l_prefix}/bin/ |
138 bjam $RPM_BUILD_ROOT%{l_prefix}/bin/ |
| 149 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
139 %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |