From owner-cvs-all Mon Nov 4 13:15:11 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C5B3237B401 for ; Mon, 4 Nov 2002 13:15:07 -0800 (PST) Received: from heaven.gigo.com (heaven.gigo.com [64.57.102.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0930C43E8A for ; Mon, 4 Nov 2002 13:15:07 -0800 (PST) (envelope-from lioux@brturbo.com) Received: from 200-193-224-204-bsace7003.dsl.telebrasilia.net.br (200-193-224-204-bsace7003.dsl.telebrasilia.net.br [200.193.224.204]) by heaven.gigo.com (Postfix) with ESMTP id DB903B84B for ; Mon, 4 Nov 2002 13:15:04 -0800 (PST) Received: (qmail 81287 invoked by uid 1001); 4 Nov 2002 21:14:18 -0000 Message-ID: <20021104211418.81286.qmail@exxodus.fedaykin.here> Date: Mon, 4 Nov 2002 19:13:56 -0200 From: Mario Sergio Fujikawa Ferreira To: Dan Langille Cc: Kris Kennaway , Kris Kennaway , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: ports/games Makefile ports/games/tome Makefile distinfo pkg-descr pkg-plist ports/games/tome/files patch-aa References: <3DC67F0E.24713.675CE99C@localhost> <3DC690A9.2293.67A1B22C@localhost> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="envbJBWh7q8WU6mo" Content-Disposition: inline In-Reply-To: <3DC690A9.2293.67A1B22C@localhost> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD 4.7-STABLE X-Disclaimer: I hope you find what you are looking for... in life :) Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 04, 2002 at 03:21:55PM -0500, Dan Langille wrote: > On 4 Nov 2002 at 12:18, Kris Kennaway wrote: >=20 > > On Mon, Nov 04, 2002 at 02:07:10PM -0500, Dan Langille wrote: > >=20 > > > > > Why is there no pkg-comment? > > > >=20 > > > > The PORTCOMMENT variable in the makefile takes care of it. > > ^^^^^^^^^^^ > > > $ make -V COMMENT > > > /usr/home/dan/ports/games/tome/pkg-comment > > >=20 > > > That's not right is it? > >=20 > > No :-) >=20 > I've raised it on -ports, and FreshPorts has a fix to cater for=20 > PORTCOMMENT. I'm just running it in my test environment for a few=20 > more commits before putting it into production. What about the following patch? 1) PORTCOMMENT is always set, i.e. if there is a COMMENT file, PORTCOMMENT is set with COMMENT file's content 2) Therefore, if there are both a COMMENT file AND a PORTCOMMENT variable, COMMENT file takes precedence 3) PORTCOMMENT is now the standard to find out the comment for a file since it will always be set 4) make read works again since it was not using the info from PORTCOMMENT when there was no COMMENT file Caveat with this patch? Only two I can think of. $ cd ports/textproc/p5-xmltv=20 $ make describe p5-xmltv-0.5.2|/usr/ports/textproc/p5-xmltv|/usr/local|"Set of programs to = process TV (tvguide) listings in XML format"|/usr/ports/textproc/p5-xmltv/p= kg-descr|lioux@FreeBSD.org|textproc perl5|/usr/ports/archivers/p5-Compress-= Zlib /usr/ports/converters/p5-Unicode-String /usr/ports/devel/p5-Date-Manip= /usr/ports/devel/p5-Memoize /usr/ports/textproc/p5-Lingua-Preferred /usr/p= orts/textproc/p5-XML-Simple /usr/ports/textproc/p5-XML-Twig /usr/ports/text= proc/p5-XML-Writer /usr/ports/www/p5-CGI.pm /usr/ports/www/p5-HTML-Parser /= usr/ports/www/p5-HTML-TableExtract /usr/ports/www/p5-libwww /usr/ports/x11-= toolkits/p5-Tk-TableMatrix|/usr/ports/archivers/p5-Compress-Zlib /usr/ports= /converters/p5-Unicode-String /usr/ports/devel/p5-Date-Manip /usr/ports/dev= el/p5-Memoize /usr/ports/textproc/p5-Lingua-Preferred /usr/ports/textproc/p= 5-XML-Simple /usr/ports/textproc/p5-XML-Twig /usr/ports/textproc/p5-XML-Wri= ter /usr/ports/www/p5-CGI.pm /usr/ports/www/p5-HTML-Parser /usr/ports/www/p= 5-HTML-TableExtract /usr/ports/www/p5-libwww /usr/ports/x11-toolkits/p5-Tk-= TableMatrix|http://xmltv.sourceforge.net/ There is a nagging "" in there. Unfortunaly the "" is required due to the parentheses in the comment. Don't ask me why but the port breaks when I try to 'make package'. The second one, we can now use PORTCOMMENT in 'make readme'. However, if there is neither PORTCOMMENT variable nor COMMENT file, we get an empty extra line inside README.html Well, what do you guys think about this patch? On a side note, we really need to fix portlint to work with the new world order. Regards, --=20 Mario S F Ferreira - DF - Brazil - "I guess this is a signature." Computer Science Undergraduate | FreeBSD Committer | CS Developer flames to beloved devnull@someotherworldbeloworabove.org feature, n: a documented bug | bug, n: an undocumented feature --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="patch-bsd.port.mk" Content-Transfer-Encoding: quoted-printable --- bsd.port.mk.orig Mon Nov 4 18:17:19 2002 +++ bsd.port.mk Mon Nov 4 19:05:04 2002 @@ -1241,6 +1241,10 @@ =20 TMPPLIST?=3D ${WRKDIR}/.PLIST.mktmp =20 +.if exists(${COMMENT}) +PORTCOMMENT!=3D ${CAT} ${COMMENT} +.endif + .if ${OSVERSION} >=3D 400000 .for _CATEGORY in ${CATEGORIES} PKGCATEGORY?=3D ${_CATEGORY} @@ -1254,11 +1258,7 @@ PKG_DELETE?=3D /usr/sbin/pkg_delete PKG_INFO?=3D /usr/sbin/pkg_info .if !defined(PKG_ARGS) -.if exists(${COMMENT}) -PKG_ARGS=3D -v -c ${COMMENT} -d ${DESCR} -f ${TMPPLIST} -p ${PREFIX} -P "= `${MAKE} package-depends | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | sort -u`" = ${EXTRA_PKG_ARGS} -.else PKG_ARGS=3D -v -c -"${PORTCOMMENT}" -d ${DESCR} -f ${TMPPLIST} -p ${PREFI= X} -P "`${MAKE} package-depends | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | sor= t -u`" ${EXTRA_PKG_ARGS} -.endif .if exists(${PKGINSTALL}) PKG_ARGS+=3D -i ${PKGINSTALL} .endif @@ -3353,11 +3353,7 @@ describe: @${ECHO_CMD} "`perl -e ' \ print q{${PKGNAME}|${.CURDIR}|${PREFIX}|}; \ - if (open(COMMENT, q{${COMMENT}})) { \ - $$_ =3D ; \ - chomp; \ - print; \ - } elsif (not // =3D~ q{${PORTCOMMENT}}) { \ + if (not // =3D~ q{${PORTCOMMENT}}) { \ print q{${PORTCOMMENT}}; \ } else { \ print q{** No Description}; \ @@ -3426,8 +3422,7 @@ @${CAT} ${TEMPLATES}/README.port | \ ${SED} -e 's=01%%PORT%%=01'`${ECHO_CMD} ${.CURDIR} | ${SED} -e 's=02.*/\= ([^/]*/[^/]*\)$$=02\1=02'`'=01g' \ -e 's=01%%PKG%%=01${PKGNAME}=01g' \ - -e '/%%COMMENT%%/r${COMMENT}' \ - -e '/%%COMMENT%%/d' \ + -e 's=01%%COMMENT%%=01'"`${ECHO_CMD} ${PORTCOMMENT}`"'=01g' \ -e 's=01%%DESCR%%=01'"`${ECHO_CMD} ${DESCR} | ${SED} -e 's=02${.CURDIR}= /=02=02'`"'=01' \ -e 's=01%%BUILD_DEPENDS%%=01'"`cd ${.CURDIR} && ${MAKE} ${__softMAKEFLA= GS} pretty-print-build-depends-list`"'=01' \ -e 's=01%%RUN_DEPENDS%%=01'"`cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS= } pretty-print-run-depends-list`"'=01' \ @@ -3563,11 +3558,7 @@ ${MKDIR} ${PKG_DBDIR}/${PKGNAME}; \ ${PKG_CMD} ${PKG_ARGS} -O ${PKGFILE} > ${PKG_DBDIR}/${PKGNAME}/+CONTENTS= ; \ ${CP} ${DESCR} ${PKG_DBDIR}/${PKGNAME}/+DESC; \ - if [ -f ${COMMENT} ]; then \ - ${CP} ${COMMENT} ${PKG_DBDIR}/${PKGNAME}/+COMMENT; \ - else \ - ${ECHO_CMD} ${PORTCOMMENT} > ${PKG_DBDIR}/${PKGNAME}/+COMMENT; \ - fi; \ + ${ECHO_CMD} ${PORTCOMMENT} > ${PKG_DBDIR}/${PKGNAME}/+COMMENT; \ if [ -f ${PKGINSTALL} ]; then \ ${CP} ${PKGINSTALL} ${PKG_DBDIR}/${PKGNAME}/+INSTALL; \ fi; \ --envbJBWh7q8WU6mo-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message