The 'non-relocated' packages of TeX Live expect to live in
TEXMFROOT/texmf-dist (e.g. to search for perl modules). This change
builds TEXMFROOT instead of just TEXMFDIST to accommodate those
packages, and obviate the need for patching fmtutil.
prior to this change, the build fails because the documentation cannot be
generated due to a missing latex package (probably fallout from a texlive
update):
! LaTeX Error: File `hypdoc.sty' not found.
Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)
Enter file name:
! Emergency stop.
<read *>
l.29 \begin{document}
^^M
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on preview.log.
make[1]: *** [Makefile:91: preview.pdf] Error 1
make[1]: Leaving directory '/build/auctex-12.3/latex'
make: *** [Makefile:219: texmf] Error 2
This commit gets pkgsCross.*.pdfgrep a bit farther. It still fails
with the error below; if anybody recognizes it I'd appreciate a hint.
```
pdfgrep-aarch64-unknown-linux-gnu> aarch64-unknown-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I/nix/store/9kzvsy9ybsy2zvivz62ia881q9djf734-poppler-glib-aarch64-unknown-linux-gnu-23.02.0-dev/include/poppler/cpp -I/nix/store/6ib0mcvv0ascsydhpja2a1kcnwvxqnfp-pcre-aarch64-unknown-linux-gnu-8.45-dev/include -I/nix/store/yyyy71mx8j85hh1xknfy2nqgw4ihfchr-libgcrypt-aarch64-unknown-linux-gnu-1.10.1-dev/include -I/nix/store/mqx4d57dva5y5kg91a9pnlipdc6bfcxc-libgpg-error-aarch64-unknown-linux-gnu-1.46-dev/include -g -O2 -c -o pdfgrep.o pdfgrep.cc
pdfgrep-aarch64-unknown-linux-gnu> In file included from /nix/store/cha4mfjki3pv42xnfsfrgppr3w1zmh27-aarch64-unknown-linux-gnu-stage-final-gcc-12.2.0/aarch64-unknown-linux-gnu/include/c++/12.2.0/stdlib.h:36,
pdfgrep-aarch64-unknown-linux-gnu> from pdfgrep.cc:24:
pdfgrep-aarch64-unknown-linux-gnu> /nix/store/cha4mfjki3pv42xnfsfrgppr3w1zmh27-aarch64-unknown-linux-gnu-stage-final-gcc-12.2.0/aarch64-unknown-linux-gnu/include/c++/12.2.0/cstdlib:151:11: error: 'malloc' has not been declared in '::'
pdfgrep-aarch64-unknown-linux-gnu> 151 | using ::malloc;
pdfgrep-aarch64-unknown-linux-gnu> | ^~~~~~
pdfgrep-aarch64-unknown-linux-gnu> /nix/store/cha4mfjki3pv42xnfsfrgppr3w1zmh27-aarch64-unknown-linux-gnu-stage-final-gcc-12.2.0/aarch64-unknown-linux-gnu/include/c++/12.2.0/cstdlib:164:11: error: 'realloc' has not been declared in '::'
pdfgrep-aarch64-unknown-linux-gnu> 164 | using ::realloc;
pdfgrep-aarch64-unknown-linux-gnu> | ^~~~~~~
pdfgrep-aarch64-unknown-linux-gnu> /nix/store/cha4mfjki3pv42xnfsfrgppr3w1zmh27-aarch64-unknown-linux-gnu-stage-final-gcc-12.2.0/aarch64-unknown-linux-gnu/include/c++/12.2.0/stdlib.h:65:12: error: 'malloc' has not been declared in 'std'
pdfgrep-aarch64-unknown-linux-gnu> 65 | using std::malloc;
pdfgrep-aarch64-unknown-linux-gnu> | ^~~~~~
pdfgrep-aarch64-unknown-linux-gnu> /nix/store/cha4mfjki3pv42xnfsfrgppr3w1zmh27-aarch64-unknown-linux-gnu-stage-final-gcc-12.2.0/aarch64-unknown-linux-gnu/include/c++/12.2.0/stdlib.h:73:12: error: 'realloc' has not been declared in 'std'
pdfgrep-aarch64-unknown-linux-gnu> 73 | using std::realloc;
pdfgrep-aarch64-unknown-linux-gnu> | ^~~~~~~
pdfgrep-aarch64-unknown-linux-gnu> make[2]: *** [Makefile:413: pdfgrep.o] Error 1
pdfgrep-aarch64-unknown-linux-gnu> make[2]: Leaving directory '/build/pdfgrep-2.1.2/src'
pdfgrep-aarch64-unknown-linux-gnu> make[1]: *** [Makefile:388: all-recursive] Error 1
pdfgrep-aarch64-unknown-linux-gnu> make[1]: Leaving directory '/build/pdfgrep-2.1.2'
pdfgrep-aarch64-unknown-linux-gnu> make: *** [Makefile:329: all] Error 2
```
The build system generates the file "hitables.c" with the program
"./himktables" that is also compiled by the build system.
This does not work when cross-compiling since this program is built for the
wrong architecture. We already use a natively built copy of texlive.bin.core for
various other tools (like tangle, weave), so this change just adds himktables to the
this native copy and uses this program in the cross build.