]> git.pld-linux.org Git - packages/crossmingw32-pthreads-w32.git/blob - 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
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 . -)
6 Release:        4
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
11 Patch0:         %{name}-timespec.patch
12 Patch1:         %{name}-sched.patch
13 URL:            http://www.sourceware.org/pthreads-win32/
14 BuildRequires:  crossmingw32-gcc
15 BuildRequires:  sed >= 4.0
16 Requires:       crossmingw32-runtime
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
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
40 Pthreads-win32 is an Open Source Software implementation of the
41 Threads component of the POSIX 1003.1c 1995 Standard for Microsoft's
42 Win32 environment. Some functions from POSIX 1003.1b are also
43 supported including semaphores. Other related functions include the
44 set of read-write lock functions. The library also supports some of
45 the functionality of the Open Group's Single Unix specification,
46 version 2, namely mutex types.
47
48 This package contains the cross version for Win32.
49
50 %description -l pl.UTF-8
51 PThreads-win32 to mająca otwarte źródła implementacja komponentu
52 Threads (wątków) ze specyfikacji standardu POSIX 1003.1c z 1995 roku
53 dla środowiska Win32 Microsoftu. Obsługiwane są także niektóre funkcje
54 z POSIX 1003.1b, w tym semafory. Inne powiązane funkcje to zbiór
55 funkcji blokad r/w. Biblioteka obsługuje także część funkcjonalności
56 specyfikacji Single Unix w wersji 2 wydanej przez Open Group, a
57 konkretnie typy mutex.
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
86 %setup -q -n pthreads-w32-%{dver}-release
87 %patch0 -p1
88 %patch1 -p1
89
90 mkdir lib
91
92 %build
93 for type in GC-inlined GCE-inlined GC-static ; do
94 %{__make} clean
95 %{__make} $type \
96         CROSS="%{target}-" \
97         CC="%{__cc}" \
98         CXX="%{__cxx}" \
99         OPT='%{rpmcflags} $(CLEANUP)'
100
101 case "$type" in
102   GC-inlined)
103         %{__mv} libpthreadGC2.a lib/libpthreadGC2.dll.a
104         %{__mv} pthreadGC2.dll lib
105         ;;
106   GCE-inlined)
107         %{__mv} libpthreadGCE2.a lib/libpthreadGCE2.dll.a
108         %{__mv} pthreadGCE2.dll lib
109         ;;
110   GC-static)
111         %{__mv} libpthreadGC2.a lib
112 esac
113 done
114
115 %if 0%{!?debug:1}
116 %{target}-strip -R.comment -R.note lib/*.dll
117 %{target}-strip -g -R.comment -R.note lib/*.a
118 %endif
119
120 %install
121 rm -rf $RPM_BUILD_ROOT
122 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_dlldir}}
123
124 install lib/*.dll $RPM_BUILD_ROOT%{_dlldir}
125 install lib/*.a $RPM_BUILD_ROOT%{_libdir}
126 ln -s libpthreadGC2.dll.a $RPM_BUILD_ROOT%{_libdir}/libpthread.dll.a
127 ln -s libpthreadGC2.a $RPM_BUILD_ROOT%{_libdir}/libpthread.a
128 cp -p pthread.h sched.h semaphore.h $RPM_BUILD_ROOT%{_includedir}
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %files
134 %defattr(644,root,root,755)
135 %doc ANNOUNCE BUGS CONTRIBUTORS COPYING ChangeLog FAQ MAINTAINERS NEWS PROGRESS README README.CV README.NONPORTABLE TODO
136 %{_libdir}/libpthread.dll.a
137 %{_libdir}/libpthreadGC2.dll.a
138 %{_libdir}/libpthreadGCE2.dll.a
139 %{_includedir}/pthread.h
140 %{_includedir}/sched.h
141 %{_includedir}/semaphore.h
142
143 %files static
144 %defattr(644,root,root,755)
145 %{_libdir}/libpthreadGC2.a
146 %{_libdir}/libpthread.a
147
148 %files dll
149 %defattr(644,root,root,755)
150 %{_dlldir}/pthreadGC2.dll
151 %{_dlldir}/pthreadGCE2.dll
This page took 0.109752 seconds and 3 git commands to generate.