diff options
Diffstat (limited to 'misc/pinfo')
-rw-r--r-- | misc/pinfo/doinst.sh | 5 | ||||
-rw-r--r-- | misc/pinfo/douninst.sh | 6 | ||||
-rw-r--r-- | misc/pinfo/fix_f9_f10_binds.diff | 16 | ||||
-rw-r--r-- | misc/pinfo/man_page.diff | 62 | ||||
-rw-r--r-- | misc/pinfo/ncurses-6.3.diff | 32 | ||||
-rw-r--r-- | misc/pinfo/pinfo.SlackBuild | 26 | ||||
-rw-r--r-- | misc/pinfo/pinfo.info | 2 |
7 files changed, 136 insertions, 13 deletions
diff --git a/misc/pinfo/doinst.sh b/misc/pinfo/doinst.sh index 3354151c29..d514aad218 100644 --- a/misc/pinfo/doinst.sh +++ b/misc/pinfo/doinst.sh @@ -1,18 +1,15 @@ config() { NEW="$1" OLD="$(dirname $NEW)/$(basename $NEW .new)" - # If there's no config file by that name, mv it over: if [ ! -r $OLD ]; then mv $NEW $OLD elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then - # toss the redundant copy rm $NEW fi - # Otherwise, we leave the .new copy for the admin to consider... } config etc/pinforc.new if [ -x /usr/bin/install-info ]; then - chroot . /usr/bin/install-info --info-dir=/usr/info /usr/info/pinfo.info.gz 2> /dev/null + /usr/bin/install-info usr/info/pinfo.info.gz usr/info/dir fi diff --git a/misc/pinfo/douninst.sh b/misc/pinfo/douninst.sh new file mode 100644 index 0000000000..1bef502028 --- /dev/null +++ b/misc/pinfo/douninst.sh @@ -0,0 +1,6 @@ +if [ -x /usr/bin/install-info -a -d usr/info ]; then + ( cd usr/info + rm -f dir + for i in *.info*; do /usr/bin/install-info $i dir 2>/dev/null; done + ) +fi diff --git a/misc/pinfo/fix_f9_f10_binds.diff b/misc/pinfo/fix_f9_f10_binds.diff new file mode 100644 index 0000000000..130c2e399c --- /dev/null +++ b/misc/pinfo/fix_f9_f10_binds.diff @@ -0,0 +1,16 @@ +diff --git a/src/parse_config.c b/src/parse_config.c +index 6345e7d..84abb1d 100644 +--- a/src/parse_config.c ++++ b/src/parse_config.c +@@ -877,9 +877,9 @@ parse_line(char *line) + *key = KEY_F(7); + else if (!(strncmp(temp + 4, "F(8)", 4))) + *key = KEY_F(8); +- else if (!(strncmp(temp + 4, "(F9)", 4))) ++ else if (!(strncmp(temp + 4, "F(9)", 4))) + *key = KEY_F(9); +- else if (!(strncmp(temp + 4, "(F10)", 5))) ++ else if (!(strncmp(temp + 4, "F(10)", 5))) + *key = KEY_F(10); + else if (!(strncmp(temp + 4, "F(11)", 5))) + *key = KEY_F(11); diff --git a/misc/pinfo/man_page.diff b/misc/pinfo/man_page.diff new file mode 100644 index 0000000000..fd4afa9f99 --- /dev/null +++ b/misc/pinfo/man_page.diff @@ -0,0 +1,62 @@ +diff --git a/doc/pinfo.1.in b/doc/pinfo.1.in +index bb285cc..bf16aef 100644 +--- a/doc/pinfo.1.in ++++ b/doc/pinfo.1.in +@@ -1,4 +1,4 @@ +-.TH PINFO 1 "01 Dec 2001" ++.TH PINFO 1 "25 Apr 2023" + .SH NAME + .B pinfo + \- is user-friendly, console-based viewer for Info documents +@@ -6,6 +6,10 @@ + .B pinfo + [\fIoptions\fR] + [\fBinfopage\fR] ++.P ++.B pman ++[\fIman-options\fR] ++[\fBman-page\fR] + .SH DESCRIPTION + This is a program for viewing info files. You specify which page you want to + read by passing it an +@@ -46,13 +50,7 @@ to the `\fIman\fR' program. Don't be confused if pinfo options, which + followed `\fB-m\fR' don't work. When using this option, pinfo does not parse + the info options as usual! It invokes the man part of program. + .P +-You can also call the man function of pinfo in another way. When pinfo is +-called with an argv[0] (the program file name), which contains the word 'man' +-in its name, the man functions are enabled automatically. +-.P +-Previously there was a symlink to pinfo, called pman, but I had to remove it +-from the distribution, since its name was in conflict with some other +-utility. Anyway, you can feel free to create such a link if you wish. ++You can also call the man function of pinfo by running \fBpman\fR. + .P + .BR "-r", + .BR --raw-filename +diff --git a/doc/pinfo.texi b/doc/pinfo.texi +index 9925202..a617e62 100644 +--- a/doc/pinfo.texi ++++ b/doc/pinfo.texi +@@ -90,6 +90,9 @@ Keys + + @value{PROGRAM} [@var{options}] [@var{info_page}] + ++@noindent ++@file{pman} [@var{man-options}] [@var{man_page}] ++ + @value{PROGRAM} is a program for viewing info files. You specify which + page you want to read by passing it an @var{info_page} argument. This argument + contains the name of an info page (i.e. @samp{bash}). The program +@@ -130,10 +133,7 @@ When @value{PROGRAM} is called with an @code{argv[0]} (the program file + name), which contains the word @code{man} in its name, the man + functions are enabled automatically. + +-Previously there was a symlink to @value{PROGRAM}, called @code{pman}, +-but I had to remove it from the distribution, since its name was in +-conflict with some other utility. Anyway, you can feel free to create +-such a link if you wish. ++You can also call the man function of pinfo by running @code{pman}. + @item -r, --raw-filename + uses a raw filename first (i.e. the name which you specified as + infopage is considered to be a real file in the specified location). diff --git a/misc/pinfo/ncurses-6.3.diff b/misc/pinfo/ncurses-6.3.diff new file mode 100644 index 0000000000..82cf176794 --- /dev/null +++ b/misc/pinfo/ncurses-6.3.diff @@ -0,0 +1,32 @@ +From ab604fdb67296dad27f3a25f3c9aabdd2fb8c3fa Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <slyich@gmail.com> +Date: Thu, 11 Nov 2021 19:02:24 +0000 +Subject: [PATCH] src/video.c: use %ld to print longs + +ncurses-6.3 added printf()-stype attribute annotations for gcc-like +compilers that can now detect argument mismatches: + + video.c:114:26: error: format '%d' expects argument of type 'int', + but argument 3 has type 'long unsigned int' [-Werror=format=] + 114 | printw(_("Viewing line %d/%d, 100%%"), lines, lines); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +--- + src/video.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/video.c b/src/video.c +index f6b444a..195d781 100644 +--- a/src/video.c ++++ b/src/video.c +@@ -109,9 +109,9 @@ showscreen(char **message, unsigned long lines, unsigned long pos, long cursor, + mymvhline(maxy - 1, 0, ' ', maxx); + move(maxy - 1, 0); + if ((pos < lines - 1) &&(lines > pos + maxy - 2)) +- printw(_("Viewing line %d/%d, %d%%"), pos + maxy - 2, lines,((pos + maxy - 2) * 100) / lines); ++ printw(_("Viewing line %ld/%ld, %ld%%"), pos + maxy - 2, lines,((pos + maxy - 2) * 100) / lines); + else +- printw(_("Viewing line %d/%d, 100%%"), lines, lines); ++ printw(_("Viewing line %ld/%ld, 100%%"), lines, lines); + info_add_highlights(pos, cursor, lines, column, message); + attrset(normal); + move(0, 0); diff --git a/misc/pinfo/pinfo.SlackBuild b/misc/pinfo/pinfo.SlackBuild index 5c640b1222..d12c03f286 100644 --- a/misc/pinfo/pinfo.SlackBuild +++ b/misc/pinfo/pinfo.SlackBuild @@ -5,7 +5,7 @@ # Copyright 2009 Arun Prasannan - <URL removed> # All rights reserved. # -# Now maintained by B. Watson <yalhcru@gmail.com>. +# Now maintained by B. Watson <urchlay@slackware.uk>. # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: @@ -24,6 +24,12 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20230425 bkw: BUILD=4 +# - add bugfix from upstream. +# - document pman link in man and info pages. + +# 20230308 bkw: BUILD=3, add douninst.sh to clean up GNU info dir. + # 20200708 bkw: BUILD=2 # - restore old 'pman' link (nothing conflicts) # - fix homepage in slack-desc @@ -39,7 +45,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=pinfo VERSION=${VERSION:-0.6.13} -BUILD=${BUILD:-2} +BUILD=${BUILD:-4} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -80,13 +86,16 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.[bg]z* # allow old .bz2 and new .gz +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz cd $PRGNAM-$VERSION chown -R root:root . find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ patch -p1 < $CWD/gcc10-stringop.diff +patch -p1 < $CWD/ncurses-6.3.diff +patch -p1 < $CWD/fix_f9_f10_binds.diff # commit 05f967c +patch -p1 < $CWD/man_page.diff # my own work [ -e configure ] || sh autogen.sh @@ -111,18 +120,19 @@ rm -f $PKG/usr/info/dir mv $PKG/etc/pinforc $PKG/etc/pinforc.new # Upstream removed this as it conflicted with something on his system. -# It doesn't conflict with ours. +# It doesn't conflict with ours. man_page.diff documents this, too. ln -s $PRGNAM $PKG/usr/bin/pman ln -s $PRGNAM.1.gz $PKG/usr/man/man1/pman.1.gz -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a AUTHORS Change[lL]og* COPYING NEWS README* TECHSTUFF \ - $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a AUTHORS Change[lL]og* COPYING NEWS README* TECHSTUFF $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh +cat $CWD/douninst.sh > $PKG/install/douninst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/misc/pinfo/pinfo.info b/misc/pinfo/pinfo.info index 8e6cedf1fb..e2c63842b9 100644 --- a/misc/pinfo/pinfo.info +++ b/misc/pinfo/pinfo.info @@ -7,4 +7,4 @@ DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" MAINTAINER="B. Watson" -EMAIL="yalhcru@gmail.com" +EMAIL="urchlay@slackware.uk" |