]>
Commit | Line | Data |
---|---|---|
d97fa3b7 ŁK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with serialization # enable Boost Serialization | |
4 | # | |
28441938 | 5 | %define realname boost |
6 | Summary: The Boost C++ Libraries - Mingw32 cross version | |
f825d7b1 | 7 | Summary(pl.UTF-8): Biblioteki C++ "Boost" - wersja skrośna dla Mingw32 |
28441938 | 8 | Name: crossmingw32-%{realname} |
fec89778 | 9 | Version: 1.37.0 |
670a15d7 | 10 | %define fver %(echo %{version} | tr . _) |
ff36f437 | 11 | Release: 1 |
28441938 | 12 | License: Boost Software License and others |
33145f37 | 13 | Group: Development/Libraries |
670a15d7 | 14 | Source0: http://dl.sourceforge.net/boost/%{realname}_%{fver}.tar.bz2 |
fec89778 | 15 | # Source0-md5: 8d9f990bfb7e83769fa5f1d6f065bc92 |
28441938 | 16 | Patch0: %{name}-win.patch |
17 | URL: http://www.boost.org/ | |
8d134d9a | 18 | BuildRequires: boost-jam >= 3.1.12 |
a72e6f01 | 19 | BuildRequires: crossmingw32-bzip2 |
28441938 | 20 | BuildRequires: crossmingw32-gcc-c++ |
21 | BuildRequires: crossmingw32-runtime | |
22 | BuildRequires: crossmingw32-w32api | |
a72e6f01 | 23 | BuildRequires: crossmingw32-zlib |
d97fa3b7 | 24 | %{?with_serialization:BuildRequires: wine-programs} |
a72e6f01 ŁK |
25 | Requires: crossmingw32-bzip2 |
26 | Requires: crossmingw32-runtime | |
27 | Requires: crossmingw32-zlib | |
28441938 | 28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
30 | %define no_install_post_strip 1 | |
31 | ||
32 | %define target i386-mingw32 | |
33 | %define target_platform i386-pc-mingw32 | |
c66a9041 JB |
34 | |
35 | %define _sysprefix /usr | |
36 | %define _prefix %{_sysprefix}/%{target} | |
37 | %define _libdir %{_prefix}/lib | |
38 | %define _dlldir /usr/share/wine/windows/system | |
28441938 | 39 | |
40 | %define __cc %{target}-gcc | |
41 | %define __cxx %{target}-g++ | |
42 | ||
c66a9041 JB |
43 | %ifnarch %{ix86} |
44 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
28441938 | 45 | %define optflags -O2 |
46 | %endif | |
47 | ||
48 | %description | |
49 | The Boost web site provides free peer-reviewed portable C++ source | |
50 | libraries. The emphasis is on libraries which work well with the C++ | |
51 | Standard Library. One goal is to establish "existing practice" and | |
52 | provide reference implementations so that the Boost libraries are | |
53 | suitable for eventual standardization. Some of the libraries have | |
54 | already been proposed for inclusion in the C++ Standards Committee's | |
55 | upcoming C++ Standard Library Technical Report. | |
56 | ||
241a7e06 | 57 | %description -l pl.UTF-8 |
28441938 | 58 | Strona http://www.boost.org/ dostarcza darmowe biblioteki C++ wraz z |
241a7e06 JR |
59 | kodem źródłowym. Nacisk położono na biblioteki, które dobrze |
60 | współpracują ze standardową biblioteką C++. Celem jest ustanowienie | |
61 | "istniejącej praktyki" i dostarczenie implementacji, tak że biblioteki | |
62 | "Boost" nadają się do ewentualnej standaryzacji. Niektóre z bibliotek | |
63 | już zostały zgłoszone do komitetu standaryzacyjnego C++ w nadchodzącym | |
28441938 | 64 | Raporcie Technicznym Biblioteki Standardowej C++ |
65 | ||
321d21fc JB |
66 | %package static |
67 | Summary: Static Boost libraries (cross mingw32 version) | |
68 | Summary(pl.UTF-8): Statyczne biblioteki Boost (wersja skrośna mingw32) | |
69 | Group: Development/Libraries | |
70 | Requires: %{name} = %{version}-%{release} | |
71 | ||
72 | %description static | |
73 | Static Boost libraries (cross mingw32 version). | |
74 | ||
75 | %description static -l pl.UTF-8 | |
76 | Statyczne biblioteki Boost (wersja skrośna mingw32). | |
77 | ||
28441938 | 78 | %package dll |
c66a9041 JB |
79 | Summary: Boost - DLL libraries for Windows |
80 | Summary(pl.UTF-8): Boost - biblioteki DLL dla Windows | |
28441938 | 81 | Group: Applications/Emulators |
670a15d7 JB |
82 | Requires: crossmingw32-bzip2-dll |
83 | Requires: crossmingw32-zlib-dll | |
84 | Requires: wine | |
28441938 | 85 | |
86 | %description dll | |
c66a9041 | 87 | Boost - DLL libraries for Windows. |
28441938 | 88 | |
241a7e06 | 89 | %description dll -l pl.UTF-8 |
c66a9041 | 90 | Boost - biblioteki DLL dla Windows. |
28441938 | 91 | |
92 | %prep | |
670a15d7 | 93 | %setup -q -n %{realname}_%{fver} |
28441938 | 94 | %patch0 -p1 |
95 | ||
321d21fc | 96 | echo 'using gcc : : %{target}-g++ : <cxxflags>"%{rpmcxxflags}" ;' \ |
ff36f437 | 97 | >tools/build/v2/user-config.jam |
28441938 | 98 | |
99 | %build | |
d97fa3b7 ŁK |
100 | %if %{with serialization} |
101 | export WINEPREFIX=`pwd`/wineprefix | |
102 | wineprefixcreate | |
103 | cp %{_prefix}/bin/mingwm10.dll wineprefix/drive_c/windows/system32/ | |
104 | %endif | |
105 | ||
321d21fc JB |
106 | CC="%{__cc}" ; export CC |
107 | CXX="%{__cxx}" ; export CXX | |
28441938 | 108 | LD=%{target}-ld ; export LD |
109 | AR=%{target}-ar ; export AR | |
110 | AS=%{target}-as ; export AS | |
28441938 | 111 | RANLIB=%{target}-ranlib ; export RANLIB |
28441938 | 112 | |
28441938 | 113 | bjam \ |
0826927f JB |
114 | -q -d2 \ |
115 | -sBZIP2_BINARY=bzip2 \ | |
116 | --toolset=gcc \ | |
117 | --without-python \ | |
d97fa3b7 | 118 | %{!?with_serialization:--without-serialization} \ |
0826927f JB |
119 | --without-test \ |
120 | variant=release \ | |
121 | debug-symbols=on \ | |
122 | inlining=on \ | |
123 | link=static,shared \ | |
ff36f437 | 124 | target-os=windows \ |
0826927f JB |
125 | threading=multi \ |
126 | threadapi=win32 | |
28441938 | 127 | |
128 | mkdir wlib | |
ff36f437 ŁK |
129 | find bin.v2/libs -name '*.a' -exec cp '{}' wlib \; |
130 | find bin.v2/libs -name '*.dll' -exec cp '{}' wlib \; | |
28441938 | 131 | |
132 | %if 0%{!?debug:1} | |
133 | %{target}-strip wlib/*.dll | |
134 | %{target}-strip -g -R.comment -R.note wlib/*.a | |
135 | %endif | |
136 | ||
137 | %install | |
138 | rm -rf $RPM_BUILD_ROOT | |
c66a9041 | 139 | install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_dlldir}} |
28441938 | 140 | |
c66a9041 JB |
141 | cp -r boost $RPM_BUILD_ROOT%{_includedir} |
142 | install wlib/*.a $RPM_BUILD_ROOT%{_libdir} | |
143 | install wlib/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
28441938 | 144 | |
145 | %clean | |
146 | rm -rf $RPM_BUILD_ROOT | |
147 | ||
148 | %files | |
149 | %defattr(644,root,root,755) | |
fec89778 | 150 | %{_libdir}/libboost_*-mgw*-mt-1_37.dll.a |
c66a9041 | 151 | %{_includedir}/boost |
321d21fc JB |
152 | |
153 | %files static | |
154 | %defattr(644,root,root,755) | |
fec89778 | 155 | %{_libdir}/libboost_*-mgw*-mt-1_37.a |
28441938 | 156 | |
157 | %files dll | |
158 | %defattr(644,root,root,755) | |
fec89778 | 159 | %{_dlldir}/boost_*-mgw*-mt-1_37.dll |