# Psion's Word: AbiWord 2.0.11 with their five patches. # # The image has been shipping AbiSuite 2.4, which carries none of Psion's # work. abiword_2.0.11.oe is theirs -- DESCRIPTION "PSION version of AbiWord # Word Processor", maintainer Alex Loveday , PR r9 -- # and abiword-psion.patch alone is 4,515 lines across the menu, toolbar, # dialog and framework layers. The tree is already extracted and all five # patches are applied in their recipe's order (overrun-correction.patch only # applies once abiword-psion.patch is in, which is why order matters). # # 2.0.12 has a far larger patch, 17,995 lines, but its tarball no longer # survives anywhere; 2.0.11's does, in the Wayback capture of abisource.com. # # gcc 3.4, for the libstdc++ reason in docs/04-CROSS-COMPILING.md. set -x rm -rf /build/out; mkdir -p /build/out/bin export PKG_CONFIG_PATH=/usr/lib/pkgconfig export LC_ALL=C export CC=gcc-3.4 export CXX=g++-3.4 # fribidi: the card carries 0.10.4, where fribidi_get_type is a macro onto # fribidi_get_type_internal. Staging 0.10.9 headers over that 0.10.4 library # made it a real function call and the link failed -- and had it linked, it # would have failed on the device instead. The headers must match the library # the device actually has. 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" # abiword builds a small code-generator and runs it during the build. On a # cross build that has to be a native binary, which is what cdump-native.oe # is for; here the chroot is the target, so one compile serves both. 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" # gcc 3.4 rejects a redundant semicolon after a member declaration at class # scope ("error: extra semicolon"). The 2.0.11 tree has 18 doubled semicolons; # inside a function body they are a legal null statement, but at class scope # they stop the build. They are removed in the source rather than here -- # this only checks none have come back. 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 # make prints warnings about aclocal-1.6 and automake-1.6 being absent, # because the patches leave configure.ac newer than configure. They are noise: # the `missing' script returns success and the build proceeds regardless. ./configure --prefix=/usr --disable-pspell --enable-enchant=no \ > /build/out/conf.log 2>&1 echo "RC_conf=$?" tail -14 /build/out/conf.log make > /build/out/make.log 2>&1 echo "RC_make=$?" tail -15 /build/out/make.log # The link target is AbiWord-2.0, in src/wp/main. Checked by explicit path: # busybox 1.00's find has neither -maxdepth nor -perm, so a find here silently # returns nothing and a successful build looks like a failed one. 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 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