the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: cmine
Version: 1.4
Revision: 1003
Source: http://www.adaptive-enterprises.com.au/~d/software/cmine/%n-%v.tar.gz
Source-MD5: b584cb2eb5e0afbc07e819e78cbd5983
PatchFile: %n.patch
PatchFile-MD5: 3d03b8df1b76c4023783447575391d83
Depends: passwd
BuildDepends: fink (>= 0.24.12-1), libncurses5 (>= 5.4-20041023-1006)
CompileScript: <<
cc -I%p/include -L%p/lib -lncurses -DPATH_SCOREFILE=\"%p/var/games/cmine.scores\" *.c -o cmine
strip %n
<<
InstallScript: <<
mkdir -p %i/share/man/man6
mkdir -p %i/share/%n
mkdir -p %i/bin/
mkdir -p %i/var/games/
cp %n.6 %i/share/man/man6/
cp %n %i/bin/
head -n 35 cmine.c >> %i/share/%n/LICENSE
touch %i/var/games/cmine.scores
<<
PostInstScript: <<
chown -R games:games %p/bin/%n %p/var/games/cmine.scores
chmod 2101 %p/bin/%n
chmod 664 %p/var/games/cmine.scores
<<
ConfFiles: %p/var/games/cmine.scores
Description: Text-based minesweeper game
DescUsage: <<
See manpage for keys and how to play.
<<
DescPackaging: <<
Needs passwd for games uid. cmine itself is public domain, however
the patched in strlcat() routine is OSI-Approved.
<<
License: OSI-Approved
Maintainer: Ben Hines
Homepage: http://www.adaptive-enterprises.com.au/~d/software/cmine/
--- cmine/mine.c Mon Feb 18 07:45:53 2002
+++ cmine-patched/mine.c Sun May 12 23:00:19 2002
@@ -94,7 +94,7 @@
return NULL;
}
/* Place the mines */
- srandomdev();
+ srandom(time(0));
for (i = 0; i < rows * cols; i ++)
m->map[i] = 0;
p = 0;
--- cmine/hiscore.c Sat Feb 16 05:57:51 2002
+++ cmine-patched/hiscore.c Sun May 12 23:15:53 2002
@@ -18,7 +18,9 @@
#include "hiscore.h"
+#ifndef PATH_SCOREFILE
#define PATH_SCOREFILE "/var/games/cmine.scores"
+#endif
struct scorekey {
int rows, cols, mines;
@@ -58,7 +60,7 @@
data.size = 0;
/* Don't bother if we aren't better than an existing */
if ((*db->get)(db, &key, &data, 0) == 0)
- if (((struct scorevalue *)data.data)->time >= time)
+ if (((struct scorevalue *)data.data)->time <= time)
return 0;
/* Save the better score */
scorevalue.time = time;