summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Phillip Warner2011-07-26 06:27:41 +0200
committer Niels Horn2011-08-12 01:28:35 +0200
commit2cbbd42d56388488e99dcdb0a4b630111fa4b5d0 (patch)
tree16a4d6c115aea710548ddd291c47391a7eaf176b
parentb05b92f5b977c14e74f384af25ff5d65b9acdf8d (diff)
downloadslackbuilds-2cbbd42d56388488e99dcdb0a4b630111fa4b5d0.tar.gz
desktop/dmenu: Revert to the dmenu_path script from 4.1.1
The dmenu_path in dmenu 4.3.1 seems to be picking up non-executables on my system. I was thinking of waiting until upstream fixes this, but there is still some churn going on regarding the dmenu_run/path scripts. I figured it would be better to get this small fix out there in the mean time. Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
-rw-r--r--desktop/dmenu/dmenu.SlackBuild8
-rw-r--r--desktop/dmenu/dmenu.info2
-rw-r--r--desktop/dmenu/dmenu_path26
3 files changed, 32 insertions, 4 deletions
diff --git a/desktop/dmenu/dmenu.SlackBuild b/desktop/dmenu/dmenu.SlackBuild
index d80cce71a6..6d545e0df9 100644
--- a/desktop/dmenu/dmenu.SlackBuild
+++ b/desktop/dmenu/dmenu.SlackBuild
@@ -25,15 +25,13 @@
PRGNAM=dmenu
VERSION=4.3.1
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -84,6 +82,10 @@ make install \
X11LIB=/usr/lib${LIBDIRSUFFIX}/X11 \
DESTDIR=$PKG
+# Use older (version 4.1.1) dmenu_path that actually works properly
+# Shouldn't be needed after upstream fixes this
+cat $CWD/dmenu_path > $PKG/usr/bin/dmenu_path
+
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
diff --git a/desktop/dmenu/dmenu.info b/desktop/dmenu/dmenu.info
index 14997c0e0a..f1c62bea52 100644
--- a/desktop/dmenu/dmenu.info
+++ b/desktop/dmenu/dmenu.info
@@ -7,4 +7,4 @@ DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
MAINTAINER="Phillip Warner"
EMAIL="pc_warner@yahoo.com"
-APPROVED="dsomero"
+APPROVED="rworkman"
diff --git a/desktop/dmenu/dmenu_path b/desktop/dmenu/dmenu_path
new file mode 100644
index 0000000000..7896a9e957
--- /dev/null
+++ b/desktop/dmenu/dmenu_path
@@ -0,0 +1,26 @@
+#!/bin/sh
+CACHE=$HOME/.dmenu_cache
+IFS=:
+
+uptodate() {
+ test -f "$CACHE" &&
+ for dir in $PATH
+ do
+ test ! $dir -nt "$CACHE" || return 1
+ done
+}
+
+if ! uptodate
+then
+ for dir in $PATH
+ do
+ cd "$dir" &&
+ for file in *
+ do
+ test -x "$file" && echo "$file"
+ done
+ done | sort | uniq > "$CACHE".$$ &&
+ mv "$CACHE".$$ "$CACHE"
+fi
+
+cat "$CACHE"