# aspell 0.60.3 + the upstream aspell6-en 6.0-0 dictionary, in ONE boot. # # meta-psion.oe lists aspell-en in psion-apps, so every soho image had # spellchecking for Word, Sheet and Email. It is the last gap against Psion's # own manifest. # # THREE THINGS THIS GETS RIGHT THAT EARLIER ATTEMPTS DID NOT: # # 1. ONE BOOT. qbuild packs a fresh chroot from buildroot every run and only # recovers /build/out, so a `make install` in one job is gone by the next. # A probe job looking for prezip/precat found NOTHING installed, which is why # all six decompression candidates returned zero words. aspell is therefore # built, installed and USED here without leaving the boot. # # 2. UPSTREAM DICTIONARY SOURCE, not Debian's prebuilt package. Debian ships the # .rws as symlinks into /var/lib/aspell and builds them in postinst -- and on # this machine /var is a tmpfs, so they would vanish every boot. The upstream # aspell6-en tarball ships its word lists and a Makefile that builds real # files, which is also what Psion's own aspell-en recipe drives. # # 3. PSION'S CONFIGURE INVOCATION, verbatim from aspell-en_0.50-2.oe: # ./configure --vars DICT_DIR="/usr/lib/aspell" DATA_DIR="/usr/share/aspell" # # Version note: Psion pinned aspell 0.50.5 / aspell-en 0.50-2. The card already # carries aspell 0.60.3 runtime (libaspell.so.15.1.2 plus /usr/lib/aspell-0.60/) # pulled in for balsa and enchant, and balsa links libaspell.so.15 directly. A # 0.50 dictionary is format-incompatible with a 0.60 runtime and swapping the # library would risk balsa, so the dictionary matches the runtime that is really # there. Deliberate deviation. # # gcc 3.4 because the card has libstdc++ 6.0.3; Debian's own aspell binary was # rejected for wanting __gnu_cxx::__pool symbols from libstdc++ 4.1. set -x rm -rf /build/out; mkdir -p /build/out/bin /build/out/dict /build/out/share export LC_ALL=C export CC=gcc-3.4 export CXX=g++-3.4 echo "=== 1. aspell 0.60.3" cd /build/aspell-0.60.3 || { echo NO_ASPELL_SRC; exit 1; } ./configure --prefix=/usr --disable-static --enable-curses=no --disable-nls \ > /build/out/aspell-conf.log 2>&1 echo "RC_aspell_conf=$?" make > /build/out/aspell-make.log 2>&1 echo "RC_aspell_make=$?" grep -E 'error:|Error [0-9]' /build/out/aspell-make.log | head -5 make install > /build/out/aspell-install.log 2>&1 echo "RC_aspell_install=$?" echo "=== the tools must exist NOW, in this same boot" ls -l /usr/bin/aspell /usr/bin/prezip-bin /usr/bin/precat /usr/bin/word-list-compress 2>&1 | head -6 /usr/bin/aspell --version 2>&1 | head -1 echo "=== 2. the dictionary, with Psion's configure invocation" cd /build/aspell6-en-6.0-0 || { echo NO_DICT_SRC; exit 1; } ./configure --vars DICT_DIR="/usr/lib/aspell" DATA_DIR="/usr/share/aspell" \ > /build/out/dict-conf.log 2>&1 echo "RC_dict_conf=$?" tail -8 /build/out/dict-conf.log make > /build/out/dict-make.log 2>&1 echo "RC_dict_make=$?" grep -E 'error|Error [0-9]|No such' /build/out/dict-make.log | head -8 make install > /build/out/dict-install.log 2>&1 echo "RC_dict_install=$?" echo "=== what landed, and HOW BIG -- an empty .rws is ~304 bytes, a real one is large" ls -l /usr/lib/aspell/*.rws 2>/dev/null | head -20 echo "RWS_COUNT=$(ls /usr/lib/aspell/*.rws 2>/dev/null | wc -l)" echo "RWS_TOTAL_BYTES=$(cat /usr/lib/aspell/*.rws 2>/dev/null | wc -c)" echo "=== THE REAL TEST: spellcheck British English" echo "recieve teh mispeling" | /usr/bin/aspell -l en_GB list 2>&1 | head -5 echo "--- 'colour' must NOT be flagged in en_GB (empty output below = correct):" echo "colour" | /usr/bin/aspell -l en_GB list 2>&1 | head -3 echo "--- 'color' SHOULD be flagged in en_GB:" echo "color" | /usr/bin/aspell -l en_GB list 2>&1 | head -3 echo "=== collect for the card" cp -a /usr/lib/aspell/. /build/out/dict/ 2>/dev/null cp -a /usr/share/aspell/. /build/out/share/ 2>/dev/null cp -a /usr/bin/aspell /usr/bin/word-list-compress /usr/bin/prezip-bin /build/out/bin/ 2>/dev/null echo "OUT_DICT=$(ls /build/out/dict 2>/dev/null | wc -l) OUT_SHARE=$(ls /build/out/share 2>/dev/null | wc -l)" echo "=== OABI and linkage of what we ship" for f in /build/out/bin/*; do [ -f "$f" ] || continue echo "--- $f"; readelf -h "$f" 2>/dev/null | grep -iE 'class|flags'; readelf -d "$f" 2>/dev/null | grep NEEDED done echo BUILD_SCRIPT_DONE