2021-04-21 17:37:12 +02:00
|
|
|
# $NetBSD: Makefile,v 1.20 2021/04/21 15:37:12 wiz Exp $
|
2000-10-15 10:39:18 +02:00
|
|
|
|
2000-10-22 01:15:24 +02:00
|
|
|
DISTNAME= new_brain
|
|
|
|
PKGNAME= knightcap-brain-19980616
|
2000-10-15 10:39:18 +02:00
|
|
|
CATEGORIES= games
|
2021-04-21 17:37:12 +02:00
|
|
|
#MASTER_SITES= ftp://ftp.samba.org/pub/KnightCap/
|
2000-10-22 01:15:24 +02:00
|
|
|
EXTRACT_SUFX= .dat
|
2000-10-15 10:39:18 +02:00
|
|
|
|
2006-03-04 22:28:51 +01:00
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
2015-01-04 07:11:03 +01:00
|
|
|
HOMEPAGE= http://samba.org/KnightCap/
|
2003-07-21 18:45:54 +02:00
|
|
|
COMMENT= Book of losing moves for KnightCap
|
2000-10-15 10:39:18 +02:00
|
|
|
|
2004-01-20 13:07:06 +01:00
|
|
|
WRKSRC= ${WRKDIR}
|
2005-12-05 21:49:47 +01:00
|
|
|
DIST_SUBDIR= ${PKGNAME_NOREV}
|
2000-10-15 10:39:18 +02:00
|
|
|
|
|
|
|
EXTRACT_ONLY= # empty
|
2005-09-28 22:52:18 +02:00
|
|
|
NO_CONFIGURE= yes
|
2000-10-15 10:39:18 +02:00
|
|
|
|
2015-01-04 07:10:19 +01:00
|
|
|
# The prefab brain file is not especially portable (see the top of
|
|
|
|
# brain.c in knightcap; the file is a binary array of brain_entry) and
|
|
|
|
# while most of it is adequate but not ideal and should be portable
|
|
|
|
# among platforms of the same endianness (even ILP32 vs. LP64 ones),
|
|
|
|
# it unfortunately contains two fields of type time_t. We think the
|
|
|
|
# posted brain file is from 32-bit x86, probably Linux, so it will
|
|
|
|
# work on little-endian machines where time_t is still 32 bit. This
|
|
|
|
# excludes at least NetBSD 6.0 and up, and at least some of the 64-bit
|
|
|
|
# Linux ports, but I don't know for sure which ones. So begin by
|
|
|
|
# allowing little-endian platforms and then excluding ones known not
|
|
|
|
# to work. Add more as needed; a brain file with mismatched time_t
|
|
|
|
# won't load. Note that while the existing brain file could easily be
|
|
|
|
# translated, if anyone feels like doing that they should probably
|
|
|
|
# translate the posted one to a portable format (e.g. compressed JSON
|
|
|
|
# or something, or just plain text) and provide a loader for that
|
|
|
|
# format upstream.
|
|
|
|
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
ONLY_FOR_PLATFORM= ${LITTLEENDIANPLATFORMS}
|
|
|
|
NOT_FOR_PLATFORM= NetBSD-[6-9].*-* NetBSD-1[1-9].*-*
|
|
|
|
NOT_FOR_PLATFORM+= Linux-*-alpha
|
|
|
|
|
2000-10-15 10:39:18 +02:00
|
|
|
EGDIR= ${PREFIX}/share/examples/knightcap
|
2005-06-16 08:57:37 +02:00
|
|
|
INSTALLATION_DIRS= bin
|
2000-10-15 10:39:18 +02:00
|
|
|
|
|
|
|
do-build:
|
2018-01-14 16:26:46 +01:00
|
|
|
${SED} -e "s,@PREFIX@,${PREFIX},g" < ${FILESDIR}/newbrain.sh \
|
|
|
|
> ${WRKSRC}/newbrain.sh
|
2000-10-15 10:39:18 +02:00
|
|
|
|
|
|
|
do-install:
|
2018-01-14 16:26:46 +01:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/newbrain.sh \
|
|
|
|
${DESTDIR}${PREFIX}/bin/newbrain
|
|
|
|
${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR}
|
|
|
|
${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/new_brain.dat \
|
|
|
|
${DESTDIR}${EGDIR}/brain.dat
|
2000-10-15 10:39:18 +02:00
|
|
|
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|