Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Nov 2002 20:21:30 -0500 (EST)
From:      "Frank J. Laszlo" <laszlof@freebsdmatrix.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/45775: Fix for games/euchre port for 5.0	
Message-ID:  <200211270121.gAR1LUfo012786@buster.freebsdmatrix.net>

next in thread | raw e-mail | index | archive | help

>Number:         45775
>Category:       ports
>Synopsis:       Fix for games/euchre port for 5.0
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 26 17:30:03 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Frank J. Laszlo
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
none	
>Environment:
System: FreeBSD buster.freebsdmatrix.net 4.7-STABLE FreeBSD 4.7-STABLE #4: Thu Nov 14 22:35:17 EST 2002 root@buster.freebsdmatrix.net:/usr/obj/usr/src/sys/BUSTER i386


>Description:
	the Options.cpp was trying to open a file that does not exist, causing it to fail. we want to only try to open the file if it actually exists. 
>How-To-Repeat:
	Build previous port on 5.0

>Fix:

	Shell archive of the new port with patch. 

--- euchre.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	euchre
#	euchre/CVS
#	euchre/CVS/Root
#	euchre/CVS/Repository
#	euchre/CVS/Entries
#	euchre/Makefile
#	euchre/distinfo
#	euchre/pkg-comment
#	euchre/pkg-descr
#	euchre/pkg-plist
#	euchre/files
#	euchre/files/patch-aa
#
Echo c - euchre
mkdir -p euchre > /dev/null 2>&1
echo c - euchre/CVS
mkdir -p euchre/CVS > /dev/null 2>&1
echo x - euchre/CVS/Root
sed 's/^X//' >euchre/CVS/Root << 'END-of-euchre/CVS/Root'
X/usr/cvs
END-of-euchre/CVS/Root
echo x - euchre/CVS/Repository
sed 's/^X//' >euchre/CVS/Repository << 'END-of-euchre/CVS/Repository'
Xports/games/euchre
END-of-euchre/CVS/Repository
echo x - euchre/CVS/Entries
sed 's/^X//' >euchre/CVS/Entries << 'END-of-euchre/CVS/Entries'
X/Makefile/1.2/Mon Nov 25 02:52:39 2002//
X/distinfo/1.1/Mon Nov 25 02:48:44 2002//
X/pkg-comment/1.1/Mon Nov 25 02:48:44 2002//
X/pkg-descr/1.1/Mon Nov 25 02:48:44 2002//
X/pkg-plist/1.1/Mon Nov 25 02:48:44 2002//
XD
END-of-euchre/CVS/Entries
echo x - euchre/Makefile
sed 's/^X//' >euchre/Makefile << 'END-of-euchre/Makefile'
X# New ports collection Makefile for:	euchre
X# Date created:				23 July 2002
X# Whom:					Frank Laszlo <laszlof@freebsdmatrix.net>
X#
X# $FreeBSD: ports/games/euchre/Makefile,v 1.2 2002/11/25 02:52:39 will Exp $
X#
X
XPORTNAME=	euchre
XPORTVERSION=	0.3
XCATEGORIES=	games
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=	${PORTNAME}
X
XMAINTAINER=	laszlof@freebsdmatrix.net
X
XUSE_AUTOMAKE=	yes
XUSE_GTK=	yes
X
X.include <bsd.port.mk>
END-of-euchre/Makefile
echo x - euchre/distinfo
sed 's/^X//' >euchre/distinfo << 'END-of-euchre/distinfo'
XMD5 (euchre-0.3.tar.gz) = 97a61061a1bccf3977ac459ef23b90b3
END-of-euchre/distinfo
echo x - euchre/pkg-comment
sed 's/^X//' >euchre/pkg-comment << 'END-of-euchre/pkg-comment'
XVery popular card game with variable skill levels
END-of-euchre/pkg-comment
echo x - euchre/pkg-descr
sed 's/^X//' >euchre/pkg-descr << 'END-of-euchre/pkg-descr'
XA very basic interpretation of the game 'Euchre.'
X
XWWW: http://sourceforge.net/projects/euchre/
END-of-euchre/pkg-descr
echo x - euchre/pkg-plist
sed 's/^X//' >euchre/pkg-plist << 'END-of-euchre/pkg-plist'
Xbin/euchre
END-of-euchre/pkg-plist
echo c - euchre/files
mkdir -p euchre/files > /dev/null 2>&1
echo x - euchre/files/patch-aa
sed 's/^X//' >euchre/files/patch-aa << 'END-of-euchre/files/patch-aa'
X--- src/lib/Options.cpp.orig	Tue Nov 26 19:56:54 2002
X+++ src/lib/Options.cpp	Tue Nov 26 19:59:02 2002
X@@ -25,6 +25,9 @@
X #include <stdlib.h>
X #include <unistd.h>
X #include <iostream.h>
X+#include <sys/types.h>
X+#include <sys/stat.h>
X+#include <unistd.h>
X 
X #include "Debug.hpp"
X #include "Options.hpp"
X@@ -86,7 +89,19 @@
X   char fullpath[OPTIONS_PATH_SIZE];
X   snprintf(fullpath, OPTIONS_PATH_SIZE, "%s/%s", dir, OPTIONS_FILE_NAME);
X 
X-  ifstream in(fullpath, ios::nocreate);
X+  // We only want to try to open the file if it already exists.
X+  // ios::nocreate seems to have disappeared, so we'll use stat instead.
X+
X+  struct stat b;
X+
X+  if (-1 == stat(fullpath, &b))
X+  {
X+    LOG("could not open " << fullpath << endl);
X+    return 1;
X+  }
X+
X+  ifstream in(fullpath);
X+
X   if (! in) {
X     LOG("could not open " << fullpath << endl);
X     return 1;
END-of-euchre/files/patch-aa
exit
--- euchre.shar ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:

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?200211270121.gAR1LUfo012786>