summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorminskim <minskim@pkgsrc.org>2004-03-08 06:05:31 +0000
committerminskim <minskim@pkgsrc.org>2004-03-08 06:05:31 +0000
commit4b2aa857fd860fbc4f909e098d3eb6a99c4b47fe (patch)
treee84f79ec47c0f2abdd9ea31ec56b78b4529554f6 /games
parentba861bb52dcef00993bee4d782b7f14994418ae2 (diff)
downloadpkgsrc-4b2aa857fd860fbc4f909e098d3eb6a99c4b47fe.tar.gz
Make this package build with gnuchess-5.07. Patch provided by
Michal Pasternak in PR pkg/24700. Bump PKGREVISION.
Diffstat (limited to 'games')
-rw-r--r--games/gnuchess-book-medium/Makefile20
-rwxr-xr-xgames/gnuchess-book-medium/files/convert.pl32
2 files changed, 7 insertions, 45 deletions
diff --git a/games/gnuchess-book-medium/Makefile b/games/gnuchess-book-medium/Makefile
index 95ab3881d55..aa359c594de 100644
--- a/games/gnuchess-book-medium/Makefile
+++ b/games/gnuchess-book-medium/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.11 2004/01/20 12:15:40 agc Exp $
+# $NetBSD: Makefile,v 1.12 2004/03/08 06:05:31 minskim Exp $
DISTNAME= medium
PKGNAME= ${CHESS_ENGINE}-book-${DISTNAME}-20000511
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= games
MASTER_SITES= ftp://ftp.cis.uab.edu/pub/hyatt/common/${DISTNAME}/
EXTRACT_SUFX= .zip
@@ -10,35 +10,29 @@ EXTRACT_SUFX= .zip
MAINTAINER= jlam@NetBSD.org
COMMENT= Chess opening book for GNU Chess (medium)
-DEPENDS+= gnuchess>=5.00nb1:../../games/gnuchess
+DEPENDS+= gnuchess>=5.07:../../games/gnuchess
-CONFLICTS= ${CHESS_ENGINE}-book-[0-9]*
+CONFLICTS= ${CHESS_ENGINE}-book-*
WRKSRC= ${WRKDIR}
CHESS_ENGINE= gnuchess
DIST_SUBDIR= chessbooks
NO_CONFIGURE= # defined
-USE_PERL5= build
-USE_BUILDLINK2= YES
PLIST_SUBST+= CHESS_ENGINE=${CHESS_ENGINE}
PLIST_SUBST+= BOOK_FILE=${BOOK_FILE}
BOOKDIR= ${PREFIX}/lib/${CHESS_ENGINE}
PGN_FILE= book.txt
-PGN_CONVERTED_FILE= book_pgn.txt
BOOK_FILE= book.dat
do-build:
- @${ECHO} ""
- @${ECHO} " ** Go to bed! This will take _very_ long!"
- @${ECHO} ""
- ${PREFIX}/bin/perl ${PKGDIR}/files/convert.pl < ${WRKSRC}/${PGN_FILE} > ${WRKSRC}/${PGN_CONVERTED_FILE}
- cd ${WRKSRC} && gnuchess compile ${PGN_CONVERTED_FILE} ${BOOK_FILE}
+ @${ECHO} "book add ${PGN_FILE}" > ${WRKSRC}/makebook.gnuchess
+ @${ECHO} "quit" >> ${WRKSRC}/makebook.gnuchess
+ @cd ${WRKSRC} && ${CAT} makebook.gnuchess | ${PREFIX}/bin/gnuchess
do-install:
${INSTALL_DATA_DIR} ${BOOKDIR}
${INSTALL_DATA} ${WRKSRC}/${BOOK_FILE} ${BOOKDIR}
-.include "../../lang/perl5/buildlink2.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/games/gnuchess-book-medium/files/convert.pl b/games/gnuchess-book-medium/files/convert.pl
deleted file mode 100755
index b577d0d938e..00000000000
--- a/games/gnuchess-book-medium/files/convert.pl
+++ /dev/null
@@ -1,32 +0,0 @@
-#!${PREFIX}/bin/perl
-
-while (<STDIN>) {
-
- /^\[Site/ && print $_;
-
- /^\[/ && next;
- /^$/ && next;
-
- $_ =~ s/[0-9]+\.//g;
- $_ =~ s/0-1//g;
- $_ =~ s/1-0//g;
- $_ =~ s/1\/2-1\/2//g;
- $_ =~ s/^ +//g;
- $_ =~ s/ +/ /g;
- /^$/ && next;
- print "$_";
-
- while (<STDIN>) {
- /^$/ && last;
- $_ =~ s/[0-9]+\.//g;
- $_ =~ s/0-1//g;
- $_ =~ s/1-0//g;
- $_ =~ s/1\/2-1\/2//g;
- $_ =~ s/^ +//g;
- $_ =~ s/ +/ /g;
- /^$/ && next;
- print "$_";
- }
-
-}
-