diff --git a/patches/pkgbuild/groff.sh b/patches/pkgbuild/groff.sh index d2730c6..34de981 100755 --- a/patches/pkgbuild/groff.sh +++ b/patches/pkgbuild/groff.sh @@ -49,6 +49,24 @@ lines[i:i] = [ ind + "# decision groff would have made had it checked.", ind + 'sed -i "/^PROCESSEDEXAMPLEFILES_PS = /,/^$/ s|^.*$||" Makefile', ind + 'grep -q "^PROCESSEDEXAMPLEFILES_PS" Makefile && { echo "groff: PS example list not emptied" >&2; exit 1; }', + ind + "# THE SECOND consumer. Two files include the logo, and only two --", + ind + "# counted rather than guessed:", + ind + "#", + ind + "# doc/webpage.ms (above)", + ind + "# contrib/hdtbl/examples/mixed_pickles.roff (this)", + ind + "#", + ind + "# hdtbl renders its example tables to PostScript, and one of them shows", + ind + "# the GNU logo. HDTBLPROCESSEDEXAMPLEFILES lists all twelve; the whole", + ind + "# list goes, because there is no reason to render eleven examples of a", + ind + "# table macro package into a documentation set nothing here reads.", + ind + 'sed -i "/^HDTBLPROCESSEDEXAMPLEFILES = /,/^$/ s|^.*$||" Makefile', + ind + 'grep -q "^HDTBLPROCESSEDEXAMPLEFILES" Makefile && { echo "groff: hdtbl example list not emptied" >&2; exit 1; }', + ind + "# And say it out loud: if a THIRD consumer appears, this is the pattern", + ind + "# to look for, not a new kind of problem.", + ind + 'if grep -rl "gnu\\.eps" --include="*.roff" --include="*.ms" . 2>/dev/null | grep -qv "^\\./doc/webpage.ms$\\|mixed_pickles"; then', + ind + ' echo "groff: a third file includes gnu.eps; see patches/pkgbuild/groff.sh" >&2', + ind + ' exit 1', + ind + 'fi', ] io.open("PKGBUILD", "w", encoding="utf-8").write("\n".join(lines)) ZZPY