summaryrefslogtreecommitdiff
path: root/crossmingw32-boost.spec
blob: 1442cba9394ee2938e5376430130cd7cdc768236 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
#
# Conditional build:
%bcond_with	context		# enable Boost Context [gas+PE combination not supported]
#
%define		realname	boost
Summary:	The Boost C++ Libraries - MinGW32 cross version
Summary(pl.UTF-8):	Biblioteki C++ "Boost" - wersja skrośna dla MinGW32
Name:		crossmingw32-%{realname}
Version:	1.55.0
%define	fver	%(echo %{version} | tr . _)
Release:	1
License:	Boost Software License and others
Group:		Development/Libraries
Source0:	http://downloads.sourceforge.net/boost/%{realname}_%{fver}.tar.bz2
# Source0-md5:	d6eef4b4cacb2183f2bf265a5a03a354
URL:		http://www.boost.org/
BuildRequires:	crossmingw32-bzip2
BuildRequires:	crossmingw32-gcc-c++
BuildRequires:	crossmingw32-runtime
BuildRequires:	crossmingw32-w32api
BuildRequires:	crossmingw32-zlib
Requires:	crossmingw32-bzip2
Requires:	crossmingw32-runtime
Requires:	crossmingw32-zlib
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%define		no_install_post_strip	1

%define		target		i386-mingw32
%define		target_platform	i386-pc-mingw32

%define		_sysprefix	/usr
%define		_prefix		%{_sysprefix}/%{target}
%define		_libdir		%{_prefix}/lib
%define		_dlldir		/usr/share/wine/windows/system

%define		__cc		%{target}-gcc
%define		__cxx		%{target}-g++

%ifnarch %{ix86}
# arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
%define		optflags	-O2
%endif
# -z options are invalid for mingw linker, most of -f options are Linux-specific
%define		filterout_ld	-Wl,-z,.*
%define		filterout_c	-f[-a-z0-9=]*
%define		filterout_cxx	-f[-a-z0-9=]*

%define		abi_tag		1_55

%description
The Boost web site provides free peer-reviewed portable C++ source
libraries. The emphasis is on libraries which work well with the C++
Standard Library. One goal is to establish "existing practice" and
provide reference implementations so that the Boost libraries are
suitable for eventual standardization. Some of the libraries have
already been proposed for inclusion in the C++ Standards Committee's
upcoming C++ Standard Library Technical Report.

%description -l pl.UTF-8
Strona http://www.boost.org/ dostarcza darmowe biblioteki C++ wraz z
kodem źródłowym. Nacisk położono na biblioteki, które dobrze
współpracują ze standardową biblioteką C++. Celem jest ustanowienie
"istniejącej praktyki" i dostarczenie implementacji, tak że biblioteki
"Boost" nadają się do ewentualnej standaryzacji. Niektóre z bibliotek
już zostały zgłoszone do komitetu standaryzacyjnego C++ w nadchodzącym
Raporcie Technicznym Biblioteki Standardowej C++.

%package static
Summary:	Static Boost libraries (cross MinGW32 version)
Summary(pl.UTF-8):	Statyczne biblioteki Boost (wersja skrośna MinGW32)
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}

%description static
Static Boost libraries (cross MinGW32 version).

%description static -l pl.UTF-8
Statyczne biblioteki Boost (wersja skrośna MinGW32).

%package dll
Summary:	Boost - DLL libraries for Windows
Summary(pl.UTF-8):	Boost - biblioteki DLL dla Windows
Group:		Applications/Emulators
Requires:	crossmingw32-bzip2-dll
Requires:	crossmingw32-zlib-dll
Requires:	wine

%description dll
Boost - DLL libraries for Windows.

%description dll -l pl.UTF-8
Boost - biblioteki DLL dla Windows.

%prep
%setup -q -n %{realname}_%{fver}

echo 'using gcc : : %{target}-g++ : <cxxflags>"%{rpmcxxflags}"' \
	'<archiver>%{target}-ar ;' >tools/build/v2/user-config.jam

# use Windows Message Compiler, not Midnight Commander
%{__sed} -i -e 's,mc $(MCFLAGS),%{target}-windmc $(MCFLAGS),' tools/build/v2/tools/mc.jam

%build
./bootstrap.sh --prefix=%{_prefix}
./b2 \
	-d2 \
	%{_smp_mflags} \
	-sBZIP2_BINARY=bzip2 \
	--layout=versioned \
	%{!?with_context:--without-context --without-coroutine} \
	--without-python \
	--without-test \
	debug-symbols=on \
	inlining=on \
	link=static,shared \
	target-os=windows \
	threadapi=win32 \
	threading=multi \
	toolset=gcc \
	variant=release

%if 0%{!?debug:1}
%{target}-strip stage/lib/*.dll
%{target}-strip -g -R.comment -R.note stage/lib/*.a
%endif

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_dlldir}}

cp -r boost $RPM_BUILD_ROOT%{_includedir}
cp -a stage/lib/*.a $RPM_BUILD_ROOT%{_libdir}
install stage/lib/*.dll $RPM_BUILD_ROOT%{_dlldir}

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%{_libdir}/libboost_atomic-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_chrono-mgw*-mt-%{abi_tag}.dll.a
%{?with_context:%{_libdir}/libboost_context-mgw*-mt-%{abi_tag}.dll.a}
%{?with_context:%{_libdir}/libboost_coroutine-mgw*-mt-%{abi_tag}.dll.a}
%{_libdir}/libboost_date_time-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_filesystem-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_graph-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_iostreams-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_locale-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_log-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_log_setup-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_math_c99-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_math_c99f-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_math_c99l-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_math_tr1-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_math_tr1f-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_math_tr1l-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_program_options-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_random-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_regex-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_serialization-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_signals-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_system-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_thread_win32-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_timer-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_wave-mgw*-mt-%{abi_tag}.dll.a
%{_libdir}/libboost_wserialization-mgw*-mt-%{abi_tag}.dll.a
# static-only
%{_libdir}/libboost_exception-mgw*-mt-%{abi_tag}.a
%{_includedir}/boost

%files static
%defattr(644,root,root,755)
%{_libdir}/libboost_atomic-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_chrono-mgw*-mt-%{abi_tag}.a
%{?with_context:%{_libdir}/libboost_context-mgw*-mt-%{abi_tag}.a}
%{?with_context:%{_libdir}/libboost_coroutine-mgw*-mt-%{abi_tag}.a}
%{_libdir}/libboost_date_time-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_filesystem-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_graph-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_iostreams-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_locale-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_log-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_log_setup-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_math_c99-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_math_c99f-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_math_c99l-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_math_tr1-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_math_tr1f-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_math_tr1l-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_program_options-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_random-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_regex-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_serialization-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_signals-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_system-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_thread_win32-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_timer-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_wave-mgw*-mt-%{abi_tag}.a
%{_libdir}/libboost_wserialization-mgw*-mt-%{abi_tag}.a

%files dll
%defattr(644,root,root,755)
%{_dlldir}/libboost_atomic-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_chrono-mgw*-mt-%{abi_tag}.dll
%{?with_context:%{_libdir}/libboost_context-mgw*-mt-%{abi_tag}.dll}
%{?with_context:%{_libdir}/libboost_coroutine-mgw*-mt-%{abi_tag}.dll}
%{_dlldir}/libboost_date_time-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_filesystem-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_graph-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_iostreams-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_locale-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_log-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_log_setup-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_math_c99-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_math_c99f-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_math_c99l-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_math_tr1-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_math_tr1f-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_math_tr1l-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_program_options-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_random-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_regex-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_serialization-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_signals-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_system-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_thread_win32-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_timer-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_wave-mgw*-mt-%{abi_tag}.dll
%{_dlldir}/libboost_wserialization-mgw*-mt-%{abi_tag}.dll