| 1 | %define svn_url     http://svn.netlabs.org/repos/ports/pthread/trunk | 
|---|
| 2 | %define svn_rev     813 | 
|---|
| 3 |  | 
|---|
| 4 | %define kmk_dist out/os2.x86/release/dist | 
|---|
| 5 |  | 
|---|
| 6 | Summary: A posix pthread emulation for OS/2-eComStation | 
|---|
| 7 | Name: pthread | 
|---|
| 8 | Version: 20140814 | 
|---|
| 9 | Release: 16%{?dist} | 
|---|
| 10 | License: unknown | 
|---|
| 11 | Group: Development/Libraries | 
|---|
| 12 | Source: %{name}-%{version}-r%{svn_rev}.zip | 
|---|
| 13 | Source1: pthread-legacy-os2.zip | 
|---|
| 14 |  | 
|---|
| 15 |  | 
|---|
| 16 | %description | 
|---|
| 17 | A posix pthread emulation library. | 
|---|
| 18 |  | 
|---|
| 19 | %package devel | 
|---|
| 20 | Summary: Header files developing apps which will use pthread | 
|---|
| 21 | Group: Development/Libraries | 
|---|
| 22 |  | 
|---|
| 23 | %description devel | 
|---|
| 24 | Header files and a library of pthread functions, for developing apps | 
|---|
| 25 | which will use the library. | 
|---|
| 26 |  | 
|---|
| 27 | %package legacy | 
|---|
| 28 | Summary: The previous posix pthread emulation library. | 
|---|
| 29 |  | 
|---|
| 30 | %description legacy | 
|---|
| 31 | The previous posix pthread emulation library. | 
|---|
| 32 |  | 
|---|
| 33 | %package debug | 
|---|
| 34 | Summary: HLL debug data for exception handling support. | 
|---|
| 35 |  | 
|---|
| 36 | %description debug | 
|---|
| 37 | HLL debug data for exception handling support. | 
|---|
| 38 |  | 
|---|
| 39 | %prep | 
|---|
| 40 | %if %(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi') | 
|---|
| 41 | %setup -q | 
|---|
| 42 | %else | 
|---|
| 43 | %setup -n "%{name}-%{version}" -T -c -a 1 | 
|---|
| 44 | svn export -r %{svn_rev} %{svn_url} . --force | 
|---|
| 45 | rm -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" | 
|---|
| 46 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" "%{name}-%{version}") | 
|---|
| 47 | %endif | 
|---|
| 48 |  | 
|---|
| 49 | %build | 
|---|
| 50 | export KCFLAGS="%{optflags}" | 
|---|
| 51 | kmk -C src | 
|---|
| 52 | kmk -C src install | 
|---|
| 53 |  | 
|---|
| 54 | %install | 
|---|
| 55 | rm -rf %{buildroot} | 
|---|
| 56 | mkdir -p %{buildroot}%{_libdir} | 
|---|
| 57 | mkdir -p %{buildroot}%{_includedir} | 
|---|
| 58 |  | 
|---|
| 59 | cp pthread.dll %{buildroot}%{_libdir} | 
|---|
| 60 | cp %{kmk_dist}/bin/pthr01.dll %{buildroot}%{_libdir} | 
|---|
| 61 | cp %{kmk_dist}/include/pthread.h %{buildroot}%{_includedir} | 
|---|
| 62 | cp %{kmk_dist}/lib/pthread*.a %{buildroot}%{_libdir} | 
|---|
| 63 |  | 
|---|
| 64 | %clean | 
|---|
| 65 | rm -rf %{buildroot} | 
|---|
| 66 |  | 
|---|
| 67 | %files | 
|---|
| 68 | %defattr(-,root,root) | 
|---|
| 69 | %{_libdir}/pthr??.dll | 
|---|
| 70 | %exclude %{_libdir}/*.dbg | 
|---|
| 71 |  | 
|---|
| 72 | %files devel | 
|---|
| 73 | %defattr(-,root,root) | 
|---|
| 74 | %{_libdir}/*.a | 
|---|
| 75 | %{_includedir}/* | 
|---|
| 76 |  | 
|---|
| 77 | %files legacy | 
|---|
| 78 | %defattr(-,root,root) | 
|---|
| 79 | %{_libdir}/pthread.dll | 
|---|
| 80 |  | 
|---|
| 81 | %files debug | 
|---|
| 82 | %defattr(-,root,root) | 
|---|
| 83 | %{_libdir}/*.dbg | 
|---|
| 84 |  | 
|---|
| 85 | %changelog | 
|---|
| 86 | * Thu Aug 14 2014 yd | 
|---|
| 87 | - r812-813, set stack to be at least 2MB for new threads. | 
|---|
| 88 | - Pull sources directly from SVN/GIT, ticket#76. | 
|---|
| 89 |  | 
|---|
| 90 | * Fri Apr 25 2014 Dmitriy Kuminov <dmik/coding.org> | 
|---|
| 91 | - r720, Return proper POSIX errors in 'key' APIs. Fix pthread_key_delete() return code. | 
|---|
| 92 |  | 
|---|
| 93 | * Thu Apr 24 2014 Dmitriy Kuminov <dmik/coding.org> | 
|---|
| 94 | - r718, fix invalid dereference in TlsAlloc and TlsFree. | 
|---|
| 95 |  | 
|---|
| 96 | * Wed Feb 26 2014 komh | 
|---|
| 97 | - r704, pthread_mutex_destroy() crashs if a variable with PTHREAD_MUTEX_INITIALIZER is passed. | 
|---|
| 98 |  | 
|---|
| 99 | * Sat Nov 17 2013 yd | 
|---|
| 100 | - r684, fix initializer for mutex destroy, fixes AOO i123001. | 
|---|
| 101 |  | 
|---|
| 102 | * Mon Sep 24 2012 yd | 
|---|
| 103 | - added stubs for pthread_rwlock_* functions. | 
|---|
| 104 |  | 
|---|
| 105 | * Tue Mar 13 2012 yd | 
|---|
| 106 | - added missing prototypes and exports (detach and kill). | 
|---|
| 107 |  | 
|---|
| 108 | * Wed Nov 02 2011 yd | 
|---|
| 109 | - added -Zdll to build system | 
|---|
| 110 | - improved build system | 
|---|
| 111 |  | 
|---|
| 112 | * Thu Oct 11 2011 yd | 
|---|
| 113 | - exception record must be on stack | 
|---|
| 114 | - always uninstall record from running thread | 
|---|
| 115 | - use new LibLoadExceptq to enable exceptq only if main app loads it. Code by Rich Walsh. | 
|---|
| 116 |  | 
|---|
| 117 | * Thu Sep 22 2011 yd | 
|---|
| 118 | - enable high memory access for library, otherwise every app using it is forced to use low memory (see git). | 
|---|