desktop/j4-dmenu-desktop: Updated for version 3.1.

Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2024-08-13 14:53:17 -04:00 committed by Willy Sudiarto Raharjo
parent 9c37442194
commit c5ef7c6bbf
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 12 additions and 24 deletions

View file

@ -6,6 +6,7 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20240813 bkw: update for 3.1 release.
# 20201103 bkw: update for 2.18 release
# 20191128 bkw:
# - Update for 2.17 release.
@ -38,7 +39,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=j4-dmenu-desktop
VERSION=${VERSION:-2.18}
VERSION=${VERSION:-3.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -62,16 +63,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
@ -86,12 +83,6 @@ 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 {} \+
# For some reason, j4-dmenu-desktop uses "bash -i -c <command>" to execute
# the user's choice. bash -i means interactive shell... which causes it to
# hang if there's no controlling terminal. No idea why upstream wanted the -i
# option in the first place, I've asked but not gotten an answer.
sed -i '/execl(shell/s|"-i", *||' src/*.hh
# For users who don't use i3, let them pick the default terminal.
# If TERMINAL not set, and i3-sensible-terminal not installed, just
# default to xterm.
@ -104,12 +95,7 @@ fi
TERMINAL="${TERMINAL:-$DEFTERM}"
MANTERM="$( echo $TERMINAL | sed 's,-,\\\\-,g' )"
echo "Using TERMINAL=$TERMINAL"
sed -i "s,i3-sensible-terminal,$TERMINAL,g" src/Main.hh
# Don't use 'make install', it wants to run the tests, which require
# something called 'catch', which isn't shipped in the src (it tries to
# download it, but fails, and I can't make myself care why). For the same
# reason, have to use 'make $PRGNAM' instead of plain make.
sed -i "s,i3-sensible-terminal,$TERMINAL,g" src/main.cc
mkdir -p build
cd build
@ -117,15 +103,17 @@ cd build
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DNO_DOWNLOAD=ON \
-DWITH_TESTS=OFF \
-DCMAKE_BUILD_TYPE=Release ..
make $PRGNAM
mkdir -p $PKG/usr/bin
install -m0755 -s $PRGNAM $PKG/usr/bin/$PRGNAM
make install/strip DESTDIR=$PKG
cd ..
rm -rf $PKG/usr/share/man
# Tell the user what the default terminal is, in the man page.
mkdir -p $PKG/usr/man/man1
sed "s,to start terminal apps *\$,& (default: $MANTERM)," < $PRGNAM.1 | \
sed "s,to start terminal apps.*\$,& (default: $MANTERM)," < $PRGNAM.1 | \
gzip -9c > $PKG/usr/man/man1/$PRGNAM.1.gz
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION

View file

@ -1,8 +1,8 @@
PRGNAM="j4-dmenu-desktop"
VERSION="2.18"
VERSION="3.1"
HOMEPAGE="https://github.com/enkore/j4-dmenu-desktop"
DOWNLOAD="https://github.com/enkore/j4-dmenu-desktop/archive/r2.18/j4-dmenu-desktop-r2.18.tar.gz"
MD5SUM="5df37206da5daf8512d7582e277a9a4b"
DOWNLOAD="https://github.com/enkore/j4-dmenu-desktop/archive/r3.1/j4-dmenu-desktop-r3.1.tar.gz"
MD5SUM="423309bc7e6b0246bdabc143695e3ec0"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="dmenu"