diff options
author | agc <agc@pkgsrc.org> | 2001-11-21 13:44:44 +0000 |
---|---|---|
committer | agc <agc@pkgsrc.org> | 2001-11-21 13:44:44 +0000 |
commit | 89257b87f11c68fedb78e6db33d859b5293f0221 (patch) | |
tree | 5a9075ee4fd60243a2c8953452c320d4bbb40583 | |
parent | 03c35761dff107fdc50dc97e1e75b976f27bef37 (diff) | |
download | pkgsrc-89257b87f11c68fedb78e6db33d859b5293f0221.tar.gz |
Add _OPSYS_HAS_MANZ and _PREFORMATTED_MAN_DIR definitions to the
individual defs.${OPSYS}.mk files, and use them in bsd.pkg.mk.
+ _OPSYS_HAS_MANZ defines whether or not the OS does MANZ handling as standard
+ _PREFORMATTED_MAN_DIR is the name of directory (cat or man) where
preformatted manual pages go.
Rename the internal definitions used in the generation of PLIST files to
start with '_'.
This completes the "generic" changes to bsd.pkg.mk.
-rw-r--r-- | mk/bsd.pkg.mk | 50 | ||||
-rw-r--r-- | mk/defs.Darwin.mk | 10 | ||||
-rw-r--r-- | mk/defs.Linux.mk | 10 | ||||
-rw-r--r-- | mk/defs.NetBSD.mk | 10 | ||||
-rw-r--r-- | mk/defs.SunOS.mk | 8 |
5 files changed, 48 insertions, 40 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 05f7f0c1bf0..80687aa28ca 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.857 2001/11/21 13:17:14 agc Exp $ +# $NetBSD: bsd.pkg.mk,v 1.858 2001/11/21 13:44:44 agc Exp $ # # This file is in the public domain. # @@ -3379,30 +3379,19 @@ MAKE_ENV+= MANZ="${MANZ}" # PERL5_PACKLIST is defined # - adding symlinks for shared libs (ELF) or ldconfig calls (a.out). -.if ${OPSYS} == "NetBSD" || ${OPSYS} == "Darwin" -IMAKE_MAN_CMD= +.if ${_OPSYS_HAS_MANZ} == "yes" . ifdef MANZ -MANZ_EXPRESSION= -e 's|\(^\([^@/]*/\)*man/\([^/]*/\)\{0,1\}man[1-9ln]/.*[1-9ln]$$\)|\1.gz|' \ +_MANZ_EXPRESSION= -e 's|\(^\([^@/]*/\)*man/\([^/]*/\)\{0,1\}man[1-9ln]/.*[1-9ln]$$\)|\1.gz|' \ -e 's|\(^\([^@/]*/\)*man/\([^/]*/\)\{0,1\}cat[1-9ln]/.*0$$\)|\1.gz|' . else -MANZ_EXPRESSION= -e 's|\(^\([^@/]*/\)*man/\([^/]*/\)\{0,1\}man[1-9ln]/.*[1-9ln]\)\.gz$$|\1|' \ +_MANZ_EXPRESSION= -e 's|\(^\([^@/]*/\)*man/\([^/]*/\)\{0,1\}man[1-9ln]/.*[1-9ln]\)\.gz$$|\1|' \ -e 's|\(^\([^@/]*/\)*man/\([^/]*/\)\{0,1\}cat[1-9ln]/.*0\)\.gz$$|\1|' . endif # MANZ -MANZ_NAWK_CMD= -.elif ${OPSYS} == "SunOS" -. ifdef USE_IMAKE -IMAKE_MAN_CMD= ${AWK} '/^([^\/]*\/)*man\/([^\/]*\/)?cat[1-9ln]\/.*0(\.gz)?$$/ { \ - sect = $$0; n = match(sect, "/cat[1-9ln]"); \ - sect = sprintf(".%s", substr(sect, n + 4, 1)); \ - s = $$0; sub("/cat", "/man", s); sub("\.0(\.gz)?$$", sect, s); \ - if (match($$0, "\.gz$$") > 0) { ext = ".gz";} else { ext = "";} \ - $$0 = sprintf("%s%s", s, ext); \ - } { print $$0; }' | -. else -IMAKE_MAN_CMD= -. endif # USE_IMAKE +_MANZ_NAWK_CMD= +.else +_MANZ_EXPRESSION= . ifdef MANZ -MANZ_NAWK_CMD= ${AWK} '/^([^\/]*\/)*man\/([^\/]*\/)?man[1-9ln]\/.*[1-9ln]\.gz$$/ { \ +_MANZ_NAWK_CMD= ${AWK} '/^([^\/]*\/)*man\/([^\/]*\/)?man[1-9ln]\/.*[1-9ln]\.gz$$/ { \ $$0 = sprintf("%s.gz", $$0); \ } \ /^([^\/]*\/)*man\/([^\/]*\/)?cat[1-9ln]\/.*0\.gz$$/ { \ @@ -3410,7 +3399,7 @@ MANZ_NAWK_CMD= ${AWK} '/^([^\/]*\/)*man\/([^\/]*\/)?man[1-9ln]\/.*[1-9ln]\.gz$$/ } \ { print $$0; }' | . else -MANZ_NAWK_CMD= ${AWK} '/^([^\/]*\/)*man\/([^\/]*\/)?man[1-9ln]\/.*[1-9ln]\.gz$$/ { \ +_MANZ_NAWK_CMD= ${AWK} '/^([^\/]*\/)*man\/([^\/]*\/)?man[1-9ln]\/.*[1-9ln]\.gz$$/ { \ $$0 = substr($$0, 1, length($$0) - 3); \ } \ /^([^\/]*\/)*man\/([^\/]*\/)?cat[1-9ln]\/.*0\.gz$$/ { \ @@ -3418,8 +3407,19 @@ MANZ_NAWK_CMD= ${AWK} '/^([^\/]*\/)*man\/([^\/]*\/)?man[1-9ln]\/.*[1-9ln]\.gz$$/ } \ { print $$0; }' | . endif # MANZ -MANZ_EXPRESSION= -.endif # SunOS +.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]"); \ + sect = sprintf(".%s", substr(sect, n + 4, 1)); \ + s = $$0; sub("/cat", "/man", s); sub("\.0(\.gz)?$$", sect, s); \ + if (match($$0, "\.gz$$") > 0) { ext = ".gz";} else { ext = "";} \ + $$0 = sprintf("%s%s", s, ext); \ + } { print $$0; }' | +. else +_IMAKE_MAN_CMD= +.endif # USE_IMAKE .if defined(PERL5_PACKLIST) PERL5_COMMENT= ( ${ECHO} "@comment The following lines are automatically generated"; \ @@ -3458,9 +3458,9 @@ ${PLIST}: ${PLIST_SRC} ${_PKG_SILENT}${_PKG_DEBUG} \ { ${CAT} ${PLIST_SRC}; \ ${PERL5_GENERATE_PLIST}; } | \ - ${MANZ_NAWK_CMD} \ - ${IMAKE_MAN_CMD} \ - ${SED} ${MANZ_EXPRESSION} \ + ${_MANZ_NAWK_CMD} \ + ${_IMAKE_MAN_CMD} \ + ${SED} ${_MANZ_EXPRESSION} \ ${PLIST_SUBST:S/=/}!/:S/$/!g/:S/^/ -e s!\\\${/} \ > ${PLIST}; \ ${MAKE} ${MAKEFLAGS} do-shlib-handling \ diff --git a/mk/defs.Darwin.mk b/mk/defs.Darwin.mk index 676f0abdaa8..a6491363f2d 100644 --- a/mk/defs.Darwin.mk +++ b/mk/defs.Darwin.mk @@ -1,4 +1,4 @@ -# $NetBSD: defs.Darwin.mk,v 1.10 2001/11/21 13:17:14 agc Exp $ +# $NetBSD: defs.Darwin.mk,v 1.11 2001/11/21 13:44:44 agc Exp $ # # Variable definitions for the Darwin operating system. @@ -61,6 +61,8 @@ ROOT_GROUP?= wheel _DO_LIBINTL_CHECKS= yes # perform checks for valid libintl _DO_SHLIB_CHECKS= no # on installation, fixup PLIST for shared libs -_IMAKE_MAKE= ${MAKE} # program which gets invoked by imake -_PATCH_BACKUP_ARG= -z # switch to patch(1) for backup file -_USE_RPATH= no # don't add rpath to LDFLAGS +_IMAKE_MAKE= ${MAKE} # program which gets invoked by imake +_OPSYS_HAS_MANZ= yes # MANZ controls gzipping of man pages +_PATCH_BACKUP_ARG= -z # switch to patch(1) for backup file +_PREFORMATTED_MAN_DIR= cat # directory where catman pages are +_USE_RPATH= no # don't add rpath to LDFLAGS diff --git a/mk/defs.Linux.mk b/mk/defs.Linux.mk index 61d915f7315..aa9db8490f3 100644 --- a/mk/defs.Linux.mk +++ b/mk/defs.Linux.mk @@ -1,4 +1,4 @@ -# $NetBSD: defs.Linux.mk,v 1.16 2001/11/21 13:17:14 agc Exp $ +# $NetBSD: defs.Linux.mk,v 1.17 2001/11/21 13:44:44 agc Exp $ # # Variable definitions for the Linux operating system. @@ -65,6 +65,8 @@ ROOT_GROUP?= wheel _DO_LIBINTL_CHECKS= no # perform checks for valid libintl _DO_SHLIB_CHECKS= no # on installation, fixup PLIST for shared libs -_IMAKE_MAKE= ${MAKE} # program which gets invoked by imake -_PATCH_BACKUP_ARG= -z # switch to patch(1) for backup file -_USE_RPATH= yes # add rpath to LDFLAGS +_IMAKE_MAKE= ${MAKE} # program which gets invoked by imake +_OPSYS_HAS_MANZ= no # no MANZ for gzipping of man pages +_PATCH_BACKUP_ARG= -z # switch to patch(1) for backup file +_PREFORMATTED_MAN_DIR= cat # directory where catman pages are +_USE_RPATH= yes # add rpath to LDFLAGS diff --git a/mk/defs.NetBSD.mk b/mk/defs.NetBSD.mk index 7eef980a3e7..8c2f192414f 100644 --- a/mk/defs.NetBSD.mk +++ b/mk/defs.NetBSD.mk @@ -1,4 +1,4 @@ -# $NetBSD: defs.NetBSD.mk,v 1.14 2001/11/21 13:17:14 agc Exp $ +# $NetBSD: defs.NetBSD.mk,v 1.15 2001/11/21 13:44:44 agc Exp $ # # Variable definitions for the NetBSD operating system. @@ -70,6 +70,8 @@ ROOT_GROUP?= wheel _DO_LIBINTL_CHECKS= yes # perform checks for valid libintl _DO_SHLIB_CHECKS= yes # fixup PLIST for shared libs/run ldconfig -_IMAKE_MAKE= ${MAKE} # program which gets invoked by imake -_PATCH_BACKUP_ARG= -b # switch to patch(1) to provide a backup file -_USE_RPATH= yes # add rpath to LDFLAGS +_IMAKE_MAKE= ${MAKE} # program which gets invoked by imake +_OPSYS_HAS_MANZ= yes # MANZ controls gzipping of man pages +_PATCH_BACKUP_ARG= -b # switch to patch(1) to provide a backup file +_PREFORMATTED_MAN_DIR= cat # directory where catman pages are +_USE_RPATH= yes # add rpath to LDFLAGS diff --git a/mk/defs.SunOS.mk b/mk/defs.SunOS.mk index df15e875945..3762a3f6e70 100644 --- a/mk/defs.SunOS.mk +++ b/mk/defs.SunOS.mk @@ -1,4 +1,4 @@ -# $NetBSD: defs.SunOS.mk,v 1.13 2001/11/21 13:17:14 agc Exp $ +# $NetBSD: defs.SunOS.mk,v 1.14 2001/11/21 13:44:44 agc Exp $ # # Variable definitions for the SunOS/Solaris operating system. @@ -73,5 +73,7 @@ ROOT_GROUP?= root _DO_LIBINTL_CHECKS= yes # perform checks for valid libintl _DO_SHLIB_CHECKS= yes # fixup PLIST for shared libs _IMAKE_MAKE= /usr/ccs/bin/make # program which gets invoked by imake -_PATCH_BACKUP_ARG= -z # switch to patch(1) for backup file -_USE_RPATH= yes # add rpath to LDFLAGS +_OPSYS_HAS_MANZ= no # no MANZ for gzipping of man pages +_PATCH_BACKUP_ARG= -z # switch to patch(1) for backup file +_PREFORMATTED_MAN_DIR= man # directory where catman pages are +_USE_RPATH= yes # add rpath to LDFLAGS |