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 URL: https://sourceforge.net/p/pthreads4w/wiki/Home/
11 BuildRequires: crossmingw32-gcc
12 BuildRequires: crossmingw32-runtime >= 1:5.4.2-2
13 BuildRequires: sed >= 4.0
14 Requires: crossmingw32-runtime >= 1:5.4.2-2
15 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17 %define _enable_debug_packages 0
18 %define no_install_post_strip 1
20 %define target i386-mingw32
21 %define target_platform i386-pc-mingw32
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++
30 %ifarch alpha sparc sparc64 sparcv9
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=]*
39 Pthreads-win32 (AKA pthreads4w) is an Open Source Software
40 implementation of the Threads component of the POSIX 1003.1c 1995
41 Standard for Microsoft's Win32 environment. Some functions from POSIX
42 1003.1b are also supported including semaphores. Other related
43 functions include the set of read-write lock functions. The library
44 also supports some of the functionality of the Open Group's Single
45 Unix specification, version 2, namely mutex types.
47 This package contains the cross version for Win32.
49 %description -l pl.UTF-8
50 PThreads-win32 (nazywana także pthreads4w) to mająca otwarte źródła
51 implementacja komponentu Threads (wątków) ze specyfikacji standardu
52 POSIX 1003.1c z 1995 roku dla środowiska Win32 Microsoftu. Obsługiwane
53 są także niektóre funkcje z POSIX 1003.1b, w tym semafory. Inne
54 powiązane funkcje to zbiór funkcji blokad r/w. Biblioteka obsługuje
55 także część funkcjonalności specyfikacji Single Unix w wersji 2
56 wydanej przez Open Group, a konkretnie typy mutex.
58 Ten pakiet zawiera wersję skrośną dla Win32.
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}
67 Static POSIX Threads library (cross MinGW32 version).
69 %description static -l pl.UTF-8
70 Statyczna biblioteka POSIX Threads (wersja skrośna MinGW32).
73 Summary: POSIX Threads - DLL library for Windows
74 Summary(pl.UTF-8): POSIX Threads - biblioteka DLL dla Windows
75 Group: Applications/Emulators
79 POSIX Threads - DLL library for Windows.
81 %description dll -l pl.UTF-8
82 POSIX Threads - biblioteka DLL dla Windows.
85 %setup -q -n pthreads4w-code-9808f0b151e6c6efe2d57f3b54a1fb9a19d1eb88
96 for type in GC GCE GC-static GCE-static ; do
102 OPT='%{rpmcflags} $(CLEANUP)'
106 #%{__mv} libpthreadGC2.a lib/libpthreadGC2.dll.a
107 %{__mv} pthreadGC2.dll libpthreadGC2.dll.a lib
110 #%{__mv} libpthreadGCE2.a lib/libpthreadGCE2.dll.a
111 %{__mv} pthreadGCE2.dll libpthreadGCE2.dll.a lib
114 %{__mv} libpthreadGC2.a lib
117 %{__mv} libpthreadGCE2.a lib
122 %{target}-strip -R.comment -R.note lib/*.dll
123 %{target}-strip -g -R.comment -R.note lib/*.a
127 rm -rf $RPM_BUILD_ROOT
128 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_dlldir}}
130 install lib/*.dll $RPM_BUILD_ROOT%{_dlldir}
131 cp -p lib/*.a $RPM_BUILD_ROOT%{_libdir}
132 ln -s libpthreadGC2.dll.a $RPM_BUILD_ROOT%{_libdir}/libpthread.dll.a
133 ln -s libpthreadGC2.a $RPM_BUILD_ROOT%{_libdir}/libpthread.a
134 cp -p _ptw32.h pthread.h sched.h semaphore.h $RPM_BUILD_ROOT%{_includedir}
137 rm -rf $RPM_BUILD_ROOT
140 %defattr(644,root,root,755)
141 %doc ANNOUNCE BUGS CONTRIBUTORS COPYING ChangeLog FAQ MAINTAINERS NEWS PROGRESS README README.CV README.NONPORTABLE TODO
142 %{_libdir}/libpthread.dll.a
143 %{_libdir}/libpthreadGC2.dll.a
144 %{_libdir}/libpthreadGCE2.dll.a
145 %{_includedir}/_ptw32.h
146 %{_includedir}/pthread.h
147 %{_includedir}/sched.h
148 %{_includedir}/semaphore.h
151 %defattr(644,root,root,755)
152 %{_libdir}/libpthreadGC2.a
153 %{_libdir}/libpthreadGCE2.a
154 %{_libdir}/libpthread.a
157 %defattr(644,root,root,755)
158 %{_dlldir}/pthreadGC2.dll
159 %{_dlldir}/pthreadGCE2.dll