]> git.pld-linux.org Git - packages/imsettings.git/blob - imsettings-no-bash.patch
- updated to 1.8.1
[packages/imsettings.git] / imsettings-no-bash.patch
1 --- imsettings-1.8.1/data/imsettings-functions.in.orig  2019-02-20 05:57:23.000000000 +0100
2 +++ imsettings-1.8.1/data/imsettings-functions.in       2019-05-20 20:46:25.377483510 +0200
3 @@ -23,7 +23,7 @@
4  LOGDIR="${XDG_CACHE_HOME:-$HOME/.cache}/imsettings"
5  LOGFILE="$LOGDIR/log"
6  
7 -function log_init() {
8 +log_init() {
9      if [ ! -n "$DRY_RUN" ]; then
10         if [ -f $HOME/.imsettings.log ]; then
11             mv $HOME/.imsettings.log $LOGFILE.bak
12 @@ -33,20 +33,20 @@
13      fi
14  }
15  
16 -function log() {
17 +log() {
18      echo "$@" >> $LOGFILE
19  }
20  
21 -function is_dbus_enabled() {
22 +is_dbus_enabled() {
23      @libexecdir[@]/imsettings-check --check-dbus
24      [ $? -eq 0 ]
25  }
26  
27 -function is_imsettings_enabled() {
28 +is_imsettings_enabled() {
29      [ -z "$DISABLE_IMSETTINGS" ] && is_dbus_enabled
30  }
31  
32 -function check_imsettings_capability() {
33 +check_imsettings_capability() {
34      mod=$1
35      @libexecdir[@]/imsettings-check --check-modules >/dev/null
36      ret=$?
37 @@ -57,7 +57,7 @@
38      return $ret
39  }
40  
41 -function lookup_desktop() {
42 +lookup_desktop() {
43      ret=$(cat $1)
44      case $ret in
45         cinnamon*)
46 @@ -84,7 +84,7 @@
47      esac
48  }
49  
50 -function get_desktop() {
51 +get_desktop() {
52      if [ -n "$XDG_CURRENT_DESKTOP" ]; then
53         GUESS_DESKTOP="\$XDG_CURRENT_DESKTOP"
54         echo "$XDG_CURRENT_DESKTOP"
55 @@ -117,7 +117,7 @@
56      fi
57  }
58  
59 -function is_gtk_supported() {
60 +is_gtk_supported() {
61      [ -n "$IMSETTINGS_DISABLE_DESKTOP_CHECK" ] && return 0
62      case "$(get_desktop|tr '[A-Z]' '[a-z]')" in
63         cinnamon*)
64 @@ -152,7 +152,7 @@
65      return 1
66  }
67  
68 -function is_qt_supported() {
69 +is_qt_supported() {
70      [ -n "$IMSETTINGS_DISABLE_DESKTOP_CHECK" ] && return 0
71      case "$(get_desktop|tr '[A-Z]' '[a-z]')" in
72         *)
73 @@ -165,7 +165,7 @@
74      return 1
75  }
76  
77 -function is_xim_supported() {
78 +is_xim_supported() {
79      [ -n "$IMSETTINGS_DISABLE_DESKTOP_CHECK" ] && return 0
80      if check_imsettings_capability xim; then
81         return 0
82 @@ -174,12 +174,12 @@
83      return 1
84  }
85  
86 -function is_desktop_supported() {
87 +is_desktop_supported() {
88      @libexecdir[@]/imsettings-check --check-desktop $(get_desktop) >/dev/null
89      [ $? -eq 0 ]
90  }
91  
92 -function setup_gtk_immodule() {
93 +setup_gtk_immodule() {
94      if is_imsettings_enabled && is_gtk_supported; then
95         # Ensure GTK_IM_MODULE is empty. otherwise GTK+ doesn't pick up immodule through XSETTINGS
96         unset GTK_IM_MODULE
97 @@ -189,7 +189,7 @@
98      fi
99  }
100  
101 -function setup_qt_immodule() {
102 +setup_qt_immodule() {
103      if is_imsettings_enabled && is_qt_supported; then
104         # FIXME: Qt doesn't support XSETTINGS for immodule yet.
105         #        We still need to go with the older way.
106 @@ -199,7 +199,7 @@
107      fi
108  }
109  
110 -function setup_xim() {
111 +setup_xim() {
112      if is_imsettings_enabled && is_xim_supported; then
113         # setup XMODIFIERS
114         XMODIFIERS="@im=imsettings"
115 @@ -210,7 +210,7 @@
116      fi
117  }
118  
119 -function run_imsettings() {
120 +run_imsettings() {
121      print_info
122      if [ -n "$DRY_RUN" ]; then
123         log "*** DRY RUN MODE: running IM through imsettings"
124 @@ -225,7 +225,7 @@
125      fi
126  }
127  
128 -function run_xim() {
129 +run_xim() {
130      print_info
131      if [ -n "$DRY_RUN" ]; then
132         log "*** DRY RUN MODE: running IM without imsettings"
133 @@ -238,7 +238,7 @@
134      fi
135  }
136  
137 -function print_result() {
138 +print_result() {
139      $1
140      if [ $? -eq 0 ]; then
141         log yes
142 @@ -247,7 +247,7 @@
143      fi
144  }
145  
146 -function print_info() {
147 +print_info() {
148      log "imsettings information"
149      log "=========================="
150      log "XINPUTRC: $READ_XINPUTRC"
151 --- imsettings-1.5.0/data/xinput.sh.in.in.orig  2012-11-25 18:33:02.248463652 +0100
152 +++ imsettings-1.5.0/data/xinput.sh.in.in       2012-11-25 18:47:20.531779098 +0100
153 @@ -1,4 +1,4 @@
154 -#!/bin/bash
155 +#!/bin/sh
156  # Copyright (C) 1999-2004,2007-2011 Red Hat, Inc. All rights reserved. This
157  # copyrighted material is made available to anyone wishing to use, modify,
158  # copy, or redistribute it subject to the terms and conditions of the
159 @@ -257,13 +257,13 @@
160  unset TERM
161  if [ -r /etc/profile.d/lang.sh ]; then
162      # for Fedora etc
163 -    source /etc/profile.d/lang.sh
164 +    . /etc/profile.d/lang.sh
165  elif [ -r /etc/default/locale ]; then
166      # for Debian
167 -    source /etc/default/locale
168 +    . /etc/default/locale
169  elif [ -r /etc/env.d/02locale ]; then
170      # for Gentoo
171 -    source /etc/env.d/02locale
172 +    . /etc/env.d/02locale
173  fi
174  [ -n "$oldterm" ] && export TERM=$oldterm
175  
176 @@ -280,7 +280,7 @@
177  [ -f "$HOME/.xinputrc.bak" ] && mv $HOME/.xinputrc.bak $CONFIGDIR/xinputrc.bak
178  
179  if [ -r "$USER_XINPUTRC" -a "x$IMSETTINGS_DISABLE_USER_XINPUTRC" = "xno" ]; then
180 -    source "$USER_XINPUTRC"
181 +    . "$USER_XINPUTRC"
182      READ_XINPUTRC=$USER_XINPUTRC
183      if [ ! -h "$USER_XINPUTRC" ]; then
184         SHORT_DESC="User Specific"
185 @@ -292,7 +292,7 @@
186      _sourced_xinputrc=0
187      for i in $_im_language_list; do
188          if echo $tmplang | grep -q -E "^$i"; then
189 -            source "$SYS_XINPUTRC"
190 +            . "$SYS_XINPUTRC"
191              READ_XINPUTRC=$SYS_XINPUTRC
192              _sourced_xinputrc=1
193              break
194 @@ -304,7 +304,7 @@
195          _xcompose_language_list="am_ET el_GR fi_FI pt_BR ru_RU"
196          for i in $_xcompose_language_list; do
197              if echo $tmplang | grep -q -E "^$i"; then
198 -                source @XINPUT_PATH@/xcompose.conf
199 +                . @XINPUT_PATH@/xcompose.conf
200                  _sourced_xinputrc=1
201                  break
202              fi
203 @@ -312,7 +312,7 @@
204      fi
205      if [ $_sourced_xinputrc -eq 0 ]; then
206          # Read none.conf to set up properly for locales not listed the above.
207 -        source @XINPUT_PATH@/none.conf
208 +        . @XINPUT_PATH@/none.conf
209      fi
210  fi
211  
212 --- imsettings-1.8.1/data/xinputinfo.sh.in.orig 2019-02-20 05:32:55.000000000 +0100
213 +++ imsettings-1.8.1/data/xinputinfo.sh.in      2019-05-20 20:47:06.287261883 +0200
214 @@ -1,4 +1,4 @@
215 -#!/bin/bash
216 +#!/bin/sh
217  # xinputinfo.sh
218  # Copyright (C) 2008-2012 Red Hat, Inc. All rights reserved.
219  
220 @@ -20,7 +20,7 @@
221  # Free Software Foundation, Inc., 51 Franklin Street, Fifth
222  # Floor, Boston, MA  02110-1301  USA
223  
224 -function is_script() {
225 +is_script() {
226      if [ "x$(sed -re '/^[      ]?*[a-zA-Z0-9_]+=.*/{d};/[      ]?*#.*/{d}' $1)" = "x" ]; then
227         return 1
228      else
229 @@ -37,13 +37,13 @@
230  unset TERM
231  if [ -r /etc/profile.d/lang.sh ]; then
232      # for Fedora etc
233 -    source /etc/profile.d/lang.sh
234 +    . /etc/profile.d/lang.sh
235  elif [ -r /etc/default/locale ]; then
236      # for Debian
237 -    source /etc/default/locale
238 +    . /etc/default/locale
239  elif [ -r /etc/env.d/02locale ]; then
240      # for Gentoo
241 -    source /etc/env.d/02locale
242 +    . /etc/env.d/02locale
243  fi
244  [ -n "$oldterm" ] && export TERM=$oldterm
245  
246 @@ -53,17 +53,17 @@
247  unset AUXILIARY_PROGRAM AUXILIARY_ARGS GTK_IM_MODULE ICON IMSETTINGS_IGNORE_ME LONG_DESC NOT_RUN PREFERENCE_PROGRAM PREFERENCE_ARGS QT_IM_MODULE SHORT_DESC XIM XIM_PROGRAM XIM_ARGS IS_XIM
248  
249  if [ $# -gt 0 ]; then
250 -    source $1
251 +    . $1
252      IMSETTINGS_FILENAME=$1
253  else
254      [ -z "${IMSETTINGS_DISABLE_USER_XINPUTRC-}" ] && IMSETTINGS_DISABLE_USER_XINPUTRC=no
255      [ -z "${IMSETTINGS_DISABLE_SYS_XINPUTRC-}" ] && IMSETTINGS_DISABLE_SYS_XINPUTRC=no
256  
257      if [ -r "$USER_XINPUTRC" -a "x$IMSETTINGS_DISABLE_USER_XINPUTRC" = "xno" ]; then
258 -       source "$USER_XINPUTRC"
259 +       . "$USER_XINPUTRC"
260         IMSETTINGS_FILENAME=$USER_XINPUTRC
261      elif [ -r "$SYS_XINPUTRC" -a "x$IMSETTINGS_DISABLE_SYS_XINPUTRC" = "xno" ]; then
262 -       source "$SYS_XINPUTRC"
263 +       . "$SYS_XINPUTRC"
264         IMSETTINGS_FILENAME=$SYS_XINPUTRC
265      fi
266  fi
267 --- imsettings-1.6.3/data/imsettings-target-checker.sh.in~      2013-05-27 05:39:15.000000000 +0200
268 +++ imsettings-1.6.3/data/imsettings-target-checker.sh.in       2013-07-15 08:12:17.339869611 +0200
269 @@ -1,4 +1,4 @@
270 -#! /bin/bash
271 +#!/bin/sh
272  # imsettings-target-checker.sh
273  # Copyright (C) 2013 Akira TAGOH
274  #
This page took 0.091092 seconds and 3 git commands to generate.