Update of /cvsroot/fink/dists/10.2/unstable/main/finkinfo/games
In directory sc8-pr-cvs1:/tmp/cvs-serv9410

Modified Files:
        crafty-smallbook-18-1.info 
Added Files:
        crafty-18.15-3.info crafty-18.15-3.patch 
Log Message:
Added mirror.


--- NEW FILE: crafty-18.15-3.info ---
Package: crafty
Version: 18.15
Revision: 3
Provides: chess
Replaces: crafty-smallbook, crafty-largebook, crafty-enormousbook
Source: mirror:custom:v18/%n-%v.tar.gz
Source2: mirror:custom:doc/crafty.doc.ascii
Source3: mirror:custom:doc/crafty.doc.pdf
Source4: mirror:custom:common/medium/medium.zip
Source5: mirror:custom:common/start.pgn
CustomMirror: <<
Primary: ftp://ftp.cis.uab.edu/pub/hyatt
Secondary: ftp://darkside.its-s.tudelft.nl/Crafty
<<
PatchScript: <<
patch -p1 < %a/%f.patch
perl -ne 'print if /\Q*****\E/..m|\Q*/\E|;' main.c>README
<<
CompileScript: <<
make macosx prefix=%p
echo "books create ../start.pgn 60" | ./crafty
echo "book create ../book.txt 60 2 50" | ./crafty
<<
InstallScript: <<
mkdir -p %i/bin
mkdir -p %i/lib/crafty/TB
/usr/bin/install -c crafty %i/bin
/usr/bin/install -c -m 444 book.bin books.bin %i/lib/crafty
chmod a+w %i/lib/crafty/book.bin
<<
DocFiles: README ../crafty.doc.ascii ../crafty.doc.pdf
Description: Strong Chess Engine
DescDetail: <<
Crafty is a chess engine that allows you to play chess either via the console
or through XBoard.
<<
DescPort:  <<
Patched to get its opening books from /sw/lib/crafty by default. Note that 
crafty learns by writing into its books, so having a global copy might have 
disadvantages. 
<<
License: Restrictive
Maintainer: Matthias Neeracher <[EMAIL PROTECTED]>
Homepage: ftp://ftp.cis.uab.edu/pub/hyatt/

--- NEW FILE: crafty-18.15-3.patch ---
diff -ru crafty-18.15.orig/Makefile crafty-18.15/Makefile
--- crafty-18.15.orig/Makefile  Sat Aug 24 12:16:04 2002
+++ crafty-18.15/Makefile       Sat Aug 24 12:17:27 2002
@@ -16,6 +16,7 @@
 #     NT_i386    {80X86 architecture running Windows 95 or NT}
 #     NT_AXP     {DEC Alpha running Windows NT}
 #     DOS        {PC running dos/windows, using DJGPP port of gcc to compile}
+#     MACOSX     (MacOS X)
 #     NEXT       {NextStep}
 #     OS/2       {IBM OS/2 warp}
 #     SGI        {SGI Workstation running Irix (SYSV/R4) Unix}
@@ -282,6 +283,20 @@
                LDFLAGS='$(LDFLAGS) $(CFLAGS)' \
                LIBS='-lpthread' \
                opt='$(opt) -DSMP -DCPUS=8 -DFAST -DPOSIX -DNOBUILTINS' \
+               crafty-make
+
+
+macosx:
+       $(MAKE) target=NetBSD \
+               CC=cc CXX=c++ \
+               CFLAGS='$(CFLAGS) -D_REENTRANT -O3 -Wall \
+                       -fomit-frame-pointer -funroll-all-loops \
+                       -finline-functions -ffast-math' \
+               CXFLAGS='$(CFLAGS) -fno-exceptions' \
+               LDFLAGS='$(LDFLAGS)' \
+               opt='$(opt) -DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS -DFAST \
+                    -DBOOKDIR=\"$(prefix)/lib/crafty\" \
+                    -DTBDIR=\"$(prefix)/lib/crafty/TB\"' \
                crafty-make
 
 netbsd:
Only in crafty-18.15: Makefile~
diff -ru crafty-18.15.orig/chess.h crafty-18.15/chess.h
--- crafty-18.15.orig/chess.h   Sat Aug 24 12:16:04 2002
+++ crafty-18.15/chess.h        Sat Aug 24 12:16:29 2002
@@ -197,6 +197,9 @@
 #  if !defined(BOOKDIR)
 #    define     BOOKDIR        "."
 #  endif
+#  if !defined(LEARNDIR)
+#    define     LEARNDIR        "."
+#  endif
 #  if !defined(LOGDIR)
 #    define      LOGDIR        "."
 #  endif
Only in crafty-18.15: chess.h~
diff -ru crafty-18.15.orig/data.c crafty-18.15/data.c
--- crafty-18.15.orig/data.c    Sat Aug 24 12:16:04 2002
+++ crafty-18.15/data.c Sat Aug 24 12:16:29 2002
@@ -338,6 +338,7 @@
   int       new_game =                              0;
   char      channel_title[32] =                  {""};
   char      book_path[128] =                {BOOKDIR};
+  char      learn_path[128] =                {LEARNDIR};
   char      log_path[128] =                  {LOGDIR};
   char      tb_path[128] =                    {TBDIR};
   char      rc_path[128] =                    {RCDIR};
diff -ru crafty-18.15.orig/data.h crafty-18.15/data.h
--- crafty-18.15.orig/data.h    Sat Aug 24 12:16:04 2002
+++ crafty-18.15/data.h Sat Aug 24 12:16:29 2002
@@ -95,6 +95,7 @@
   extern int            channel;
   extern char           channel_title[32];
   extern char           book_path[128];
+  extern char           learn_path[128];
   extern char           log_path[128];
   extern char           tb_path[128];
   extern char           rc_path[128];
diff -ru crafty-18.15.orig/init.c crafty-18.15/init.c
--- crafty-18.15.orig/init.c    Sat Aug 24 12:16:04 2002
+++ crafty-18.15/init.c Sat Aug 24 12:16:29 2002
@@ -229,25 +229,25 @@
     }
   }
 #if defined(MACOS)
-  sprintf(log_filename,":%s:book.lrn",book_path);
+  sprintf(log_filename,":%s:book.lrn",learn_path);
 #else
-  sprintf(log_filename,"%s/book.lrn",book_path);
+  sprintf(log_filename,"%s/book.lrn",learn_path);
 #endif
   book_lrn_file=fopen(log_filename,"a");
   if (!book_lrn_file) {
 #if defined(MACOS)
-    printf("unable to open book learning file [:%s:book.lrn].\n",book_path);
+    printf("unable to open book learning file [:%s:book.lrn].\n",learn_path);
 #else
-    printf("unable to open book learning file [%s/book.lrn].\n",book_path);
+    printf("unable to open book learning file [%s/book.lrn].\n",learn_path);
 #endif
     printf("learning disabled.\n");
     learning&=~(book_learning+result_learning);
   }
   if (learning&position_learning) {
 #if defined(MACOS)
-    sprintf(log_filename,":%s:position.bin",book_path);
+    sprintf(log_filename,":%s:position.bin",learn_path);
 #else
-    sprintf(log_filename,"%s/position.bin",book_path);
+    sprintf(log_filename,"%s/position.bin",learn_path);
 #endif
     position_file=fopen(log_filename,"rb+");
     if (position_file) {
@@ -267,18 +267,18 @@
       }
       else {
 #if defined(MACOS)
-        printf("unable to open position learning file 
[:%s:position.bin].\n",book_path);
+        printf("unable to open position learning file 
+[:%s:position.bin].\n",learn_path);
 #else
-        printf("unable to open position learning file 
[%s/position.bin].\n",book_path);
+        printf("unable to open position learning file 
+[%s/position.bin].\n",learn_path);
 #endif
         printf("learning disabled.\n");
         learning&=~position_learning;
       }
     }
 #if defined(MACOS)
-    sprintf(log_filename,":%s:position.lrn",book_path);
+    sprintf(log_filename,":%s:position.lrn",learn_path);
 #else
-    sprintf(log_filename,"%s/position.lrn",book_path);
+    sprintf(log_filename,"%s/position.lrn",learn_path);
 #endif
     position_lrn_file=fopen(log_filename,"r");
     if (!position_lrn_file) {
diff -ru crafty-18.15.orig/learn.c crafty-18.15/learn.c
--- crafty-18.15.orig/learn.c   Sat Aug 24 12:16:04 2002
+++ crafty-18.15/learn.c        Sat Aug 24 12:16:29 2002
@@ -518,9 +518,9 @@
 #endif
     fclose(book_lrn_file);
 #if defined(MACOS)
-    sprintf(text,":%s:book.lrn",book_path);
+    sprintf(text,":%s:book.lrn",learn_path);
 #else
-    sprintf(text,"%s/book.lrn",book_path);
+    sprintf(text,"%s/book.lrn",learn_path);
 #endif
     book_lrn_file=fopen(text,"w");
     fseek(book_file,0,SEEK_SET);
@@ -834,26 +834,26 @@
   if (nargs>1 && !strcmp(args[1],"clear")) {
     fclose(position_file);
 #if defined(MACOS)
-    sprintf(text,":%s:position.lrn",book_path);
+    sprintf(text,":%s:position.lrn",learn_path);
 #else
-    sprintf(text,"%s/position.lrn",book_path);
+    sprintf(text,"%s/position.lrn",learn_path);
 #endif
     position_lrn_file=fopen(text,"w");
     if (!position_lrn_file) {
 #if defined(MACOS)
       printf("unable to open position learning file [:%s:position.lrn].\n",
-             book_path);
+             learn_path);
 #else
       printf("unable to open position learning file [%s/position.lrn].\n",
-             book_path);
+             learn_path);
 #endif
       return;
     }
     fprintf(position_lrn_file,"position\n");
 #if defined(MACOS)
-    sprintf(text,":%s:position.bin",book_path);
+    sprintf(text,":%s:position.bin",learn_path);
 #else
-    sprintf(text,"%s/position.bin",book_path);
+    sprintf(text,"%s/position.bin",learn_path);
 #endif
     position_file=fopen(text,"wb+");
     if (position_file) {
@@ -866,10 +866,10 @@
     else {
 #if defined(MACOS)
       printf("unable to open position learning file [:%s:position.bin].\n",
-             book_path);
+             learn_path);
 #else
       printf("unable to open position learning file [%s/position.bin].\n",
-             book_path);
+             learn_path);
 #endif
       return;
     }
diff -ru crafty-18.15.orig/main.c crafty-18.15/main.c
--- crafty-18.15.orig/main.c    Sat Aug 24 12:16:04 2002
+++ crafty-18.15/main.c Sat Aug 24 12:16:29 2002
@@ -2896,6 +2896,9 @@
   char *directory_spec=getenv("CRAFTY_BOOK_PATH");
   if (directory_spec)
     strncpy (book_path, directory_spec, sizeof book_path);
+  directory_spec=getenv("CRAFTY_LEARN_PATH");
+  if (directory_spec)
+    strncpy (learn_path, directory_spec, sizeof learn_path);
   directory_spec=getenv("CRAFTY_LOG_PATH");
   if (directory_spec)
     strncpy (log_path, directory_spec, sizeof log_path);
Only in crafty-18.15: main.c~
diff -ru crafty-18.15.orig/option.c crafty-18.15/option.c
--- crafty-18.15.orig/option.c  Sat Aug 24 12:16:04 2002
+++ crafty-18.15/option.c       Sat Aug 24 12:16:29 2002
@@ -2554,6 +2554,7 @@
     }
     if (!strchr(args[1],'(')) {
       if (strstr(args[0],"bookpath")) strcpy(book_path,args[1]);
+      else if (strstr(args[0],"learnpath")) strcpy(learn_path,args[1]);
       else if (strstr(args[0],"logpath")) strcpy(log_path,args[1]);
       else if (strstr(args[0],"tbpath")) {
         strcpy(tb_path,args[1]);
Only in crafty-18.15: option.c~

Index: crafty-smallbook-18-1.info
===================================================================
RCS file: 
/cvsroot/fink/dists/10.2/unstable/main/finkinfo/games/crafty-smallbook-18-1.info,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- crafty-smallbook-18-1.info  30 Aug 2002 21:10:14 -0000      1.1
+++ crafty-smallbook-18-1.info  21 Jan 2003 19:06:59 -0000      1.2
@@ -3,7 +3,11 @@
 Revision: 1
 Depends: crafty
 Replaces: crafty, crafty-largebook, crafty-enormousbook
-Source: ftp://ftp.cis.uab.edu/pub/hyatt/common/small/small.zip
+Source: mirror:custom:common/small/small.zip
+CustomMirror: <<
+Primary: ftp://ftp.cis.uab.edu/pub/hyatt
+Secondary: ftp://darkside.its-s.tudelft.nl/Crafty
+<<
 NoSourceDirectory: true
 CompileScript: <<
 echo "book create small.txt 60 2 50" | crafty



-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to