]> git.pld-linux.org Git - packages/crossmingw32-std-threads.git/blob - crossmingw32-std-threads.spec
2a95a898a11c2ec13aa79a0cd203821cadb43f05
[packages/crossmingw32-std-threads.git] / crossmingw32-std-threads.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # perform test build
4 #
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
8 Version:        0
9 %define gitref  ee67ef384470e998c8e0b7301f7a79b5019251a2
10 %define snap    20180912
11 Release:        0.%{snap}.1
12 License:        BSD
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
19 %if %{with tests}
20 BuildRequires:  crossmingw32-gcc-c++ >= 1:4.7
21 %endif
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)
26
27 %define         no_install_post_strip   1
28
29 %define         target                  i386-mingw32
30 %define         target_platform         i386-pc-mingw32
31
32 %define         __cc                    %{target}-gcc
33 %define         __cxx                   %{target}-g++
34
35 %define         _sysprefix              /usr
36 %define         _prefix                 %{_sysprefix}/%{target}
37
38 %ifnarch %{ix86}
39 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc.
40 # now at least i486 is required for atomic operations
41 %define         optflags        -O2
42 %endif
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=]*
47
48 %description
49 Standard C++11 threading classes (std::condition_variable, std::mutex,
50 std::thread) implementation, which are currently still missing on
51 MinGW GCC.
52
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.
57
58 %prep
59 %setup -q -n mingw-std-threads-%{gitref}
60 %patch0 -p1
61 %patch1 -p1
62
63 %build
64 %if %{with tests}
65 install -d tests/build
66 cd tests/build
67 CC="%{__cc}" \
68 CXX="%{__cxx}" \
69 cmake .. \
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
75
76 %{__make}
77 %endif
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81 install -d $RPM_BUILD_ROOT%{_includedir}/std-threads
82
83 cp -p *.h $RPM_BUILD_ROOT%{_includedir}/std-threads
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %files
89 %defattr(644,root,root,755)
90 %doc LICENSE README.md
91 %{_includedir}/std-threads
This page took 0.041895 seconds and 2 git commands to generate.