mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-22 19:44:21 +01:00
desktop/j4-dmenu-desktop: Updated for version 20140724.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
d36b85e518
commit
ba6e6c4f14
7 changed files with 72 additions and 16 deletions
|
@ -4,8 +4,9 @@ j4-dmenu-desktop is a replacement for i3-dmenu-desktop. Its purpose
|
|||
is to find .desktop files and offer you a menu to start an application
|
||||
using dmenu.
|
||||
|
||||
When j4-dmenu-desktop starts an application that runs in a terminal, by
|
||||
default it uses i3-sensible-terminal. If you'd rather use a different
|
||||
terminal emulator, set TERMINAL in the script's environment. Example:
|
||||
When j4-dmenu-desktop starts an application that runs in a terminal,
|
||||
by default it uses i3-sensible-terminal if it's installed on the build
|
||||
host, or xterm if not. If you'd rather use a different terminal emulator,
|
||||
set TERMINAL in the script's environment. Example:
|
||||
|
||||
# TERMINAL=xterm ./j4-dmenu-desktop.SlackBuild
|
||||
# TERMINAL=urxvt ./j4-dmenu-desktop.SlackBuild
|
||||
|
|
|
@ -133,7 +133,7 @@
|
|||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "J4-DMENU-DESKTOP 1"
|
||||
.TH J4-DMENU-DESKTOP 1 "2014-03-10" "20140310" "SlackBuilds.org"
|
||||
.TH J4-DMENU-DESKTOP 1 "2014-07-24" "20140724" "SlackBuilds.org"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
|
@ -159,7 +159,7 @@ Determines the command used to invoke dmenu. Default is \*(L"dmenu
|
|||
Display binary name after each entry (off by default).
|
||||
.IP "\-\-term=<command>" 4
|
||||
.IX Item "--term=<command>"
|
||||
Sets the terminal emulator used to start terminal apps. Default is _TERMINAL_.
|
||||
Sets the terminal emulator used to start terminal apps. Default is \fB_TERMINAL_\fR.
|
||||
.IP "\-\-help" 4
|
||||
.IX Item "--help"
|
||||
Display help message.
|
||||
|
|
|
@ -9,12 +9,19 @@
|
|||
# Zip file created with:
|
||||
# wget -O j4-dmenu-desktop-$(date +%Y%m%d).zip https://github.com/enkore/j4-dmenu-desktop/archive/master.zip
|
||||
|
||||
# 20140724 bkw: updated to 20140724 snapshot.
|
||||
# - Default to TERMINAL=xterm if i3-sensible-terminal not installed
|
||||
# on build host. Can still set TERMINAL in env to override.
|
||||
# - Fix hangs caused by using an interactive shell when there's no
|
||||
# controlling terminal. Thanks to crumb on ##slackware for the
|
||||
# bug report.
|
||||
|
||||
# 20140310 bkw: updated to 20140310 snapshot.
|
||||
# - Added man page
|
||||
# - Added default terminal selection
|
||||
|
||||
PRGNAM=j4-dmenu-desktop
|
||||
VERSION=${VERSION:-20140310}
|
||||
VERSION=${VERSION:-20140724}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
|
@ -60,8 +67,23 @@ find -L . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
# for users who don't use i3, let them pick the default terminal.
|
||||
TERMINAL="${TERMINAL:-i3-sensible-terminal}"
|
||||
# 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.
|
||||
patch -p1 < $CWD/no_interactive_shell.diff
|
||||
|
||||
# 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.
|
||||
if which i3-sensible-terminal &>/dev/null; then
|
||||
DEFTERM="i3-sensible-terminal"
|
||||
else
|
||||
DEFTERM="xterm"
|
||||
fi
|
||||
|
||||
TERMINAL="${TERMINAL:-$DEFTERM}"
|
||||
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
|
||||
|
@ -91,7 +113,7 @@ cp -a CHANGELOG LICENSE README.md $CWD/$PRGNAM.pod $PKG/usr/doc/$PRGNAM-$VERSION
|
|||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
sed "s,_TERMINAL_,$TERMINAL,g" $CWD/slack-desc > $PKG/install/slack-desc
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
PRGNAM="j4-dmenu-desktop"
|
||||
VERSION="20140310"
|
||||
VERSION="20140724"
|
||||
HOMEPAGE="http://www.j4tools.org/"
|
||||
DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/j4-dmenu-desktop-20140310.zip"
|
||||
DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/j4-dmenu-desktop-20140724.zip"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM="0132473fa2fcd03ed4d70d4ec8371890"
|
||||
MD5SUM="698d7ee1ae8e479ba5280af68df0d26f"
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES="dmenu"
|
||||
MAINTAINER="B. Watson"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# pod2man --stderr -r20140310 -s1 -cSlackBuilds.org -nJ4-DMENU-DESKTOP < j4-dmenu-desktop.pod > j4-dmenu-desktop.1
|
||||
# pod2man --stderr -r20140724 -s1 -cSlackBuilds.org j4-dmenu-desktop.pod > j4-dmenu-desktop.1
|
||||
|
||||
=pod
|
||||
|
||||
|
@ -31,7 +31,7 @@ Display binary name after each entry (off by default).
|
|||
|
||||
=item --term=<command>
|
||||
|
||||
Sets the terminal emulator used to start terminal apps. Default is _TERMINAL_.
|
||||
Sets the terminal emulator used to start terminal apps. Default is B<_TERMINAL_>.
|
||||
|
||||
=item --help
|
||||
|
||||
|
|
33
desktop/j4-dmenu-desktop/no_interactive_shell.diff
Normal file
33
desktop/j4-dmenu-desktop/no_interactive_shell.diff
Normal file
|
@ -0,0 +1,33 @@
|
|||
diff -Naur j4-dmenu-desktop-master/src/Applications.hh j4-dmenu-desktop-master.patched/src/Applications.hh
|
||||
--- j4-dmenu-desktop-master/src/Applications.hh 2014-05-27 07:02:41.000000000 -0400
|
||||
+++ j4-dmenu-desktop-master.patched/src/Applications.hh 2014-07-24 15:23:39.000000000 -0400
|
||||
@@ -44,10 +44,11 @@
|
||||
if((shell = getenv("SHELL")) == 0)
|
||||
shell = "/bin/sh";
|
||||
|
||||
- fprintf(stderr, "%s -i -c '%s'\n", shell, choice.c_str());
|
||||
+ fprintf(stderr, "%s -c '%s'\n", shell, choice.c_str());
|
||||
|
||||
// -i -c was tested with both bash and zsh.
|
||||
- exit(execl(shell, shell, "-i", "-c", choice.c_str(), 0));
|
||||
+ // 20140724 bkw: remove -i, it causes problems.
|
||||
+ exit(execl(shell, shell, "-c", choice.c_str(), 0));
|
||||
}
|
||||
|
||||
// +1 b/c there must be whitespace we add back later...
|
||||
diff -Naur j4-dmenu-desktop-master/src/Main.hh j4-dmenu-desktop-master.patched/src/Main.hh
|
||||
--- j4-dmenu-desktop-master/src/Main.hh 2014-05-27 07:02:41.000000000 -0400
|
||||
+++ j4-dmenu-desktop-master.patched/src/Main.hh 2014-07-24 15:28:38.000000000 -0400
|
||||
@@ -47,9 +47,10 @@
|
||||
if((shell = getenv("SHELL")) == 0)
|
||||
shell = "/bin/sh";
|
||||
|
||||
- fprintf(stderr, "%s -i -c '%s'\n", shell, command.c_str());
|
||||
+ fprintf(stderr, "%s -c '%s'\n", shell, command.c_str());
|
||||
|
||||
- return execl(shell, shell, "-i", "-c", command.c_str(), 0);
|
||||
+ // 20140724 bkw: get rid of -i, it causes problems.
|
||||
+ return execl(shell, shell, "-c", command.c_str(), 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -12,7 +12,7 @@ j4-dmenu-desktop: j4-dmenu-desktop is a replacement for i3-dmenu-desktop. Its pu
|
|||
j4-dmenu-desktop: is to find .desktop files and offer you a menu to start an application
|
||||
j4-dmenu-desktop: using dmenu.
|
||||
j4-dmenu-desktop:
|
||||
j4-dmenu-desktop:
|
||||
j4-dmenu-desktop: This package built with _TERMINAL_ as default terminal.
|
||||
j4-dmenu-desktop:
|
||||
j4-dmenu-desktop:
|
||||
j4-dmenu-desktop:
|
||||
|
|
Loading…
Reference in a new issue