has not been supported by pkgsrc up to now. This changes adds a PLIST macro @imake-man that expands to zero, one or two lines, depending on the value of IMAKE_MANINSTALL. Packages must explicitly have the macro in the PLIST files to use this feature. Since currently no package has that, this change doesn't affect anything at all by now. TODO: The platforms' definitions for IMAKE_MANINSTALL and the other definitions like IMAKE_MAN_SUFFIX need to be adjusted.
27 lines
606 B
Awk
27 lines
606 B
Awk
# $NetBSD: plist-macros.awk,v 1.1 2007/10/31 21:09:03 rillig Exp $
|
|
|
|
BEGIN {
|
|
IMAKE_MANINSTALL = getenv_or_die("IMAKE_MANINSTALL")
|
|
}
|
|
|
|
# @imake-man dir basename extension
|
|
#
|
|
# Creates up to two PLIST entries for man pages of imake-style programs.
|
|
#
|
|
/^@imake-man/ {
|
|
if (IMAKE_MANINSTALL ~ /catinstall/) {
|
|
n = split($2, components, "/")
|
|
sub("man", "cat", components[n])
|
|
print join(components, 1, n, "/") "/" $3 ".0"
|
|
}
|
|
if (IMAKE_MANINSTALL ~ /maninstall/) {
|
|
n = split($2, components, "/")
|
|
sub("cat", "man", components[n])
|
|
print join(components, 1, n, "/") "/" $3 "." $4
|
|
}
|
|
next;
|
|
}
|
|
|
|
1 {
|
|
print;
|
|
}
|