boost/boost.spec

changeset 775
21ce05ebf344
parent 496
c4f4c533995f
equal deleted inserted replaced
0:ec82b6557279 1:07d73411c0dc
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21 ## SUCH DAMAGE. 21 ## SUCH DAMAGE.
22 ## 22 ##
23 23
24 # package version 24 # package version
25 %define V_openpkg 1.49.0 25 %define V_openpkg 1.50.0
26 %define V_dist 1_49_0 26 %define V_dist 1_50_0
27 27
28 # package information 28 # package information
29 Name: boost 29 Name: boost
30 Summary: Peer-Reviewed Portable C++ Libraries 30 Summary: Peer-Reviewed Portable C++ Libraries
31 URL: http://www.boost.org/ 31 URL: http://www.boost.org/
34 Distribution: OpenPKG Community 34 Distribution: OpenPKG Community
35 Class: EVAL 35 Class: EVAL
36 Group: Language 36 Group: Language
37 License: Boost Software License 37 License: Boost Software License
38 Version: %{V_openpkg} 38 Version: %{V_openpkg}
39 Release: 20120722 39 Release: 20120800
40 40
41 # package options 41 # package options
42 %option with_debug yes 42 %option with_debug yes
43 %option with_optimize yes 43 %option with_optimize yes
44 %option with_threads yes 44 %option with_threads yes
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}

mercurial