]> git.pld-linux.org Git - packages/crossmingw32-boost.git/blob - crossmingw32-boost.spec
- up to 1.41
[packages/crossmingw32-boost.git] / crossmingw32-boost.spec
1 #
2 # Conditional build:
3 %bcond_with     serialization   # enable Boost Serialization
4 #
5 %define         realname        boost
6 Summary:        The Boost C++ Libraries - Mingw32 cross version
7 Summary(pl.UTF-8):      Biblioteki C++ "Boost" - wersja skrośna dla Mingw32
8 Name:           crossmingw32-%{realname}
9 Version:        1.41.0
10 %define fver    %(echo %{version} | tr . _)
11 Release:        1
12 License:        Boost Software License and others
13 Group:          Development/Libraries
14 Source0:        http://dl.sourceforge.net/boost/%{realname}_%{fver}.tar.bz2
15 # Source0-md5:  8bb65e133907db727a2a825c5400d0a6
16 Patch0:         %{name}-win.patch
17 URL:            http://www.boost.org/
18 BuildRequires:  boost-jam >= 3.1.12
19 BuildRequires:  crossmingw32-bzip2
20 BuildRequires:  crossmingw32-gcc-c++
21 BuildRequires:  crossmingw32-runtime
22 BuildRequires:  crossmingw32-w32api
23 BuildRequires:  crossmingw32-zlib
24 %{?with_serialization:BuildRequires:    wine-programs}
25 Requires:       crossmingw32-bzip2
26 Requires:       crossmingw32-runtime
27 Requires:       crossmingw32-zlib
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
34
35 %define         _sysprefix      /usr
36 %define         _prefix         %{_sysprefix}/%{target}
37 %define         _libdir         %{_prefix}/lib
38 %define         _dlldir         /usr/share/wine/windows/system
39
40 %define         __cc            %{target}-gcc
41 %define         __cxx           %{target}-g++
42
43 %ifnarch %{ix86}
44 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
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
57 %description -l pl.UTF-8
58 Strona http://www.boost.org/ dostarcza darmowe biblioteki C++ wraz z
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
64 Raporcie Technicznym Biblioteki Standardowej C++.
65
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
78 %package dll
79 Summary:        Boost - DLL libraries for Windows
80 Summary(pl.UTF-8):      Boost - biblioteki DLL dla Windows
81 Group:          Applications/Emulators
82 Requires:       crossmingw32-bzip2-dll
83 Requires:       crossmingw32-zlib-dll
84 Requires:       wine
85
86 %description dll
87 Boost - DLL libraries for Windows.
88
89 %description dll -l pl.UTF-8
90 Boost - biblioteki DLL dla Windows.
91
92 %prep
93 %setup -q -n %{realname}_%{fver}
94 %patch0 -p1
95
96 echo 'using gcc : : %{target}-g++ : <cxxflags>"%{rpmcxxflags}"' \
97         '<archiver>%{target}-ar ;' >tools/build/v2/user-config.jam
98
99 %build
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
106 bjam \
107         -q -d2 \
108         --layout=versioned \
109         -sBZIP2_BINARY=bzip2 \
110         --toolset=gcc \
111         --without-python \
112         %{!?with_serialization:--without-serialization} \
113         --without-test \
114         variant=release \
115         debug-symbols=on \
116         inlining=on \
117         link=static,shared \
118         target-os=windows \
119         threading=multi \
120         threadapi=win32
121
122 mkdir wlib
123 find bin.v2/libs -name '*.a' -exec cp '{}' wlib \;
124 find bin.v2/libs -name '*.dll' -exec cp '{}' wlib \;
125
126 %if 0%{!?debug:1}
127 %{target}-strip wlib/*.dll
128 %{target}-strip -g -R.comment -R.note wlib/*.a
129 %endif
130
131 %install
132 rm -rf $RPM_BUILD_ROOT
133 install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir},%{_dlldir}}
134
135 cp -r boost $RPM_BUILD_ROOT%{_includedir}
136 install wlib/*.a $RPM_BUILD_ROOT%{_libdir}
137 install wlib/*.dll $RPM_BUILD_ROOT%{_dlldir}
138
139 %clean
140 rm -rf $RPM_BUILD_ROOT
141
142 %files
143 %defattr(644,root,root,755)
144 %{_libdir}/libboost_*-mgw*-mt-*.dll.a
145 %{_includedir}/boost
146
147 %files static
148 %defattr(644,root,root,755)
149 %{_libdir}/libboost_*-mgw*-mt-*.a
150
151 %files dll
152 %defattr(644,root,root,755)
153 %{_dlldir}/boost_*-mgw*-mt-*.dll
This page took 0.751947 seconds and 4 git commands to generate.