Port That Generates Its Own Man Page?

Is it possible to run the executable of a port post-build? I'm working on a port of gum and the build does not generate a man page, but the program itself can be run to output the man page contents, like so:

gum man

So I'd like to do soemthing like this. Please excuse the very rough pseudo-code.

Code:
post-build:
    {$SOMEWRAPPER} ${SOMEDIR}/gum man > ${STAGEDIR}${PREFIX}/man/man1/gum.1


Is this possible? Can I some how execute the built binary to create the man page?
 
Yes, that is possible. I'm doing that in the devel/malloy port which uses doxygen to generate the docs:

Simplified snipped from the Makefile:
Code:
post-build:
    (cd ${WRKSRC} && ${LOCALBASE}/bin/doxygen)

post-install:
    ${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/readme.md ${STAGEDIR}${DOCSDIR}
    (cd ${WRKSRC}/doc/doxygen && \
        ${COPYTREE_SHARE} html ${STAGEDIR}${DOCSDIR})
This is however not generating & installing man pages. Just doxygen generated HTML documentation. The steps should be similar tho.
 
Thanks! I think I have it resolved, but I'll wait until the port is committed before I post code.
 
Back
Top