diff options
author | seb <seb@pkgsrc.org> | 2002-03-04 11:47:25 +0000 |
---|---|---|
committer | seb <seb@pkgsrc.org> | 2002-03-04 11:47:25 +0000 |
commit | 27eb7cc25770bba750699efbd35f101609b1a663 (patch) | |
tree | 0454136cc6124d6ca92944033d98a3f4d2e2cd84 | |
parent | 52614eabd029677771d91e2e1295f3a4fa8bb68e (diff) | |
download | pkgsrc-27eb7cc25770bba750699efbd35f101609b1a663.tar.gz |
Adding PLIST filtering based on MANINSTALL's content for the shake
of BSD-makefile'd packages.
By tuning MANINSTALL, passing it to a package's build process by
way of MAKE_ENV, one can retains the man related entries in
${PLIST_SRC} while keeping a correct generated ${PLIST}. This is
mostly intended for packages being compiled on non-NetBSD platforms
when "andoc man pages" are difficult or impossible to process i.e.
depending on groff package is not realistic.
-rw-r--r-- | mk/bsd.pkg.mk | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 7820dced2aa..6276abf0c6b 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.937 2002/03/02 16:09:14 wiz Exp $ +# $NetBSD: bsd.pkg.mk,v 1.938 2002/03/04 11:47:25 seb Exp $ # # This file is in the public domain. # @@ -3749,6 +3749,19 @@ _MANZ_NAWK_CMD= ${AWK} '/^([^\/]*\/)*man\/([^\/]*\/)?man[1-9ln]\/.*[1-9ln]\.gz$$ . endif # MANZ .endif +.if defined(MANINSTALL) +_MANINSTALL_CMD= ${AWK} 'BEGIN{ \ + start="^([^\/]*\/)*man\/([^\/]*\/)?"; \ + end="[1-9ln]"; } \ + { if (!"${MANINSTALL:Mmaninstall}" && \ + match($$0, start "man" end)) {next;} \ + if (!"${MANINSTALL:Mcatinstall}" && \ + match($$0, start "cat" end)) {next;} \ + print $$0; }' | +.else +_MANINSTALL_CMD= +.endif + .if defined(USE_IMAKE) && ${_PREFORMATTED_MAN_DIR} == "man" _IMAKE_MAN_CMD= ${AWK} '/^([^\/]*\/)*man\/([^\/]*\/)?cat[1-9ln]\/.*0(\.gz)?$$/ { \ sect = $$0; n = match(sect, "/cat[1-9ln]"); \ @@ -3798,6 +3811,7 @@ ${PLIST}: ${PLIST_SRC} ${_PKG_SILENT}${_PKG_DEBUG} \ { ${CAT} ${PLIST_SRC}; \ ${PERL5_GENERATE_PLIST}; } | \ + ${_MANINSTALL_CMD} \ ${_MANZ_NAWK_CMD} \ ${_IMAKE_MAN_CMD} \ ${SED} ${_MANZ_EXPRESSION} \ |