313.2. dasher-5.0.0.beta.20200420
Text entry by steering a pointer, eye tracker or switch through a predictive language model
| Version | 5.0.0.beta.20200420, release 1 |
| Shelf | accessibility — Screen readers, speech, braille and alternative input |
| Phase | 44_apps (Applications), 4 of 422 in build order |
| Licence | GPL-2.0-or-later |
| Homepage | https://github.com/dasher-project/dasher |
| Build time | 1.8 SBU |
| Installed size | 26.6 MiB in 214 files |
| Recipe | ports/core/accessibility/dasher/kpkgbuild |
About
Dasher writes text without a keyboard. Letters stream towards the pointer in boxes sized by a predictive language model, and steering into a box writes its letter, so a mouse, an eye tracker, a head pointer or a single switch is enough to type. It is a GTK 3 application. Its direct mode types into the focused window of another X11 application, one running under Xwayland, through AT-SPI (at-spi2-core); a native Wayland window does not receive it. Dasher can speak what has been written through speech-dispatcher. The source is upstream’s git tree at the commit _commit names.
Sources
dasher-5.0.0.beta.20200420.tar.gz(17.8 MiB)
sha2569181bffe9fa4842dd159a855b935dff1f871fa5412213663b84c534c1a486242
upstream: https://github.com/dasher-project/dasher/archive/0ec7d646dbaadf06b8eebfc11b784738a20e75af.tar.gz
archive copy: sources-1/accessibility--dasher-5.0.0.beta.20200420.tar.gz
Dependencies
Depends on: autoconf, automake, libtool, gettext, pkgconf, glib, gtk3, cairo, at-spi2-core, expat, libX11, xorgproto, speech-dispatcher.
Required by: no port names it.
Patches
build.sh applies these; kpkg applies nothing by itself.
alphabet-combo-before-interface.patch— Skip filling the alphabet combo until the interface has created itatspi-no-extern-c.patch— A git commit, 5eed251f, carried with itscommitandAuthor:lines rather than a mail header: drops theextern "C" { }wrapped around#include <atspi/atspi.h>inSrc/Gtk2/dasher_editor_external_atspi.cpp. GLib’s headers use C++ templates when compiled as C++, and a template inside C linkage is a compile error.keep-panes-visible.patch— Keep the text pane and the canvas from shrinking to nothingBoth children of the main window's divider were packed shrinkable, so the window's minimum size left them out and a window given that size showed only its menu bar, toolbar and speed bar. Pack both unshrinkable and give the text pane a 75-pixel minimum, the default height of its pane.
x11-backend.patch— Debian’s patch (its header is DEP-3, not a mail header): callsgdk_set_allowed_backends("x11")inSrc/main.ccbefore GDK starts. Dasher reads the pointer position with X11 calls, which do not work on the Wayland backend, so the window always opens under Xwayland. Direct mode reaches only X11 windows even then.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install dasher'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/accessibility/dasher.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/accessibility/dasher
echo '9181bffe9fa4842dd159a855b935dff1f871fa5412213663b84c534c1a486242 dasher-5.0.0.beta.20200420.tar.gz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/dasher
SRC=$SRC_ROOT/dasher-5.0.0.beta.20200420
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf dasher-5.0.0.beta.20200420.tar.gz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the recipe’s helpers _commit and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
patch -p1 -i "$PORT_SRC/atspi-no-extern-c.patch"
patch -p1 -i "$PORT_SRC/x11-backend.patch"
patch -p1 -i "$PORT_SRC/keep-panes-visible.patch"
patch -p1 -i "$PORT_SRC/alphabet-combo-before-interface.patch"
printf '%s' "$version" > .tarball-version
autoreconf -fi
./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib \
--disable-static \
--enable-atspi \
--enable-speech=speechdispatcher \
--with-gsettings \
--with-cairo \
--without-gnome \
--disable-japanese \
--disable-joystick \
--disable-tilt
make
make DESTDIR=$PKG install
cat > "$PKG/usr/share/applications/dasher.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Dasher
GenericName=Predictive Text Entry
Comment=Write without a keyboard, by pointer, eye tracker or switch
TryExec=dasher
Exec=dasher
Icon=dasher
Terminal=false
StartupNotify=true
StartupWMClass=dasher
Categories=GTK;Utility;Accessibility;
Keywords=text entry;keyboard;eye tracking;switch;pointer;accessibility;a11y;dasher;
DESKTOP
chmod 644 "$PKG/usr/share/applications/dasher.desktop"
The switches, and why each is set:
--enable-atspi— Direct mode sends its characters to the focused application through AT-SPI 2 rather than through the X test extension. Named, configure stops with “atspi 2 requested but not found” when the library is missing, instead of falling back.--enable-speech=speechdispatcher— Text-to-speech through speech-dispatcher’slibspeechd. Left unset, configure only warns when no speech module is found and builds without one; naming the module makes its absence an error.--with-gsettings— Keep the user’s preferences in GSettings. Named, configure stops with “GSettings requested but not found” instead of falling back to GConf or, without it, to a Dasher that stores no preferences.--with-cairo— Draw with cairo; upstream’s default, named so it cannot change.--without-gnome— Leave outData/Help/Gnome, the GNOME help: a DocBook manual whose makefile is built from yelp-tools’YELP_HELP_RULES. yelp-tools is not a port.--disable-japanese,--disable-joystick,--disable-tilt— Leave out Kanji entry (which needs the Canna library, not a port), Linux joystick input and the experimental tilt-sensor input. All three are off by default upstream; naming them keeps them off whatever those defaults become.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/dasher, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf dasher-5.0.0.beta.20200420-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/dasher, and runs the triggers its paths call for.
Contents
Installed programs: dasher.
Installed directories: /usr/share/dasher, /usr/share/licenses/dasher.
Short descriptions
dasher |
graphical predictive text entry system |
Notes
The tarball is a git snapshot with no configure, so build.sh runs autoreconf -fi. Before that it writes $version into .tarball-version: AC_INIT takes the version from build-aux/mkversion, which prints that file when it exists and otherwise runs git describe, which has no repository to read here.
build.sh writes its own dasher.desktop over the one upstream installs, with TryExec, StartupWMClass=dasher and search keywords, and without upstream’s GNOME category, its GNOME Bugzilla keys and the translated names and comments its build merges in from po/.
keep-panes-visible.patch makes the main window’s minimum size include the text pane and the canvas. Upstream packs both shrinkable, so a window given its minimum size shows its menu bar, toolbar and speed bar and nothing else, and maximising it then leaves the text pane at no height. With the patch the smallest window is about 270 by 410 pixels and shows a text pane of 75 pixels above a canvas of 200.
alphabet-combo-before-interface.patch makes dasher_main_populate_alphabet_combo return while the alphabet list does not exist yet. Building the interface sets the alphabet, whose change notification would fill the toolbar’s alphabet combo before dasher_main_load_interface has created the combo and its list store, so every start would log a run of Gtk-CRITICAL assertions from gtk_list_store_*, gtk_combo_box_set_active_iter and g_signal_handlers_unblock_matched on a null object. dasher_main_populate_controls fills the combo once the interface is built, so nothing is lost.