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