# Psion's Word: AbiWord 2.0.11, rebuilt WITH a working spellchecker. # # WHY THIS EXISTS. # job-abiword.sh configured with `--disable-pspell --enable-enchant=no`, which # disabled both of AbiWord's spellcheck backends. The binary then fell back to # its internal ISpellChecker, which loads .hash dictionaries through # /usr/share/AbiSuite-2.0/dictionary/ispell_dictionary_list.xml -- a directory # that does not exist on the card. So Word shipped with no spellchecker at all, # and the aspell 0.60.3 + aspell6-en work went only to Email (balsa links # libaspell.so.15 directly). # # WHY PSPELL AND NOT ENCHANT. # Psion's own abiword_2.0.12.oe uses `--disable-pspell --enable-enchant`, but # 2.0.12's tarball does not survive and 2.0.11's configure offers no # `--with-aspell` at all -- only --enable-pspell / --with-pspell / --enable- # enchant. (Psion's abiword_2.0.11.oe passes `--with-aspell`, which autoconf # silently ignores; that is very likely why they moved to 2.0.12.) --enable- # enchant needs enchant.pc and headers through pkg-config, and the chroot has # only libenchant.so with no development files. --enable-pspell needs # pspell-config plus pspell/pspell.h, and all of those are already staged: # # /usr/bin/pspell-config # /usr/include/pspell/pspell.h, /usr/include/aspell.h # /usr/lib/libpspell.so -> libpspell.so.15.1.4 # # pspell in aspell 0.60 is a thin forwarding shim over libaspell, so this ends # up at the same dictionaries the card already carries in /usr/lib/aspell. # # Everything else below is job-abiword.sh unchanged. set -x rm -rf /build/out; mkdir -p /build/out/bin /build/out/lib export PKG_CONFIG_PATH=/usr/lib/pkgconfig export LC_ALL=C export CC=gcc-3.4 export CXX=g++-3.4 echo "=== the pspell backend must be present BEFORE configure runs" ls -l /usr/bin/pspell-config /usr/include/pspell/pspell.h /usr/lib/libpspell.so /usr/bin/pspell-config --cflags /usr/bin/pspell-config --libs grep -q 'define fribidi_get_type' /usr/include/fribidi/fribidi.h \ && echo "fribidi headers match the 0.10.4 library" \ || echo "WARNING: fribidi header/library mismatch" gcc-3.4 -o /usr/bin/cdump /build/cdump.c 2>/dev/null && echo "cdump built" export BUILD_CDUMPTOOL=/usr/bin/cdump cd /build/abiword-2.0.11/abi grep -q 'PSION' src/wp/ap/xp/ap_Menu_Layouts.h 2>/dev/null && echo "psion patches present" \ || grep -rq 'psion' src/wp/ap/ 2>/dev/null && echo "psion patches present" || echo "WARNING: psion patches MISSING" if grep -rqn ';;[[:space:]]*$' --include='*.cpp' --include='*.h' src 2>/dev/null; then echo "WARNING: doubled semicolons present, gcc 3.4 will reject them" else echo "semicolon sweep clean" fi # A previous configure left a cache and a full set of makefiles behind; the # spell backend is chosen at configure time, so that state has to go or the # rebuild quietly keeps the old choice. rm -f config.cache config.status make distclean > /dev/null 2>&1 echo "=== THE FIX: pspell on, enchant off (2.0.11 has no --with-aspell)" ./configure --prefix=/usr --enable-pspell --enable-enchant=no \ > /build/out/conf.log 2>&1 echo "RC_conf=$?" echo "--- did configure actually FIND pspell? (this is the whole point)" grep -iE 'pspell|spell' /build/out/conf.log | tail -12 tail -8 /build/out/conf.log make > /build/out/make.log 2>&1 echo "RC_make=$?" grep -E 'error:|Error [0-9]' /build/out/make.log | head -8 tail -12 /build/out/make.log BIN="" for c in src/wp/main/AbiWord-2.0 src/wp/main/unix/AbiWord-2.0 \ src/wp/main/AbiWord src/wp/main/unix/AbiWord; do [ -f "$c" ] && { BIN="$c"; break; } done echo "binary: ${BIN:-NOT FOUND}" if [ -n "$BIN" ]; then cp "$BIN" /build/out/bin/abiword strip /build/out/bin/abiword echo GOT_abiword echo "=== VERIFY: the binary must now name a speller in DT_NEEDED" readelf -d /build/out/bin/abiword | grep NEEDED readelf -h /build/out/bin/abiword | grep -iE 'class|flags' echo "=== the card has libaspell.so.15 but NO libpspell -- ship it" cp -a /usr/lib/libpspell.so.15* /build/out/lib/ 2>/dev/null ls -l /build/out/lib/ make install DESTDIR=/build/out/inst > /build/out/install.log 2>&1 echo "RC_install=$?" find /build/out/inst -type f | sed 's|/build/out/inst||' | sort > /build/out/filelist.txt wc -l < /build/out/filelist.txt du -sh /build/out/inst else echo MISSING_abiword grep -E 'error:|Error [0-9]' /build/out/make.log | tail -10 fi ls -l /build/out/bin echo BUILD_SCRIPT_DONE