From 96cd78dd1f0ac583bf05ff10c0fad7ac73f8431d Mon Sep 17 00:00:00 2001 From: "W. Michael Petullo" Date: Fri, 12 Mar 2021 11:23:18 -0600 Subject: [PATCH] mandoc: new package Signed-off-by: W. Michael Petullo --- utils/mandoc/Makefile | 47 ++++++++++++++++++ .../010-mandoc-1.14.5-fix-gnu-make.patch | 49 +++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 utils/mandoc/Makefile create mode 100644 utils/mandoc/patches/010-mandoc-1.14.5-fix-gnu-make.patch diff --git a/utils/mandoc/Makefile b/utils/mandoc/Makefile new file mode 100644 index 000000000..a6a13267c --- /dev/null +++ b/utils/mandoc/Makefile @@ -0,0 +1,47 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=mandoc +PKG_VERSION:=1.14.5 +PKG_RELEASE:=$(AUTORELEASE) + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://mandoc.bsd.lv/snapshots/ +PKG_HASH:=8219b42cb56fc07b2aa660574e6211ac38eefdbf21f41b698d3348793ba5d8f7 + +PKG_MAINTAINER:=W. Michael Petullo +PKG_LICENSE:=BSD-3-Clause BSD-2-Clause +PKG_LICENSE_FILES:=LICENSE + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/mandoc + SECTION:=utils + CATEGORY:=Utilities + TITLE:=mandoc document formatting system + DEPENDS:=+zlib + URL:=https://mandoc.bsd.lv/ +endef + +define Package/sed/description +mandoc is a suite of tools compiling mdoc, the roff macro language +of choice for BSD manual pages, and man, the predominant historical +language for UNIX manuals. It is small, ISO C, ISC-licensed, and quite +fast. The main component of the toolset is the mandoc utility program, +based on the libmandoc validating compiler, to format output for UTF-8 +and ASCII UNIX terminals, HTML 5, PostScript, and PDF. +endef + +CONFIGURE_VARS=\ + CC=$(CC) \ + HAVE_FTS=0 \ + HAVE_REALLOCARRAY=0 \ + +define Package/mandoc/install + $(INSTALL_DIR) $(1)/usr/bin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mandoc $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,mandoc)) diff --git a/utils/mandoc/patches/010-mandoc-1.14.5-fix-gnu-make.patch b/utils/mandoc/patches/010-mandoc-1.14.5-fix-gnu-make.patch new file mode 100644 index 000000000..b88cab256 --- /dev/null +++ b/utils/mandoc/patches/010-mandoc-1.14.5-fix-gnu-make.patch @@ -0,0 +1,49 @@ +Only in mandoc-1.14.5/: config.h +Only in mandoc-1.14.5/: config.log +Only in mandoc-1.14.5/: config.log.old +--- a/configure ++++ b/configure +@@ -41,7 +41,6 @@ OSENUM= + OSNAME= + UTF8_LOCALE= + +-CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | env -i make -sf -` + CFLAGS= + LDADD= + LDFLAGS= +@@ -60,7 +59,7 @@ HAVE_DIRENT_NAMLEN= + HAVE_EFTYPE= + HAVE_ENDIAN= + HAVE_ERR= +-HAVE_FTS= ++HAVE_FTS=0 + HAVE_FTS_COMPARE_CONST= + HAVE_GETLINE= + HAVE_GETSUBOPT= +@@ -74,7 +73,7 @@ HAVE_OHASH= + HAVE_PATH_MAX= + HAVE_PLEDGE= + HAVE_PROGNAME= +-HAVE_REALLOCARRAY= ++HAVE_REALLOCARRAY=0 + HAVE_RECALLOCARRAY= + HAVE_RECVMSG= + HAVE_REWB_BSD= +@@ -95,7 +94,7 @@ HAVE_WCHAR= + NEED_GNU_SOURCE=0 + NEED_OPENBSD_SOURCE=0 + +-PREFIX="/usr/local" ++PREFIX="/usr" + BINDIR= + SBINDIR= + BIN_FROM_SBIN= +@@ -299,8 +298,6 @@ runtest PATH_MAX PATH_MAX || true + runtest pledge PLEDGE || true + runtest sandbox_init SANDBOX_INIT || true + runtest progname PROGNAME || true +-singletest reallocarray REALLOCARRAY || \ +- runtest reallocarray REALLOCARRAY -D_OPENBSD_SOURCE || true + singletest recallocarray RECALLOCARRAY || \ + runtest recallocarray RECALLOCARRAY -D_OPENBSD_SOURCE || true + runtest rewb-bsd REWB_BSD || true