]> git.pld-linux.org Git - packages/crossmingw32-pthreads-w32.git/blame - crossmingw32-pthreads-w32.spec
- added winsock patch (avoid including <winsock.h> in _ptw32.h, <winerror.h> is enoug...
[packages/crossmingw32-pthreads-w32.git] / crossmingw32-pthreads-w32.spec
CommitLineData
0c2c9674
JB
1Summary: POSIX Threads component implementation for Win32 - MinGW32 cross version
2Summary(pl.UTF-8): Implementacja komponentu POSIX Threads dla Win32 - wersja skrośna dla MinGW32
3Name: crossmingw32-pthreads-w32
eb01a44a 4Version: 2.11.0
8855b7d1 5Release: 2
0c2c9674
JB
6License: LGPL v2.1
7Group: Development/Libraries
eb01a44a
JB
8Source0: https://downloads.sourceforge.net/pthreads4w/pthreads4w-code-v%{version}.zip
9# Source0-md5: 75c3ade4fa6aeff1d1d25d33f6bbce12
8855b7d1 10Patch0: pthreads4w-winsock.patch
eb01a44a 11URL: https://sourceforge.net/p/pthreads4w/wiki/Home/
0c2c9674 12BuildRequires: crossmingw32-gcc
eb01a44a 13BuildRequires: crossmingw32-runtime >= 1:5.4.2-2
0c2c9674 14BuildRequires: sed >= 4.0
eb01a44a 15Requires: crossmingw32-runtime >= 1:5.4.2-2
0c2c9674
JB
16BuildRoot: %{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
40Pthreads-win32 (AKA pthreads4w) is an Open Source Software
41implementation of the Threads component of the POSIX 1003.1c 1995
42Standard for Microsoft's Win32 environment. Some functions from POSIX
431003.1b are also supported including semaphores. Other related
44functions include the set of read-write lock functions. The library
45also supports some of the functionality of the Open Group's Single
46Unix specification, version 2, namely mutex types.
0c2c9674
JB
47
48This package contains the cross version for Win32.
49
50%description -l pl.UTF-8
eb01a44a
JB
51PThreads-win32 (nazywana także pthreads4w) to mająca otwarte źródła
52implementacja komponentu Threads (wątków) ze specyfikacji standardu
53POSIX 1003.1c z 1995 roku dla środowiska Win32 Microsoftu. Obsługiwane
54są także niektóre funkcje z POSIX 1003.1b, w tym semafory. Inne
55powiązane funkcje to zbiór funkcji blokad r/w. Biblioteka obsługuje
56także część funkcjonalności specyfikacji Single Unix w wersji 2
57wydanej przez Open Group, a konkretnie typy mutex.
0c2c9674
JB
58
59Ten pakiet zawiera wersję skrośną dla Win32.
60
61%package static
62Summary: Static POSIX Threads library (cross MinGW32 version)
63Summary(pl.UTF-8): Statyczna biblioteka POSIX Threads (wersja skrośna MinGW32)
64Group: Development/Libraries
65Requires: %{name} = %{version}-%{release}
66
67%description static
68Static POSIX Threads library (cross MinGW32 version).
69
70%description static -l pl.UTF-8
71Statyczna biblioteka POSIX Threads (wersja skrośna MinGW32).
72
73%package dll
74Summary: POSIX Threads - DLL library for Windows
75Summary(pl.UTF-8): POSIX Threads - biblioteka DLL dla Windows
76Group: Applications/Emulators
77Requires: wine
78
79%description dll
80POSIX Threads - DLL library for Windows.
81
82%description dll -l pl.UTF-8
83POSIX Threads - biblioteka DLL dla Windows.
84
85%prep
eb01a44a 86%setup -q -n pthreads4w-code-9808f0b151e6c6efe2d57f3b54a1fb9a19d1eb88
8855b7d1 87%patch0 -p1
0c2c9674
JB
88
89mkdir lib
90
91%build
eb01a44a
JB
92%{__autoconf}
93%{__autoheader}
94%configure \
95 --target=%{target} \
96 --host=%{target}
97
98for 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
106case "$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
120esac
121done
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
129rm -rf $RPM_BUILD_ROOT
130install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_dlldir}}
131
132install lib/*.dll $RPM_BUILD_ROOT%{_dlldir}
eb01a44a 133cp -p lib/*.a $RPM_BUILD_ROOT%{_libdir}
0c2c9674
JB
134ln -s libpthreadGC2.dll.a $RPM_BUILD_ROOT%{_libdir}/libpthread.dll.a
135ln -s libpthreadGC2.a $RPM_BUILD_ROOT%{_libdir}/libpthread.a
eb01a44a 136cp -p _ptw32.h pthread.h sched.h semaphore.h $RPM_BUILD_ROOT%{_includedir}
0c2c9674
JB
137
138%clean
139rm -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
This page took 0.169992 seconds and 4 git commands to generate.