OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 30-Oct-2005 09:50:17
Branch: HEAD Handle: 2005103008501700
Modified files:
openpkg-src/newt newt.patch newt.spec
Log:
upgrading package: newt 0.51.6.8 -> 0.52.1.0
Summary:
Revision Changes Path
1.2 +453 -117 openpkg-src/newt/newt.patch
1.20 +7 -6 openpkg-src/newt/newt.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/newt/newt.patch
============================================================================
$ cvs diff -u -r1.1 -r1.2 newt.patch
--- openpkg-src/newt/newt.patch 14 Dec 2003 11:36:42 -0000 1.1
+++ openpkg-src/newt/newt.patch 30 Oct 2005 08:50:17 -0000 1.2
@@ -1,26 +1,22 @@
Index: Makefile.in
---- Makefile.in.orig 2003-11-06 07:56:47.000000000 +0100
-+++ Makefile.in 2003-12-14 12:02:42.000000000 +0100
-@@ -1,153 +1,72 @@
--LIBS = -lslang -lm #-lefence
--SHLIBS = -lslang -lm -lc
+--- Makefile.in.orig 2005-09-30 16:20:53 +0200
++++ Makefile.in 2005-10-30 09:39:25 +0100
+@@ -1,162 +1,70 @@
+-LIBS = -lslang -lm -ldl #-lefence
+-SHLIBS = -lslang -lm -dl -lc
+-LIBTCL = -ltcl8.4
[EMAIL PROTECTED]@
-+VERSION = @VERSION@
-
--CFLAGS = $(RPM_OPT_FLAGS) -Wall -I/usr/include/slang -D_GNU_SOURCE
--ifeq ($(RPM_OPT_FLAGS),)
--CFLAGS += -g
--endif
+-CFLAGS = $(RPM_OPT_FLAGS) -Wall -D_GNU_SOURCE -g -O2 -DUTF8 -fPIC
-I/usr/include/slang
-
+-SHLIBFLAGS= -Wl,-O1 -Wl,--version-script,newt.0.52.ver
-VERSION = @VERSION@
-CVSTAG = r$(subst .,-,$(VERSION))
-SONAME = @SONAME@
-
--PYTHONVERS = $(shell ls /usr/include/python*/Python.h | sed
"s|/usr/include/||g"| sed "s|/Python.h||g")
+-PYTHONVERS = python2.4
-
--WHIPTCLSO=
--#WHIPTCLSO=whiptcl.so
+-WHIPTCLSO=whiptcl.so
-
-PROGS = test whiptail $(WHIPTCLSO) testgrid testtree showchars showkey
-TESTOBJS = test.o
@@ -54,37 +50,48 @@
-TARGET=depend $(PROGS)
-endif
-
--all: $(TARGET) _snackmodule.so
+-all: $(TARGET) _snackmodule.so po/po-stamp
+-
+-po/po-stamp:
+- $(MAKE) -C po po-stamp
-
-test: $(TESTOBJS) $(LIBNEWT)
-- gcc -g -o test $(TESTOBJS) $(LIBNEWT) $(LIBS) -static
+- $(CC) -g -o test $(TESTOBJS) $(LIBNEWT) $(LIBS) -static
-
-testgrid: testgrid.o $(LIBNEWT)
-- gcc -g -o testgrid testgrid.o $(LIBNEWT) $(LIBS)
+- $(CC) -g -o testgrid testgrid.o $(LIBNEWT) $(LIBS)
-
-testtree: testtree.o $(LIBNEWT)
-- gcc -g -o testtree testtree.o $(LIBNEWT) $(LIBS)
+- $(CC) -g -o testtree testtree.o $(LIBNEWT) $(LIBS)
-
-showchars: showchars.o $(LIBNEWT)
-- gcc -g -o showchars showchars.o $(LIBNEWT) $(LIBS)
+- $(CC) -g -o showchars showchars.o $(LIBNEWT) $(LIBS)
-
-showkey: showkey.o $(LIBNEWT)
-- gcc -g -o showkey showkey.o $(LIBNEWT) $(LIBS)
+- $(CC) -g -o showkey showkey.o $(LIBNEWT) $(LIBS)
-
-_snackmodule.so: snackmodule.c $(LIBNEWTSH)
- for ver in $(PYTHONVERS) ; do \
- if [ ! -f "$$ver/_snackmodule.so" -o $(LIBNEWTSH) -nt
"$$ver/_snackmodule.so" ]; then \
- mkdir -p $$ver ;\
-- gcc $(CFLAGS) -I/usr/include/$$ver -fPIC -c -o
$$ver/snackmodule.o snackmodule.c ;\
-- gcc --shared $(SHCFLAGS) -o $$ver/_snackmodule.so
$$ver/snackmodule.o -L . $(LIBNEWTSH) ;\
+- $(CC) $(CFLAGS) -I/usr/include/$$ver -fPIC -c -o
$$ver/snackmodule.o snackmodule.c ;\
+- $(CC) --shared $(SHCFLAGS) -o $$ver/_snackmodule.so
$$ver/snackmodule.o -L . -lnewt -lslang ;\
- fi ; \
- done
-
-whiptail: $(NDIALOGOBJS) $(LIBNEWTSH)
-- gcc -g -o whiptail $(NDIALOGOBJS) -L . $(LIBNEWTSH) $(LIBS) -lpopt
+- $(CC) -g -o whiptail $(NDIALOGOBJS) -L . -lnewt $(LIBS) -lpopt
-
-whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH)
-- gcc -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . $(LIBNEWTSH)
-ltcl -lslang -lpopt -lm
+- $(CC) -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . -lnewt
$(LIBTCL) -lslang -lpopt -lm
+-
+-# Ensure dialogboxes is compiled -fPIC
+-dialogboxes.o: dialogboxes.c
+- $(CC) $(CFLAGS) $(SHCFLAGS) -c dialogboxes.c
+-
+-whiptcl.o: whiptcl.c
+- $(CC) -I/usr/include/tcl8.4 $(SHCFLAGS) $(CFLAGS) -c whiptcl.c
+-
-
-$(LIBNEWT): $(LIBOBJS)
- ar rv $@ $^
@@ -98,7 +105,7 @@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
-+LIBS = -lslang -lpopt -lm @LIBS@
++LIBS = -lslang -lpopt -lintl -liconv -lm @LIBS@
+RM = rm -f
+AR = ar
+RANLIB = ranlib
@@ -125,7 +132,7 @@
+.SUFFIXES: .c .o
+
+.c.o:
-+ $(CC) $(CFLAGS) $(CPPFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $<
++ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
+all: $(LIBNEWT) $(TARGETS)
+
@@ -173,7 +180,8 @@
-sharedlib: $(LIBNEWTSH)
-
-$(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS)
-- gcc -shared -o $(LIBNEWTSH) -Wl,-soname,$(LIBNEWTSONAME) $(SHAREDOBJS)
$(SHLIBS)
+- $(CC) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS)
-Wl,-soname,$(LIBNEWTSONAME) $(SHAREDOBJS) $(SHLIBS)
+- ln -s $(LIBNEWTSH) libnewt.so
-
-$(SHAREDDIR)/%.o : %.c
- $(CC) $(SHCFLAGS) -c $(CFLAGS) -o $@ $<
@@ -222,8 +230,8 @@
-include .depend
-endif
Index: newt.c
---- newt.c.orig 2003-02-05 08:11:35.000000000 +0100
-+++ newt.c 2003-12-14 12:02:42.000000000 +0100
+--- newt.c.orig 2005-09-30 16:13:16 +0200
++++ newt.c 2005-10-30 09:39:25 +0100
@@ -9,7 +9,9 @@
#include <sys/types.h>
#include <termios.h>
@@ -234,10 +242,10 @@
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
-@@ -146,13 +148,16 @@
+@@ -154,13 +156,16 @@
}
- int wstrlen(const char *str, int len) {
+ int _newt_wstrlen(const char *str, int len) {
+#ifdef HAVE_WCHAR
mbstate_t ps;
wchar_t tmp;
@@ -251,7 +259,7 @@
memset(&ps,0,sizeof(mbstate_t));
while (len > 0) {
int x,y;
-@@ -166,6 +171,9 @@
+@@ -174,6 +179,9 @@
nchars+=y;
} else break;
}
@@ -261,19 +269,44 @@
return nchars;
}
+@@ -186,18 +194,24 @@
+ char *p = title;
+ int ln = chrs;
+ int x = 0,y = 0;
++#ifdef FIXME
+ wchar_t tmp;
+ mbstate_t ps;
+
+ memset(&ps, 0, sizeof(ps));
++#endif
+
+ while (*p) {
++#ifdef FIXME
+ x = mbrtowc(&tmp, p, ln, &ps);
++#endif
+ if (x < 0) { // error
+ *p = '\0';
+ return;
+ }
++#ifdef FIXME
+ y = wcwidth(tmp);
++#endif
+ if (y > ln) {
+ *p = '\0';
+ return;
Index: shtool
---- shtool.orig 2003-12-14 12:02:42.000000000 +0100
-+++ shtool 2003-12-14 12:02:42.000000000 +0100
-@@ -0,0 +1,628 @@
+--- shtool.orig 2005-10-30 09:40:04 +0100
++++ shtool 2005-10-30 09:39:55 +0100
+@@ -0,0 +1,661 @@
+#!/bin/sh
+##
+## GNU shtool -- The GNU Portable Shell Tool
-+## Copyright (c) 1994-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
++## Copyright (c) 1994-2005 Ralf S. Engelschall <[EMAIL PROTECTED]>
+##
+## See http://www.gnu.org/software/shtool/ for more information.
+## See ftp://ftp.gnu.org/gnu/shtool/ for latest version.
+##
-+## Version: 1.6.2 (02-Nov-2002)
++## Version: 2.0.2 (15-Jun-2005)
+## Contents: 2/19 available modules
+##
+
@@ -320,7 +353,7 @@
+## rotate Logfile rotation
+## tarball Roll distribution tarballs
+## subst Apply sed(1) substitution operations
-+## guessos Simple operating system guesser
++## platform Platform Identification Utility
+## arx Extended archive command
+## slo Separate linker options by library class
+## scpp Sharing C Pre-Processor
@@ -333,9 +366,9 @@
+ echo "$0:Hint: run \`$0 -h' for usage" 1>&2
+ exit 1
+fi
-+if [ ".$1" = ".-h" -o ".$1" = ".--help" ]; then
-+ echo "This is GNU shtool, version 1.6.2 (02-Nov-2002)"
-+ echo "Copyright (c) 1994-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>"
++if [ ".$1" = ".-h" ] || [ ".$1" = ".--help" ]; then
++ echo "This is GNU shtool, version 2.0.2 (15-Jun-2005)"
++ echo "Copyright (c) 1994-2005 Ralf S. Engelschall <[EMAIL PROTECTED]>"
+ echo "Report bugs to <[EMAIL PROTECTED]>"
+ echo ''
+ echo "Usage: shtool [<options>] [<cmd-name> [<cmd-options>]
[<cmd-args>]]"
@@ -356,7 +389,7 @@
+ echo ' [<dir> ...]'
+ echo ''
+ echo 'Not available <cmd-name> (because module was not built-in):'
-+ echo ' echo [-n|--newline] [-e|--expand] [<str> ...]'
++ echo ' echo [-n|--newline] [-e|--expand] [<string> ...]'
+ echo ' mdate [-n|--newline] [-z|--zero] [-s|--shorten]
[-d|--digits]'
+ echo ' [-f|--field-sep <str>] [-o|--order <spec>] <path>'
+ echo ' table [-F|--field-sep <sep>] [-w|--width <width>]
[-c|--columns'
@@ -371,17 +404,21 @@
+ echo ' rotate [-v|--verbose] [-t|--trace] [-f|--force]
[-n|--num-files'
+ echo ' <count>] [-s|--size <size>] [-c|--copy] [-r|--remove]'
+ echo ' [-a|--archive-dir <dir>] [-z|--compress
[<tool>:]<level>]'
-+ echo ' [-b|--background] [-d|--delay] [-p|--pad <len>]
[-o|--owner'
-+ echo ' <owner>] [-g|--group <group>] [-m|--mode <mode>]
[-M|--migrate'
++ echo ' [-b|--background] [-d|--delay] [-p|--pad <len>]
[-m|--mode'
++ echo ' <mode>] [-o|--owner <owner>] [-g|--group <group>]
[-M|--migrate'
+ echo ' <cmd>] [-P|--prolog <cmd>] [-E|--epilog <cmd>] <file>
[...]'
+ echo ' tarball [-t|--trace] [-v|--verbose] [-o|--output <tarball>]'
+ echo ' [-c|--compress <prog>] [-d|--directory <dir>]
[-u|--user'
+ echo ' <user>] [-g|--group <group>] [-e|--exclude <pattern>]'
+ echo ' <path> [<path> ...]'
-+ echo ' subst [-v|--verbose] [-t|--trace] [-n|--nop] [-s|--stealth]'
-+ echo ' [-i|--interactive] [-b|--backup <ext>] [-e|--exec
<cmd>]'
-+ echo ' [-f|--file <cmd-file>] [<file>] [...]'
-+ echo ' guessos '
++ echo ' subst [-v|--verbose] [-t|--trace] [-n|--nop] [-w|--warning]'
++ echo ' [-q|--quiet] [-s|--stealth] [-i|--interactive]
[-b|--backup'
++ echo ' <ext>] [-e|--exec <cmd>] [-f|--file <cmd-file>]
[<file>]'
++ echo ' [...]'
++ echo ' platform [-F|--format <format>] [-S|--sep <string>] [-C|--conc'
++ echo ' <string>] [-L|--lower] [-U|--upper] [-v|--verbose]'
++ echo ' [-c|--concise] [-n|--no-newline] [-t|--type <type>]'
++ echo ' [-V|--version] [-h|--help]'
+ echo ' arx [-t|--trace] [-C|--command <cmd>] <op> <archive>
[<file>'
+ echo ' ...]'
+ echo ' slo [-p|--prefix <str>] -- -L<dir> -l<lib> [-L<dir>
-l<lib>'
@@ -398,15 +435,15 @@
+ echo ''
+ exit 0
+fi
-+if [ ".$1" = ".-v" -o ".$1" = ."--version" ]; then
-+ echo "GNU shtool 1.6.2 (02-Nov-2002)"
++if [ ".$1" = ".-v" ] || [ ".$1" = ".--version" ]; then
++ echo "GNU shtool 2.0.2 (15-Jun-2005)"
+ exit 0
+fi
-+if [ ".$1" = ".-r" -o ".$1" = ."--recreate" ]; then
++if [ ".$1" = ".-r" ] || [ ".$1" = ".--recreate" ]; then
+ shtoolize -oshtool install mkdir
+ exit 0
+fi
-+if [ ".$1" = ".-d" -o ".$1" = ."--debug" ]; then
++if [ ".$1" = ".-d" ] || [ ".$1" = ".--debug" ]; then
+ shift
+ set -x
+fi
@@ -505,7 +542,7 @@
+
+# parse option alias string
+eval `echo h:help,$opt_alias |\
-+ tr 'x-' 'x_' | sed -e
's/\([a-zA-Z0-9]\):\([^,]*\),*/opt_ALIAS_\2=\1;/g'`
++ sed -e 's/-/_/g' -e
's/\([a-zA-Z0-9]\):\([^,]*\),*/opt_ALIAS_\2=\1;/g'`
+
+# interate over argument line
+opt_PREV=''
@@ -530,12 +567,12 @@
+ --[a-zA-Z0-9]*=*)
+ eval `echo "x$1" |\
+ sed -e
's/^x--\([a-zA-Z0-9-]*\)=\(.*\)$/opt_OPT="\1";opt_ARG="\2"/'`
-+ opt_STR=`echo $opt_OPT | tr 'x-' 'x_'`
++ opt_STR=`echo $opt_OPT | sed -e 's/-/_/g'`
+ eval "opt_OPT=\${opt_ALIAS_${opt_STR}-${opt_OPT}}"
+ ;;
+ --[a-zA-Z0-9]*)
+ opt_OPT=`echo "x$1" | cut -c4-`
-+ opt_STR=`echo $opt_OPT | tr 'x-' 'x_'`
++ opt_STR=`echo $opt_OPT | sed -e 's/-/_/g'`
+ eval "opt_OPT=\${opt_ALIAS_${opt_STR}-${opt_OPT}}"
+ opt_ARG=''
+ ;;
@@ -559,8 +596,8 @@
+
+ # determine whether option needs an argument
+ eval "opt_MODE=\$opt_MODE_${opt_OPT}"
-+ if [ ".$opt_ARG" = . -a ".$opt_ARG_OK" != .yes ]; then
-+ if [ ".$opt_MODE" = ".:" -o ".$opt_MODE" = ".+" ]; then
++ if [ ".$opt_ARG" = . ] && [ ".$opt_ARG_OK" != .yes ]; then
++ if [ ".$opt_MODE" = ".:" ] || [ ".$opt_MODE" = ".+" ]; then
+ opt_PREV="$opt_OPT"
+ continue
+ fi
@@ -619,6 +656,7 @@
+
+# establish a temporary file on request
+if [ ".$gen_tmpfile" = .yes ]; then
++ # create (explicitly) secure temporary directory
+ if [ ".$TMPDIR" != . ]; then
+ tmpdir="$TMPDIR"
+ elif [ ".$TEMPDIR" != . ]; then
@@ -626,12 +664,40 @@
+ else
+ tmpdir="/tmp"
+ fi
-+ tmpfile="$tmpdir/.shtool.$$"
-+ rm -f $tmpfile >/dev/null 2>&1
-+ touch $tmpfile
-+ chmod 600 $tmpfile
++ tmpdir="$tmpdir/.shtool.$$"
++ ( umask 077
++ rm -rf "$tmpdir" >/dev/null 2>&1 || true
++ mkdir "$tmpdir" >/dev/null 2>&1
++ if [ $? -ne 0 ]; then
++ echo "$msgprefix:Error: failed to create temporary directory
\`$tmpdir'" 1>&2
++ exit 1
++ fi
++ )
++
++ # create (implicitly) secure temporary file
++ tmpfile="$tmpdir/shtool.tmp"
++ touch "$tmpfile"
+fi
+
++# utility function: map string to lower case
++util_lower () {
++ echo "$1" | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'
++}
++
++# utility function: map string to upper case
++util_upper () {
++ echo "$1" | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
++}
++
++# cleanup procedure
++shtool_exit () {
++ rc="$1"
++ if [ ".$gen_tmpfile" = .yes ]; then
++ rm -rf "$tmpdir" >/dev/null 2>&1 || true
++ fi
++ exit $rc
++}
++
+##
+## DISPATCH INTO SCRIPT BODY
+##
@@ -641,10 +707,9 @@
+install )
+ ##
+ ## install -- Install a program, script or datafile
-+ ## Copyright (c) 1997-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
-+ ## Originally written for shtool
++ ## Copyright (c) 1997-2005 Ralf S. Engelschall <[EMAIL PROTECTED]>
+ ##
-+
++
+ # special case: "shtool install -d <dir> [...]" internally
+ # maps to "shtool mkdir -f -p -m 755 <dir> [...]"
+ if [ "$opt_d" = yes ]; then
@@ -662,11 +727,11 @@
+ cmd="$cmd -t"
+ fi
+ for dir in "$@"; do
-+ eval "$cmd $dir" || exit $?
++ eval "$cmd $dir" || shtool_exit $?
+ done
-+ exit 0
++ shtool_exit 0
+ fi
-+
++
+ # determine source(s) and destination
+ argc=$#
+ srcs=""
@@ -675,30 +740,30 @@
+ shift
+ done
+ dstpath="$1"
-+
++
+ # type check for destination
+ dstisdir=0
+ if [ -d $dstpath ]; then
+ dstpath=`echo "$dstpath" | sed -e 's:/$::'`
+ dstisdir=1
+ fi
-+
++
+ # consistency check for destination
-+ if [ $argc -gt 2 -a $dstisdir = 0 ]; then
++ if [ $argc -gt 2 ] && [ $dstisdir = 0 ]; then
+ echo "$msgprefix:Error: multiple sources require destination to be
directory" 1>&2
-+ exit 1
++ shtool_exit 1
+ fi
-+
++
+ # iterate over all source(s)
+ for src in $srcs; do
+ dst=$dstpath
-+
++
+ # if destination is a directory, append the input filename
+ if [ $dstisdir = 1 ]; then
+ dstfile=`echo "$src" | sed -e 's;.*/\([^/]*\)$;\1;'`
+ dst="$dst/$dstfile"
+ fi
-+
++
+ # check for correct arguments
+ if [ ".$src" = ".$dst" ]; then
+ echo "$msgprefix:Warning: source and destination are the same -
skipped" 1>&2
@@ -708,17 +773,17 @@
+ echo "$msgprefix:Warning: source \`$src' is a directory -
skipped" 1>&2
+ continue
+ fi
-+
++
+ # make a temp file name in the destination directory
+ dsttmp=`echo $dst |\
+ sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;' -e 's;^$;.;' \
+ -e "s;\$;/[EMAIL PROTECTED];"`
-+
++
+ # verbosity
+ if [ ".$opt_v" = .yes ]; then
+ echo "$src -> $dst" 1>&2
+ fi
-+
++
+ # copy or move the file name to the temp name
+ # (because we might be not allowed to change the source)
+ if [ ".$opt_C" = .yes ]; then
@@ -728,14 +793,14 @@
+ if [ ".$opt_t" = .yes ]; then
+ echo "cp $src $dsttmp" 1>&2
+ fi
-+ cp $src $dsttmp || exit $?
++ cp $src $dsttmp || shtool_exit $?
+ else
+ if [ ".$opt_t" = .yes ]; then
+ echo "mv $src $dsttmp" 1>&2
+ fi
-+ mv $src $dsttmp || exit $?
++ mv $src $dsttmp || shtool_exit $?
+ fi
-+
++
+ # adjust the target file
+ if [ ".$opt_e" != . ]; then
+ sed='sed'
@@ -745,34 +810,35 @@
+ sed="$sed -e '$e'"
+ done
+ cp $dsttmp $dsttmp.old
-+ eval "$sed <$dsttmp.old >$dsttmp" || exit $?
++ chmod u+w $dsttmp
++ eval "$sed <$dsttmp.old >$dsttmp" || shtool_exit $?
+ rm -f $dsttmp.old
+ fi
+ if [ ".$opt_s" = .yes ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "strip $dsttmp" 1>&2
+ fi
-+ strip $dsttmp || exit $?
++ strip $dsttmp || shtool_exit $?
+ fi
+ if [ ".$opt_o" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chown $opt_o $dsttmp" 1>&2
+ fi
-+ chown $opt_o $dsttmp || exit $?
++ chown $opt_o $dsttmp || shtool_exit $?
+ fi
+ if [ ".$opt_g" != . ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chgrp $opt_g $dsttmp" 1>&2
+ fi
-+ chgrp $opt_g $dsttmp || exit $?
++ chgrp $opt_g $dsttmp || shtool_exit $?
+ fi
+ if [ ".$opt_m" != ".-" ]; then
+ if [ ".$opt_t" = .yes ]; then
+ echo "chmod $opt_m $dsttmp" 1>&2
+ fi
-+ chmod $opt_m $dsttmp || exit $?
++ chmod $opt_m $dsttmp || shtool_exit $?
+ fi
-+
++
+ # determine whether to do a quick install
+ # (has to be done _after_ the strip was already done)
+ quick=no
@@ -783,7 +849,7 @@
+ fi
+ fi
+ fi
-+
++
+ # finally, install the file to the real destination
+ if [ $quick = yes ]; then
+ if [ ".$opt_t" = .yes ]; then
@@ -797,21 +863,21 @@
+ rm -f $dst && mv $dsttmp $dst
+ fi
+ done
++
++ shtool_exit 0
+ ;;
+
+mkdir )
+ ##
+ ## mkdir -- Make one or more directories
-+ ## Copyright (c) 1996-2002 Ralf S. Engelschall <[EMAIL PROTECTED]>
-+ ## Originally written for public domain by Noah Friedman <[EMAIL
PROTECTED]>
-+ ## Cleaned up and enhanced for shtool
++ ## Copyright (c) 1996-2005 Ralf S. Engelschall <[EMAIL PROTECTED]>
+ ##
-+
++
+ errstatus=0
+ for p in ${1+"$@"}; do
+ # if the directory already exists...
+ if [ -d "$p" ]; then
-+ if [ ".$opt_f" = .no -a ".$opt_p" = .no ]; then
++ if [ ".$opt_f" = .no ] && [ ".$opt_p" = .no ]; then
+ echo "$msgprefix:Error: directory already exists: $p" 1>&2
+ errstatus=1
+ break
@@ -885,17 +951,17 @@
+ done
+ fi
+ done
-+ exit $errstatus
++
++ shtool_exit $errstatus
+ ;;
+
+esac
+
-+exit 0
++shtool_exit 0
+
-+##EOF##
Index: textbox.c
---- textbox.c.orig 2003-01-03 21:54:45.000000000 +0100
-+++ textbox.c 2003-12-14 12:02:42.000000000 +0100
+--- textbox.c.orig 2005-09-30 16:05:55 +0200
++++ textbox.c 2005-10-30 09:39:25 +0100
@@ -4,7 +4,9 @@
#include <stdlib.h>
#include <string.h>
@@ -906,7 +972,7 @@
#include "newt.h"
#include "newt_pr.h"
-@@ -161,8 +163,10 @@
+@@ -163,8 +165,10 @@
int i;
int howbad = 0;
int height = 0;
@@ -917,7 +983,7 @@
if (resultPtr) {
/* XXX I think this will work */
-@@ -170,7 +174,9 @@
+@@ -172,7 +176,9 @@
*result = '\0';
}
@@ -927,7 +993,7 @@
while (*text) {
end = strchr(text, '\n');
if (!end)
-@@ -202,6 +208,7 @@
+@@ -204,6 +210,7 @@
chptr = text;
w2 = 0;
for (i = 0; i < width - 1;) {
@@ -935,7 +1001,7 @@
if ((x=mbrtowc(&tmp,chptr,end-chptr,&ps))<=0)
break;
if (spc && !iswspace(tmp))
-@@ -215,6 +222,17 @@
+@@ -217,6 +224,17 @@
x = wcwidth(tmp);
if (x>0)
i+=x;
@@ -953,7 +1019,7 @@
}
howbad += width - w2 + 1;
#ifdef DEBUG_WRAP
-@@ -229,9 +247,14 @@
+@@ -231,9 +249,14 @@
text = chptr;
while (1) {
@@ -969,8 +1035,8 @@
}
}
Index: tutorial.txt
---- tutorial.txt.orig 2003-12-14 12:19:49.000000000 +0100
-+++ tutorial.txt 2003-12-14 12:19:54.000000000 +0100
+--- tutorial.txt.orig 2005-10-30 09:39:25 +0100
++++ tutorial.txt 2005-10-30 09:39:25 +0100
@@ -0,0 +1,1079 @@
+
+Writing Programs Using newtErik Troan, <[EMAIL PROTECTED]>
@@ -2052,9 +2118,9 @@
+void newtFormSetHeight(newtComponent co, int height);
+void newtFormSetWidth(newtComponent co, int width);
Index: whiptail.1
---- whiptail.1.orig 2003-12-14 12:02:42.000000000 +0100
-+++ whiptail.1 2003-12-14 12:02:42.000000000 +0100
-@@ -0,0 +1,242 @@
+--- whiptail.1.orig 2005-09-21 11:32:04 +0200
++++ whiptail.1 2005-10-30 09:39:25 +0100
+@@ -1,3 +1,513 @@
+.TH WHIPTAIL 1 "10 January 1998" "Whiptail Version 0.21"
+.SH NAME
+whiptail \- display dialog boxes from shell scripts
@@ -2297,15 +2363,285 @@
+Modifications for whiptail by:
+.LP
+Enrique Zanardi ([EMAIL PROTECTED])
++.TH WHIPTAIL 1 "20 September 2004" "Whiptail Version 0.51.6"
++.SH NAME
++whiptail \- display dialog boxes from shell scripts
++.SH SYNOPSIS
++.B whiptail
++[
++.B \-\-title
++.I title
++]
++[
++.B \-\-backtitle
++.I backtitle
++]
++[
++.B \-\-clear
++]
++[
++.B \-\-default\-item
++.I string
++]
++[
++.B \-\-defaultno
++]
++[
++.B \-\-fb
++]
++[
++.B \-\-nocancel
++]
++[
++.B \-\-noitem
++[
++]
++.B \-\-output\-fd
++.I fd
++]
++[
++.B \-\-separate\-output
++]
++[
++.B \-\-scrolltext
++]
++.B box-options
++.SH DESCRIPTION
++.B whiptail
++is a program that will let you present a variety of questions or
++display messages using dialog boxes from a shell script. Currently,
++these types of dialog boxes are implemented:
++.LP
++.BR yes/no " box," " menu" " box," " input" " box,"
++.BR message " box," " text" " box," " info" " box,"
++.BR checklist " box," " radiolist" " box" " gauge" " box, and"
++.BR password " box."
++.SH OPTIONS
++.TP
++.B \-\-clear
++The screen will be cleared to the
++.BR "screen attribute" " on exit."
++This doesn't work in an xterm (and descendants) if alternate screen
++switching is enabled, because in that case slang writes to (and clears)
++an alternate screen.
++.TP
++.B \-\-defaultno
++The dialog box will open with the cursor over the
++.BR No " button."
++.TP
++.B \-\-default\-item "string"
++Set the default item in a menu box.
++Normally the first item in the box is the default.
++.TP
++.B \-\-fb
++Use full buttons. (By default,
++.B whiptail
++uses compact buttons).
++.TP
++.B \-\-nocancel
++The dialog box won't have a
++.BR Cancel " button".
++.TP
++.B \-\-noitem
++The menu, checklist and radiolist widgets will display tags only, not
++the item strings.
++.TP
++.BI \-\-separate\-output
++For checklist widgets, output result one line at a time, with no
++quoting. This facilitates parsing by another program.
++.TP
++.BI \-\-output\-fd " fd"
++Direct output to the given file descriptor. Most
++.B whiptail
++scripts
++write to standard error, but error messages may also be
++written there, depending on your script.
++.TP
++.BI \-\-title " title"
++Specifies a
++.I title
++string to be displayed at the top of the dialog box.
++.TP
++.BI \-\-backtitle " backtitle"
++Specifies a
++.I backtitle
++string to be displayed on the backdrop, at the top of the screen.
++.TP
++.BI \-\-scrolltext
++Force the display of a vertical scrollbar.
++.TP
++.B Box Options
++.TP
++.BI \-\-yesno " text height width"
++.RB A " yes/no" " dialog box of size"
++.I height
++rows by
++.I width
++columns will be displayed. The string specified by
++.I text
++is displayed inside the dialog box. If this string is too long to be fit
++in one line, it will be automatically divided into multiple lines at
++appropriate places. The
++.I text
++string may also contain the sub-string
++.I
++"\en"
++or newline characters
++.I `\en'
++to control line breaking explicitly. This dialog box is useful for
++asking questions that require the user to answer either yes or no.
++.RB "The dialog box has a" " Yes" " button and a " No
++button, in which the user can switch between by pressing the
++.IR TAB " key."
++.TP
++.BI \-\-msgbox " text height width"
++.RB A " message" " box is very similar to a" " yes/no" " box."
++The only difference between a
++.B message
++box and a
++.B yes/no
++box is that a
++.B message
++box has only a single
++.B OK
++button. You can use this dialog box to display any message you like.
++After reading the message, the user can press the
++.I ENTER
++key so that
++.B whiptail
++will exit and the calling shell script can continue its operation.
++.TP
++.BI \-\-infobox " text height width"
++.RB An " info" " box is basically a" " message" " box."
++However, in this case,
++.B whiptail
++will exit immediately after displaying the message to the user. The
++screen is not cleared when
++.B whiptail
++exits, so that the message will remain on the screen until the calling
++shell script clears it later. This is useful when you want to inform
++the user that some operations are carrying on that may require some
++time to finish.
++.TP
++.BI \-\-inputbox " text height width [init]"
++.RB "An " input " box is useful when you want to ask questions that"
++require the user to input a string as the answer. If init is supplied
++it is used to initialize the input string.
++When inputing the
++string, the
++.I BACKSPACE
++key can be used to correct typing errors. If the input string is longer than
++the width of the dialog box, the input field will be scrolled. On exit,
++the input string will be printed on
++.IR stderr "."
++.TP
++.BI \-\-passwordbox " text height width [init]"
++.RB "A " password " box is similar to an input box, except the text the
user"
++enters is not displayed. This is useful when prompting for passwords or
other
++sensitive information. Be aware that if anything is passed in "init", it
++will be visible in the system's process table to casual snoopers. Also, it
++is very confusing to the user to provide them with a default password they
++cannot see. For these reasons, using "init" is highly discouraged.
++.TP
++.BI \-\-textbox " file height width"
++.RB A " text" " box lets you display the contents of a text file in a"
++dialog box. It is like a simple text file viewer. The user can move
++through the file by using the
++.IR UP/DOWN ", " PGUP/PGDN
++.RI and " HOME/END" " keys available on most keyboards."
++If the lines are too long to be displayed in the box, the
++.I LEFT/RIGHT
++keys can be used to scroll the text region horizontally. For more
++convenience, forward and backward searching functions are also provided.
++.IP "\fB\-\-menu \fItext height width menu-height \fR[ \fItag item \fR]
\fI..."
++As its name suggests, a
++.B menu
++box is a dialog box that can be used to present a list of choices in
++the form of a menu for the user to choose. Each menu entry consists of a
++.IR tag " string and an " item " string. The"
++.I tag
++gives the entry a name to distinguish it from the other entries in the
++menu. The
++.I item
++is a short description of the option that the entry represents. The
++user can move between the menu entries by pressing the
++.I UP/DOWN
++keys, the first letter of the
++.I tag
++as a hot-key. There are
++.I menu-height
++entries displayed in the menu at one time, but the menu will be
++scrolled if there are more entries than that. When
++.B whiptail
++exits, the
++.I tag
++of the chosen menu entry will be printed on
++.IR stderr "."
++.IP "\fB\-\-checklist \fItext height width list-height \fR[ \fItag item
status \fR] \fI..."
++.RB "A " checklist " box is similar to a " menu " box in that there are"
++multiple entries presented in the form of a menu.
++You can select and deselect items using the SPACE key.
++The initial on/off state of each entry is specified by
++.IR status "."
++On exit, a list of the
++.I tag
++strings of those entries that are turned on will be printed on
++.IR stderr "."
++
++.IP "\fB\-\-radiolist \fItext height width list-height \fR [ \fItag item
status \fR] \fI..."
++.RB "A " radiolist " box is similar to a " menu " box. The only difference
is"
++that you can indicate which entry is currently selected, by setting its
++.IR status " to " on "."
++
++.IP "\fB\-\-gauge \fItext height width percent\fR"
++.RB "A " gauge " box displays a meter along the bottom of the box.
++The meter indicates a percentage. New percentages are read from
++standard input, one integer per line. The meter is updated
++to reflect each new percentage. If stdin is XXX, then subsequent
++lines up to another XXX are used for a new prompt.
++The gauge exits when EOF is reached on stdin.
++
++.SH NOTES
++whiptail interprets arguments starting with a dash "\-" as being arguments.
++To avoid this, and start some text in, for example, a menubox item, with a
++dash, whiptail honours the getopt convention of accepting the special
++argument "\-\-" which means that all following arguments with dashes are to
++be treated verbatim and not parsed as options.
++.SH DIAGNOSTICS
++Exit status is 0 if
++.BR whiptail " is exited by pressing the " Yes " or " OK
++button, and 1 if the
++.BR No " or " Cancel
++button is pressed. Otherwise, if errors occur inside
++.B whiptail
++or
++.B whiptail
++is exited by pressing the
++.I ESC
++key, the exit status is -1.
++.SH AUTHOR
++Based on the man page for dialog(1) by:
++.LP
++Savio Lam ([EMAIL PROTECTED]) - version 0.3
++.LP
++Stuart Herbert ([EMAIL PROTECTED]) - patch for version 0.4
++.LP
++Modifications for whiptail by:
++.LP
++Enrique Zanardi ([EMAIL PROTECTED])
++.LP
++Alastair McKinstry ([EMAIL PROTECTED])
+ .TH WHIPTAIL 1 "20 September 2004" "Whiptail Version 0.51.6"
+ .SH NAME
+ whiptail \- display dialog boxes from shell scripts
Index: whiptail.c
---- whiptail.c.orig 2003-01-03 21:54:45.000000000 +0100
-+++ whiptail.c 2003-12-14 12:02:42.000000000 +0100
-@@ -24,7 +24,7 @@
- #define OPT_INFOBOX 1008
-
- static void usage(void) {
-- fprintf(stderr, "whiptail: bad parameters (see man dialog(1) for
details)\n");
-+ fprintf(stderr, "whiptail: bad parameters (see man whiptail(1) for
details)\n");
- exit(1);
- }
+--- whiptail.c.orig 2005-09-21 11:32:03 +0200
++++ whiptail.c 2005-10-30 09:39:25 +0100
+@@ -8,6 +8,7 @@
+ #include <unistd.h>
+ #include <wchar.h>
+ #include <slang.h>
++#include <sys/stat.h>
+ #include "nls.h"
+ #include "dialogboxes.h"
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/newt/newt.spec
============================================================================
$ cvs diff -u -r1.19 -r1.20 newt.spec
--- openpkg-src/newt/newt.spec 16 Sep 2005 14:20:20 -0000 1.19
+++ openpkg-src/newt/newt.spec 30 Oct 2005 08:50:17 -0000 1.20
@@ -23,8 +23,8 @@
##
# package version
-%define V_major 0.51.6
-%define V_minor 8
+%define V_major 0.52.1
+%define V_minor 0
# package information
Name: newt
@@ -37,7 +37,7 @@
Group: Terminal
License: LGPL
Version: %{V_major}.%{V_minor}
-Release: 20050916
+Release: 20051030
# list of sources
Source0:
ftp://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/newt-%{V_major}-%{V_minor}.src.rpm
@@ -47,8 +47,10 @@
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
-BuildPreReq: OpenPKG, openpkg >= 20050615, slang, popt, gcc
-PreReq: OpenPKG, openpkg >= 20050615, slang
+BuildPreReq: OpenPKG, openpkg >= 20050615, gcc
+PreReq: OpenPKG, openpkg >= 20050615
+BuildPreReq: slang, gettext, libiconv, popt
+PreReq: slang, gettext, libiconv, popt
AutoReq: no
AutoReqProv: no
@@ -73,7 +75,6 @@
%{l_gzip} -d -c newt-%{V_major}.tar.gz | %{l_tar} xf -
%patch -p0 -d newt-%{V_major}
chmod u+r newt-%{V_major}/*.orig
- cp %{l_shtool} ./newt-%{V_major}/shtool
%build
# determine available terminal library
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]