aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-08-11 16:43:57 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-08-17 18:14:14 +0700
commit783d127a0814c0f158dd807e2496a3af74eb7f32 (patch)
tree1dc58221c65a7da9625d29d5bb8301a9c5a9c954
parent3d8203937b8688382c5b2dc8a8f83b68ca3a8dc3 (diff)
desktop/cmatrix: New maintainer.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--desktop/cmatrix/cmatrix-1.2a-find_fonts.diff67
-rw-r--r--desktop/cmatrix/cmatrix.SlackBuild54
-rw-r--r--desktop/cmatrix/cmatrix.info4
-rw-r--r--desktop/cmatrix/doinst.sh2
4 files changed, 28 insertions, 99 deletions
diff --git a/desktop/cmatrix/cmatrix-1.2a-find_fonts.diff b/desktop/cmatrix/cmatrix-1.2a-find_fonts.diff
deleted file mode 100644
index 429b48701f..0000000000
--- a/desktop/cmatrix/cmatrix-1.2a-find_fonts.diff
+++ /dev/null
@@ -1,67 +0,0 @@
-diff -Nur cmatrix-1.2a.orig/configure cmatrix-1.2a/configure
---- cmatrix-1.2a.orig/configure 2002-03-31 19:17:59.000000000 -0600
-+++ cmatrix-1.2a/configure 2009-09-06 23:43:05.089753804 -0500
-@@ -1876,7 +1876,7 @@
- if test x$CONSOLECHARS != x -o x$CONSOLECHARS != x'"$CONSOLECHARS"'; then
- if test x$SETFONT != x -o x$SETFONT != x'"$SETFONT"'; then
-
-- for ac_file in /usr/lib/kbd/consolefonts /usr/share/consolefonts
-+ for ac_file in /usr/lib/kbd/consolefonts /usr/share/consolefonts /usr/share/kbd/consolefonts
- do
-
- ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
-@@ -1911,15 +1911,17 @@
-
- if test "x$ac_cv_file__usr_lib_kbd_consolefonts" = "xno"; then
- if test "x$ac_cv_file__usr_share_consolefonts" = "xno"; then
-- echo "configure: warning:
-+ if test "x$ac_cv_file__usr_share_kbd_consolefonts" = "xno"; then
-+ echo "configure: warning:
-
- *** You do not appear to have a consolefonts directory in a standard location
--*** (/usr/lib/kbd or /usr/share), even though you appear to have the
-+*** (/usr/lib/kbd or /usr/share/kbd or /usr/share), even though you appear to have the
- *** consolechars and/or setfont command. The matrix font for the console
- *** will not be installed. This means you will not be able to use the
- *** matrix console font (and the -l command line switch) unless the font
- *** is located in your current directory when you run CMatrix.
- " 1>&2
-+ fi
- fi
- fi
- fi
-@@ -1962,7 +1964,7 @@
- echo "$ac_t""no" 1>&6
- fi
-
--for ac_file in /usr/lib/X11/fonts/misc /usr/X11R6/lib/X11/fonts/misc
-+for ac_file in /usr/lib/X11/fonts/misc /usr/X11R6/lib/X11/fonts/misc /usr/share/fonts/misc
- do
-
- ac_safe=`echo "$ac_file" | sed 'y%./+-%__p_%'`
-@@ -1997,17 +1999,19 @@
-
- if test "x$ac_cv_file__usr_lib_X11_fonts_misc" = "xno"; then
- if test "x$ac_cv_file__usr_X11R6_lib_X11_fonts_misc" = "xno"; then
-- echo "configure: warning:
-+ if test "x$ac_cv_file__usr_share_fonts_misc" = "xno"; then
-+ echo "configure: warning:
-
- *** You do not appear to have an X window fonts directory in the standard
--*** locations (/usr/lib/X11/fonts/misc or /usr/X11R6/lib/X11/fonts/misc). The
--*** mtx.pcf font will not be installed. This means you will probably not
--*** be able to use the mtx fonts in your x terminals, and hence be unable
--*** to use the -x command line switch. Sorry about that...
-+*** locations (/usr/lib/X11/fonts/misc or /usr/X11R6/lib/X11/fonts/misc or
-+*** /usr/share/fonts/misc). The mtx.pcf font will not be installed. This
-+*** means you will probably not be able to use the mtx fonts in your x
-+*** terminals, and hence be unable to use the -x command line switch.
-+*** Sorry about that...
- " 1>&2
- fi
- fi
--
-+fi
-
- LIBS="$LIBS $CURSES_LIB"
- # Check whether --enable-debug or --disable-debug was given.
diff --git a/desktop/cmatrix/cmatrix.SlackBuild b/desktop/cmatrix/cmatrix.SlackBuild
index ba636deeb3..3be24327b4 100644
--- a/desktop/cmatrix/cmatrix.SlackBuild
+++ b/desktop/cmatrix/cmatrix.SlackBuild
@@ -1,13 +1,28 @@
#!/bin/bash
# Slackware build script for cmatrix
-# Written by Phillip Warner <pc_warner@yahoo.com>
+# Originally written by Phillip Warner <email removed>
+# Now maintained by B. Watson <urchlay@slackware.uk>
+
+# Original version of the script had no license. This version is
+# licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+# Note: there is an updated fork of cmatrix here:
+# https://github.com/abishekvashok/cmatrix/
+# ...but I didn't package it because "cmatrix -l" doesn't work in
+# that version (shows only + - ^ characters instead of Japanese).
+
+# 20240811 bkw, BUILD=3:
+# - new maintainer.
+# - add WTFPL license.
+# - gzip the pcf font.
+# - remove cmatrix-1.2a-find_fonts.diff (it wasn't needed).
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=cmatrix
VERSION=${VERSION:-1.2a}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -19,9 +34,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -54,14 +66,8 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
-# Patch configure to find the fonts correctly
-patch -p1 < $CWD/cmatrix-1.2a-find_fonts.diff
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -71,28 +77,16 @@ CXXFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
- --disable-static \
--build=$ARCH-slackware-linux
make
# Manual install - patching the Makefile not worth it
-install -D -m 0755 $TMP/$PRGNAM-$VERSION/cmatrix \
- $PKG/usr/bin/cmatrix
-install -D -m 0644 $TMP/$PRGNAM-$VERSION/cmatrix.1 \
- $PKG/usr/man/man1/cmatrix.1
-install -D -m 0644 $TMP/$PRGNAM-$VERSION/matrix.fnt \
- $PKG/usr/share/kbd/consolefonts/matrix.fnt
-install -D -m 0644 $TMP/$PRGNAM-$VERSION/matrix.psf.gz \
- $PKG/usr/share/kbd/consolefonts/matrix.psf.gz
-install -D -m 0644 $TMP/$PRGNAM-$VERSION/mtx.pcf \
- $PKG/usr/share/fonts/misc/mtx.pcf
-
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-# Compress the man page
-gzip -9 $PKG/usr/man/man1/cmatrix.1
+mkdir -p $PKG/usr/{bin,man/man1,share/{kbd/consolefonts,fonts/misc}}
+install -s $PRGNAM $PKG/usr/bin
+cp -a matrix.fnt matrix.psf.gz $PKG/usr/share/kbd/consolefonts
+gzip -9c < cmatrix.1 > $PKG/usr/man/man1/cmatrix.1.gz
+gzip -9c < mtx.pcf > $PKG/usr/share/fonts/misc/mtx.pcf.gz
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING README ChangeLog NEWS TODO $PKG/usr/doc/$PRGNAM-$VERSION
diff --git a/desktop/cmatrix/cmatrix.info b/desktop/cmatrix/cmatrix.info
index cc7885e917..fdfc036429 100644
--- a/desktop/cmatrix/cmatrix.info
+++ b/desktop/cmatrix/cmatrix.info
@@ -6,5 +6,5 @@ MD5SUM="ebfb5733104a258173a9ccf2669968a1"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
-MAINTAINER="Phillip Warner"
-EMAIL="pc_warner@yahoo.com"
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/desktop/cmatrix/doinst.sh b/desktop/cmatrix/doinst.sh
index c9973502ab..87f5707c46 100644
--- a/desktop/cmatrix/doinst.sh
+++ b/desktop/cmatrix/doinst.sh
@@ -7,6 +7,8 @@ if [ -x /usr/bin/mkfontdir ]; then
)
fi
+xset fp rehash &>/dev/null
+
# Update the X font indexes:
if [ -x /usr/bin/fc-cache ]; then
/usr/bin/fc-cache -f