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