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