diff options
author | hubertf <hubertf@pkgsrc.org> | 1997-11-22 03:39:20 +0000 |
---|---|---|
committer | hubertf <hubertf@pkgsrc.org> | 1997-11-22 03:39:20 +0000 |
commit | 87364636d609a5d260a1f18188679a615ceea5b7 (patch) | |
tree | 965f7558aeb396c51795bb8ba3cd96be2bcf0af8 /mk | |
parent | 427ba64225f45446e631f76c59560a48d7922c73 (diff) | |
download | pkgsrc-87364636d609a5d260a1f18188679a615ceea5b7.tar.gz |
Use MI/MD PLIST files pkg/PLIST-{mi,md-{shared,static}}
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 55 | ||||
-rw-r--r-- | mk/bsd.port.mk | 55 |
2 files changed, 86 insertions, 24 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 433f8e26d2b..3637aac5d8d 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,7 +1,7 @@ #-*- mode: Fundamental; tab-width: 4; -*- # ex:ts=4 # -# $NetBSD: bsd.pkg.mk,v 1.19 1997/11/21 17:44:11 agc Exp $ +# $NetBSD: bsd.pkg.mk,v 1.20 1997/11/22 03:39:20 hubertf Exp $ # # bsd.port.mk - 940820 Jordan K. Hubbard. # This file is in the public domain. @@ -117,6 +117,10 @@ NetBSD_MAINTAINER= agc@netbsd.org # MTREE_FILE - The name of the mtree file (default: /etc/mtree/BSD.x11.dist # if USE_IMAKE or USE_X11 is set, /etc/mtree/BSD.local.dist # otherwise.) +# PLIST_SRC - Which file(s) to use to build ${PLIST}. Either +# ${PKGDIR}/PLIST or ${PKGDIR}/PLIST-mi plus +# ${PKGDIR}/PLIST-md.shared or ${PKGDIR}/PLIST-md.static, +# if not set otherwise. # # NO_BUILD - Use a dummy (do-nothing) build target. # NO_CONFIGURE - Use a dummy (do-nothing) configure target. @@ -1835,19 +1839,46 @@ tags: # (we don't regard MANCOMPRESSED as many ports seem to have .gz pages in # PLIST even when they install manpages without compressing them) # - substituting machine architecture (uname -m) for <$ARCH> -${PLIST}: ${PKGDIR}/PLIST +.if !defined(PLIST_SRC) +.if exists(${PKGDIR}/PLIST) +PLIST_SRC= ${PKGDIR}/PLIST +.elif exists(${PKGDIR}/PLIST-mi) && \ + exists(${PKGDIR}/PLIST-md.shared) && \ + exists(${PKGDIR}/PLIST-md.static) +PLIST_SRC= ${PKGDIR}/PLIST-mi +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "pmax" || ${MACHINE_ARCH} == "alpha" +# XXX this is mostly for perl; alpha can be removed once perl knows +# how to do dynamic loading - hubertf +PLIST_SRC+= ${PKGDIR}/PLIST-md.static +.else +PLIST_SRC+= ${PKGDIR}/PLIST-md.shared +.endif # powerpc || pmax || alpha +.else # no PLIST at all +PLIST_SRC= +.endif # ${PKGDIR}/PLIST +.endif # !PLIST_SRC + +${PLIST}: ${PLIST_SRC} + @if [ -z "${PLIST_SRC}" ] ; then \ + ${ECHO} "No ${PKGDIR}/PLIST, and no ${PKGDIR}/PLIST-{mi,md.shared,md.static}" ; \ + ${ECHO} "Package must care for making ${PLIST}!" ; \ + fi .if defined(MANZ) - @${SED} \ - -e '/man\/man.*[^g][^z]$$/s/$$/.gz/g' \ - -e '/man\/cat.*[^g][^z]$$/s/$$/.gz/g' \ - -e 's/\<\$$ARCH\>/'${ARCH}'/g' \ - <${PKGDIR}/PLIST >${PLIST} + @if [ ! -z "${PLIST_SRC}" ] ; then + ${CAT} ${PLIST_SRC} | ${SED} \ + -e '/man\/man.*[^g][^z]$$/s/$$/.gz/g' \ + -e '/man\/cat.*[^g][^z]$$/s/$$/.gz/g' \ + -e 's/\<\$$ARCH\>/'${ARCH}'/g' \ + >${PLIST} ; \ + fi .else # !MANZ - @${SED} \ - -e '/man\/man/s/\.gz$$//g' \ - -e '/man\/cat/s/\.gz$$//g' \ - -e 's/\<\$$ARCH\>/'${ARCH}'/g' \ - <${PKGDIR}/PLIST >${PLIST} + @if [ ! -z "${PLIST_SRC}" ] ; then \ + ${CAT} ${PLIST_SRC} | ${SED} \ + -e '/man\/man/s/\.gz$$//g' \ + -e '/man\/cat/s/\.gz$$//g' \ + -e 's/\<\$$ARCH\>/'${ARCH}'/g' \ + >${PLIST} ; \ + fi .endif # MANZ diff --git a/mk/bsd.port.mk b/mk/bsd.port.mk index 4fdcd0476e9..8da383fb5e1 100644 --- a/mk/bsd.port.mk +++ b/mk/bsd.port.mk @@ -1,7 +1,7 @@ #-*- mode: Fundamental; tab-width: 4; -*- # ex:ts=4 # -# $NetBSD: bsd.port.mk,v 1.19 1997/11/21 17:44:11 agc Exp $ +# $NetBSD: bsd.port.mk,v 1.20 1997/11/22 03:39:20 hubertf Exp $ # # bsd.port.mk - 940820 Jordan K. Hubbard. # This file is in the public domain. @@ -117,6 +117,10 @@ NetBSD_MAINTAINER= agc@netbsd.org # MTREE_FILE - The name of the mtree file (default: /etc/mtree/BSD.x11.dist # if USE_IMAKE or USE_X11 is set, /etc/mtree/BSD.local.dist # otherwise.) +# PLIST_SRC - Which file(s) to use to build ${PLIST}. Either +# ${PKGDIR}/PLIST or ${PKGDIR}/PLIST-mi plus +# ${PKGDIR}/PLIST-md.shared or ${PKGDIR}/PLIST-md.static, +# if not set otherwise. # # NO_BUILD - Use a dummy (do-nothing) build target. # NO_CONFIGURE - Use a dummy (do-nothing) configure target. @@ -1835,19 +1839,46 @@ tags: # (we don't regard MANCOMPRESSED as many ports seem to have .gz pages in # PLIST even when they install manpages without compressing them) # - substituting machine architecture (uname -m) for <$ARCH> -${PLIST}: ${PKGDIR}/PLIST +.if !defined(PLIST_SRC) +.if exists(${PKGDIR}/PLIST) +PLIST_SRC= ${PKGDIR}/PLIST +.elif exists(${PKGDIR}/PLIST-mi) && \ + exists(${PKGDIR}/PLIST-md.shared) && \ + exists(${PKGDIR}/PLIST-md.static) +PLIST_SRC= ${PKGDIR}/PLIST-mi +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "pmax" || ${MACHINE_ARCH} == "alpha" +# XXX this is mostly for perl; alpha can be removed once perl knows +# how to do dynamic loading - hubertf +PLIST_SRC+= ${PKGDIR}/PLIST-md.static +.else +PLIST_SRC+= ${PKGDIR}/PLIST-md.shared +.endif # powerpc || pmax || alpha +.else # no PLIST at all +PLIST_SRC= +.endif # ${PKGDIR}/PLIST +.endif # !PLIST_SRC + +${PLIST}: ${PLIST_SRC} + @if [ -z "${PLIST_SRC}" ] ; then \ + ${ECHO} "No ${PKGDIR}/PLIST, and no ${PKGDIR}/PLIST-{mi,md.shared,md.static}" ; \ + ${ECHO} "Package must care for making ${PLIST}!" ; \ + fi .if defined(MANZ) - @${SED} \ - -e '/man\/man.*[^g][^z]$$/s/$$/.gz/g' \ - -e '/man\/cat.*[^g][^z]$$/s/$$/.gz/g' \ - -e 's/\<\$$ARCH\>/'${ARCH}'/g' \ - <${PKGDIR}/PLIST >${PLIST} + @if [ ! -z "${PLIST_SRC}" ] ; then + ${CAT} ${PLIST_SRC} | ${SED} \ + -e '/man\/man.*[^g][^z]$$/s/$$/.gz/g' \ + -e '/man\/cat.*[^g][^z]$$/s/$$/.gz/g' \ + -e 's/\<\$$ARCH\>/'${ARCH}'/g' \ + >${PLIST} ; \ + fi .else # !MANZ - @${SED} \ - -e '/man\/man/s/\.gz$$//g' \ - -e '/man\/cat/s/\.gz$$//g' \ - -e 's/\<\$$ARCH\>/'${ARCH}'/g' \ - <${PKGDIR}/PLIST >${PLIST} + @if [ ! -z "${PLIST_SRC}" ] ; then \ + ${CAT} ${PLIST_SRC} | ${SED} \ + -e '/man\/man/s/\.gz$$//g' \ + -e '/man\/cat/s/\.gz$$//g' \ + -e 's/\<\$$ARCH\>/'${ARCH}'/g' \ + >${PLIST} ; \ + fi .endif # MANZ |