From ed651bf96f558fd6514d8301c813a175a8a1c51b Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 20 Aug 2025 07:33:51 +0000 Subject: support Groff v1.19.2 as still used by default on NetBSD 10 * They have a newer version in pkgsrc, but it's not even available as a binary package on the arm6. * Has some glitches, e.g. does accept the ASCII 27 in tutorial.ms, but it's probably not worth to work around. --- INSTALL | 2 +- configure.ac | 8 ++++++++ debian/control | 2 +- doc/Makefile.am | 8 ++++---- doc/grosciteco.tes | 2 +- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/INSTALL b/INSTALL index 84fa787..9574e36 100644 --- a/INSTALL +++ b/INSTALL @@ -35,7 +35,7 @@ SciTECO Build and Runtime Dependencies * other curses implementations might work as well but are untested * When choosing the GTK interface: * GTK+ v3.12 or later: http://www.gtk.org/ - * GNU roff (groff): https://www.gnu.org/software/groff/ + * GNU roff (groff) v1.19.2 or later: https://www.gnu.org/software/groff/ Required at build-time, but it is already shipped on most UNIX-like systems to format man pages. * Doxygen (only when generating developer documentation) diff --git a/configure.ac b/configure.ac index 23d02b5..9d5e059 100644 --- a/configure.ac +++ b/configure.ac @@ -115,6 +115,14 @@ if [[ x$GROFF = x ]]; then AC_MSG_ERROR([GNU roff required!]) fi +# preconv was added only in Groff v1.20, which is still missig +# in NetBSD. +AC_CHECK_PROG(PRECONV, preconv, preconv) +if [[ x$PRECONV != x ]]; then + GROFF_FLAGS="-Kutf-8" +fi +AC_SUBST(GROFF_FLAGS) + # Doxygen is not necessarily required as long as # you do not run `make devdoc`. AC_CHECK_PROG(DOXYGEN, doxygen, doxygen) diff --git a/debian/control b/debian/control index a35e968..3c6cf63 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 10), dh-exec, gcc (>= 4:5.0), g++ (>= 4:5.0), libglib2.0-dev (>= 2.44), ncurses-term, libncurses-dev, libgtk-3-dev (>= 3.12), xvfb, - groff + groff (>= 1.19.2) Standards-Version: 4.5.0 Homepage: https://rhaberkorn.github.io/sciteco/ Vcs-Browser: https://github.com/rhaberkorn/sciteco diff --git a/doc/Makefile.am b/doc/Makefile.am index 4911cb1..5ef4110 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -81,11 +81,11 @@ EXTRA_DIST += tutorial.ms.in CLEANFILES += $(women_DATA) %.woman %.woman.tec : % sciteco.tmac grosciteco.tes - @GROFF@ -wall -Z -Kutf-8 -Tutf8 -t -man -M@srcdir@ -msciteco $< | \ + @GROFF@ @GROFF_FLAGS@ -wall -Z -Tutf8 -t -man -M@srcdir@ -msciteco $< | \ $(SCITECO_FULL) -im -- @srcdir@/grosciteco.tes $@ tutorial.woman tutorial.woman.tec : tutorial.ms sciteco.tmac grosciteco.tes - @GROFF@ -wall -Z -Kutf-8 -Tutf8 -t -ms -M@srcdir@ -msciteco $< | \ + @GROFF@ @GROFF_FLAGS@ -wall -Z -Tutf8 -t -ms -M@srcdir@ -msciteco $< | \ $(SCITECO_FULL) -im -- @srcdir@/grosciteco.tes $@ man_MANS = grosciteco.tes.1 tedoc.tes.1 sciteco.1 sciteco.7 @@ -100,10 +100,10 @@ endif %.html : % htbl.tes $(SCITECO_FULL) -qiom -- @srcdir@/htbl.tes <$< | \ - @GROFF@ -wall -Thtml -man >$@ + @GROFF@ @GROFF_FLAGS@ -wall -Thtml -man >$@ %.html : %.ms - @GROFF@ -wall -Thtml -ms $< >$@ + @GROFF@ @GROFF_FLAGS@ -wall -Thtml -ms $< >$@ # FIXME: We may want to build the cheat sheet automatically. # This would require a full Groff installation, though. diff --git a/doc/grosciteco.tes b/doc/grosciteco.tes index a724a5f..c4f16e1 100755 --- a/doc/grosciteco.tes +++ b/doc/grosciteco.tes @@ -219,7 +219,7 @@ EBN[output-woman] HK 1EB :M#sw :M#gi :M#sc F< !cmd.V! - :M#sw :M#gi/Q[res.v]-1+Q[origin.v]U[pos.v] :M#sc F< + :M#sw :M#gi/Q[res.v]-1+Q[origin.v]U[pos.v] Q[pos.v]"<0U[pos.v]' :M#sc F< !cmd.v! :M#sw :M#gi/Q[res.v]%[pos.v] :M#sc F< -- cgit v1.2.3