]> git.pld-linux.org Git - packages/crossmingw32-pthreads-w32.git/blob - crossmingw32-pthreads-w32.spec
66714d50e7f1d10e6ebf5c9899c050ef3dc5618f
[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.11.0
5 Release:        1
6 License:        LGPL v2.1
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)
16
17 %define         _enable_debug_packages  0
18 %define         no_install_post_strip   1
19
20 %define         target                  i386-mingw32
21 %define         target_platform         i386-pc-mingw32
22
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++
29
30 %ifarch alpha sparc sparc64 sparcv9
31 %define         optflags        -O2
32 %endif
33
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=]*
37
38 %description
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.
46
47 This package contains the cross version for Win32.
48
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.
57
58 Ten pakiet zawiera wersję skrośną dla Win32.
59
60 %package static
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}
65
66 %description static
67 Static POSIX Threads library (cross MinGW32 version).
68
69 %description static -l pl.UTF-8
70 Statyczna biblioteka POSIX Threads (wersja skrośna MinGW32).
71
72 %package dll
73 Summary:        POSIX Threads - DLL library for Windows
74 Summary(pl.UTF-8):      POSIX Threads - biblioteka DLL dla Windows
75 Group:          Applications/Emulators
76 Requires:       wine
77
78 %description dll
79 POSIX Threads - DLL library for Windows.
80
81 %description dll -l pl.UTF-8
82 POSIX Threads - biblioteka DLL dla Windows.
83
84 %prep
85 %setup -q -n pthreads4w-code-9808f0b151e6c6efe2d57f3b54a1fb9a19d1eb88
86
87 mkdir lib
88
89 %build
90 %{__autoconf}
91 %{__autoheader}
92 %configure \
93         --target=%{target} \
94         --host=%{target}
95
96 for type in GC GCE GC-static GCE-static ; do
97 %{__make} clean
98 %{__make} -j1 $type \
99         CROSS="%{target}-" \
100         CC="%{__cc}" \
101         CXX="%{__cxx}" \
102         OPT='%{rpmcflags} $(CLEANUP)'
103
104 case "$type" in
105   GC)
106         #%{__mv} libpthreadGC2.a lib/libpthreadGC2.dll.a
107         %{__mv} pthreadGC2.dll libpthreadGC2.dll.a lib
108         ;;
109   GCE)
110         #%{__mv} libpthreadGCE2.a lib/libpthreadGCE2.dll.a
111         %{__mv} pthreadGCE2.dll libpthreadGCE2.dll.a lib
112         ;;
113   GC-static)
114         %{__mv} libpthreadGC2.a lib
115         ;;
116   GCE-static)
117         %{__mv} libpthreadGCE2.a lib
118 esac
119 done
120
121 %if 0%{!?debug:1}
122 %{target}-strip -R.comment -R.note lib/*.dll
123 %{target}-strip -g -R.comment -R.note lib/*.a
124 %endif
125
126 %install
127 rm -rf $RPM_BUILD_ROOT
128 install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_dlldir}}
129
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}
135
136 %clean
137 rm -rf $RPM_BUILD_ROOT
138
139 %files
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
149
150 %files static
151 %defattr(644,root,root,755)
152 %{_libdir}/libpthreadGC2.a
153 %{_libdir}/libpthreadGCE2.a
154 %{_libdir}/libpthread.a
155
156 %files dll
157 %defattr(644,root,root,755)
158 %{_dlldir}/pthreadGC2.dll
159 %{_dlldir}/pthreadGCE2.dll
This page took 0.066101 seconds and 2 git commands to generate.