Date: Sun, 3 Nov 2002 09:27:28 -0500 (EST) From: Trevor Johnson <trevor@jpj.net> To: Kris Kennaway <kris@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, <cvs-all@FreeBSD.org> Subject: Re: cvs commit: ports/Mk bsd.port.mk Message-ID: <20021103084715.F95677-100000@blues.jpj.net> In-Reply-To: <200211030543.gA35hnMM018389@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> * If the ${COMMENT} file does not exist, use the value of the > ${PORTCOMMENT} variable instead. This will allow us to incrementally > phase out pkg-comment [1] This is not IBM-compatible. IBM cards only have 80 columns. Using 14 of them for PORTCOMMENT="" leaves only 66 for the comment itself, unless a continuation card is used. NetBSD and OpenBSD have chosen the shorter name COMMENT instead. That leaves 70 columns for the comment. Our portlint recommends 70 (or fewer columns), so existing ports which pass portlint are already consistent with the shorter name, but not necessarily with the longer one. Here's a patch. I tested it and it failed "make package" in the same manner that bsd.port.mk rev. 1.427 does ("pkg_create: only one package name allowed ('for' extraneous)"). It also failed "make deinstall" in the same way ("pkg_delete: package 'portlint-2.3.3' doesn't have a prefix"). -- Trevor Johnson Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.427 diff -u -r1.427 bsd.port.mk --- bsd.port.mk 3 Nov 2002 05:43:49 -0000 1.427 +++ bsd.port.mk 3 Nov 2002 13:55:32 -0000 @@ -1231,7 +1231,7 @@ .undef NO_PACKAGE .endif -COMMENT?= ${PKGDIR}/pkg-comment +COMMENTFILE?= ${PKGDIR}/pkg-comment DESCR?= ${PKGDIR}/pkg-descr PLIST?= ${PKGDIR}/pkg-plist PKGINSTALL?= ${PKGDIR}/pkg-install @@ -1254,10 +1254,10 @@ PKG_DELETE?= /usr/sbin/pkg_delete PKG_INFO?= /usr/sbin/pkg_info .if !defined(PKG_ARGS) -.if exists(${COMMENT}) -PKG_ARGS= -v -c ${COMMENT} -d ${DESCR} -f ${TMPPLIST} -p ${PREFIX} -P "`${MAKE} package-depends | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | sort -u`" ${EXTRA_PKG_ARGS} +.if exists(${COMMENTFILE}) +PKG_ARGS= -v -c ${COMMENTFILE} -d ${DESCR} -f ${TMPPLIST} -p ${PREFIX} -P "`${MAKE} package-depends | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | sort -u`" ${EXTRA_PKG_ARGS} .else -PKG_ARGS= -v -c -"${PORTCOMMENT}" -d ${DESCR} -f ${TMPPLIST} -p ${PREFIX} -P "`${MAKE} package-depends | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | sort -u`" ${EXTRA_PKG_ARGS} +PKG_ARGS= -v -c -"${COMMENT}" -d ${DESCR} -f ${TMPPLIST} -p ${PREFIX} -P "`${MAKE} package-depends | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | sort -u`" ${EXTRA_PKG_ARGS} .endif .if exists(${PKGINSTALL}) PKG_ARGS+= -i ${PKGINSTALL} @@ -3353,12 +3353,12 @@ describe: @${ECHO_CMD} "`perl -e ' \ print q{${PKGNAME}|${.CURDIR}|${PREFIX}|}; \ - if (open(COMMENT, q{${COMMENT}})) { \ - $$_ = <COMMENT>; \ + if (open(COMMENTFILE, q{${COMMENTFILE}})) { \ + $$_ = <COMMENTFILE>; \ chomp; \ print; \ - } elsif (not // =~ q{${PORTCOMMENT}}) { \ - print q{${PORTCOMMENT}}; \ + } elsif (not // =~ q{${COMMENT}}) { \ + print q{${COMMENT}}; \ } else { \ print q{** No Description}; \ } \ @@ -3426,8 +3426,8 @@ @${CAT} ${TEMPLATES}/README.port | \ ${SED} -e 's%%PORT%%'`${ECHO_CMD} ${.CURDIR} | ${SED} -e 's.*/\([^/]*/[^/]*\)$$\1'`'g' \ -e 's%%PKG%%${PKGNAME}g' \ - -e '/%%COMMENT%%/r${COMMENT}' \ - -e '/%%COMMENT%%/d' \ + -e '/%%COMMENTFILE%%/r${COMMENTFILE}' \ + -e '/%%COMMENTFILE%%/d' \ -e 's%%DESCR%%'"`${ECHO_CMD} ${DESCR} | ${SED} -e 's${.CURDIR}/'`"'' \ -e 's%%BUILD_DEPENDS%%'"`cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} pretty-print-build-depends-list`"'' \ -e 's%%RUN_DEPENDS%%'"`cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} pretty-print-run-depends-list`"'' \ @@ -3563,10 +3563,10 @@ ${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; \ + if [ -f ${COMMENTFILE} ]; then \ + ${CP} ${COMMENTFILE} ${PKG_DBDIR}/${PKGNAME}/+COMMENT; \ else \ - ${ECHO_CMD} ${PORTCOMMENT} > ${PKG_DBDIR}/${PKGNAME}/+COMMENT; \ + ${ECHO_CMD} ${COMMENT} > ${PKG_DBDIR}/${PKGNAME}/+COMMENT; \ fi; \ if [ -f ${PKGINSTALL} ]; then \ ${CP} ${PKGINSTALL} ${PKG_DBDIR}/${PKGNAME}/+INSTALL; \ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021103084715.F95677-100000>