summaryrefslogtreecommitdiffstats
path: root/system/csh/csh.SlackBuild
diff options
context:
space:
mode:
author B. Watson <urchlay@slackware.uk>2023-09-19 07:10:50 -0400
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2023-09-23 11:33:46 +0700
commit1699b53da6eeaac6022257a7280a06bb55e02d53 (patch)
tree3f0cd09877baa6319e7997e08dcc21b1332d32be /system/csh/csh.SlackBuild
parent70512eadfd420fcf618faf3b9b00e2e280166e00 (diff)
downloadslackbuilds-1699b53da6eeaac6022257a7280a06bb55e02d53.tar.gz
slackbuilds-1699b53da6eeaac6022257a7280a06bb55e02d53.tar.xz
system/csh: Updated for version 20230828_1.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/csh/csh.SlackBuild')
-rw-r--r--system/csh/csh.SlackBuild88
1 files changed, 59 insertions, 29 deletions
diff --git a/system/csh/csh.SlackBuild b/system/csh/csh.SlackBuild
index 22c743c494..bd4cb04f56 100644
--- a/system/csh/csh.SlackBuild
+++ b/system/csh/csh.SlackBuild
@@ -6,6 +6,15 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20230919 bkw:
+# - update for v20230828_1 (sync with Debian sid).
+# - remove old no-longer-needed bufsiz.diff and glibc-2.32-sys_siglist.diff.
+# - add timespec.diff to work around breakage in csh's time builtin.
+# - add remove_publib_dep.diff to avoid an external publib dependency.
+# - update csh.login a bit (new csh has a different default $prompt).
+# - mention bad profile scripts in README_Slackware.txt.
+# - fix the man page slightly.
+
# 20220409 bkw: BUILD=2
# - fix doinst.sh: only create bin/csh symlink if bin exists, which
# fixes installing the package with 'installpkg -root /some/path'.
@@ -22,8 +31,8 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=csh
-VERSION=${VERSION:-20110502_6}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-20230828_1}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -65,38 +74,54 @@ DEBVER="${VERSION#*_}" # 123_4 => 4
# Grr.
TARNAM="${PRGNAM}_${MAINVER}.orig"
-DIRNAM="${PRGNAM}-${MAINVER}.orig"
+DIRNAM="${PRGNAM}-${MAINVER}"
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $DIRNAM
-tar xvf $CWD/$TARNAM.tar.gz
+tar xvf $CWD/$TARNAM.tar.xz
cd $DIRNAM
-tar xvf $CWD/${PRGNAM}_${MAINVER}-$DEBVER.debian.tar.[xg]z
+tar xvf $CWD/${PRGNAM}_${MAINVER}-$DEBVER.debian.tar.xz
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 {} \+
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
-# Apply all of Debian's patches. Except one...
-for diff in debian/patches/*.diff; do
- [ "$( basename $diff )" != "09_sys_signame.diff" ] && patch -p1 < $diff
+# Apply all of Debian's patches.
+for diff in $( cat debian/patches/series ); do
+ patch -p1 < debian/patches/$diff
done
-# My own patch, keeps csh.h from defining its own (tiny) BUFSIZ. Might
-# make I/O more efficient, and allows /etc/profile.d/coreutils-dircolors.sh
-# to set a giant $LS_OPTIONS value without "Word too long" error.
-patch -p1 < $CWD/bufsiz.diff
-
-# 20210827 bkw: my own patch, glibc >= 2.32 no longer exports
-# sys_siglist so we have to use sigdescr_np() instead. Ditto
-# sys_signame and sigabbrev_np(). See glibc changelog:
-# https://sourceware.org/pipermail/libc-announce/2020/000029.html
-# This patch replaces Debian's 09_sys_signame.diff.
-patch -p1 < $CWD/glibc-2.32-sys_siglist.diff
-
-# use Slackware standard flags
-sed -i "1iCFLAGS=$SLKCFLAGS -fcommon" Makefile
+# 20230919 bkw: My own patch. Provides an implementations of
+# xrealloc(), and replaces xfree() with free(), so we don't have
+# publib as a dependency.
+patch -p1 < $CWD/remove_publib_dep.diff
+
+# 20230919 bkw: My own patch. Fixes the mess caused by debian's
+# bsd_time.patch. We need the patch, but it introduces a bug where a
+# 'struct timeval' pointer is treated as a 'struct timespec' pointer,
+# leading to a broken time builtin.
+# This isn't *just* here to fix a compiler warning! Without this
+# patch, we get:
+# % time sleep 2.3
+# 0.0u 0.0s 0:02.99 0.0% 0+0k 0+0io 0pf+0w
+# ...it thinks a 2.3 second sleep took 2.99 sec. Sometimes this
+# will print as 0:02:00 instead (also wrong). With the patch:
+# % time sleep 2.3
+# 0.0u 0.0s 0:02.30 0.0% 0+0k 0+0io 0pf+0w
+# This wasn't an issue in the previous (20110502_6) version.
+patch -p1 < $CWD/timespec.diff
+
+# 20230919 bkw: Missing prototype for closefrom(). We don't want
+# to #include <bsd/unistd.h> to get it, so just prepend it. This
+# probably didn't cause a problem anyway.
+sed -i '1ivoid closefrom(int lowfd);' misc.c
+
+# use Slackware standard flags.
+# 20230919 bkw: _VIS thing just silences a meaningless warning. it's
+# meaningless because it only applies to strnvis() and strnunvis(),
+# neither of which is called by csh.
+sed -i "1iCFLAGS=$SLKCFLAGS -fcommon -DLIBBSD_OPENBSD_VIS" Makefile
# The LIBC= isn't even used, but Slackware64's pmake is broken: it has
# /usr/lib/libc.a hard-coded, and pmake wants to build that (and can't),
@@ -108,6 +133,11 @@ cd USD.doc
pmake paper.ps paper.txt
cd -
+# 20230919 bkw: word length is BUFSIZ (by default in 20230828_1, no
+# patching required). This is 8192 bytes on x86 and x86_64, so fix
+# the man page.
+sed -i '/Words can be no/s,1024,8192,' csh.1
+
# I think this is the first time I've ever seen 'make install' gzip the
# man pages and strip the binary! BSD FTW!
mkdir -p $PKG/usr/bin $PKG/usr/man/man1
@@ -119,11 +149,11 @@ pmake install DESTDIR=$PKG BINDIR=/usr/bin MANDIR=/usr/man
mkdir -p $PKG/etc
cat $CWD/csh.login > $PKG/etc/csh.login.new
-DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION
-mkdir -p $DOCDIR
-cp -a USD.doc/paper.* $DOCDIR
-cat $CWD/$PRGNAM.SlackBuild > $DOCDIR/$PRGNAM.SlackBuild
-cat $CWD/README_Slackware.txt > $DOCDIR/README_Slackware.txt
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a USD.doc/paper.* $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+cat $CWD/README_Slackware.txt > $PKGDOC/README_Slackware.txt
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc