Dr. Werner Fink 2012-03-12 12:18:35 +00:00 committed by Git OBS Bridge
parent 8422e7707f
commit 9bbc444417
5 changed files with 56 additions and 27 deletions

41
check-build.sh Normal file
View File

@ -0,0 +1,41 @@
#!/bin/bash -e
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# This script use the following variable(s):
#
# - $BUILD_BASENAME
#
: ${BUILD_BASENAME:=$(uname -m)}
kernel_version()
{
echo $((($1<<16)+($2<<8)+($3)))
}
kernel_string()
{
echo $((($1>>16)&0xff)).$((($1>>8)&0xff)).$(($1&0xff))
}
typeset -i major minor level version required
IFS=' .-' read -t 10 name dummy major minor level rest < /proc/version || exit 1
let version=$(((major<<16)+(minor<<8)+(level)))
unset name dummy major minor level rest
case "$BUILD_BASENAME" in
*x86_64*) let required=$(kernel_version 2 6 32) ;; # gcc exception 32
*) let required=$(kernel_version 2 6 16) ;;
esac
if ((version<required)) ; then
echo "FATAL: kernel too old, need kernel >= $(kernel_string required) for this package" 1>&2
exit 1
fi
#
# Success
#
exit 0

View File

@ -1,23 +0,0 @@
--- progs/infocmp.c
+++ progs/infocmp.c 2012-03-05 11:11:08.300796156 +0000
@@ -1089,9 +1089,10 @@ dump_initializers(TERMTYPE *term)
if (VALID_STRING(term->Strings[n])) {
tp = buf;
+#define TP_LIMIT ((MAX_STRING - 4) - (size_t)(tp - buf))
*tp++ = '"';
for (sp = term->Strings[n];
- *sp != 0 && (tp - buf) < MAX_STRING - 6;
+ *sp != 0 && TP_LIMIT > 2;
sp++) {
if (isascii(UChar(*sp))
&& isprint(UChar(*sp))
@@ -1099,7 +1100,7 @@ dump_initializers(TERMTYPE *term)
&& *sp != '"')
*tp++ = *sp;
else {
- _nc_SPRINTF(tp, _nc_SLIMIT(MAX_STRING) "\\%03o", UChar(*sp));
+ _nc_SPRINTF(tp, _nc_SLIMIT(TP_LIMIT) "\\%03o", UChar(*sp));
tp += 4;
}
}

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d9a2e11c5683b5af8cb02693d573aea1aa1c1bc37789313e671cf007f023e9c4
size 1033359
oid sha256:effba7fdac27f7b71bba1abd91cdc41032f8de6dbf1ed15524cc2f9a376bb010
size 1044301

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Mon Mar 12 12:17:31 UTC 2012 - werner@suse.de
- Add check_build script to avoid to stumble on gcc exception 32
-------------------------------------------------------------------
Mon Mar 12 10:38:59 UTC 2012 - werner@suse.de
- Add ncurses patch 5.9.20120310
+ fix some strict compiler warnings for abi6 and 64-bits.
+ use begin_va_copy/end_va_copy macros in lib_printw.c (cf: 20120303).
+ improve a limit-check in infocmp.c (Werner Fink)
-------------------------------------------------------------------
Mon Mar 5 11:33:17 UTC 2012 - werner@suse.de

View File

@ -47,7 +47,6 @@ Source5: tack-1.07-20120303.tar.bz2
Source6: edit.sed
Source7: baselibs.conf
Patch0: ncurses-%{version}.dif
Patch1: ncurses-5.9-fortify.dif
Patch3: ncurses-5.9-overwrite.dif
Patch4: ncurses-5.7-tack.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -261,7 +260,6 @@ rm -f mkinstalldirs
tar Oxfj %{S:1} | patch -p1 -s
tar xfj %{S:5}
mv tack-* tack
%patch -P 1 -p0 -b .ovf
%patch -P 3 -p0 -b .ow
%patch -P 4 -p0 -b .hs
%patch -P 0 -p0 -b .p0