Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Oct 2000 00:50:02 -0700 (PDT)
From:      asami@FreeBSD.org (Satoshi - Ports Wraith - Asami)
To:        freebsd-ports@FreeBSD.org
Subject:   Re: ports/21952: make readmes in ports is broke
Message-ID:  <200010140750.AAA10755@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/21952; it has been noted by GNATS.

From: asami@FreeBSD.org (Satoshi - Ports Wraith - Asami)
To: <trevor@FreeBSD.org>
Cc: srodberg@visi.com, freebsd-gnats-submit@FreeBSD.org,
	Dann Lunsford <dann@greycat.com>
Subject: Re: ports/21952: make readmes in ports is broke
Date: 14 Oct 2000 00:40:01 -0700

  * This same problem was reported by Dann Lunsford in PR 21851.
  * Does his patch work for you?
 
 Actually, bsd.port.subdir.mk was broken a long time ago -- the recent
 update just made the problem worse.  Please try the following.  It
 seems to work fine for ports that define MASTERDIR and/or
 COMMENT/DESCR.
 
 I've also added inclusion of the comment file in the category level.
 
 Satoshi
 -------
 Index: Mk/bsd.port.subdir.mk
 ===================================================================
 RCS file: /usr/cvs/ports/Mk/bsd.port.subdir.mk,v
 retrieving revision 1.38
 diff -u -r1.38 bsd.port.subdir.mk
 --- Mk/bsd.port.subdir.mk	2000/08/08 14:56:46	1.38
 +++ Mk/bsd.port.subdir.mk	2000/10/14 03:49:18
 @@ -195,6 +195,8 @@
  .else
  README=	${TEMPLATES}/README.category
  .endif
 +COMMENT?=	${.CURDIR}/pkg/COMMENT
 +DESCR?=		${.CURDIR}/pkg/DESCR
  
  HTMLIFY=	sed -e 's/&/\&amp;/g' -e 's/>/\&gt;/g' -e 's/</\&lt;/g'
  
 @@ -210,20 +212,23 @@
  .else
  	@echo -n '<a href="'${entry}/README.html'">'"`cd ${entry}; make package-name | ${HTMLIFY}`</a>: " >> $@.tmp
  .endif
 -.if exists(${entry}/pkg/COMMENT)
 -	@${HTMLIFY} ${entry}/pkg/COMMENT >> $@.tmp
 -.else
 -	@echo "(no description)" >> $@.tmp
 -.endif
 +	@cat `cd ${entry}; make -V COMMENT` | ${HTMLIFY} >> $@.tmp
  .endfor
  	@sort -t '>' +1 -2 $@.tmp > $@.tmp2
 -.if exists(${.CURDIR}/pkg/DESCR)
 -	@${HTMLIFY} ${.CURDIR}/pkg/DESCR > $@.tmp3
 +.if exists(${DESCR})
 +	@${HTMLIFY} ${DESCR} > $@.tmp3
  .else
  	@> $@.tmp3
  .endif
 +.if exists(${COMMENT})
 +	@${HTMLIFY} ${COMMENT} > $@.tmp4
 +.else
 +	@> $@.tmp4
 +.endif
  	@cat ${README} | \
  		sed -e 's/%%CATEGORY%%/'"`basename ${.CURDIR}`"'/g' \
 +			-e '/%%COMMENT%%/r$@.tmp4' \
 +			-e '/%%COMMENT%%/d' \
  			-e '/%%DESCR%%/r$@.tmp3' \
  			-e '/%%DESCR%%/d' \
  			-e '/%%SUBDIR%%/r$@.tmp2' \
 Index: Templates/README.category
 ===================================================================
 RCS file: /usr/cvs/ports/Templates/README.category,v
 retrieving revision 1.2
 diff -u -r1.2 README.category
 --- Templates/README.category	2000/01/21 11:08:22	1.2
 +++ Templates/README.category	2000/10/14 03:47:19
 @@ -5,6 +5,12 @@
  
  <p>You are now in the directory "%%CATEGORY%%".
  
 +<p>This is the one-line description for this category:
 +
 +<p><hr><p>
 +%%COMMENT%%
 +<p><hr>
 +
  <p>
  %%DESCR%%
  
 


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?200010140750.AAA10755>