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
7 Group: Development/Libraries
8 Source0: https://downloads.sourceforge.net/pthreads4w/pthreads4w-code-v%{version}.zip
9 # Source0-md5: 75c3ade4fa6aeff1d1d25d33f6bbce12
10 Patch0: pthreads4w-winsock.patch
11 URL: https://sourceforge.net/p/pthreads4w/wiki/Home/
12 BuildRequires: crossmingw32-gcc
13 BuildRequires: crossmingw32-runtime >= 1:5.4.2-2
14 BuildRequires: sed >= 4.0
15 Requires: crossmingw32-runtime >= 1:5.4.2-2
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 %define _enable_debug_packages 0
19 %define no_install_post_strip 1
21 %define target i386-mingw32
22 %define target_platform i386-pc-mingw32
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++
31 %ifarch alpha sparc sparc64 sparcv9
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=]*
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.
48 This package contains the cross version for Win32.
50 %description -l pl.UTF-8
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.
59 Ten pakiet zawiera wersję skrośną dla Win32.
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}
68 Static POSIX Threads library (cross MinGW32 version).
70 %description static -l pl.UTF-8
71 Statyczna biblioteka POSIX Threads (wersja skrośna MinGW32).
74 Summary: POSIX Threads - DLL library for Windows
75 Summary(pl.UTF-8): POSIX Threads - biblioteka DLL dla Windows
76 Group: Applications/Emulators
80 POSIX Threads - DLL library for Windows.
82 %description dll -l pl.UTF-8
83 POSIX Threads - biblioteka DLL dla Windows.
86 %setup -q -n pthreads4w-code-9808f0b151e6c6efe2d57f3b54a1fb9a19d1eb88
98 for type in GC GCE GC-static GCE-static ; do
100 %{__make} -j1 $type \
104 OPT='%{rpmcflags} $(CLEANUP)'
108 #%{__mv} libpthreadGC2.a lib/libpthreadGC2.dll.a
109 %{__mv} pthreadGC2.dll libpthreadGC2.dll.a lib
112 #%{__mv} libpthreadGCE2.a lib/libpthreadGCE2.dll.a
113 %{__mv} pthreadGCE2.dll libpthreadGCE2.dll.a lib
116 %{__mv} libpthreadGC2.a lib
119 %{__mv} libpthreadGCE2.a lib
124 %{target}-strip -R.comment -R.note lib/*.dll
125 %{target}-strip -g -R.comment -R.note lib/*.a
129 rm -rf $RPM_BUILD_ROOT
130 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_dlldir}}
132 install lib/*.dll $RPM_BUILD_ROOT%{_dlldir}
133 cp -p lib/*.a $RPM_BUILD_ROOT%{_libdir}
134 ln -s libpthreadGC2.dll.a $RPM_BUILD_ROOT%{_libdir}/libpthread.dll.a
135 ln -s libpthreadGC2.a $RPM_BUILD_ROOT%{_libdir}/libpthread.a
136 cp -p _ptw32.h pthread.h sched.h semaphore.h $RPM_BUILD_ROOT%{_includedir}
139 rm -rf $RPM_BUILD_ROOT
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
147 %{_includedir}/_ptw32.h
148 %{_includedir}/pthread.h
149 %{_includedir}/sched.h
150 %{_includedir}/semaphore.h
153 %defattr(644,root,root,755)
154 %{_libdir}/libpthreadGC2.a
155 %{_libdir}/libpthreadGCE2.a
156 %{_libdir}/libpthread.a
159 %defattr(644,root,root,755)
160 %{_dlldir}/pthreadGC2.dll
161 %{_dlldir}/pthreadGCE2.dll