diff options
author | adamw <adamw@FreeBSD.org> | 2017-10-17 22:38:17 +0800 |
---|---|---|
committer | adamw <adamw@FreeBSD.org> | 2017-10-17 22:38:17 +0800 |
commit | 66a1546c04a37427e2ff69c7c51e8e5e87f19f9e (patch) | |
tree | c2f165c6acd050f6e64d4172acb076d60ad70c47 | |
parent | 50db6bb9fd27745f34b0ca2c629135796ced5249 (diff) | |
download | freebsd-ports-gnome-66a1546c04a37427e2ff69c7c51e8e5e87f19f9e.tar.gz freebsd-ports-gnome-66a1546c04a37427e2ff69c7c51e8e5e87f19f9e.tar.zst freebsd-ports-gnome-66a1546c04a37427e2ff69c7c51e8e5e87f19f9e.zip |
Build manpages and neomuttrc when DOCS is off
Using BINARY_ALIAS, we can trick neomutt into building the manpages and
the neomuttrc. Neomutt already gracefully handles pieces of the documentation
being unavailable during installation, and pkg-create(8) takes care of the
rest.
PORTREVISION bump because the plist has changed for anybody building without
DOCS.
-rw-r--r-- | mail/neomutt/Makefile | 19 | ||||
-rw-r--r-- | mail/neomutt/pkg-plist | 14 |
2 files changed, 15 insertions, 18 deletions
diff --git a/mail/neomutt/Makefile b/mail/neomutt/Makefile index 4dfe0df387ca..86827706c296 100644 --- a/mail/neomutt/Makefile +++ b/mail/neomutt/Makefile @@ -3,6 +3,7 @@ PORTNAME= neomutt PORTVERSION= 20171013 DISTVERSIONPREFIX= ${PORTNAME}- +PORTREVISION= 1 CATEGORIES= mail MAINTAINER= bapt@FreeBSD.org @@ -88,26 +89,22 @@ SLANG_VARS= PKGMESSAGE=${FILESDIR}/pkg-message.slang NCURSES_USES= ncurses -DOCS_CONFIGURE_ENABLE= doc DOCS_BUILD_DEPENDS= xsltproc:textproc/libxslt \ ${LOCALBASE}/share/xsl/docbook/html/docbook.xsl:textproc/docbook-xsl \ lynx:www/lynx -post-build-DOCS-off: - ${SED} -e 's,@docdir@,${DOCSDIR},' ${WRKSRC}/doc/neomuttrc.head > ${WRKSRC}/doc/neomuttrc - cd ${WRKSRC} && ${CC} -I. -o doc/makedoc doc/makedoc.c - cd ${WRKSRC} && ${CPP} -isystem ${LOCALBASE}/include -D_MAKEDOC -C -I. ./init.h | doc/makedoc -c >> doc/neomuttrc +.include <bsd.port.options.mk> + +# Trick neomutt into building manpages and neomuttrc +.if empty(PORT_OPTIONS:MDOCS) +BINARY_ALIAS= xsltproc=true +.endif post-install: ${RM} ${STAGEDIR}${PREFIX}/etc/mime* + ${MV} ${STAGEDIR}${PREFIX}/etc/neomuttrc ${STAGEDIR}${PREFIX}/etc/neomuttrc.dist ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/neomutt \ ${STAGEDIR}${PREFIX}/lib/neomutt/pgpring \ ${STAGEDIR}${PREFIX}/lib/neomutt/pgpewrap -post-install-DOCS-on: - ${MV} ${STAGEDIR}${PREFIX}/etc/neomuttrc ${STAGEDIR}${PREFIX}/etc/neomuttrc.dist - -post-install-DOCS-off: - ${INSTALL_DATA} ${WRKSRC}/doc/neomuttrc ${STAGEDIR}${PREFIX}/etc/neomuttrc.dist - .include <bsd.port.mk> diff --git a/mail/neomutt/pkg-plist b/mail/neomutt/pkg-plist index 34995bf02a4c..839270359c61 100644 --- a/mail/neomutt/pkg-plist +++ b/mail/neomutt/pkg-plist @@ -2,13 +2,13 @@ bin/neomutt lib/neomutt/pgpewrap lib/neomutt/pgpring lib/neomutt/smime_keys -%%PORTDOCS%%man/man1/neomutt.1.gz -%%PORTDOCS%%man/man1/pgpewrap_neomutt.1.gz -%%PORTDOCS%%man/man1/pgpring_neomutt.1.gz -%%PORTDOCS%%man/man1/smime_keys_neomutt.1.gz -%%PORTDOCS%%man/man5/mbox_neomutt.5.gz -%%PORTDOCS%%man/man5/mmdf_neomutt.5.gz -%%PORTDOCS%%man/man5/neomuttrc.5.gz +man/man1/neomutt.1.gz +man/man1/pgpewrap_neomutt.1.gz +man/man1/pgpring_neomutt.1.gz +man/man1/smime_keys_neomutt.1.gz +man/man5/mbox_neomutt.5.gz +man/man5/mmdf_neomutt.5.gz +man/man5/neomuttrc.5.gz @sample etc/neomuttrc.dist etc/neomuttrc %%NLS%%share/locale/bg/LC_MESSAGES/neomutt.mo %%NLS%%share/locale/ca/LC_MESSAGES/neomutt.mo |