diff options
author | dholland <dholland@pkgsrc.org> | 2015-01-04 06:10:19 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2015-01-04 06:10:19 +0000 |
commit | 8ba76724b96ff0d6f8f90b2d761e7d3eb5fc9c66 (patch) | |
tree | 67762881dd0f62618988530c4b80ced505b35c6a /games | |
parent | 7cf2a4f52cd9088f41dd09f54b0048056baaf1c6 (diff) | |
download | pkgsrc-8ba76724b96ff0d6f8f90b2d761e7d3eb5fc9c66.tar.gz |
Document ONLY_FOR_PLATFORM after investigating, and improve the range
of platforms accepted: the situation is that the upstream file is
binary and only semi-portable. It in particular won't work on netbsd-6
and up, regardless of machine type, because it uses time_t.
If anyone feels like improving the situation, get upstream to
distribute a portable file...
Diffstat (limited to 'games')
-rw-r--r-- | games/knightcap-brain/Makefile | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/games/knightcap-brain/Makefile b/games/knightcap-brain/Makefile index 2f200c61646..3536e572666 100644 --- a/games/knightcap-brain/Makefile +++ b/games/knightcap-brain/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2012/10/06 11:54:44 asau Exp $ +# $NetBSD: Makefile,v 1.17 2015/01/04 06:10:19 dholland Exp $ DISTNAME= new_brain PKGNAME= knightcap-brain-19980616 @@ -10,14 +10,34 @@ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://anu.samba.org/KnightCap/ COMMENT= Book of losing moves for KnightCap -ONLY_FOR_PLATFORM= *-*-i386 - WRKSRC= ${WRKDIR} DIST_SUBDIR= ${PKGNAME_NOREV} EXTRACT_ONLY= # empty NO_CONFIGURE= yes +# 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 + EGDIR= ${PREFIX}/share/examples/knightcap INSTALLATION_DIRS= bin |