]>
Commit | Line | Data |
---|---|---|
0c2c9674 JB |
1 | Summary: POSIX Threads component implementation for Win32 - MinGW32 cross version |
2 | Summary(pl.UTF-8): Implementacja komponentu POSIX Threads dla Win32 - wersja skrośna dla MinGW32 | |
3 | Name: crossmingw32-pthreads-w32 | |
eb01a44a | 4 | Version: 2.11.0 |
8855b7d1 | 5 | Release: 2 |
0c2c9674 JB |
6 | License: LGPL v2.1 |
7 | Group: Development/Libraries | |
eb01a44a JB |
8 | Source0: https://downloads.sourceforge.net/pthreads4w/pthreads4w-code-v%{version}.zip |
9 | # Source0-md5: 75c3ade4fa6aeff1d1d25d33f6bbce12 | |
8855b7d1 | 10 | Patch0: pthreads4w-winsock.patch |
eb01a44a | 11 | URL: https://sourceforge.net/p/pthreads4w/wiki/Home/ |
0c2c9674 | 12 | BuildRequires: crossmingw32-gcc |
eb01a44a | 13 | BuildRequires: crossmingw32-runtime >= 1:5.4.2-2 |
0c2c9674 | 14 | BuildRequires: sed >= 4.0 |
eb01a44a | 15 | Requires: crossmingw32-runtime >= 1:5.4.2-2 |
0c2c9674 JB |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
17 | ||
eb01a44a | 18 | %define _enable_debug_packages 0 |
0c2c9674 JB |
19 | %define no_install_post_strip 1 |
20 | ||
21 | %define target i386-mingw32 | |
22 | %define target_platform i386-pc-mingw32 | |
23 | ||
24 | %define _sysprefix /usr | |
25 | %define _prefix %{_sysprefix}/%{target} | |
26 | %define _libdir %{_prefix}/lib | |
27 | %define _dlldir /usr/share/wine/windows/system | |
28 | %define __cc %{target}-gcc | |
29 | %define __cxx %{target}-g++ | |
30 | ||
31 | %ifarch alpha sparc sparc64 sparcv9 | |
32 | %define optflags -O2 | |
33 | %endif | |
34 | ||
35 | # -z options are invalid for mingw linker, most of -f options are Linux-specific | |
36 | %define filterout_ld -Wl,-z,.* | |
37 | %define filterout_c -f[-a-z0-9=]* | |
38 | ||
39 | %description | |
eb01a44a JB |
40 | Pthreads-win32 (AKA pthreads4w) is an Open Source Software |
41 | implementation of the Threads component of the POSIX 1003.1c 1995 | |
42 | Standard for Microsoft's Win32 environment. Some functions from POSIX | |
43 | 1003.1b are also supported including semaphores. Other related | |
44 | functions include the set of read-write lock functions. The library | |
45 | also supports some of the functionality of the Open Group's Single | |
46 | Unix specification, version 2, namely mutex types. | |
0c2c9674 JB |
47 | |
48 | This package contains the cross version for Win32. | |
49 | ||
50 | %description -l pl.UTF-8 | |
eb01a44a JB |
51 | PThreads-win32 (nazywana także pthreads4w) to mająca otwarte źródła |
52 | implementacja komponentu Threads (wątków) ze specyfikacji standardu | |
53 | POSIX 1003.1c z 1995 roku dla środowiska Win32 Microsoftu. Obsługiwane | |
54 | są także niektóre funkcje z POSIX 1003.1b, w tym semafory. Inne | |
55 | powiązane funkcje to zbiór funkcji blokad r/w. Biblioteka obsługuje | |
56 | także część funkcjonalności specyfikacji Single Unix w wersji 2 | |
57 | wydanej przez Open Group, a konkretnie typy mutex. | |
0c2c9674 JB |
58 | |
59 | Ten pakiet zawiera wersję skrośną dla Win32. | |
60 | ||
61 | %package static | |
62 | Summary: Static POSIX Threads library (cross MinGW32 version) | |
63 | Summary(pl.UTF-8): Statyczna biblioteka POSIX Threads (wersja skrośna MinGW32) | |
64 | Group: Development/Libraries | |
65 | Requires: %{name} = %{version}-%{release} | |
66 | ||
67 | %description static | |
68 | Static POSIX Threads library (cross MinGW32 version). | |
69 | ||
70 | %description static -l pl.UTF-8 | |
71 | Statyczna biblioteka POSIX Threads (wersja skrośna MinGW32). | |
72 | ||
73 | %package dll | |
74 | Summary: POSIX Threads - DLL library for Windows | |
75 | Summary(pl.UTF-8): POSIX Threads - biblioteka DLL dla Windows | |
76 | Group: Applications/Emulators | |
77 | Requires: wine | |
78 | ||
79 | %description dll | |
80 | POSIX Threads - DLL library for Windows. | |
81 | ||
82 | %description dll -l pl.UTF-8 | |
83 | POSIX Threads - biblioteka DLL dla Windows. | |
84 | ||
85 | %prep | |
eb01a44a | 86 | %setup -q -n pthreads4w-code-9808f0b151e6c6efe2d57f3b54a1fb9a19d1eb88 |
8855b7d1 | 87 | %patch0 -p1 |
0c2c9674 JB |
88 | |
89 | mkdir lib | |
90 | ||
91 | %build | |
eb01a44a JB |
92 | %{__autoconf} |
93 | %{__autoheader} | |
94 | %configure \ | |
95 | --target=%{target} \ | |
96 | --host=%{target} | |
97 | ||
98 | for type in GC GCE GC-static GCE-static ; do | |
0c2c9674 | 99 | %{__make} clean |
eb01a44a | 100 | %{__make} -j1 $type \ |
0c2c9674 JB |
101 | CROSS="%{target}-" \ |
102 | CC="%{__cc}" \ | |
103 | CXX="%{__cxx}" \ | |
104 | OPT='%{rpmcflags} $(CLEANUP)' | |
105 | ||
106 | case "$type" in | |
eb01a44a JB |
107 | GC) |
108 | #%{__mv} libpthreadGC2.a lib/libpthreadGC2.dll.a | |
109 | %{__mv} pthreadGC2.dll libpthreadGC2.dll.a lib | |
0c2c9674 | 110 | ;; |
eb01a44a JB |
111 | GCE) |
112 | #%{__mv} libpthreadGCE2.a lib/libpthreadGCE2.dll.a | |
113 | %{__mv} pthreadGCE2.dll libpthreadGCE2.dll.a lib | |
0c2c9674 JB |
114 | ;; |
115 | GC-static) | |
116 | %{__mv} libpthreadGC2.a lib | |
eb01a44a JB |
117 | ;; |
118 | GCE-static) | |
119 | %{__mv} libpthreadGCE2.a lib | |
0c2c9674 JB |
120 | esac |
121 | done | |
122 | ||
123 | %if 0%{!?debug:1} | |
124 | %{target}-strip -R.comment -R.note lib/*.dll | |
125 | %{target}-strip -g -R.comment -R.note lib/*.a | |
126 | %endif | |
127 | ||
128 | %install | |
129 | rm -rf $RPM_BUILD_ROOT | |
130 | install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_dlldir}} | |
131 | ||
132 | install lib/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
eb01a44a | 133 | cp -p lib/*.a $RPM_BUILD_ROOT%{_libdir} |
0c2c9674 JB |
134 | ln -s libpthreadGC2.dll.a $RPM_BUILD_ROOT%{_libdir}/libpthread.dll.a |
135 | ln -s libpthreadGC2.a $RPM_BUILD_ROOT%{_libdir}/libpthread.a | |
eb01a44a | 136 | cp -p _ptw32.h pthread.h sched.h semaphore.h $RPM_BUILD_ROOT%{_includedir} |
0c2c9674 JB |
137 | |
138 | %clean | |
139 | rm -rf $RPM_BUILD_ROOT | |
140 | ||
141 | %files | |
142 | %defattr(644,root,root,755) | |
143 | %doc ANNOUNCE BUGS CONTRIBUTORS COPYING ChangeLog FAQ MAINTAINERS NEWS PROGRESS README README.CV README.NONPORTABLE TODO | |
144 | %{_libdir}/libpthread.dll.a | |
145 | %{_libdir}/libpthreadGC2.dll.a | |
146 | %{_libdir}/libpthreadGCE2.dll.a | |
eb01a44a | 147 | %{_includedir}/_ptw32.h |
0c2c9674 JB |
148 | %{_includedir}/pthread.h |
149 | %{_includedir}/sched.h | |
150 | %{_includedir}/semaphore.h | |
151 | ||
152 | %files static | |
153 | %defattr(644,root,root,755) | |
154 | %{_libdir}/libpthreadGC2.a | |
eb01a44a | 155 | %{_libdir}/libpthreadGCE2.a |
0c2c9674 JB |
156 | %{_libdir}/libpthread.a |
157 | ||
158 | %files dll | |
159 | %defattr(644,root,root,755) | |
160 | %{_dlldir}/pthreadGC2.dll | |
161 | %{_dlldir}/pthreadGCE2.dll |