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