From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Jul 13 19:00:47 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8CE6F16A4CE for ; Tue, 13 Jul 2004 19:00:47 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CE5C43D41 for ; Tue, 13 Jul 2004 19:00:47 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i6DJ0lOH033617 for ; Tue, 13 Jul 2004 19:00:47 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i6DJ0lBU033616; Tue, 13 Jul 2004 19:00:47 GMT (envelope-from gnats) Date: Tue, 13 Jul 2004 19:00:47 GMT Message-Id: <200407131900.i6DJ0lBU033616@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Herve Quiroz Subject: Re: ports/68944: [MAINTAINER] games/pcgen: dynamic plist and various improvements X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Herve Quiroz List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2004 19:00:47 -0000 The following reply was made to PR ports/68944; it has been noted by GNATS. From: Herve Quiroz To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-ports-bugs@FreeBSD.org Cc: Subject: Re: ports/68944: [MAINTAINER] games/pcgen: dynamic plist and various improvements Date: Tue, 13 Jul 2004 21:00:24 +0200 --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline With the initial patch, there are chances that user data could get added to the plist while upgrading the port. Use the attached patch instead. It builds the plist according to files present in ${WRKSRC} rather than ${DATADIR}. --sm4nu43k4a2Rpi4c Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="mypatch.diff" --- Makefile.orig Mon Jul 12 13:18:49 2004 +++ Makefile Tue Jul 13 20:56:24 2004 @@ -15,18 +15,14 @@ COMMENT= A Java-based RPG character generator and maintenance program USE_ZIP= YES -EXTRACT_AFTER_ARGS= -d pcgen +NO_WRKSUBDIR= YES USE_JAVA= YES JAVA_VERSION= 1.4+ NO_BUILD= YES -WRKSRC= ${WRKDIR}/pcgen DATADIR= ${JAVASHAREDIR}/${PORTNAME} -WRKDIRS= characters data lib outputsheets plugins system -WRKDOCSDIR= ${WRKSRC}/docs -WRKSCRIPT= ${WRKSRC}/pcgen.bsd.sh -PLIST_FILES+= ${DATADIR:S,^${PREFIX}/,,}/filepaths.ini bin/pcgen.sh -PLIST_DIRS+= ${DATADIR:S,^${PREFIX}/,,} +DATAFILES= characters data filepaths.ini lib outputsheets pcgen.jar plugins system +PLIST_FILES+= bin/pcgen.sh ${DATADIR:S,^${PREFIX}/,,}/pcgen.sh .if !defined(NOPORTDOCS) PORTDOCS= acknowledgments faqpages gmgen greetings.html index.html \ @@ -35,35 +31,32 @@ pcgen.css systemimages tabpages walkthroughpages .endif -pre-extract: - @${MKDIR} ${WRKSRC} - post-extract: @${FIND} ${WRKSRC} -name CVS | ${XARGS} -t ${RM} -rf +do-configure: + @${ECHO_MSG} "pcgen.filepaths=user" > ${WRKSRC}/filepaths.ini + @cd ${WRKSRC} && ${SED} "s|^java|${JAVA}|" pcgen.sh | ${SED} 's|`dirname $$0`|${DATADIR}|' > pcgen.sh.bsd + do-install: @${ECHO_MSG} -n ">> Installing in ${DATADIR}..." -.for SOMEDIR in ${WRKDIRS} - @${ECHO_MSG} -n " ${SOMEDIR}" - @cd ${WRKSRC} && ${FIND} ${SOMEDIR} -type d -exec ${MKDIR} ${DATADIR}/{} ";" - @cd ${WRKSRC} && ${FIND} ${SOMEDIR} -type f -exec ${INSTALL_DATA} {} ${DATADIR}/{} ";" -.endfor - @${ECHO_MSG} -n " pcgen.jar" - @cd ${WRKSRC} && ${INSTALL_DATA} pcgen.jar ${DATADIR} - @${ECHO_MSG} -n " pcgen.sh" - @cd ${WRKSRC} && ${SED} "s|^java|${JAVA}|" pcgen.sh | ${SED} 's|`dirname $$0`|${DATADIR}|' > ${WRKSCRIPT} - @cd ${WRKSRC} && ${INSTALL_SCRIPT} ${WRKSCRIPT} ${DATADIR}/pcgen.sh + @cd ${WRKSRC} && ${FIND} ${DATAFILES} -type d -exec ${MKDIR} ${DATADIR}/{} ";" + @cd ${WRKSRC} && ${FIND} ${DATAFILES} -type f -exec ${INSTALL_DATA} {} ${DATADIR}/{} ";" + @cd ${WRKSRC} && ${INSTALL_SCRIPT} pcgen.sh.bsd ${DATADIR}/pcgen.sh + @${ECHO_MSG} " [ DONE ]" @${LN} -fs ${DATADIR}/pcgen.sh ${PREFIX}/bin/pcgen.sh - @${ECHO_MSG} " [DONE]" - @${ECHO_MSG} -n ">> Configuring..." - @${ECHO_MSG} "pcgen.filepaths=user" > ${DATADIR}/filepaths.ini - @${ECHO_MSG} " [DONE]" - .if !defined(NOPORTDOCS) @${ECHO_MSG} -n ">> Installing documentation in ${DOCSDIR}..." - @cd ${WRKDOCSDIR} && ${FIND} . -type d -exec ${MKDIR} ${DOCSDIR}/{} ";" - @cd ${WRKDOCSDIR} && ${FIND} . -type f -exec ${INSTALL_DATA} {} ${DOCSDIR}/{} ";" - @${ECHO_MSG} " [DONE]" + @cd ${WRKSRC}/docs && ${FIND} . -type d -exec ${MKDIR} ${DOCSDIR}/{} ";" + @cd ${WRKSRC}/docs && ${FIND} . -type f -exec ${INSTALL_DATA} {} ${DOCSDIR}/{} ";" + @${ECHO_MSG} " [ DONE ]" .endif + +post-install: + @${FIND} -s ${DATAFILES:S,^,${WRKSRC}/,} -not -type d 2>/dev/null | \ + ${SED} -ne 's,^${WRKSRC},${DATADIR:S,^${PREFIX}/,,},p' >> ${TMPPLIST} + @${FIND} -s -d ${DATAFILES:S,^,${WRKSRC}/,} -type d 2>/dev/null | \ + ${SED} -ne 's,^${WRKSRC},@dirrm ${DATADIR:S,^${PREFIX}/,,},p' >> ${TMPPLIST} + @${ECHO_CMD} '@dirrm ${DATADIR:S,^${PREFIX}/,,}' >> ${TMPPLIST} .include --sm4nu43k4a2Rpi4c--