summaryrefslogtreecommitdiff
path: root/wm/windowmaker
diff options
context:
space:
mode:
authorjlam <jlam>2001-07-15 08:48:01 +0000
committerjlam <jlam>2001-07-15 08:48:01 +0000
commit8b922c5340fa904cafff3ed7a0af8d548390cc1e (patch)
treed4c47ffae1c6fa26ca2e6122d807c48eacd09a29 /wm/windowmaker
parent69f5ca883439e52721eda425a9a259c4ac6acb0d (diff)
downloadpkgsrc-8b922c5340fa904cafff3ed7a0af8d548390cc1e.tar.gz
Fix several non-portable shell constructs:
(1) [ doesn't understand ==; use = instead. (2) i=${!tmp} is apparently intended to do the equivalent of eval i=\$$tmp; so use the latter instead. I don't see how this script ever worked before.
Diffstat (limited to 'wm/windowmaker')
-rw-r--r--wm/windowmaker/patches/patch-ag119
1 files changed, 119 insertions, 0 deletions
diff --git a/wm/windowmaker/patches/patch-ag b/wm/windowmaker/patches/patch-ag
new file mode 100644
index 00000000000..49de53ea732
--- /dev/null
+++ b/wm/windowmaker/patches/patch-ag
@@ -0,0 +1,119 @@
+$NetBSD: patch-ag,v 1.1 2001/07/15 08:48:01 jlam Exp $
+
+--- util/wsetfont.orig Mon Feb 19 20:28:11 2001
++++ util/wsetfont
+@@ -115,7 +115,7 @@
+
+ for i in $DomainNames; do
+ tmp="Domain$i"
+- AllKeys="$AllKeys ${!tmp}"
++ eval AllKeys="\"$AllKeys \$${tmp}\""
+ done
+
+ #
+@@ -212,8 +212,9 @@
+ family="default"
+ else
+ for i in $all_codings; do
+- for j in ${!i}; do
+- if [ "$j" == "${locale%_*}" ]; then
++ eval _i="\$$i"
++ for j in ${_i}; do
++ if [ "$j" = "${locale%_*}" ]; then
+ family="$i"
+ break 2
+ fi
+@@ -227,7 +228,7 @@
+ #
+ is_supported=""
+ for i in $Supported; do
+- if test "$family" == "$i"; then
++ if test "$family" = "$i"; then
+ is_supported="YES"
+ break
+ fi
+@@ -245,7 +246,7 @@
+ #
+ is_nodef_unable=""
+ for i in $NodefUnable; do
+- if test "$family" == "$i"; then
++ if test "$family" = "$i"; then
+ if test -n "$nodef"; then # --nodef with one from $NodefUnable
+ echo -e "\n"\
+ "Sorry, --nodef argument is not allowed for these font codings:\n"\
+@@ -268,22 +269,22 @@
+ for i in $AllKeys; do
+ if test -n "$is_nodef_unable"; then # japanese,... defaults
+ tmp="$family$i"
+- eval $i=${!tmp}
++ eval $i="\$${tmp}"
+ else # rest, load defaults
+ not_font=""
+ for j in $NotFont; do
+- if test "$i" == "$j"; then
++ if test "$i" = "$j"; then
+ not_font="YES"
+ break
+ fi
+ done
+ if test -n "$not_font"; then # don't append coding (not default!)
+ tmp="${family}$i"
+- eval $i="${!tmp}"
++ eval $i="\$${tmp}"
+ else # append coding
+ tmp="Default$i"
+ tmp1="${family}Coding"
+- eval $i="${!tmp}${!tmp1}"
++ eval $i="\$${tmp}\$${tmp1}"
+ fi
+ fi
+ done
+@@ -305,36 +306,36 @@
+ echo
+ echo "Setting up $i domain file..."
+ tmp="Domain$i"
+- for j in ${!tmp}; do
++ eval _tmp="\$${tmp}"
++ for j in ${_tmp}; do
+ if test -n "$nodef"; then # --nodef, change coding only
+ not_font=""
+ for k in $NotFont; do
+- if test "$k" == "$j"; then
++ if test "$k" = "$j"; then
+ not_font="YES"
+ break;
+ fi
+ done
+ if test -n "$not_font"; then # don't append coding
+ tmp1="${family}$j"
+- eval $j=${!tmp1}
++ eval $j="\$${tmp1}"
+ else # append coding
+ #TODO:make this funny sed script a lot smarter to let us make changes in font
+ # lists, etc... (then we can enable --nodef for NodefUnable codings)
+ #TODO:better (or at least any) check, whether wmaker is installed...
+ tmp1="${family}Coding"
+- eval $j=$($WDREAD $i $j | sed -e "s/\(^-.*-\).*-.*$/\1${!tmp1}/g")
+- if test -z "${!j}"; then # failed, load default
++ eval _tmp1="\$${tmp1}"
++ eval $j=$($WDREAD $i $j | sed -e "s/\(^-.*-\).*-.*$/\1${_tmp1}/g")
++ eval _j="\$$j"
++ if test -z "${_j}"; then # failed, load default
+ tmp2="Default$j"
+- eval $j=${!tmp2}
++ eval $j="\$${tmp2}"
+ fi
+ fi
+ fi
+- tmp1="$j=\"${!j}\"" # cosmetic length workaround
+- if (( ${#tmp1} > 80 )); then
+- tmp1=$(echo "${tmp1:0:76}...\"")
+- fi
+- echo "$tmp1"
+- $WDWRITE $i $j \"${!j}\"
++ eval _j="\$$j"
++ echo $j="${_j}"
++ $WDWRITE $i $j \"${_j}\"
+ done
+ done
+ echo