aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-01-21 21:37:25 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2025-01-25 09:03:37 +0700
commitec16563710c6a9c40d0e0edbc07b2206853cf2b3 (patch)
tree9b7c077554a8ef0ba27cbc73234f93942cc88019
parentace29589cdb4c910a0e141f259800f823d418f3e (diff)
desktop/xtrlock: Updated for version 2.16.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--desktop/xtrlock/manpage.diff14
-rw-r--r--desktop/xtrlock/xtrlock.SlackBuild48
-rw-r--r--desktop/xtrlock/xtrlock.info6
3 files changed, 50 insertions, 18 deletions
diff --git a/desktop/xtrlock/manpage.diff b/desktop/xtrlock/manpage.diff
new file mode 100644
index 0000000000..d974e3198f
--- /dev/null
+++ b/desktop/xtrlock/manpage.diff
@@ -0,0 +1,14 @@
+diff -Naur xtrlock-2.16/xtrlock.man xtrlock-2.16.patched/xtrlock.man
+--- xtrlock-2.16/xtrlock.man 2025-01-03 12:34:41.000000000 -0500
++++ xtrlock-2.16.patched/xtrlock.man 2025-01-21 19:42:41.791013326 -0500
+@@ -44,9 +44,9 @@
+ \fB\-f\fR
+ fork after locking is complete, and return success from the parent
+ process
++.TP
+ \fB\-F\fR
+ force lock, e.g. if there is no password set.
+-process
+ .SH X RESOURCES, CONFIGURATION
+ None.
+ .SH BUGS
diff --git a/desktop/xtrlock/xtrlock.SlackBuild b/desktop/xtrlock/xtrlock.SlackBuild
index d46e990a75..bb589ec722 100644
--- a/desktop/xtrlock/xtrlock.SlackBuild
+++ b/desktop/xtrlock/xtrlock.SlackBuild
@@ -6,16 +6,22 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20250121 bkw: updated for v2.16, which has actual new features.
+# - build with XInput (multitouch) support.
+# - build with capabilities (libcap) support.
+# - fix formatting in man page.
+# - silence compiler warnings.
+
# 20210219 bkw: updated for v2.15.
# 20201208 bkw: updated for v2.14, although the only changes
-# since 2.13 are in the debian packagaing (which we don't/can't
+# since 2.13 are in the debian packaging (which we don't/can't
# use). Basically just updating it to avoid people asking for it to
# be updated.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=xtrlock
-VERSION=${VERSION:-2.15}
+VERSION=${VERSION:-2.16}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -39,16 +45,12 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
fi
set -e
@@ -60,24 +62,40 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/${PRGNAM}_$VERSION.tar.xz
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 {} \+
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
# work around slack 14.2 bug (only happens when upgrading from 14.2):
touch host.def
+# 20250121 bkw: fix formatting of new -F option in man page.
+patch -p1 < $CWD/manpage.diff
+
+# 20250121 bkw: build with capabilities and "multitouch" (XInput
+# extension), which attempts to grab multitouch devices which are not
+# intercepted via XGrabPointer. Matches how Debian packages it.
+sed -i '/^SingleProgramTarget/s,-lX11,& -lcap -lXi,' Imakefile
+OPTS="$SLKCFLAGS -DSHADOW_PWD -DLIBCAP -DMULTITOUCH"
+
xmkmf -a
+
+# 20250121 bkw: get rid of deprecation warnings caused by xmkmf.
+sed -i -e 's/-D_BSD_SOURCE//g' \
+ -e 's/-D_SVID_SOURCE/-D_DEFAULT_SOURCE/g' \
+ Makefile
+
make
-make install install.man DESTDIR=$PKG CCOPTIONS="$SLKCFLAGS -DSHADOW_PWD"
-for i in $PKG/usr/bin/$PRGNAM; do
- strip $i
- chown root:shadow $i
- chmod 2751 $i
-done
+make install install.man DESTDIR=$PKG CCOPTIONS="$OPTS"
+
+i=$PKG/usr/bin/$PRGNAM
+strip $i
+chown root:shadow $i
+chmod 2751 $i
+
gzip -9 $PKG/usr/man/man1/$PRGNAM.1x
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a *.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a *.txt debian/changelog $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/desktop/xtrlock/xtrlock.info b/desktop/xtrlock/xtrlock.info
index bed39ed8f9..f6a72437c2 100644
--- a/desktop/xtrlock/xtrlock.info
+++ b/desktop/xtrlock/xtrlock.info
@@ -1,8 +1,8 @@
PRGNAM="xtrlock"
-VERSION="2.15"
+VERSION="2.16"
HOMEPAGE="https://packages.debian.org/sid/xtrlock"
-DOWNLOAD="https://deb.debian.org/debian/pool/main/x/xtrlock/xtrlock_2.15.tar.xz"
-MD5SUM="3b481c63bc3d7b05d3adce388bc79762"
+DOWNLOAD="https://deb.debian.org/debian/pool/main/x/xtrlock/xtrlock_2.16.tar.xz"
+MD5SUM="a6ea35b53611c2bdb38cdc8b85dc028d"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""