1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
10 Summary: MinGW Windows port of Boost C++ Libraries
13 Group: Development/Libraries
14 URL: http://www.boost.org/
15 Source0: http://downloads.sourceforge.net/boost/boost_1_34_1.tar.bz2
16 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
18 Patch0: boost-configure.patch
19 Patch1: boost-gcc-soname.patch
20 #Patch2: boost-use-rpm-optflags.patch
21 Patch3: boost-run-tests.patch
22 Patch4: boost-regex.patch
23 Patch5: boost-gcc43.patch
27 BuildRequires: mingw32-filesystem >= 30
28 BuildRequires: mingw32-gcc
29 BuildRequires: mingw32-gcc-c++
30 BuildRequires: mingw32-binutils
31 #BuildRequires: mingw-libstdc++
32 BuildRequires: mingw32-bzip2
33 BuildRequires: mingw32-zlib
34 # These are required by the native package:
35 #BuildRequires: mingw32-python
36 #BuildRequires: mingw32-libicu
40 Boost provides free peer-reviewed portable C++ source libraries. The
41 emphasis is on libraries which work well with the C++ Standard
42 Library, in the hopes of establishing "existing practice" for
43 extensions and providing reference implementations so that the Boost
44 libraries are suitable for eventual standardization. (Some of the
45 libraries have already been proposed for inclusion in the C++
46 Standards Committee's upcoming C++ Standard Library Technical Report.)
50 %setup -q -n boost_1_34_1
64 # build make tools, ie bjam, necessary for building libs, docs, and testing
65 (cd tools/jam/src && ./build.sh)
66 BJAM=`find tools/jam/src/ -name bjam -a -type f`
68 #BUILD_FLAGS="--with-toolset=gcc --prefix=$RPM_BUILD_ROOT%{_prefix}"
69 BUILD_FLAGS="--with-toolset=gcc --with-bjam=$BJAM"
70 #PYTHON_VERSION=$(python -c 'import sys; print sys.version[:3]')
71 #PYTHON_FLAGS="--with-python-root=/usr --with-python-version=$PYTHON_VERSION"
72 PYTHON_FLAGS="--without-libraries=python"
73 #REGEX_FLAGS="--with-icu"
74 REGEX_FLAGS="--without-icu"
76 ./configure $BUILD_FLAGS $PYTHON_FLAGS $REGEX_FLAGS
78 # Make it use the cross-compiler instead of gcc.
80 echo "using gcc : : %{_mingw32_cc} : ;" > user-config.jam
86 rm -rf $RPM_BUILD_ROOT
87 mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
88 mkdir -p $RPM_BUILD_ROOT%{_mingw32_libdir}
89 mkdir -p $RPM_BUILD_ROOT%{_mingw32_includedir}
91 # Boost doesn't build shared libraries for some reason. However it
92 # builds *.a files which we can trivially convert to *.dll (they
93 # contain objects which are already compiled for PIC).
101 i686-pc-mingw32-gcc -shared \
103 -Wl,--out-implib,../$2.dll.a \
104 *.o -lbz2 -lz -lstdc++ || error=1
110 for f in `find bin.v2 -name '*.a'`; do
113 if a2dll $f $d/$b; then
114 install $d/$b.dll $RPM_BUILD_ROOT%{_mingw32_bindir}
115 install $d/$b.dll.a $RPM_BUILD_ROOT%{_mingw32_libdir}
117 echo '*** FAILED TO BUILD' $d/$b.dll
121 # install include files
122 find boost -type d | while read a; do
123 mkdir -p $RPM_BUILD_ROOT%{_mingw32_includedir}/$a
124 find $a -mindepth 1 -maxdepth 1 -type f \
125 | xargs -r install -m 644 -p -t $RPM_BUILD_ROOT%{_mingw32_includedir}/$a
128 # remove scripts used to generate include files
129 find $RPM_BUILD_ROOT%{_mingw32_includedir}/ \( -name '*.pl' -o -name '*.sh' \) -exec rm {} \;
133 rm -rf $RPM_BUILD_ROOT
137 %defattr(-,root,root)
138 %{_mingw32_includedir}/boost
139 %{_mingw32_bindir}/libboost_date_time.dll
140 %{_mingw32_libdir}/libboost_date_time.dll.a
141 %{_mingw32_bindir}/libboost_date_time-mt.dll
142 %{_mingw32_libdir}/libboost_date_time-mt.dll.a
143 %{_mingw32_bindir}/libboost_filesystem.dll
144 %{_mingw32_libdir}/libboost_filesystem.dll.a
145 %{_mingw32_bindir}/libboost_filesystem-mt.dll
146 %{_mingw32_libdir}/libboost_filesystem-mt.dll.a
147 %{_mingw32_bindir}/libboost_graph.dll
148 %{_mingw32_libdir}/libboost_graph.dll.a
149 %{_mingw32_bindir}/libboost_graph-mt.dll
150 %{_mingw32_libdir}/libboost_graph-mt.dll.a
151 %{_mingw32_bindir}/libboost_iostreams.dll
152 %{_mingw32_libdir}/libboost_iostreams.dll.a
153 %{_mingw32_bindir}/libboost_iostreams-mt.dll
154 %{_mingw32_libdir}/libboost_iostreams-mt.dll.a
155 %{_mingw32_bindir}/libboost_program_options.dll
156 %{_mingw32_libdir}/libboost_program_options.dll.a
157 %{_mingw32_bindir}/libboost_program_options-mt.dll
158 %{_mingw32_libdir}/libboost_program_options-mt.dll.a
159 %{_mingw32_bindir}/libboost_regex.dll
160 %{_mingw32_libdir}/libboost_regex.dll.a
161 %{_mingw32_bindir}/libboost_regex-mt.dll
162 %{_mingw32_libdir}/libboost_regex-mt.dll.a
163 %{_mingw32_bindir}/libboost_serialization.dll
164 %{_mingw32_libdir}/libboost_serialization.dll.a
165 %{_mingw32_bindir}/libboost_serialization-mt.dll
166 %{_mingw32_libdir}/libboost_serialization-mt.dll.a
167 %{_mingw32_bindir}/libboost_signals.dll
168 %{_mingw32_libdir}/libboost_signals.dll.a
169 %{_mingw32_bindir}/libboost_signals-mt.dll
170 %{_mingw32_libdir}/libboost_signals-mt.dll.a
171 %{_mingw32_bindir}/libboost_wave.dll
172 %{_mingw32_libdir}/libboost_wave.dll.a
173 %{_mingw32_bindir}/libboost_wave-mt.dll
174 %{_mingw32_libdir}/libboost_wave-mt.dll.a
175 # These fail to build: they depend on linking with other parts of boost.
176 #libboost_prg_exec_monitor.dll
177 #libboost_test_exec_monitor.dll
178 #libboost_unit_test_framework.dll
179 #libboost_unit_test_framework-mt.dll
180 #libboost_test_exec_monitor-mt.dll
181 #libboost_prg_exec_monitor-mt.dll
182 #libboost_wserialization.dll
183 #libboost_wserialization-mt.dll
184 #libboost_thread-mt.dll
188 * Sat Oct 24 2008 Richard W.M. Jones <rjones@redhat.com> - 1.34.1-2
189 - Initial RPM release.