LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File mingw32-pthreads.spec of Package mingw32-pthreads (Project windows:mingw:win32)

%define __strip %{_mingw32_strip}
%define __objdump %{_mingw32_objdump}
%define _use_internal_dependency_generator 0
%define __find_requires %{_mingw32_findrequires}
%define __find_provides %{_mingw32_findprovides}
%define __os_install_post %{_mingw32_debug_install_post} \
                          %{_mingw32_install_post}

%define crazy_version 2-8-0

Name:           mingw32-pthreads
Version:        2.8.0
Release:        0
Summary:        MinGW pthread library

License:        LGPLv2+
Group:          Development/Libraries
URL:            http://sourceware.org/pthreads-win32/
Source0:        ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-%{crazy_version}-release.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
#!BuildIgnore: post-build-checks  

Patch0:         pthreads-2.8.0-w64.diff

BuildRequires:  mingw32-filesystem >= 30
BuildRequires:  mingw32-cross-gcc
BuildRequires:  mingw32-cross-gcc-c++
BuildRequires:  mingw32-cross-binutils

%description
The POSIX 1003.1-2001 standard defines an application programming
interface (API) for writing multithreaded applications. This interface
is known more commonly as pthreads. A good number of modern operating
systems include a threading library of some kind: Solaris (UI)
threads, Win32 threads, DCE threads, DECthreads, or any of the draft
revisions of the pthreads standard. The trend is that most of these
systems are slowly adopting the pthreads standard API, with
application developers following suit to reduce porting woes.

Win32 does not, and is unlikely to ever, support pthreads
natively. This project seeks to provide a freely available and
high-quality solution to this problem.


%package devel
Summary:        MinGW pthread library
Group:          Development/Libraries


%description devel
The POSIX 1003.1-2001 standard defines an application programming
interface (API) for writing multithreaded applications. This interface
is known more commonly as pthreads. A good number of modern operating
systems include a threading library of some kind: Solaris (UI)
threads, Win32 threads, DCE threads, DECthreads, or any of the draft
revisions of the pthreads standard. The trend is that most of these
systems are slowly adopting the pthreads standard API, with
application developers following suit to reduce porting woes.

Win32 does not, and is unlikely to ever, support pthreads
natively. This project seeks to provide a freely available and
high-quality solution to this problem.


%{_mingw32_debug_package}

%prep
%setup -q -n pthreads-w32-%{crazy_version}-release

%patch0 -p0 -b .w64


%build
make clean
make CROSS=%{_mingw32_host}- GC-inlined
make CROSS=%{_mingw32_host}- GCE-inlined


%install
rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT%{_mingw32_bindir}
mkdir -p $RPM_BUILD_ROOT%{_mingw32_libdir}
mkdir -p $RPM_BUILD_ROOT%{_mingw32_includedir}

install -m 0755 *.dll $RPM_BUILD_ROOT%{_mingw32_bindir}
install -m 0644 *.def $RPM_BUILD_ROOT%{_mingw32_libdir}
install -m 0644 *.a $RPM_BUILD_ROOT%{_mingw32_libdir}
(cd $RPM_BUILD_ROOT%{_mingw32_libdir} && ln -s libpthreadGC2.a libpthread.dll.a)
install -m 0644 *.h $RPM_BUILD_ROOT%{_mingw32_includedir}
rm -rf $RPM_BUILD_ROOT%{_mingw32_includedir}/config.h


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root)
%{_mingw32_bindir}/pthreadGC2.dll
%{_mingw32_bindir}/pthreadGCE2.dll


%files devel
%defattr(-,root,root)
%{_mingw32_libdir}/pthread.def
%{_mingw32_libdir}/libpthreadGC2.a
%{_mingw32_libdir}/libpthreadGCE2.a
%{_mingw32_libdir}/libpthread.dll.a
%{_mingw32_includedir}


%changelog
* Fri Oct 10 2008 Richard W.M. Jones <rjones@redhat.com> - 2.8.0-2
- Initial RPM release.