diff --git a/emacs.changes b/emacs.changes index e116006..c1ff71f 100644 --- a/emacs.changes +++ b/emacs.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Feb 26 12:51:56 UTC 2016 - werner@suse.de + +- Add small shell extension in emacs wrapper script to disable the + AT bridge if not available + ------------------------------------------------------------------- Tue Feb 2 14:18:51 UTC 2016 - normand@linux.vnet.ibm.com diff --git a/emacs.sh b/emacs.sh index fe9b328..90664b8 100644 --- a/emacs.sh +++ b/emacs.sh @@ -30,13 +30,13 @@ if test "$EMACS_TOOLKIT" = gtk; then fi arg0=$0 argv=("$@") -if test -e ${arg0}-${EMACS_TOOLKIT} +if test -x ${arg0}-${EMACS_TOOLKIT} then set -- ${arg0}-${EMACS_TOOLKIT} -elif test -e ${arg0}-x11 +elif test -x ${arg0}-x11 then set -- ${arg0}-x11 -elif test -e ${arg0}-nox +elif test -x ${arg0}-nox then set -- ${arg0}-nox else @@ -44,8 +44,6 @@ else exit 1 fi dbusdaemon=$(type -p dbus-daemon 2>/dev/null) -dbuslaunch=$(type -p dbus-launch 2>/dev/null) -dbusession=$(type -p dbus-run-session 2>/dev/null) # # Now check for valid dbus, e.g. after su/sudo/slogin # @@ -94,6 +92,8 @@ if test -n "$dbusdaemon" ; then unset mid guid suid dadd # Oops ... no dbus-daemon then launch a new session if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then + dbuslaunch=$(type -p dbus-launch 2>/dev/null) + dbusession=$(type -p dbus-run-session 2>/dev/null) if test -z "$dbusession" -a -n "$dbuslaunch" ; then set -- $dbuslaunch --sh-syntax --close-stderr --exit-with-session ${1+"$@"} arg0=$dbuslaunch @@ -106,4 +106,16 @@ if test -n "$dbusdaemon" ; then fi unset dbuslaunch dbusdaemon fi +# +# Disable AT bridge if not accessible +# +if test -z "NO_AT_BRIDGE" ; then + gsettings=$(gsettings get org.gnome.desktop.interface toolkit-accessibility 2>/dev/null) + if test -z "$gsettings" -o "$gsettings" = false ; then + NO_AT_BRIDGE=1 + export NO_AT_BRIDGE + fi + unset gsettings +fi +unset G_MESSAGES_DEBUG G_DEBUG G_MESSAGES_PREFIXED exec -a $arg0 ${1+"$@"} "${argv[@]}" diff --git a/emacs.spec b/emacs.spec index 3078298..2d1b0eb 100644 --- a/emacs.spec +++ b/emacs.spec @@ -339,7 +339,6 @@ LDFLAGS= cflags -fno-optimize-sibling-calls CFLAGS cflags -fno-PIE CFLAGS cflags -Wl,-O2 LDFLAGS - cflags -Wl,--hash-size=65521 LDFLAGS %ifarch ia64 CFLAGS=$(echo "${CFLAGS}"|sed -r 's/-O[0-9]?/-O1/g') %endif