Date: Fri, 28 Apr 2000 01:17:00 +0300 From: Maxim Sobolev <sobomax@altavista.net> To: ports@freebsd.org Subject: bsd.ports.mk PLISTS proposal Message-ID: <3908BC5C.8512DE97@altavista.net>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------49CFCE9F220BF4D4B842F416 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Hi, I've wrote small patch to bsd.port.mk to add possibility to specify multiple PLIST's, which should be usefull for over 600 ports using NOPORTDOCS and other complex ports using compile-time PLIST generation. This change should retain full backward compatibility. For example with this patch applied Makefile of the NOPORTDOCS-using port could be rewriten as following to generate valid +CONTENTS (i.e. w/o missing files) in both NOPORTDOCS defined and undefined cases: ---------------------------------------------------------- .if !defined(NOPORTDOCS) PLISTS= ${PKGDIR}/PLIST \ ${PKGDIR}/PLIST.doc .endif # there is no need to specify .else case because PLISTS # defaulting to plain ${PKGDIR}/PLIST in this case ---------------------------------------------------------- -Maxim --------------49CFCE9F220BF4D4B842F416 Content-Type: text/plain; charset=koi8-r; name="bsd.port.mk.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bsd.port.mk.diff" --- /usr/ports/Mk/bsd.port.mk 2000/04/27 20:57:36 1.1 +++ /usr/ports/Mk/bsd.port.mk 2000/04/27 21:30:07 @@ -396,7 +396,7 @@ # MTREE_FILE - The name of the mtree file (default: /etc/mtree/BSD.x11.dist # if USE_X_PREFIX is set, /etc/mtree/BSD.local.dist # otherwise.) -# PLIST - Name of the `packing list' file (default: ${PKGDIR}/PLIST). +# PLISTS - Names of the `packing list' files (default: ${PKGDIR}/PLIST). # Change this to ${WRKDIR}/PLIST or something if you # need to write to it. (It is not a good idea for a port # to write to any file outside ${WRKDIR} during a normal @@ -902,6 +902,7 @@ COMMENT?= ${PKGDIR}/COMMENT DESCR?= ${PKGDIR}/DESCR PLIST?= ${PKGDIR}/PLIST +PLISTS?= ${PLIST} TMPPLIST?= ${WRKDIR}/.PLIST.mktmp PKGINSTALL?= ${PKGDIR}/INSTALL PKGDEINSTALL?= ${PKGDIR}/DEINSTALL @@ -2681,7 +2682,10 @@ generate-plist: @${ECHO_MSG} "===> Generating temporary packing list" @${MKDIR} `dirname ${TMPPLIST}` - @if [ ! -f ${PLIST} -o ! -f ${COMMENT} -o ! -f ${DESCR} ]; then ${ECHO} "** Missing package files for ${PKGNAME}."; exit 1; fi + @for file in ${PLISTS}; do \ + if [ ! -f $$file ]; then ${ECHO} "** Missing package file $$file for ${PKGNAME}."; exit 1; fi \ + done + @if [ ! -f ${COMMENT} -o ! -f ${DESCR} ]; then ${ECHO} "** Missing package files for ${PKGNAME}."; exit 1; fi @>${TMPPLIST} @for man in ${__MANPAGES}; do \ ${ECHO} $${man} >> ${TMPPLIST}; \ @@ -2700,10 +2704,12 @@ @${ECHO} '@cwd ${PREFIX}' >> ${TMPPLIST} .endif .endfor - @${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${PLIST} | \ - ${SED} -e "/\@exec install-info.*$$/h" \ - -e "s^^\@exec [ -f %D/info/dir -o ! -f /usr/share/info/dir ] || sed -ne '1,/Menu:/p' /usr/share/info/dir > %D/info/dir^g" \ - -e "t fix" -e "b" -e ":fix" -e "G" >> ${TMPPLIST} + @for file in ${PLISTS}; do \ + ${SED} ${PLIST_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} $$file | \ + ${SED} -e "/\@exec install-info.*$$/h" \ + -e "s^^\@exec [ -f %D/info/dir -o ! -f /usr/share/info/dir ] || sed -ne '1,/Menu:/p' /usr/share/info/dir > %D/info/dir^g" \ + -e "t fix" -e "b" -e ":fix" -e "G" >> ${TMPPLIST}; \ + done .if !defined(NO_FILTER_SHLIBS) .if (${PORTOBJFORMAT} == "aout") @${SED} -e 's,\(/lib.*\.so\.[0-9]*\)$$,\1.0,' ${TMPPLIST} > ${TMPPLIST}.tmp --------------49CFCE9F220BF4D4B842F416-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3908BC5C.8512DE97>