freebsd-ports/games/xboard/Makefile
2012-06-16 14:51:46 +00:00

90 lines
2.1 KiB
Makefile

# New ports collection makefile for: xboard
# Date created: 5 Jan 1997
# Whom: xaa@stack.nl
#
# $FreeBSD$
#
PORTNAME= xboard
PORTVERSION= 4.6.2
PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= xboard
MAINTAINER= johans@FreeBSD.org
COMMENT= X frontend for Crafty, GNUChess, Chess Servers, or e-mail chess
OPTIONS_DEFINE= XAW3D CRAFTY FAIRYMAX GNUCHESS KNIGHTCAP PHALANX
OPTIONS_DEFAULT=XAW3D
XAW3D_DESC= Use Xaw3d widgets (instead of Xaw)
CRAFTY_DESC= Install crafty engine
FAIRYMAX_DESC= Install fairymax engine
GNUCHESS_DESC= Install GnuChess engine
KNIGHTCAP_DESC= Install KnightCap engine
PHALANX_DESC= Install phalanx engine
USE_XORG= xt xpm xaw
GNU_CONFIGURE= yes
CONFIGURE_ARGS+=CFLAGS="-I${LOCALBASE}/include -L${LOCALBASE}/lib" \
MKDIR_P="${MKDIR}"
MAN6= xboard.6
INFO= xboard
USE_PERL5_BUILD=yes
INSTALLS_ICONS= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MXAW3D}
CONFIGURE_ARGS+= "--with-Xaw3d"
LIB_DEPENDS+= Xaw3d.${XAWVER}:${PORTSDIR}/x11-toolkits/Xaw3d
.endif
.if ${PORT_OPTIONS:MCRAFTY}
RUN_DEPENDS+= crafty:${PORTSDIR}/games/crafty
.endif
.if ${PORT_OPTIONS:MFAIRYMAX}
RUN_DEPENDS+= fairymax:${PORTSDIR}/games/fairymax
.endif
.if ${PORT_OPTIONS:MGNUCHESS}
RUN_DEPENDS+= gnuchess:${PORTSDIR}/games/gnuchess
.endif
.if ${PORT_OPTIONS:MKNIGHTCAP}
RUN_DEPENDS+= KnightCap:${PORTSDIR}/games/KnightCap
.endif
.if ${PORT_OPTIONS:MPHALANX}
RUN_DEPENDS+= phalanx:${PORTSDIR}/games/phalanx
.endif
.if ${PORT_OPTIONS:MNLS}
USE_GETTEXT= yes
PLIST_SUB+= NLS=""
.else
CONFIGURE_ARGS+= --disable-nls
PLIST_SUB+= NLS="@comment "
.endif
.include <bsd.port.pre.mk>
.if ${ARCH} == "sparc64"
BROKEN= Does not install on sparc64
.endif
post-patch:
@${REINPLACE_CMD} -e 's/fairymax/gnuchessx/' \
${WRKSRC}/xboard.h ${WRKSRC}/xboard.conf.in
@${REINPLACE_CMD} -e '/^#include..malloc.h/d' \
${WRKSRC}/engineoutput.c ${WRKSRC}/uci.c
@${REINPLACE_CMD} -e 's:INSTALL.*sysconfdir):&/$$$$files.dist:' \
${WRKSRC}/Makefile.in
post-install:
@${INSTALL_SCRIPT} ${WRKSRC}/cmail ${PREFIX}/bin/
@${CP} -pn ${PREFIX}/etc/xboard.conf.dist ${PREFIX}/etc/xboard.conf
.include <bsd.port.post.mk>