From c7f39d47344b005e210645874eceb6f329983ca4 Mon Sep 17 00:00:00 2001 From: Karchnu Date: Sat, 24 Apr 2021 17:06:46 +0200 Subject: [PATCH] Add groff recipe. --- wip/groff/Makefile | 30 ++++++++++++++++++++++++++++++ wip/groff/site.tmac | 17 +++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 wip/groff/Makefile create mode 100644 wip/groff/site.tmac diff --git a/wip/groff/Makefile b/wip/groff/Makefile new file mode 100644 index 0000000..c48c3ef --- /dev/null +++ b/wip/groff/Makefile @@ -0,0 +1,30 @@ +name = groff +version = 1.22.4 +pkgrel = 0 +pkgdesc = "GNU troff text-formatting system" +url = "https://www.gnu.org/software/groff/groff.html" +arch = "all" +license = "GPL-3.0-or-later" +build-dependencies = perl bison zlib-dev texinfo +URL = https://ftp.gnu.org/gnu/$(name)/$(name)-$(version).tar.gz + +CONFIGURE_OPTIONS_USER = --without-x --disable-rpath + +SYSCONF ?= ../../ +include $(SYSCONF)/package.mk + +post_fake_root_install: + rm -rf "$(pkg_fake_root_dir)"/$(PREFIX)/lib/charset.alias + rmdir -p "$(pkg_fake_root_dir)"/$(PREFIX)/lib 2>/dev/null || true + + for f in man mdoc; do \ + cat site.tmac >> $(pkg_fake_root_dir)/$(SHAREDIR)/groff/site-tmac/$${f}.local ; \ + done + + # Prevent conflict with mandoc-doc + rm -f "$(pkg_fake_root_dir)"/$(MANDIR)/man1/soelim.1 \ + "$(pkg_fake_root_dir)"/$(MANDIR)/man7/roff.7 + +pre_build: + @# work around parallel build issue + $(Q)cd $(bdir) ; make arch/misc && make diff --git a/wip/groff/site.tmac b/wip/groff/site.tmac new file mode 100644 index 0000000..cf0ef61 --- /dev/null +++ b/wip/groff/site.tmac @@ -0,0 +1,17 @@ +. +.if n \{\ +. \" Character translations for non-keyboard +. \" characters - to make them searchable +. if '\*[.T]'utf8' \{\ +. char \- \N'45' +. char - \N'45' +. char ' \N'39' +. char \' \N'39' +. \} +. +. \" Shut off SGR by default (groff colors) +. \" Require GROFF_SGR envvar defined to turn it on +. if '\V[GROFF_SGR]'' \ +. output x X tty: sgr 0 +.\} +