# aspell 0.60.3 and the en dictionaries, built to match what the card already has. # # meta-psion.oe lists aspell-en in psion-apps, so every soho image had # spellchecking. It was the one real gap against Psion's manifest. # # WHY 0.60.3 AND NOT PSION'S PINNED 0.50.5. # The card already carries aspell 0.60.3 runtime -- libaspell.so.15.1.2 and a # /usr/lib/aspell-0.60/ filter set -- 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 out would risk balsa. So the dictionary # has to match the runtime that is actually there. Deliberate deviation, recorded. # # WHY BUILD AT ALL, RATHER THAN SHIP DEBIAN'S DICTIONARY. # Debian's aspell-en ships the .rws files as symlinks into /var/lib/aspell and # builds them in postinst. On this machine /var is a tmpfs, so those would vanish # on every boot. The .rws are built here and installed as REAL files instead. # Debian's aspell binary is no use either: it wants __gnu_cxx::__pool symbols from # libstdc++ 4.1 and the card has 6.0.3, gcc 3.4's -- the same constraint that has # governed every build in this project. set -x rm -rf /build/out; mkdir -p /build/out/bin /build/out/dict export LC_ALL=C export CC=gcc-3.4 export CXX=g++-3.4 cd /build/aspell-0.60.3 || { echo NO_SRC; exit 1; } ./configure --prefix=/usr --disable-static --enable-curses=no --disable-nls \ > /build/out/conf.log 2>&1 echo "RC_conf=$?" tail -12 /build/out/conf.log make > /build/out/make.log 2>&1 echo "RC_make=$?" grep -E 'error:|Error [0-9]|undefined reference' /build/out/make.log | head -8 make install > /build/out/install.log 2>&1 echo "RC_install=$?" /usr/bin/aspell --version 2>&1 | head -2 echo "ASPELL_OK=$?" echo "=== build the dictionaries from the word lists, as update-dictcommon-aspell would" cd /build/aspell-en-wordlists || { echo NO_WORDLISTS; exit 1; } # busybox has no `install`; mkdir/cp do the job mkdir -p /usr/lib/aspell cp -f en.dat en_affix.dat en_phonet.dat /usr/lib/aspell/ 2>/dev/null ls /usr/lib/aspell/ | head built=0 for cwl in *.cwl.gz; do base=$(basename "$cwl" .cwl.gz) echo "--- $base" gunzip -c "$cwl" > /tmp/$base.cwl 2>/dev/null # .cwl is PREZIP-compressed (header \002\0), not word-list-compress format. # aspell 0.60 uses prezip-bin; word-list-compress is the 0.50 tool and silently # produced an empty list, which is why the first pass built 12 dictionaries of # exactly 304 bytes each -- an empty .rws. /usr/bin/prezip-bin d < /tmp/$base.cwl > /tmp/$base.wl 2>/dev/null echo "WORDS_$base=$(wc -l < /tmp/$base.wl)" /usr/bin/aspell --lang=en --encoding=iso-8859-1 create master "/usr/lib/aspell/$base.rws" < /tmp/$base.wl 2>&1 | head -3 if [ -s "/usr/lib/aspell/$base.rws" ]; then echo "BUILT_$base=$(wc -c < /usr/lib/aspell/$base.rws)" built=$((built+1)) else echo "FAILED_$base" fi rm -f /tmp/$base.cwl /tmp/$base.wl done echo "RWS_BUILT=$built" echo "=== collect for the card" cp -a /usr/lib/aspell/*.rws /build/out/dict/ 2>/dev/null cp -a /usr/bin/aspell /usr/bin/word-list-compress /usr/bin/prezip-bin /build/out/bin/ 2>/dev/null ls -l /build/out/dict/ | head -20 echo "DICT_COUNT=$(ls /build/out/dict/ 2>/dev/null | wc -l)" echo "=== VERIFY: does it actually spellcheck British English?" cp -f *.multi *.alias /usr/lib/aspell/ 2>/dev/null echo "recieve teh mispeling colour" | /usr/bin/aspell -l en_GB list 2>&1 | head -5 echo "--- and that 'colour' is NOT flagged in en_GB:" echo "colour" | /usr/bin/aspell -l en_GB list 2>&1 | head -3 echo "=== OABI and linkage" for f in /build/out/bin/*; do 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