| 1 | %define kmk_dist out/os2.x86/release/dist | 
|---|
| 2 |  | 
|---|
| 3 | Summary: A posix pthread emulation for OS/2-eComStation | 
|---|
| 4 | Name: pthread | 
|---|
| 5 | Version: 20131117 | 
|---|
| 6 | Release: 12%{?dist} | 
|---|
| 7 | License: unknown | 
|---|
| 8 | Group: Development/Libraries | 
|---|
| 9 | Source: pthread-%{version}-os2.zip | 
|---|
| 10 | Source1: pthread-legacy-os2.zip | 
|---|
| 11 |  | 
|---|
| 12 |  | 
|---|
| 13 | %description | 
|---|
| 14 | A posix pthread emulation library. | 
|---|
| 15 |  | 
|---|
| 16 | %package devel | 
|---|
| 17 | Summary: Header files developing apps which will use pthread | 
|---|
| 18 | Group: Development/Libraries | 
|---|
| 19 |  | 
|---|
| 20 | %description devel | 
|---|
| 21 | Header files and a library of pthread functions, for developing apps | 
|---|
| 22 | which will use the library. | 
|---|
| 23 |  | 
|---|
| 24 | %package legacy | 
|---|
| 25 | Summary: The previous posix pthread emulation library. | 
|---|
| 26 |  | 
|---|
| 27 | %description legacy | 
|---|
| 28 | The previous posix pthread emulation library. | 
|---|
| 29 |  | 
|---|
| 30 | %package debug | 
|---|
| 31 | Summary: HLL debug data for exception handling support. | 
|---|
| 32 |  | 
|---|
| 33 | %description debug | 
|---|
| 34 | HLL debug data for exception handling support. | 
|---|
| 35 |  | 
|---|
| 36 | %prep | 
|---|
| 37 | %setup -q -c -a 1 | 
|---|
| 38 |  | 
|---|
| 39 |  | 
|---|
| 40 | %build | 
|---|
| 41 | export KCFLAGS="%{optflags}" | 
|---|
| 42 | kmk -C src | 
|---|
| 43 | kmk -C src install | 
|---|
| 44 |  | 
|---|
| 45 | %install | 
|---|
| 46 | rm -rf %{buildroot} | 
|---|
| 47 | mkdir -p %{buildroot}%{_libdir} | 
|---|
| 48 | mkdir -p %{buildroot}%{_includedir} | 
|---|
| 49 |  | 
|---|
| 50 | cp pthread.dll %{buildroot}%{_libdir} | 
|---|
| 51 | cp %{kmk_dist}/bin/pthr01.dll %{buildroot}%{_libdir} | 
|---|
| 52 | cp %{kmk_dist}/include/pthread.h %{buildroot}%{_includedir} | 
|---|
| 53 | cp %{kmk_dist}/lib/pthread*.a %{buildroot}%{_libdir} | 
|---|
| 54 |  | 
|---|
| 55 | %clean | 
|---|
| 56 | rm -rf %{buildroot} | 
|---|
| 57 |  | 
|---|
| 58 | %files | 
|---|
| 59 | %defattr(-,root,root) | 
|---|
| 60 | %{_libdir}/pthr??.dll | 
|---|
| 61 | %exclude %{_libdir}/*.dbg | 
|---|
| 62 |  | 
|---|
| 63 | %files devel | 
|---|
| 64 | %defattr(-,root,root) | 
|---|
| 65 | %{_libdir}/*.a | 
|---|
| 66 | %{_includedir}/* | 
|---|
| 67 |  | 
|---|
| 68 | %files legacy | 
|---|
| 69 | %defattr(-,root,root) | 
|---|
| 70 | %{_libdir}/pthread.dll | 
|---|
| 71 |  | 
|---|
| 72 | %files debug | 
|---|
| 73 | %defattr(-,root,root) | 
|---|
| 74 | %{_libdir}/*.dbg | 
|---|
| 75 |  | 
|---|
| 76 | %changelog | 
|---|
| 77 | * Sat Nov 17 2013 yd | 
|---|
| 78 | - r684, fix initializer for mutex destroy, fixes AOO i123001. | 
|---|
| 79 |  | 
|---|
| 80 | * Mon Sep 24 2012 yd | 
|---|
| 81 | - added stubs for pthread_rwlock_* functions. | 
|---|
| 82 |  | 
|---|
| 83 | * Tue Mar 13 2012 yd | 
|---|
| 84 | - added missing prototypes and exports (detach and kill). | 
|---|
| 85 |  | 
|---|
| 86 | * Wed Nov 02 2011 yd | 
|---|
| 87 | - added -Zdll to build system | 
|---|
| 88 | - improved build system | 
|---|
| 89 |  | 
|---|
| 90 | * Thu Oct 11 2011 yd | 
|---|
| 91 | - exception record must be on stack | 
|---|
| 92 | - always uninstall record from running thread | 
|---|
| 93 | - use new LibLoadExceptq to enable exceptq only if main app loads it. Code by Rich Walsh. | 
|---|
| 94 |  | 
|---|
| 95 | * Thu Sep 22 2011 yd | 
|---|
| 96 | - enable high memory access for library, otherwise every app using it is forced to use low memory (see git). | 
|---|