Changeset 1591 for spec/trunk/SPECS/libc.spec
- Timestamp:
- Feb 15, 2019, 4:11:06 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
spec/trunk/SPECS/libc.spec
r1557 r1591 1 #disable lxlite strip & debug info generation 2 %define __os_install_post %{nil} 1 # Defines the major version (used in the DLL name) 2 %define ver_maj 0 3 4 # Disable .dbg creation for forwaders and compression fo the main DLL 5 # (will be done manually with special compression options) 6 %define _strip_opts --debuginfo -x "libc*.dll" --compress -x "libcn%{ver_maj}.dll" 7 8 # New Epoch to signify rebranding from kLIBC to LIBC Next with its own versioning 9 Epoch: 1 3 10 4 11 Name: libc … … 6 13 Summary: Standard Shared Libraries 7 14 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 15 Version: %{ver_maj}.1.0 16 Release: 1%{?dist} 17 Vendor: bww bitwise works GmbH 18 Url: https://github.com/bitwiseworks/libc 19 20 %scm_source github https://github.com/bitwiseworks/libc %{version} 21 #scm_source git file://D:/Coding/libc/master HEAD 22 23 BuildRequires: rexx_exe kbuild 24 BuildRequires: gcc unzip sed gawk 25 26 # for libiberty 27 BuildRequires: binutils-devel >= 2.27-3 43 28 44 29 # Require kLIBC user management to make programs using Unix user management API … … 58 43 Summary: Include Files and Libraries Mandatory for Development 59 44 Group: Development/Libraries/C and C++ 60 Requires: libc = %{ version}-%{release}45 Requires: libc = %{epoch}:%{version}-%{release} 61 46 Obsoletes: libc-kprofile < %{version} 62 47 … … 66 51 67 52 68 %package -ndb1-devel53 %package db1-devel 69 54 License: BSD; GPL v2 or later; LGPL v2.1 or later 70 55 Summary: Include Files and Libraries Mandatory for Development (db headers) 71 56 Group: Development/Libraries/C and C++ 72 73 %description -n db1-devel 57 Requires: libc = %{epoch}:%{version}-%{release} 58 Provides: db1-devel = %{epoch}:%{version}-%{release} 59 Obsoletes: db1-devel < %{epoch}:%{version}-%{release} 60 61 %description db1-devel 74 62 These libraries are needed to develop programs which use the standard C 75 63 library (db headers). … … 81 69 Group: Development/Libraries/C and C++ 82 70 Provides: gettext-devel 83 Requires: libc = %{ version}-%{release}71 Requires: libc = %{epoch}:%{version}-%{release} 84 72 85 73 %description gettext-devel … … 88 76 89 77 90 %package debug 91 Summary: HLL debug data for exception handling support. 92 93 %description debug 94 HLL debug data for exception handling support. 78 %debug_package 95 79 96 80 97 81 %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 82 83 %scm_setup 84 85 # Check that package version matches the version from the sources 86 test "`grep -P -o '(?<=(VH|VM|VL) = )([0-9]+)' < src/emx/version.smak | tr \\\n .`" = "%{version}." 87 88 89 %build 90 91 # TODO: For now, we still build only a i686 RPM of LIBC even though we could 92 # do multiplatform builds by overriding OPTIMIZE_FLAGS. The reason is that 93 # LIBC isn't stable with -march=pentium4. See https://github.com/bitwiseworks/libc/issues/30 94 # for details. Once we fix that, we should set OPTIMIZE_FLAGS as follows 95 # (note -O2 override with -O3 as LIBC wants this): 96 # 97 #OPTIMIZE_FLAGS="%{lua: print((string.gsub(rpm.expand('%{optflags}'), '-O2', '-O3')))}" 98 99 %define kmk_flags \\\ 100 NO_STRIP=1 \\\ 101 INS="%{buildroot}/@unixroot/usr/" \\\ 102 OUT=out/ \\\ 103 ASM="%{_builddir}/%{?buildsubdir}/bin/ml.exe -c" \\\ 104 SHELL=/@unixroot/usr/bin/sh.exe \\\ 105 BUILD_ID="%{lua: print(string.sub(rpm.expand('%{__source_rev}'), 1, 7))}-git" \\\ 106 OFFICIAL_VERSION=1 107 108 # boostrap everything using the system LIBC build 109 kmk -C src/emx MODE=opt %{kmk_flags} tools 110 # NOTE: There is a bug in kmk's .NOTPARALLEL processing triggered by $(_STD_WILDWILD) deps for 111 # $.stmp-libc-std that causes it to generate libc-std.h out of order so that files including it 112 # build earlier. A workaround is to generate this file up front in a separate invocation. 113 kmk -C src/emx MODE=opt %{kmk_flags} -f libonly.gmk libc-std.h 114 kmk -C src/emx MODE=opt %{kmk_flags} libs 115 kmk -C src/emx MODE=opt %{kmk_flags} install 116 117 # check that install uses the right dirs 118 test -d "%{buildroot}%{_bindir}" -a -d "%{buildroot}%{_libdir}" -a -d "%{buildroot}%{_includedir}" 119 120 # build everything again from scratch using the bootstrap LIBC 121 %{__rm} -rf out/ 122 export PATH="%{buildroot}%{_bindir};$PATH" 123 export LIBRARY_PATH="%{buildroot}%{_libdir};$LIBRARY_PATH" 124 export C_INCLUDE_PATH="%{buildroot}%{_includedir};$C_INCLUDE_PATH" 125 export BEGINLIBPATH="%{buildroot}%{_libdir};$BEGINLIBPATH" 126 export LIBPATHSTRICT=T 127 kmk -C src/emx MODE=opt %{kmk_flags} tools 128 kmk -C src/emx MODE=opt %{kmk_flags} -f libonly.gmk libc-std.h 129 kmk -C src/emx MODE=opt %{kmk_flags} libs 107 130 108 131 %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 %{__rm} -rf %{buildroot} 134 kmk -C src/emx MODE=opt %{kmk_flags} install 135 136 # use special lxlite flags for the main LIBC DLL (see LXLITE.FLAGS in 137 # Makefile.gmk for reasoning) - note that we have to strip ourselves too 138 # TODO: add a _strip_opts option to override compression options 139 emxomfstrip -D %{buildroot}%{_libdir}/libcn%{ver_maj}.dbg %{buildroot}%{_libdir}/libcn%{ver_maj}.dll 140 lxlite /F+ /AP:4096 /MRN /MLN /MF1 %{buildroot}%{_libdir}/libcn%{ver_maj}.dll 141 142 # don't need this (not used) 143 %{__rm} -rf %{buildroot}/@unixroot/usr/i386-pc-os2-emx 144 145 # don't need this (some Innotek helper DLL) 146 %{__rm} -f %{buildroot}%{_libdir}/innidm.dll 147 148 # remove .map files 149 %{__rm} -f %{buildroot}%{_libdir}/*.map 132 150 133 151 # remove ELH and PRF DLLs due to missing kdbglib.dll and kprofile.dll 134 152 # (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 153 %{__rm} -f %{buildroot}%{_libdir}/libc*.elh 154 %{__rm} -f %{buildroot}%{_libdir}/libc*.prf 155 156 # remove CHKLOG and PRF versions of utility libraries (not used) 157 %{__rm} -f %{buildroot}%{_libdir}/lib*_l.* 158 %{__rm} -f %{buildroot}%{_libdir}/tcpipv4/lib*_l.* 159 %{__rm} -f %{buildroot}%{_libdir}/lib*_p.* 160 %{__rm} -f %{buildroot}%{_libdir}/tcpipv4/lib*_p.* 161 162 # remove static versions of LIBC (not supported) 163 %{__rm} -f %{buildroot}%{_libdir}/lib*_s.* 164 %{__rm} -f %{buildroot}%{_libdir}/libc_app.* 165 %{__rm} -f %{buildroot}%{_libdir}/libc_app_*.* 166 167 # remove sys/mman.h (provided by libcx-devel) 168 %{__rm} -f %{buildroot}%{_includedir}/sys/mman.h 169 170 # convert & install dllar 171 rexx2vio src/misc/dllar.cmd %{buildroot}%{_bindir}/dllar.exe 172 172 173 173 # build omf libraries 174 cd %{buildroot}%{_libdir}175 cmd /c "@MakeOmfLibs.cmd" 174 src/misc/MakeOmfLibs.cmd %{buildroot}%{_libdir} 175 176 176 177 177 %clean 178 rm -rf $RPM_BUILD_ROOT 178 179 rm -rf "%{buildroot}" 179 180 180 181 181 182 %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/* 183 %doc README.md CHANGELOG.md 184 %doc doc/COPYING.* doc/*.os2 185 %{_libdir}/libc*.dll 186 187 188 %files devel -f %{debug_package_exclude_files} 190 189 %{_bindir} 191 %exclude %{_bindir}/*.dbg192 190 %{_includedir} 193 191 %exclude %{_includedir}/db.h 194 192 %exclude %{_includedir}/ndbm.h 195 193 %exclude %{_includedir}/libintl.h 196 %{_usr}/info197 194 %{_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) 195 %exclude %{_libdir}/libc*.dll 196 197 198 %files db1-devel 206 199 %{_includedir}/db.h 207 200 %{_includedir}/ndbm.h 208 201 202 209 203 %files gettext-devel 210 %defattr(-,root,root)211 204 %{_includedir}/libintl.h 212 205 213 %files debug214 %defattr(-,root,root)215 %{_bindir}/*.dbg216 %{_libdir}/*.dbg217 %{_libdir}/dbg218 %{_libdir}/tcpipv4/dbg219 206 220 207 %changelog 221 * Tue Jan 15 2019 Dmitriy Kuminov <coding@dmik.org> 0.6.6-40 208 * Fri Feb 15 2019 Dmitriy Kuminov <coding@dmik.org> 1:0.1.0-1 209 - Fork kLIBC and rebrand it to LIBC Next with a new versioning scheme and epoch. 210 - Release LIBC Next version 0.1.0 211 (https://github.com/bitwiseworks/libc/blob/0.1.0/CHANGELOG.md). 212 - Use scm_source macros. 213 - Remove a lot of (unused and unneeded) static libs from the devel package. 214 215 * Fri Jan 11 2019 Dmitriy Kuminov <coding@dmik.org> 0.6.6-40 222 216 - Remove (old) libiberty headers (provided by binutils-devel now). 223 217 … … 287 281 - removed ansidecl.h since it is already in binutils-devel. ticket#103. 288 282 289 * ThuJan 09 2015 yd283 * Fri Jan 09 2015 yd 290 284 - added new SafeDos* wrappers from trunk r3942 and r3943. 291 285 - added emxomfstrip binary from trunk. … … 301 295 - emxomf, merged libc tickets #251, #293, #295. 302 296 303 * ThuSep 11 2013 yd297 * Wed Sep 11 2013 yd 304 298 - ticket#63: remove gcc335.dll from devel distribution. 305 299 … … 310 304 - remove gcc 3.x stdc++/supc++ static libraries. 311 305 312 * MonMay 11 2012 yd306 * Fri May 11 2012 yd 313 307 - remove obsolete binutil headers/libs 314 308 … … 328 322 - fixed mmap include 329 323 330 * WedSep 05 2011 yd324 * Mon Sep 05 2011 yd 331 325 - removed binutils 332 326 333 * TueSep 04 2011 yd327 * Sun Sep 04 2011 yd 334 328 - update to csd4
Note:
See TracChangeset
for help on using the changeset viewer.