Bump to release 4 to force rebuild.
[fedora-mingw.git] / pthreads / mingw32-pthreads.spec
1 %define __strip %{_mingw32_strip}
2 %define __objdump %{_mingw32_objdump}
3 %define _use_internal_dependency_generator 0
4 %define __find_requires %{_mingw32_findrequires}
5 %define __find_provides %{_mingw32_findprovides}
6
7 # The tests take ages to run and require Wine.
8 %define run_tests 0
9
10 Name:           mingw32-pthreads
11 Version:        2.8.0
12 Release:        4%{?dist}
13 Summary:        MinGW pthread library
14
15 %define crazy_version %(echo %{version}|tr . -)
16
17 License:        LGPLv2+
18 Group:          Development/Libraries
19 URL:            http://sourceware.org/pthreads-win32/
20 Source0:        ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-%{crazy_version}-release.tar.gz
21 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
22
23 BuildArch:      noarch
24
25 Patch0:         mingw32-pthreads-2.8.0-use-wine-for-tests.patch
26 Patch1:         mingw32-pthreads-2.8.0-no-failing-tests.patch
27 Patch2:         mingw32-pthreads-flags.patch
28
29 BuildRequires:  mingw32-filesystem >= 40
30 BuildRequires:  mingw32-gcc
31 BuildRequires:  mingw32-gcc-c++
32 BuildRequires:  mingw32-binutils
33
34 %if %{run_tests}
35 BuildRequires:  wine
36 %endif
37
38
39 %description
40 The POSIX 1003.1-2001 standard defines an application programming
41 interface (API) for writing multithreaded applications. This interface
42 is known more commonly as pthreads. A good number of modern operating
43 systems include a threading library of some kind: Solaris (UI)
44 threads, Win32 threads, DCE threads, DECthreads, or any of the draft
45 revisions of the pthreads standard. The trend is that most of these
46 systems are slowly adopting the pthreads standard API, with
47 application developers following suit to reduce porting woes.
48
49 Win32 does not, and is unlikely to ever, support pthreads
50 natively. This project seeks to provide a freely available and
51 high-quality solution to this problem.
52
53
54 %prep
55 %setup -q -n pthreads-w32-%{crazy_version}-release
56
57 %patch0 -p1
58 %patch1 -p1
59 %patch2 -p1
60
61
62 %build
63 %{_mingw32_make} clean
64 %{_mingw32_make} CROSS=%{_mingw32_host}- GC-inlined
65 %{_mingw32_make} clean
66 %{_mingw32_make} CROSS=%{_mingw32_host}- GCE-inlined
67
68
69 %check
70 %if %{run_tests}
71 pushd tests
72 %{_mingw32_make} clean
73 %{_mingw32_make} QAPC= \
74   CC=%{_mingw32_cc} XXCFLAGS="-D__CLEANUP_C" TEST=GC all-pass
75 %{_mingw32_make} clean
76 %{_mingw32_make} QAPC= \
77   CC=%{_mingw32_cc} XXCFLAGS="-D__CLEANUP_C" TEST=GCE all-pass
78 popd
79 %endif
80
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84
85 mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
86 mkdir -p $RPM_BUILD_ROOT%{_mingw32_libdir}
87 mkdir -p $RPM_BUILD_ROOT%{_mingw32_includedir}/pthread
88
89 install -m 0755 *.dll $RPM_BUILD_ROOT%{_mingw32_bindir}
90 install -m 0644 *.def $RPM_BUILD_ROOT%{_mingw32_bindir}
91 install -m 0644 *.a $RPM_BUILD_ROOT%{_mingw32_libdir}
92 install -m 0644 *.h $RPM_BUILD_ROOT%{_mingw32_includedir}/pthread
93
94
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
98
99 %files
100 %defattr(-,root,root)
101 %doc ANNOUNCE BUGS ChangeLog CONTRIBUTORS COPYING COPYING.LIB
102 %doc FAQ MAINTAINERS NEWS PROGRESS README README.NONPORTABLE TODO
103 %{_mingw32_bindir}/pthreadGC2.dll
104 %{_mingw32_bindir}/pthreadGCE2.dll
105 %{_mingw32_bindir}/pthread.def
106 %{_mingw32_libdir}/libpthreadGC2.a
107 %{_mingw32_libdir}/libpthreadGCE2.a
108 %{_mingw32_includedir}/pthread
109
110
111 %changelog
112 * Tue Jan 13 2009 Richard W.M. Jones <rjones@redhat.com> - 2.8.0-4
113 - Cleanup to the spec file, no functional changes.
114
115 * Mon Dec 29 2008 Levente Farkas <lfarkas@lfarkas.org> - 2.8.0-3
116 - minor cleanup
117
118 * Fri Oct 10 2008 Richard W.M. Jones <rjones@redhat.com> - 2.8.0-2
119 - Initial RPM release.