Resurrect devel/c2mdoc (with stage support), assign maintainer
It seems that this port was killed for not having publically available distfiles, but from what I can tell, this was always a distfile-free port, meaning that it was removed in error. The PR to bring it back did not provide the required stage support, but luckily that was trivial to add. Differences from the previous version: * pkg-descr rewrapped * whitespace removed from awk script (caused PORTREVISION bump) * Header trimmed * NOMAN definition removed * CP+REINPLACE_CMD replaced with SED and moved to post-extract target * Stage support * Maintenance passed to PR submitter PR: 189009 Submitted by: Chris Hutchinson Tweaks by: marino
This commit is contained in:
parent
89f5d7f26d
commit
6163fcb80d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=357466
1
MOVED
1
MOVED
@ -2056,7 +2056,6 @@ editors/xenon||2011-05-02|Has expired: Upstream disappeared and distfile is no l
|
||||
devel/a2dev||2011-05-02|Has expired: Upstream disappeared and distfile is no longer available
|
||||
devel/c2lib||2011-05-02|Has expired: Upstream disappeared and distfile is no longer available
|
||||
devel/c2man||2011-05-02|Has expired: Upstream disappeared and distfile is no longer available
|
||||
devel/c2mdoc||2011-05-02|Has expired: Upstream disappeared and distfile is no longer available
|
||||
devel/c_parser||2011-05-02|Has expired: Upstream disappeared and distfile is no longer available
|
||||
devel/cdoc||2011-05-02|Has expired: Upstream disappeared and distfile is no longer available
|
||||
devel/diffconvert||2011-05-02|Has expired: Upstream disappeared and distfile is no longer available
|
||||
|
@ -178,6 +178,7 @@
|
||||
SUBDIR += bzr-upload
|
||||
SUBDIR += bzrtools
|
||||
SUBDIR += c-unit
|
||||
SUBDIR += c2mdoc
|
||||
SUBDIR += c4
|
||||
SUBDIR += calibrator
|
||||
SUBDIR += capstone
|
||||
|
29
devel/c2mdoc/Makefile
Normal file
29
devel/c2mdoc/Makefile
Normal file
@ -0,0 +1,29 @@
|
||||
# Created by: Bruce M. Simpson <bms@FreeBSD.org>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= c2mdoc
|
||||
PORTVERSION= 20040302
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= devel textproc
|
||||
MASTER_SITES= #
|
||||
DISTFILES=
|
||||
|
||||
MAINTAINER= portmaster@bsdforge.com
|
||||
COMMENT= Script to generate mdoc(7) markup from C functions
|
||||
|
||||
RUN_DEPENDS= cproto:${PORTSDIR}/devel/cproto
|
||||
|
||||
NO_BUILD= yes
|
||||
NO_WRKSUBDIR= yes
|
||||
|
||||
PLIST_FILES= bin/c2mdoc libexec/c2mdoc.awk
|
||||
|
||||
post-extract:
|
||||
${SED} -e "s|%%LIBEXECDIR%%|${PREFIX}/libexec|g;" \
|
||||
${FILESDIR}/c2mdoc > ${WRKDIR}/c2mdoc
|
||||
|
||||
do-install:
|
||||
${INSTALL_SCRIPT} ${FILESDIR}/c2mdoc.awk ${STAGEDIR}${PREFIX}/libexec
|
||||
${INSTALL_SCRIPT} ${WRKDIR}/c2mdoc ${STAGEDIR}${PREFIX}/bin
|
||||
|
||||
.include <bsd.port.mk>
|
17
devel/c2mdoc/files/c2mdoc
Normal file
17
devel/c2mdoc/files/c2mdoc
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# c2mdoc -- Front-end which abuses the cproto parser to spit out
|
||||
# mdoc(7) format prototypes for use in FreeBSD documentation.
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
AWKSCRIPT="%%LIBEXECDIR%%/c2mdoc.awk"
|
||||
CPROTO='-P"int\tf\t(\ta\t,\tb\t)" -pq -f3'
|
||||
CPROTO_BIN=cproto
|
||||
export CPROTO
|
||||
|
||||
${CPROTO_BIN} $1 | \
|
||||
grep -v '/\*.*\*/' | \
|
||||
sed -e 's/[,();]//g' | \
|
||||
${AWKSCRIPT}
|
15
devel/c2mdoc/files/c2mdoc.awk
Normal file
15
devel/c2mdoc/files/c2mdoc.awk
Normal file
@ -0,0 +1,15 @@
|
||||
#!/usr/bin/awk -f
|
||||
#
|
||||
# c2mdoc.awk -- Takes tabulated output from cproto(1) and turns it into
|
||||
# mdoc(7) markup.
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
BEGIN { FS="\t" }
|
||||
{
|
||||
printf ".Ft %s\n", $1 ;
|
||||
printf ".Fn %s", $2 ;
|
||||
for (i = 4; i < NF; i++)
|
||||
printf " \"%s\"", $i
|
||||
printf "\n" ;
|
||||
}
|
5
devel/c2mdoc/pkg-descr
Normal file
5
devel/c2mdoc/pkg-descr
Normal file
@ -0,0 +1,5 @@
|
||||
c2mdoc is a shell and awk script wrapper which abuses devel/cproto's
|
||||
parser to spit out function prototypes in a format ready to paste into
|
||||
FreeBSD developer documentation. c2man already claims to do such a
|
||||
thing, but seems crippled in the face of our kernel source. The
|
||||
toolchain used by this port whinges but still generates markup.
|
Loading…
Reference in New Issue
Block a user