From owner-freebsd-ports Thu Apr 27 15:17:48 2000 Delivered-To: freebsd-ports@freebsd.org Received: from ipt2.iptelecom.net.ua (ipt2.iptelecom.net.ua [212.9.224.2]) by hub.freebsd.org (Postfix) with ESMTP id 9D06637B539 for ; Thu, 27 Apr 2000 15:17:40 -0700 (PDT) (envelope-from sobomax@altavista.net) Received: from vega.vega.com (dialup2-25.iptelecom.net.ua [212.9.226.89]) by ipt2.iptelecom.net.ua (8.9.3/8.9.3) with ESMTP id BAA20449 for ; Fri, 28 Apr 2000 01:25:19 +0300 (EEST) Received: from altavista.net (big_brother.vega.com [192.168.1.1]) by vega.vega.com (8.9.3/8.9.3) with ESMTP id BAA24752 for ; Fri, 28 Apr 2000 01:17:02 +0300 (EEST) (envelope-from sobomax@altavista.net) Message-ID: <3908BC5C.8512DE97@altavista.net> Date: Fri, 28 Apr 2000 01:17:00 +0300 From: Maxim Sobolev Organization: Vega International Capital X-Mailer: Mozilla 4.72 [en] (WinNT; I) X-Accept-Language: uk,ru,en MIME-Version: 1.0 To: ports@freebsd.org Subject: bsd.ports.mk PLISTS proposal Content-Type: multipart/mixed; boundary="------------49CFCE9F220BF4D4B842F416" Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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