summaryrefslogtreecommitdiff
path: root/x11-wm
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2009-05-12 16:42:22 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2009-05-12 16:42:22 +0000
commit31900b144a6fb0f2af8ad1143f26834f8f96aa4b (patch)
treed043aadaa8f5c122bec4559752e4a997844b82bd /x11-wm
parentSort pkg-plist and remove stale dependency. (diff)
- Fix bashisms and eliminate (implicit) bash requirement
PR: 134477 Submitted by: Guillermo Antonio Amaral Bastidas <gamaral at amaral dot com dot mx> Fix by: Nikos Ntarmos <ntarmos at cs dot uoi dot gr> (maintainer)
Notes
Notes: svn path=/head/; revision=233785
Diffstat (limited to 'x11-wm')
-rw-r--r--x11-wm/awesome/Makefile4
-rw-r--r--x11-wm/awesome/files/patch-build-utils-gperf.sh54
-rw-r--r--x11-wm/awesome/files/patch-lib-awful-util.lua.in22
-rw-r--r--x11-wm/awesome/files/patch-utils-awesome-client21
4 files changed, 101 insertions, 0 deletions
diff --git a/x11-wm/awesome/Makefile b/x11-wm/awesome/Makefile
index d07137ea0a6b..a0500bc1d801 100644
--- a/x11-wm/awesome/Makefile
+++ b/x11-wm/awesome/Makefile
@@ -7,6 +7,7 @@
PORTNAME= awesome
DISTVERSION= 3.3-rc2
+PORTREVISION= 1
CATEGORIES= x11-wm
MASTER_SITES= http://awesome.naquadah.org/download/ \
http://redundancy.redundancy.org/mirror/
@@ -74,4 +75,7 @@ pre-configure:
${WRKSRC}/awesomeConfig.cmake
.endif
+post-patch:
+ @${RM} ${WRKSRC}/lib/awful/util.lua.in.orig
+
.include <bsd.port.post.mk>
diff --git a/x11-wm/awesome/files/patch-build-utils-gperf.sh b/x11-wm/awesome/files/patch-build-utils-gperf.sh
new file mode 100644
index 000000000000..b503fc367d64
--- /dev/null
+++ b/x11-wm/awesome/files/patch-build-utils-gperf.sh
@@ -0,0 +1,54 @@
+--- build-utils/gperf.sh.orig
++++ build-utils/gperf.sh
+@@ -1,4 +1,4 @@
+-#! /bin/sh -e
++#!/bin/sh
+ #
+ # Copyright © 2008 Pierre Habouzit <madcoder@debian.org>
+ #
+@@ -50,7 +50,7 @@ do_h() {
+
+ typedef enum awesome_token_t {
+ A_TK_UNKNOWN,
+-`tr 'a-z-./ ' 'A-Z____' | sed -e "s/^[^/].*/ A_TK_&,/"`
++`tr '[:lower:]' '[:upper:]' | sed -e "s/^[^/].*/ A_TK_&,/"`
+ } awesome_token_t;
+
+ __attribute__((pure)) enum awesome_token_t a_tokenize(const char *s, int len);
+@@ -63,20 +63,21 @@ do_tokens() {
+ case "$tok" in
+ "") continue;;
+ *)
+- echo "$tok, A_TK_`echo $tok | tr 'a-z-./ ' 'A-Z____'`"
++ echo "$tok, A_TK_`echo $tok | tr '[:lower:]' '[:upper:]'`"
+ ;;
+ esac
+ done
+ }
+
+ do_c() {
+- if ! which gperf > /dev/null; then
++ which gperf > /dev/null
++ if test $? = 1 ; then
+ echo "gperf not found. You need to install gperf." > /dev/stderr;
+ exit 1;
+ fi;
+
+- cat <<EOF | gperf -l -t -C -F",0" \
+- --language=ANSI-C -Na_tokenize_aux \
++ gperf -l -t -C -F",0" \
++ --language=ANSI-C -Na_tokenize_aux <<EOF \
+ | sed -e '/__gnu_inline__/d;s/\<\(__\|\)inline\>//g'
+ %{
+ `do_hdr`
+@@ -119,8 +120,8 @@ trap "rm -f ${TARGET}" 0
+
+ rm -f "${TARGET}"
+ case "${TARGET}" in
+- *.h) cat "${TOKENS_FILE}" | do_h > "${TARGET}";;
+- *.c) cat "${TOKENS_FILE}" | do_c > "${TARGET}";;
++ *.h) do_h > "${TARGET}" < "${TOKENS_FILE}" ;;
++ *.c) do_c > "${TARGET}" < "${TOKENS_FILE}" ;;
+ *) die "you must ask for the 'h' or 'c' generation";;
+ esac
+ chmod -w "${TARGET}"
diff --git a/x11-wm/awesome/files/patch-lib-awful-util.lua.in b/x11-wm/awesome/files/patch-lib-awful-util.lua.in
new file mode 100644
index 000000000000..7e89ce0dda47
--- /dev/null
+++ b/x11-wm/awesome/files/patch-lib-awful-util.lua.in
@@ -0,0 +1,22 @@
+--- lib/awful/util.lua.in.orig
++++ lib/awful/util.lua.in
+@@ -26,6 +26,8 @@ module("awful.util")
+
+ table = {}
+
++shell = os.getenv("SHELL") or "/bin/sh"
++
+ function deprecate(see)
+ io.stderr:write("W: awful: function is deprecated")
+ if see then
+@@ -79,10 +81,6 @@ end
+ -- @param screen The screen where to run the command.
+ function spawn_with_shell(cmd, screen)
+ if cmd and cmd ~= "" then
+- -- Get the shell once for all
+- if not shell then
+- shell = os.getenv("SHELL") or "/bin/sh"
+- end
+ cmd = shell .. " -c \"" .. cmd .. "\""
+ return capi.awesome.spawn(cmd, false, screen or capi.mouse.screen)
+ end
diff --git a/x11-wm/awesome/files/patch-utils-awesome-client b/x11-wm/awesome/files/patch-utils-awesome-client
new file mode 100644
index 000000000000..67cecf738b05
--- /dev/null
+++ b/x11-wm/awesome/files/patch-utils-awesome-client
@@ -0,0 +1,21 @@
+--- utils/awesome-client.orig
++++ utils/awesome-client
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ # rlwrap provides readline to stuff which doesn't know readline by itself
+ RLWRAP=`which rlwrap 2>/dev/null`
+@@ -15,9 +15,11 @@ fi
+
+ DBUS_SEND=dbus-send
+
+-if ! which ${DBUS_SEND} >/dev/null 2>&1
++which ${DBUS_SEND} > /dev/null
++if test $? = 1
+ then
+ echo "E: Unable to find" ${DBUS_SEND}
++ exit 1
+ fi
+
+ DBUS_METHOD=org.awesome.Remote.Eval