diff options
-rw-r--r-- | desktop/j4-dmenu-desktop/README | 9 | ||||
-rw-r--r-- | desktop/j4-dmenu-desktop/j4-dmenu-desktop.1 | 4 | ||||
-rw-r--r-- | desktop/j4-dmenu-desktop/j4-dmenu-desktop.SlackBuild | 30 | ||||
-rw-r--r-- | desktop/j4-dmenu-desktop/j4-dmenu-desktop.info | 6 | ||||
-rw-r--r-- | desktop/j4-dmenu-desktop/j4-dmenu-desktop.pod | 4 | ||||
-rw-r--r-- | desktop/j4-dmenu-desktop/no_interactive_shell.diff | 33 | ||||
-rw-r--r-- | desktop/j4-dmenu-desktop/slack-desc | 2 |
7 files changed, 72 insertions, 16 deletions
diff --git a/desktop/j4-dmenu-desktop/README b/desktop/j4-dmenu-desktop/README index d23b69ad53..5389503ddf 100644 --- a/desktop/j4-dmenu-desktop/README +++ b/desktop/j4-dmenu-desktop/README @@ -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 diff --git a/desktop/j4-dmenu-desktop/j4-dmenu-desktop.1 b/desktop/j4-dmenu-desktop/j4-dmenu-desktop.1 index 1bb92f4307..9994141eb6 100644 --- a/desktop/j4-dmenu-desktop/j4-dmenu-desktop.1 +++ b/desktop/j4-dmenu-desktop/j4-dmenu-desktop.1 @@ -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. diff --git a/desktop/j4-dmenu-desktop/j4-dmenu-desktop.SlackBuild b/desktop/j4-dmenu-desktop/j4-dmenu-desktop.SlackBuild index 4501d44476..93dbf04ebb 100644 --- a/desktop/j4-dmenu-desktop/j4-dmenu-desktop.SlackBuild +++ b/desktop/j4-dmenu-desktop/j4-dmenu-desktop.SlackBuild @@ -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} diff --git a/desktop/j4-dmenu-desktop/j4-dmenu-desktop.info b/desktop/j4-dmenu-desktop/j4-dmenu-desktop.info index 8f95b77fd4..3db203cc5e 100644 --- a/desktop/j4-dmenu-desktop/j4-dmenu-desktop.info +++ b/desktop/j4-dmenu-desktop/j4-dmenu-desktop.info @@ -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" diff --git a/desktop/j4-dmenu-desktop/j4-dmenu-desktop.pod b/desktop/j4-dmenu-desktop/j4-dmenu-desktop.pod index 0d92f48a36..d881709ad2 100644 --- a/desktop/j4-dmenu-desktop/j4-dmenu-desktop.pod +++ b/desktop/j4-dmenu-desktop/j4-dmenu-desktop.pod @@ -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 diff --git a/desktop/j4-dmenu-desktop/no_interactive_shell.diff b/desktop/j4-dmenu-desktop/no_interactive_shell.diff new file mode 100644 index 0000000000..252130addc --- /dev/null +++ b/desktop/j4-dmenu-desktop/no_interactive_shell.diff @@ -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; + } diff --git a/desktop/j4-dmenu-desktop/slack-desc b/desktop/j4-dmenu-desktop/slack-desc index bc84c2f07c..3c9ba802de 100644 --- a/desktop/j4-dmenu-desktop/slack-desc +++ b/desktop/j4-dmenu-desktop/slack-desc @@ -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: |