1 # $NetBSD: Makefile,v 1.12 2011/05/28 22:41:43 dholland Exp $
8 MASTER_SITES= http://www.ce.unipr.it/~gbe/
11 MAINTAINER= pkgsrc-users@NetBSD.org
12 HOMEPAGE= http://www.ce.unipr.it/~gbe/
13 COMMENT= Perfect-play engine for connect four
14 LICENSE= velena-license
16 RESTRICTED= You must not charge a fee for this software nor for any derived work in which this software is included.
17 NO_BIN_ON_CDROM= ${RESTRICTED}
18 NO_SRC_ON_CDROM= ${RESTRICTED}
20 NOT_FOR_PLATFORM= DragonFly-*-x86_64 # Can't build 32-bit binaries
21 PKG_DESTDIR_SUPPORT= user-destdir
23 EXTRACT_OPTS_ZIP= -LLaqo
29 SUBST_STAGE.path= pre-configure
30 SUBST_FILES.path= connect4.h
31 SUBST_SED.path= -e 's,"white_ob.cn4","${PREFIX}/share/velena/white_ob.cn4",'
33 SUBST_CLASSES+= ansi-c
34 SUBST_STAGE.ansi-c= pre-configure
35 SUBST_FILES.ansi-c= *.c *.h
36 SUBST_SED.ansi-c= -e 's,<malloc\.h>,<stdlib.h>,'
38 SUBST_CLASSES+= cflags
39 SUBST_STAGE.cflags= pre-configure
40 SUBST_FILES.cflags= makefile
41 SUBST_SED.cflags= -e s,^CFLAGS.*,,
43 # Velena isn't 64bit-safe, which results in a "fatal error" for some
46 # Try for example "c170", which works with -m32 and fails without.
48 .include "../../mk/bsd.prefs.mk"
49 .if ${MACHINE_ARCH:M*64} != ""
50 . if ${PKGSRC_COMPILER:Mgcc} != ""
53 PKG_FAIL_REASON+= "Velena doesn't work on 64-bit platforms."
58 ${INSTALL_PROGRAM} ${WRKSRC}/veleng ${DESTDIR}${PREFIX}/bin/velena
59 ${INSTALL_DATA} ${WRKSRC}/readme ${DESTDIR}${PREFIX}/share/doc/velena/README
60 ${INSTALL_DATA} ${WRKSRC}/white_ob.cn4 ${DESTDIR}${PREFIX}/share/velena/.
62 .include "../../mk/bsd.pkg.mk"