Fixup fromcvs/togit conversion
[pkgsrcv2.git] / games / velena / Makefile
1 # $NetBSD: Makefile,v 1.12 2011/05/28 22:41:43 dholland Exp $
2 #
3
4 DISTNAME=       veleng10
5 PKGNAME=        velena-1.0
6 PKGREVISION=    4
7 CATEGORIES=     games
8 MASTER_SITES=   http://www.ce.unipr.it/~gbe/
9 EXTRACT_SUFX=   .zip
10
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
15
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}
19
20 NOT_FOR_PLATFORM=       DragonFly-*-x86_64    # Can't build 32-bit binaries
21 PKG_DESTDIR_SUPPORT=    user-destdir
22
23 EXTRACT_OPTS_ZIP=       -LLaqo
24 WRKSRC=                 ${WRKDIR}
25 MAKE_FILE=              makefile
26 AUTO_MKDIRS=            yes
27
28 SUBST_CLASSES+=         path
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",'
32
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>,'
37
38 SUBST_CLASSES+=         cflags
39 SUBST_STAGE.cflags=     pre-configure
40 SUBST_FILES.cflags=     makefile
41 SUBST_SED.cflags=       -e s,^CFLAGS.*,,
42
43 # Velena isn't 64bit-safe, which results in a "fatal error" for some
44 # board positions.
45 #
46 # Try for example "c170", which works with -m32 and fails without.
47 #
48 .include "../../mk/bsd.prefs.mk"
49 .if ${MACHINE_ARCH:M*64} != ""
50 .  if ${PKGSRC_COMPILER:Mgcc} != ""
51 CFLAGS+=        -m32
52 .  else
53 PKG_FAIL_REASON+=       "Velena doesn't work on 64-bit platforms."
54 .  endif
55 .endif
56
57 do-install:
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/.
61
62 .include "../../mk/bsd.pkg.mk"