| 1 | #disable lxlite strip & debug info generation | 
|---|
| 2 | %define __os_install_post       %{nil} | 
|---|
| 3 |  | 
|---|
| 4 | Name:           libc | 
|---|
| 5 | License:        BSD; GPL v2 or later; LGPL v2.1 or later | 
|---|
| 6 | Summary:        Standard Shared Libraries | 
|---|
| 7 | Group:          System/Libraries | 
|---|
| 8 | Version:        0.6.6 | 
|---|
| 9 | Release:        38%{?dist} | 
|---|
| 10 | Url:            http://svn.netlabs.org/libc | 
|---|
| 11 |  | 
|---|
| 12 | Source:         libc-%{version}.zip | 
|---|
| 13 | Source1:        libc-emxomf-20150207.zip | 
|---|
| 14 | # This contains binary build of LIBC with patches from tickets #361-36 (see Patch1xx below) | 
|---|
| 15 | Source2:        libc-hotfix-20180605.zip | 
|---|
| 16 | # This contains binary build of emxomfld with patches from ticket #376 | 
|---|
| 17 | Source3:        libc-emxomfld-20170411.zip | 
|---|
| 18 |  | 
|---|
| 19 | Patch0:         libc.patch | 
|---|
| 20 |  | 
|---|
| 21 | # http://trac.netlabs.org/libc/ticket/377 | 
|---|
| 22 | Patch1:         libc-dmik-no-bsd.diff | 
|---|
| 23 | # http://trac.netlabs.org/libc/ticket/366 (header only) | 
|---|
| 24 | Patch2:         libc-dmik-fork_completion_callback-header.diff | 
|---|
| 25 | # https://github.com/bitwiseworks/libc/commit/ac12fd8873a2016779f9f08c04bf0498b91bc9ee | 
|---|
| 26 | Patch3:         libc-dmik-LONG_LONG_SUPPORTED.diff | 
|---|
| 27 |  | 
|---|
| 28 | # These patches are not actually applied but they record what | 
|---|
| 29 | # needs to be done to the stock LIBC 0.6 source in order to build | 
|---|
| 30 | # emxomf.exe contained in libc-emxomf.zip | 
|---|
| 31 | Patch101:       libc-dmik-emxomf-02-remove-asterisk.diff | 
|---|
| 32 | Patch102:       libc-yuri-emxomf-verbose-warnings-3.patch | 
|---|
| 33 | Patch103:       libc-dmik-fork_completion_callback.diff | 
|---|
| 34 | #Patch104:       https://github.com/bitwiseworks/libc/commit/bdb42421f945cee32a272b9e33233e0093e9eb5f | 
|---|
| 35 |  | 
|---|
| 36 | BuildRequires:  rexx_exe | 
|---|
| 37 |  | 
|---|
| 38 | # Require kLIBC user management to make programs using Unix user management API | 
|---|
| 39 | # (getpwuid() and friends) work correctly. | 
|---|
| 40 | Requires:       klusrmgr | 
|---|
| 41 |  | 
|---|
| 42 | %description | 
|---|
| 43 | kLIBC is a C runtime library in which the coder is exploring The Single Unix | 
|---|
| 44 | Specification (SUS) and various *BSD, Sun and Linux interfaces used in 'portable' | 
|---|
| 45 | software. While implementing SUS completely and providing a great range of special | 
|---|
| 46 | BSD, Sun and Linux APIs is a kind of ultimate goal, the main focus is on what is | 
|---|
| 47 | interesting to play with and what is requested by porters using kLIBC. | 
|---|
| 48 |  | 
|---|
| 49 |  | 
|---|
| 50 | %package devel | 
|---|
| 51 | License:        BSD; GPL v2 or later; LGPL v2.1 or later | 
|---|
| 52 | Summary:        Include Files and Libraries Mandatory for Development | 
|---|
| 53 | Group:          Development/Libraries/C and C++ | 
|---|
| 54 | Requires:       libc = %{version}-%{release} | 
|---|
| 55 | Obsoletes:      libc-kprofile < %{version} | 
|---|
| 56 |  | 
|---|
| 57 | %description devel | 
|---|
| 58 | These libraries are needed to develop programs which use the standard C | 
|---|
| 59 | library. | 
|---|
| 60 |  | 
|---|
| 61 |  | 
|---|
| 62 | %package -n db1-devel | 
|---|
| 63 | License:        BSD; GPL v2 or later; LGPL v2.1 or later | 
|---|
| 64 | Summary:        Include Files and Libraries Mandatory for Development (db headers) | 
|---|
| 65 | Group:          Development/Libraries/C and C++ | 
|---|
| 66 |  | 
|---|
| 67 | %description -n db1-devel | 
|---|
| 68 | These libraries are needed to develop programs which use the standard C | 
|---|
| 69 | library (db headers). | 
|---|
| 70 |  | 
|---|
| 71 |  | 
|---|
| 72 | %package gettext-devel | 
|---|
| 73 | License:        BSD; GPL v2 or later; LGPL v2.1 or later | 
|---|
| 74 | Summary:        Include Files and Libraries Mandatory for Development (gettext headers) | 
|---|
| 75 | Group:          Development/Libraries/C and C++ | 
|---|
| 76 | Provides:       gettext-devel | 
|---|
| 77 | Requires:       libc = %{version}-%{release} | 
|---|
| 78 |  | 
|---|
| 79 | %description gettext-devel | 
|---|
| 80 | These libraries are needed to develop programs which use the standard C | 
|---|
| 81 | library (gettext headers). | 
|---|
| 82 |  | 
|---|
| 83 |  | 
|---|
| 84 | %package debug | 
|---|
| 85 | Summary: HLL debug data for exception handling support. | 
|---|
| 86 |  | 
|---|
| 87 | %description debug | 
|---|
| 88 | HLL debug data for exception handling support. | 
|---|
| 89 |  | 
|---|
| 90 |  | 
|---|
| 91 | %prep | 
|---|
| 92 | %setup -q -c -a 1 -a 2 -a 3 | 
|---|
| 93 | %patch0 | 
|---|
| 94 | %patch1 | 
|---|
| 95 | %patch2 | 
|---|
| 96 | %patch3 | 
|---|
| 97 |  | 
|---|
| 98 | #replace paths.h wrong macros | 
|---|
| 99 | sed -i 's,"/@unixroot/bin,"/@unixroot/usr/bin,g' usr/include/paths.h | 
|---|
| 100 |  | 
|---|
| 101 | %install | 
|---|
| 102 | rm -rf $RPM_BUILD_ROOT | 
|---|
| 103 | mkdir -p %{buildroot}%{_bindir} | 
|---|
| 104 | mkdir -p %{buildroot}%{_includedir} | 
|---|
| 105 | mkdir -p %{buildroot}%{_libdir} | 
|---|
| 106 | mkdir -p %{buildroot}%{_usr}/man | 
|---|
| 107 | mkdir -p %{buildroot}%{_usr}/info | 
|---|
| 108 |  | 
|---|
| 109 | cp -p -r usr/bin/* %{buildroot}%{_bindir} | 
|---|
| 110 | cp -p -r usr/include/* %{buildroot}%{_includedir} | 
|---|
| 111 | cp -p -r usr/lib/* %{buildroot}%{_libdir} | 
|---|
| 112 | cp -p -r usr/man/* %{buildroot}%{_usr}/man | 
|---|
| 113 | cp -p -r usr/man/* %{buildroot}%{_usr}/info | 
|---|
| 114 |  | 
|---|
| 115 | # add new files | 
|---|
| 116 | cp -p -r emxomf.exe %{buildroot}%{_bindir} | 
|---|
| 117 | cp -p -r emxomfstrip.exe %{buildroot}%{_bindir} | 
|---|
| 118 | cp -p -r os2safe.h %{buildroot}%{_includedir} | 
|---|
| 119 | cp -p -r libos2.a %{buildroot}%{_libdir} | 
|---|
| 120 |  | 
|---|
| 121 | cp -p -r emxomfld.exe %{buildroot}%{_bindir} | 
|---|
| 122 |  | 
|---|
| 123 | # add hotfix DLLs | 
|---|
| 124 | cp -p -r libc066.* %{buildroot}%{_libdir} | 
|---|
| 125 |  | 
|---|
| 126 | # remove ELH and PRF DLLs due to missing kdbglib.dll and kprofile.dll | 
|---|
| 127 | # (http://trac.netlabs.org/rpm/ticket/196) | 
|---|
| 128 | rm -f %{buildroot}%{_libdir}/libc*.elh | 
|---|
| 129 | rm -f %{buildroot}%{_libdir}/libc*.elh.map | 
|---|
| 130 | rm -f %{buildroot}%{_libdir}/libc*.prf | 
|---|
| 131 | rm -f %{buildroot}%{_libdir}/libc*.prf.map | 
|---|
| 132 |  | 
|---|
| 133 | #remove (old) binutils headers/libs | 
|---|
| 134 | rm -f %{buildroot}%{_includedir}/ansidecl.h | 
|---|
| 135 | rm -f %{buildroot}%{_includedir}/bfd.h | 
|---|
| 136 | rm -f %{buildroot}%{_includedir}/bfdlink.h | 
|---|
| 137 | rm -f %{buildroot}%{_includedir}/dis-asm.h | 
|---|
| 138 | rm -f %{buildroot}%{_includedir}/libiberty.h | 
|---|
| 139 | rm -f %{buildroot}%{_includedir}/symcat.h | 
|---|
| 140 | rm -f %{buildroot}%{_libdir}/libbfd.* | 
|---|
| 141 | rm -f %{buildroot}%{_libdir}/libopcodes.* | 
|---|
| 142 |  | 
|---|
| 143 | #remove libstdc++/supc++ static libs (built with gcc 3.x) | 
|---|
| 144 | rm -f %{buildroot}%{_libdir}/libstdc++.* | 
|---|
| 145 | rm -f %{buildroot}%{_libdir}/libsupc++.* | 
|---|
| 146 | rm -f %{buildroot}%{_libdir}/libiberty.* | 
|---|
| 147 |  | 
|---|
| 148 | #remove sys/mman.h (provided by libcx-devel) | 
|---|
| 149 | rm -f %{buildroot}%{_includedir}/sys/mman.h | 
|---|
| 150 |  | 
|---|
| 151 | rexx2vio $RPM_BUILD_ROOT%{_bindir}/dllar.cmd $RPM_BUILD_ROOT%{_bindir}/dllar.exe | 
|---|
| 152 |  | 
|---|
| 153 | # build omf libraries | 
|---|
| 154 | cd %{buildroot}%{_libdir} | 
|---|
| 155 | cmd /c "@MakeOmfLibs.cmd" | 
|---|
| 156 |  | 
|---|
| 157 | %clean | 
|---|
| 158 | rm -rf $RPM_BUILD_ROOT | 
|---|
| 159 |  | 
|---|
| 160 |  | 
|---|
| 161 | %files | 
|---|
| 162 | %defattr(-,root,root) | 
|---|
| 163 | %doc usr/doc/gcc-3.3.5/* | 
|---|
| 164 | %{_libdir}/libc06*.dll | 
|---|
| 165 |  | 
|---|
| 166 | %files devel | 
|---|
| 167 | %defattr(-,root,root) | 
|---|
| 168 | %doc %{_prefix}/man/man1/* | 
|---|
| 169 | %doc %{_prefix}/man/man7/* | 
|---|
| 170 | %{_bindir} | 
|---|
| 171 | %exclude %{_bindir}/*.dbg | 
|---|
| 172 | %{_includedir} | 
|---|
| 173 | %exclude %{_includedir}/db.h | 
|---|
| 174 | %exclude %{_includedir}/ndbm.h | 
|---|
| 175 | %exclude %{_includedir}/libintl.h | 
|---|
| 176 | %{_usr}/info | 
|---|
| 177 | %{_libdir} | 
|---|
| 178 | %exclude %{_libdir}/libc06*.dll | 
|---|
| 179 | %exclude %{_libdir}/*.dbg | 
|---|
| 180 | %exclude %{_libdir}/dbg | 
|---|
| 181 | %exclude %{_libdir}/tcpipv4/dbg | 
|---|
| 182 | %exclude %{_libdir}/gcc335.dll | 
|---|
| 183 |  | 
|---|
| 184 | %files -n db1-devel | 
|---|
| 185 | %defattr(-,root,root) | 
|---|
| 186 | %{_includedir}/db.h | 
|---|
| 187 | %{_includedir}/ndbm.h | 
|---|
| 188 |  | 
|---|
| 189 | %files gettext-devel | 
|---|
| 190 | %defattr(-,root,root) | 
|---|
| 191 | %{_includedir}/libintl.h | 
|---|
| 192 |  | 
|---|
| 193 | %files debug | 
|---|
| 194 | %defattr(-,root,root) | 
|---|
| 195 | %{_bindir}/*.dbg | 
|---|
| 196 | %{_libdir}/*.dbg | 
|---|
| 197 | %{_libdir}/dbg | 
|---|
| 198 | %{_libdir}/tcpipv4/dbg | 
|---|
| 199 |  | 
|---|
| 200 | %changelog | 
|---|
| 201 | * Tue Jun 5 2018 Dmitriy Kuminov <coding@dmik.org> 0.6.6-38 | 
|---|
| 202 | - Fix resetting file access mode to O_WRONLY if opened with O_NOINHERIT. GitHub #2. | 
|---|
| 203 | - Define __LONG_LONG_SUPPORTED on modern C++ (C++11 and above). GitHub #6. | 
|---|
| 204 |  | 
|---|
| 205 | * Mon May 21 2018 Dmitriy Kuminov <coding@dmik.org> 0.6.6-37 | 
|---|
| 206 | - Make libc-devel not provide libXXX.dll (it's provided by libc). | 
|---|
| 207 |  | 
|---|
| 208 | * Tue Apr 17 2018 Dmitriy Kuminov <coding@dmik.org> 0.6.6-36 | 
|---|
| 209 | - Apply patch from ticket #384 to fix DosAllocMemEx(OBJ_LOCATION) bug. | 
|---|
| 210 |  | 
|---|
| 211 | * Tue Aug 29 2017 Dmitriy Kuminov <coding@dmik.org> 0.6.6-35 | 
|---|
| 212 | - Apply patch from ticket #366 to allow using LIBC in fork() callbacks. | 
|---|
| 213 |  | 
|---|
| 214 | * Sat Jun 10 2017 Dmitriy Kuminov <coding@dmik.org> 0.6.6-34 | 
|---|
| 215 | - Remove BSD defines from sys/param.h and types.h to avoid mistreating OS/2 | 
|---|
| 216 | as BSD (e.g. by LIBICU's unicode/platform.h). | 
|---|
| 217 |  | 
|---|
| 218 | * Tue Jun 6 2017 Dmitriy Kuminov <coding@dmik.org> 0.6.6-33 | 
|---|
| 219 | - Provide patched emxomfld.exe that fixes Invalid WKEXT record errors. | 
|---|
| 220 |  | 
|---|
| 221 | * Fri Apr 7 2017 Dmitriy Kuminov <coding@dmik.org> 0.6.6-32 | 
|---|
| 222 | - Require kLIBC user management (klusrmgr) to make programs using Unix user | 
|---|
| 223 | management API (getpwuid() and friends) work correctly. | 
|---|
| 224 | - Move debug libraries from libc-devel to libc-debug (saves a lot of space). | 
|---|
| 225 |  | 
|---|
| 226 | * Thu Sep 22 2016 Dmitriy Kuminov <coding@dmik.org> 0.6.6-31 | 
|---|
| 227 | - Remove sys/mman.h which is now provided by libcx-devel. | 
|---|
| 228 |  | 
|---|
| 229 | * Fri Sep 02 2016 yd <yd@os2power.com> 0.6.6-30 | 
|---|
| 230 | - Fix path definitions in paths.h header. ticket#200. | 
|---|
| 231 |  | 
|---|
| 232 | * Sat Aug 20 2016 Dmitriy Kuminov <coding@dmik.org> 0.6.6-29 | 
|---|
| 233 | - Remove libcXXX.elh and libcXXX.prf from libc-devel due to missing | 
|---|
| 234 | dependnencies (klibdbg.dll and kprofile.dll). This also obsoletes | 
|---|
| 235 | the libc-kprofile dummy package. | 
|---|
| 236 |  | 
|---|
| 237 | * Mon Aug 8 2016 Dmitriy Kuminov <coding@dmik.org> 0.6.6-28 | 
|---|
| 238 | - Apply patches from tickets #361-365 to make fork() work in dash | 
|---|
| 239 | and similar cases and other minor improvements. | 
|---|
| 240 |  | 
|---|
| 241 | * Tue Jun 14 2016 yd <yd@os2power.com> 0.6.6-27 | 
|---|
| 242 | - removed libiberty.h since it is already in binutils-devel. ticket#103 and ticket#188. | 
|---|
| 243 |  | 
|---|
| 244 | * Sat Feb 07 2015 yd 0.6.6-26 | 
|---|
| 245 | - r3946, readded SafeWinUpper. | 
|---|
| 246 | - removed asterisk patch from emxomf. | 
|---|
| 247 |  | 
|---|
| 248 | * Fri Jan 23 2015 yd 0.6.6-25 | 
|---|
| 249 | - added builtin.h and stddef.h patches required for building gcc 4.9.x. | 
|---|
| 250 |  | 
|---|
| 251 | * Sun Jan 18 2015 yd | 
|---|
| 252 | - added new SafeDos* wrappers from trunk r3944. | 
|---|
| 253 |  | 
|---|
| 254 | * Sun Jan 11 2015 yd | 
|---|
| 255 | - removed ansidecl.h since it is already in binutils-devel. ticket#103. | 
|---|
| 256 |  | 
|---|
| 257 | * Thu Jan 09 2015 yd | 
|---|
| 258 | - added new SafeDos* wrappers from trunk r3942 and r3943. | 
|---|
| 259 | - added emxomfstrip binary from trunk. | 
|---|
| 260 |  | 
|---|
| 261 | * Tue Jan 06 2015 yd 0.6.6-21 | 
|---|
| 262 | - update to libc 0.6.6-csd6, added omf libraries. | 
|---|
| 263 |  | 
|---|
| 264 | * Tue Aug 19 2014 Dmitriy Kuminov <coding@dmik.org> 0.6.5-20 | 
|---|
| 265 | - Merged emxomf-remove-asterick.diff from libc ticket #220. | 
|---|
| 266 | - Made libc-devel and libc-gettext-devel strictly depend on current libc. | 
|---|
| 267 |  | 
|---|
| 268 | * Wed Jun 25 2014 yd | 
|---|
| 269 | - emxomf, merged libc tickets #251, #293, #295. | 
|---|
| 270 |  | 
|---|
| 271 | * Thu Sep 11 2013 yd | 
|---|
| 272 | - ticket#63: remove gcc335.dll from devel distribution. | 
|---|
| 273 |  | 
|---|
| 274 | * Thu Mar 21 2013 yd | 
|---|
| 275 | - renamed gettext-devel to libc-gettext-devel to make it more visible. | 
|---|
| 276 |  | 
|---|
| 277 | * Thu Dec 13 2012 yd | 
|---|
| 278 | - remove gcc 3.x stdc++/supc++ static libraries. | 
|---|
| 279 |  | 
|---|
| 280 | * Mon May 11 2012 yd | 
|---|
| 281 | - remove obsolete binutil headers/libs | 
|---|
| 282 |  | 
|---|
| 283 | * Tue Apr 17 2012 yd | 
|---|
| 284 | - update to csd5 | 
|---|
| 285 |  | 
|---|
| 286 | * Mon Jan 09 2012 yd | 
|---|
| 287 | - commented out sbrk/_sbrk definitions in stdlib.h (use unistd.h ones). | 
|---|
| 288 |  | 
|---|
| 289 | * Fri Dec 16 2011 yd | 
|---|
| 290 | - restored stdarg.h/cdefs.h from original libc distribution. | 
|---|
| 291 |  | 
|---|
| 292 | * Thu Oct 20 2011 yd | 
|---|
| 293 | - included emxomf.exe by dmik to workaround gcc/wlink bugs. | 
|---|
| 294 |  | 
|---|
| 295 | * Wed Oct 12 2011 yd | 
|---|
| 296 | - fixed mmap include | 
|---|
| 297 |  | 
|---|
| 298 | * Wed Sep 05 2011 yd | 
|---|
| 299 | - removed binutils | 
|---|
| 300 |  | 
|---|
| 301 | * Tue Sep 04 2011 yd | 
|---|
| 302 | - update to csd4 | 
|---|