ports/116266: [Maintainer Update] games/crafty: fixes & features
Jonathan Shoemaker
shoemaker at bluebottle.com
Mon Sep 10 21:30:02 UTC 2007
>Number: 116266
>Category: ports
>Synopsis: [Maintainer Update] games/crafty: fixes & features
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Mon Sep 10 21:30:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Jonathan Shoemaker
>Release: FreeBSD 6.2-RELEASE-p7 i386
>Organization:
>Environment:
System: FreeBSD localhost 6.2-RELEASE-p7 FreeBSD 6.2-RELEASE-p7 #0: Sat Sep 8 13:47:46 MDT 2007 root at localhost:/var/obj/usr/src/sys/CUSTOM i386
>Description:
Does not need to ber setuid nobody, as this breaks the
per-user rc-files goal; setgid with group-writable files should
suffice. Configured for the new personalities feature, and added a
fix to make sure that help is available (wasn't working before as it
was moved from the executable to a file.)
>How-To-Repeat:
>Fix:
--- crafty/Makefile.orig Sun Sep 9 19:11:53 2007
+++ crafty/Makefile Mon Sep 10 15:08:53 2007
@@ -41,12 +41,15 @@
.if !defined(WITH_TBDIR)
WITH_TBDIR= ${PREFIX}/lib/crafty/TB
.endif
-
+.if !defined(WITH_PERSDIR)
+WITH_PERSDIR= ${PREFIX}/lib/crafty/cpf
+.endif
OPT= -DHASHSTATS -DTRACE -DBOOKDIR=\\\"${WITH_BOOKDIR}\\\" \
-DLOGDIR=\\\"${WITH_LOGDIR}\\\" \
-DRCDIR=\\\"${WITH_RCDIR}\\\" \
- -DTBDIR=\\\"${WITH_TBDIR}\\\"
-
+ -DTBDIR=\\\"${WITH_TBDIR}\\\" \
+ -DPERSDIR=\\\"${WITH_PERSDIR}\\\"
+
.include <bsd.port.pre.mk>
.if ${ARCH} == "i386"
@@ -71,17 +74,18 @@
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/crafty ${PREFIX}/bin/crafty
- ${CHOWN} nobody:nogroup ${PREFIX}/bin/crafty
- ${CHMOD} 6555 ${PREFIX}/bin/crafty
- ${MKDIR} ${PREFIX}/lib/crafty
- ${CHOWN} nobody:nogroup ${PREFIX}/lib/crafty
+ ${CHOWN} root:nogroup ${PREFIX}/bin/crafty
+ ${CHMOD} 2555 ${PREFIX}/bin/crafty
+ ${MKDIR} ${PREFIX}/lib/crafty/cpf
+ ${CHOWN} -R root:nogroup ${PREFIX}/lib/crafty
+ ${CHMOD} 775 ${PREFIX}/lib/crafty ${PREFIX}/lib/crafty/cpf
${INSTALL_DATA} ${WRKSRC}/books.bin ${PREFIX}/lib/crafty/books.bin
${INSTALL_DATA} ${WRKSRC}/book.lrn ${PREFIX}/lib/crafty/book.lrn
${INSTALL_DATA} ${WRKSRC}/position.bin ${PREFIX}/lib/crafty/position.bin
${INSTALL_DATA} ${WRKSRC}/position.lrn ${PREFIX}/lib/crafty/position.lrn
${TOUCH} ${PREFIX}/lib/crafty/book.bin
- ${CHOWN} nobody:nogroup ${PREFIX}/lib/crafty/book*
- ${CHOWN} nobody:nogroup ${PREFIX}/lib/crafty/position*
+ ${CHOWN} root:nogroup ${PREFIX}/lib/crafty/book*
+ ${CHOWN} root:nogroup ${PREFIX}/lib/crafty/position*
${CHMOD} 664 ${PREFIX}/lib/crafty/book*
${CHMOD} 664 ${PREFIX}/lib/crafty/position*
.if !defined(NOPORTDOCS)
--- crafty/files/patch-option.c.orig Wed Dec 31 17:00:00 1969
+++ crafty/files/patch-option.c Mon Sep 10 14:53:43 2007
@@ -0,0 +1,15 @@
+--- option.c.orig Tue Jun 20 07:57:17 2006
++++ option.c Mon Sep 10 14:53:11 2007
+@@ -1331,9 +1331,11 @@
+ else if (OptionMatch("help", *args)) {
+ FILE *helpfile;
+ char *readstat = (char *) -1;
++ char fname[128];
+ int lines = 0;
+
+- helpfile = fopen("crafty.hlp", "r");
++ sprintf(fname, "%s/crafty.hlp", book_path);
++ helpfile = fopen(fname, "r");
+ if (!helpfile) {
+ printf("ERROR. Unable to open \"crafty.hlp\" -- help unavailable\n");
+ return (1);
--- crafty/pkg-plist.orig Sun Sep 9 19:11:53 2007
+++ crafty/pkg-plist Mon Sep 10 14:49:53 2007
@@ -2,9 +2,11 @@
lib/crafty/book.bin
lib/crafty/book.lrn
lib/crafty/books.bin
+lib/crafty/crafty.hlp
lib/crafty/position.bin
lib/crafty/position.lrn
share/doc/crafty/crafty.doc.ascii
share/doc/crafty/crafty.doc.ps
@dirrm share/doc/crafty
+ at dirrm lib/crafty/cpf
@dirrm lib/crafty
--- crafty/scripts/configure.orig Sun Sep 9 19:12:45 2007
+++ crafty/scripts/configure Mon Sep 10 14:42:27 2007
@@ -5,12 +5,13 @@
echo "WITH_LOGDIR (default: /tmp)"
echo "WITH_RCDIR (default: ~/)"
echo "WITH_TBDIR (default: ${PREFIX}/lib/crafty/TB)"
+ echo "WITH_PERSDIR (default: ${PREFIX}/lib/crafty/cpf)"
echo ""
echo "To alter any of these, press CTRL-C now, and "
echo "simply set your desired variable with one or more of:"
echo ""
- echo "<setenv WITH_BOOKDIR|LOGDIR|RCDIR|TBDIR path> (csh) or"
- echo "<export WITH_BOOKDIR|LOGDIR|RCDIR|TBDIR=path> (sh)"
+ echo "<setenv WITH_BOOKDIR|LOGDIR|RCDIR|TBDIR|PERSDIR path> (csh) or"
+ echo "<export WITH_BOOKDIR|LOGDIR|RCDIR|TBDIR|PERSDIR=path> (sh)"
echo ""
echo "Changing BOOKDIR or TBDIR is not recommended, as other"
echo "ports depend on these being in a standard location"
----------------------------------------------------------------------
Find out how you can get spam free email.
http://www.bluebottle.com/tag/3
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list