3 %bcond_without tests # perform test build
5 Summary: C++11 threading classes implementation for MinGW
6 Summary(pl.UTF-8): Implementacja klas C++11 związanych z wątkami dla MinGW
7 Name: crossmingw32-std-threads
9 %define gitref ee67ef384470e998c8e0b7301f7a79b5019251a2
13 Group: Development/Libraries
14 Source0: https://github.com/meganz/mingw-std-threads/archive/%{gitref}/mingw-std-threads-%{snap}.tar.gz
15 # Source0-md5: c55d7a463149d803535b71c6bb1346cb
16 Patch0: mingw-std-threads-include.patch
17 Patch1: mingw-std-threads-errors.patch
18 URL: https://github.com/meganz/mingw-std-threads
20 BuildRequires: crossmingw32-gcc-c++ >= 1:4.7
22 Requires: crossmingw32-gcc-c++ >= 1:4.7
23 Requires: crossmingw32-runtime
24 Requires: crossmingw32-w32api
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define no_install_post_strip 1
29 %define target i386-mingw32
30 %define target_platform i386-pc-mingw32
32 %define __cc %{target}-gcc
33 %define __cxx %{target}-g++
35 %define _sysprefix /usr
36 %define _prefix %{_sysprefix}/%{target}
39 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc.
40 # now at least i486 is required for atomic operations
43 # -z options are invalid for mingw linker, most of -f options are Linux-specific
44 %define filterout_ld -Wl,-z,.*
45 %define filterout_c -f[-a-z0-9=]*
46 %define filterout_cxx -f[-a-z0-9=]*
49 Standard C++11 threading classes (std::condition_variable, std::mutex,
50 std::thread) implementation, which are currently still missing on
53 %description -l pl.UTF-8
54 Implementacja klas związanych z wątkami ze standardu C++11
55 (std::condition_variable, std::mutex, std::thread), obecnie
56 brakujących w GCC dla MinGW.
59 %setup -q -n mingw-std-threads-%{gitref}
65 install -d tests/build
70 -DCMAKE_BUILD_TYPE=PLD \
71 -DCMAKE_CXX_FLAGS_PLD="%{rpmcxxflags} -DWINVER=0x0501" \
72 -DCMAKE_SYSTEM_NAME=Windows \
73 -DCMAKE_SYSTEM_PROCESSOR=i386 \
74 -DCMAKE_VERBOSE_MAKEFILE=ON
80 rm -rf $RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT%{_includedir}/std-threads
83 cp -p *.h $RPM_BUILD_ROOT%{_includedir}/std-threads
86 rm -rf $RPM_BUILD_ROOT
89 %defattr(644,root,root,755)
90 %doc LICENSE README.md
91 %{_includedir}/std-threads