aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authoradamw <adamw@FreeBSD.org>2017-10-16 03:04:23 +0800
committeradamw <adamw@FreeBSD.org>2017-10-16 03:04:23 +0800
commit54104327529ce15e1dfc06738ad6f578d62f7a7a (patch)
tree48661d0cc1133728df3910a7e4541769d94867c7 /mail
parent20a97f4d115883e5c34b582c0c83ba59959e1d3a (diff)
downloadfreebsd-ports-gnome-54104327529ce15e1dfc06738ad6f578d62f7a7a.tar.gz
freebsd-ports-gnome-54104327529ce15e1dfc06738ad6f578d62f7a7a.tar.zst
freebsd-ports-gnome-54104327529ce15e1dfc06738ad6f578d62f7a7a.zip
Fix packaging when DOCS=off
The manpages are once again only built when DOCS=on, but now so is the default neomuttrc. The manpages are fine to protect with %%PORTDOCS%% (not great, but permissible), but the default neomuttrc needs to be there. So, generate it manually after the build. This is kludgey, but it at least gets the port packaging again. Approved by: maintainer (bapt)
Diffstat (limited to 'mail')
-rw-r--r--mail/neomutt/Makefile12
-rw-r--r--mail/neomutt/pkg-plist14
2 files changed, 18 insertions, 8 deletions
diff --git a/mail/neomutt/Makefile b/mail/neomutt/Makefile
index 61cc7fa4ca3a..c6ca5b1d5ee5 100644
--- a/mail/neomutt/Makefile
+++ b/mail/neomutt/Makefile
@@ -93,11 +93,21 @@ 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
+
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 839270359c61..34995bf02a4c 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
-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
+%%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
@sample etc/neomuttrc.dist etc/neomuttrc
%%NLS%%share/locale/bg/LC_MESSAGES/neomutt.mo
%%NLS%%share/locale/ca/LC_MESSAGES/neomutt.mo