|
Lines 1-71
Link Here
|
| 1 |
# Created by: xaa@stack.nl |
1 |
# Created by: xaa@stack.nl |
| 2 |
# $FreeBSD: head/games/xboard/Makefile 366198 2014-08-26 10:35:00Z johans $ |
2 |
# $FreeBSD: head/games/xboard/Makefile 366198 2014-08-26 10:35:00Z johans $ |
| 3 |
|
3 |
|
| 4 |
PORTNAME= xboard |
4 |
PORTNAME?= xboard |
| 5 |
PORTVERSION= 4.7.3 |
5 |
PORTVERSION?= 4.7.3 |
| 6 |
PORTREVISION= 1 |
6 |
PORTREVISION?= 2 |
| 7 |
CATEGORIES= games |
7 |
PORTEPOCH?= |
| 8 |
MASTER_SITES= GNU |
8 |
CATEGORIES?= games |
| 9 |
|
9 |
MASTER_SITES?= GNU |
| 10 |
MAINTAINER= johans@FreeBSD.org |
10 |
|
| 11 |
COMMENT= X frontend for Crafty, GNUChess, Chess Servers, or e-mail chess |
11 |
MAINTAINER?= johans@FreeBSD.org |
| 12 |
|
12 |
COMMENT?= X frontend for Crafty, GNUChess, Chess Servers, or e-mail chess |
| 13 |
LIB_DEPENDS= libcairo.so:${PORTSDIR}/graphics/cairo |
13 |
|
| 14 |
|
14 |
LICENSE?= GPLv3 |
| 15 |
OPTIONS_DEFINE= NLS ZIPPY CRAFTY FAIRYMAX GNUCHESS KNIGHTCAP PHALANX DOCS |
15 |
|
| 16 |
OPTIONS_DEFAULT= |
16 |
LIB_DEPENDS?= libcairo.so:${PORTSDIR}/graphics/cairo |
| 17 |
OPTIONS_SUB= yes |
17 |
|
|
|
18 |
CONFLICTS?= xboard-devel-[0-9]* |
| 19 |
|
| 20 |
OPTIONS_DEFINE?= NLS DOCS ZIPPY |
| 21 |
OPTIONS_SINGLE?= FRONTEND |
| 22 |
OPTIONS_SINGLE_FRONTEND?= XAW XAW3D GTK2 |
| 23 |
OPTIONS_GROUP?= ENGINES |
| 24 |
OPTIONS_GROUP_ENGINES?= FAIRYMAX CRAFTY GNUCHESS KNIGHTCAP PHALANX |
| 25 |
OPTIONS_RADIO?= SOUND |
| 26 |
OPTIONS_RADIO_SOUND?= SOX ALSA |
| 27 |
OPTIONS_DEFAULT?= XAW |
| 28 |
OPTIONS_SUB?= yes |
| 18 |
ZIPPY_DESC= Add Zippy capability (computer player on ICS) |
29 |
ZIPPY_DESC= Add Zippy capability (computer player on ICS) |
|
|
30 |
ENGINES_DESC= Chess Engines |
| 19 |
CRAFTY_DESC= Install crafty engine |
31 |
CRAFTY_DESC= Install crafty engine |
| 20 |
FAIRYMAX_DESC= Install fairymax engine |
32 |
FAIRYMAX_DESC= Install fairymax engine (many chess variants) |
| 21 |
GNUCHESS_DESC= Install GnuChess engine |
33 |
GNUCHESS_DESC= Install GnuChess engine |
| 22 |
KNIGHTCAP_DESC= Install KnightCap engine |
34 |
KNIGHTCAP_DESC= Install KnightCap engine |
| 23 |
PHALANX_DESC= Install phalanx engine |
35 |
PHALANX_DESC= Install phalanx engine |
| 24 |
NLS_USES= gettext |
36 |
FRONTEND_DESC= Fornt End |
| 25 |
NLS_CONFIGURE_ENABLE= nls |
37 |
XAW_DESC= Xaw GUI toolkit support (default) |
| 26 |
ZIPPY_CONFIGURE_ENABLE= zippy |
38 |
XAW3D_DESC= Xaw3d GUI toolkit support (not fully supported) |
|
|
39 |
GTK2_DESC= GTK+ 2 GUI toolkit support (experimental) |
| 40 |
SOUND_DESC= Sound Output (optional) |
| 41 |
SOX_DESC= SoX audio support |
| 27 |
CRAFTY_RUN_DEPENDS+= crafty:${PORTSDIR}/games/crafty |
42 |
CRAFTY_RUN_DEPENDS+= crafty:${PORTSDIR}/games/crafty |
| 28 |
FAIRYMAX_RUN_DEPENDS+= fairymax:${PORTSDIR}/games/fairymax |
43 |
FAIRYMAX_RUN_DEPENDS+= fairymax:${PORTSDIR}/games/fairymax |
| 29 |
GNUCHESS_RUN_DEPENDS+= gnuchess:${PORTSDIR}/games/gnuchess |
44 |
GNUCHESS_RUN_DEPENDS+= gnuchess:${PORTSDIR}/games/gnuchess |
| 30 |
KNIGHTCAP_RUN_DEPENDS+= KnightCap:${PORTSDIR}/games/KnightCap |
45 |
KNIGHTCAP_RUN_DEPENDS+= KnightCap:${PORTSDIR}/games/KnightCap |
| 31 |
PHALANX_RUN_DEPENDS+= phalanx:${PORTSDIR}/games/phalanx |
46 |
PHALANX_RUN_DEPENDS+= phalanx:${PORTSDIR}/games/phalanx |
|
|
47 |
XAW3D_DEPENDS+= libXaw3d.so:${PORTSDIR}/x11-toolkits/Xaw3d |
| 48 |
SOX_RUN_DEPENDS+= play:${PORTSDIR}/audio/sox |
| 49 |
ALSA_RUN_DEPENDS+= aplay:${PORTSDIR}/audio/alsa-utils |
| 50 |
NLS_USES= gettext |
| 51 |
NLS_CONFIGURE_ENABLE= nls |
| 52 |
ZIPPY_CONFIGURE_ENABLE= zippy |
| 53 |
XAW_CONFIGURE_WITH= Xaw |
| 54 |
XAW3D_CONFIGURE_WITH= Xaw3d |
| 55 |
GTK2_CONFIGURE_WITH= gtk |
| 56 |
|
| 57 |
.include <bsd.port.options.mk> |
| 32 |
|
58 |
|
| 33 |
USES= desktop-file-utils makeinfo perl5 pkgconfig shared-mime-info |
59 |
USES+= desktop-file-utils makeinfo perl5 pkgconfig shared-mime-info |
| 34 |
USE_XORG= xt xpm xaw |
60 |
USE_XORG+= xt xpm |
| 35 |
USE_GNOME= librsvg2 |
61 |
USE_GNOME+= librsvg2 |
|
|
62 |
.if ${PORT_OPTIONS:MXAW} |
| 63 |
USE_XORG+= xaw |
| 64 |
.endif |
| 65 |
.if ${PORT_OPTIONS:MGTK2} |
| 66 |
USE_GNOME+= gtk20 |
| 67 |
.endif |
| 36 |
GNU_CONFIGURE= yes |
68 |
GNU_CONFIGURE= yes |
| 37 |
CONFIGURE_ARGS+=MKDIR_P="${MKDIR}" PERLPATH=${LOCALBASE}/bin |
69 |
CONFIGURE_ARGS+=MKDIR_P="${MKDIR}" PERLPATH=${PERL} |
| 38 |
CFLAGS+= -I${LOCALBASE}/include |
70 |
CFLAGS+= -I${LOCALBASE}/include |
| 39 |
LDFLAGS+= -L${LOCALBASE}/lib |
71 |
LDFLAGS+= -L${LOCALBASE}/lib |
| 40 |
INFO= xboard |
72 |
INFO= xboard |
| 41 |
USE_PERL5= build |
73 |
USE_PERL5= build |
| 42 |
INSTALLS_ICONS= yes |
74 |
INSTALLS_ICONS= yes |
| 43 |
DATADIR= ${PREFIX}/share/games/${PORTNAME} |
75 |
DATADIR?= ${PREFIX}/share/games/${PORTNAME} |
| 44 |
|
76 |
|
| 45 |
PORTDOCS= AUTHORS ChangeLog NEWS README SHORTLOG TODO |
77 |
PORTDOCS= AUTHORS COPYING COPYRIGHT ChangeLog DIFFSTAT FAQ.html NEWS README SHORTLOG TODO |
| 46 |
|
78 |
|
| 47 |
BROKEN_sparc64= Does not install on sparc64 |
79 |
BROKEN_sparc64= Does not install on sparc64 |
| 48 |
|
80 |
|
| 49 |
.include <bsd.port.options.mk> |
|
|
| 50 |
|
| 51 |
.if ${PORT_OPTIONS:MZIPPY} |
81 |
.if ${PORT_OPTIONS:MZIPPY} |
| 52 |
PORTDOCS+= zippy.README |
82 |
PORTDOCS+= zippy.README |
| 53 |
.endif |
83 |
.endif |
| 54 |
|
84 |
|
|
|
85 |
.if ${PORT_OPTIONS:MNLS} |
| 86 |
PORTDOCS+= ABOUT-NLS |
| 87 |
.endif |
| 88 |
|
| 55 |
post-patch: |
89 |
post-patch: |
| 56 |
@${REINPLACE_CMD} -e 's/fairymax/gnuchessx/' ${WRKSRC}/xboard.conf.in |
90 |
@${ECHO_CMD} -n "" > ${WRKSRC}/engineEntries.txt |
|
|
91 |
.if ${PORT_OPTIONS:MCRAFTY} |
| 92 |
@${ECHO_CMD} "\"Crafty\" -fcp crafty\\" >> ${WRKSRC}/engineEntries.txt |
| 93 |
@${ECHO_CMD} -n "crafty" > ${WRKSRC}/firstEngine.txt |
| 94 |
.endif |
| 95 |
.if ${PORT_OPTIONS:MGNUCHESS} |
| 96 |
@${ECHO_CMD} "\"GNU Chess\" -fcp gnuchess\\" >> ${WRKSRC}/engineEntries.txt |
| 97 |
@${ECHO_CMD} -n "gnuchess" > ${WRKSRC}/firstEngine.txt |
| 98 |
.endif |
| 99 |
.if ${PORT_OPTIONS:MKNIGHTCAP} |
| 100 |
@${ECHO_CMD} "\"KnightCap\" -fcp \"KnightCap -n -X -A -f ${PREFIX}/share/games/KnightCap/coeffs.dat\"\\" >> ${WRKSRC}/engineEntries.txt |
| 101 |
@${ECHO_CMD} -n "KnightCap" > ${WRKSRC}/firstEngine.txt |
| 102 |
.endif |
| 103 |
.if ${PORT_OPTIONS:MPHALANX} |
| 104 |
@${ECHO_CMD} "\"Phalanx\" -fcp phalanx\\" >> ${WRKSRC}/engineEntries.txt |
| 105 |
@${ECHO_CMD} -n "phalanx" > ${WRKSRC}/firstEngine.txt |
| 106 |
.endif |
| 107 |
.if ${PORT_OPTIONS:MFAIRYMAX} |
| 108 |
@${ECHO_CMD} "\"FairyMax\" -fcp fairymax\\" >> ${WRKSRC}/engineEntries.txt |
| 109 |
@${ECHO_CMD} -n "fairymax" > ${WRKSRC}/firstEngine.txt |
| 110 |
.endif |
| 111 |
@firstEngine=`cat ${WRKSRC}/firstEngine.txt` && \ |
| 112 |
${REINPLACE_CMD} -e "s|\(-firstChessProgram\) .*|\1 $${firstEngine}|" ${WRKSRC}/xboard.conf.in |
| 113 |
@engineEntries=`cat ${WRKSRC}/engineEntries.txt` && \ |
| 114 |
${REINPLACE_CMD} -e "s|\(firstChessProgramNames[ ]*{\)[ ]*.*|\1$${engineEntries}}|" ${WRKSRC}/xboard.conf.in |
| 57 |
@${REINPLACE_CMD} -e '/^#include..malloc.h/d' \ |
115 |
@${REINPLACE_CMD} -e '/^#include..malloc.h/d' \ |
| 58 |
${WRKSRC}/engineoutput.c ${WRKSRC}/uci.c |
116 |
${WRKSRC}/engineoutput.c ${WRKSRC}/uci.c |
| 59 |
@${REINPLACE_CMD} -e 's:INSTALL.*sysconfdir):&/$$$$files.dist:' \ |
|
|
| 60 |
${WRKSRC}/Makefile.in |
| 61 |
.if ${PORT_OPTIONS:MZIPPY} |
117 |
.if ${PORT_OPTIONS:MZIPPY} |
| 62 |
@cd ${WRKSRC} && ${PATCH} < ${PATCHDIR}/OPTION_ZIPPY__patch-xboard.texi |
118 |
@cd ${WRKSRC} && ${PATCH} < ${PATCHDIR}/OPTION_ZIPPY__patch-xboard.texi |
| 63 |
@${REINPLACE_CMD} -e 's|%%DOCSDIR%%|${DOCSDIR}|g' ${WRKSRC}/xboard.texi |
119 |
@${REINPLACE_CMD} -e 's|%%DOCSDIR%%|${DOCSDIR}|g' ${WRKSRC}/xboard.texi |
| 64 |
.endif |
120 |
.endif |
|
|
121 |
.if ${PORT_OPTIONS:MSOX} |
| 122 |
@${REINPLACE_CMD} -e "s|\(soundProgram\) .*|\1 \"play -q\"|" ${WRKSRC}/xboard.conf.in |
| 123 |
.elif ${PORT_OPTIONS:MALSA} |
| 124 |
@${REINPLACE_CMD} -e "s|\(soundProgram\) .*|\1 \"aplay -q\"|" ${WRKSRC}/xboard.conf.in |
| 125 |
.else |
| 126 |
@${REINPLACE_CMD} -e "s|\(soundProgram\) .*|\1 \"\"|" ${WRKSRC}/xboard.conf.in |
| 127 |
.endif |
| 65 |
|
128 |
|
| 66 |
post-install: |
129 |
post-install: |
| 67 |
${INSTALL_SCRIPT} ${WRKSRC}/cmail ${STAGEDIR}${PREFIX}/bin/ |
130 |
${INSTALL_SCRIPT} ${WRKSRC}/cmail ${STAGEDIR}${PREFIX}/bin/ |
| 68 |
${MV} ${STAGEDIR}${PREFIX}/etc/xboard.conf.dist \ |
131 |
${MV} ${STAGEDIR}${PREFIX}/etc/xboard.conf \ |
| 69 |
${STAGEDIR}${PREFIX}/etc/xboard.conf.sample |
132 |
${STAGEDIR}${PREFIX}/etc/xboard.conf.sample |
| 70 |
.if ${PORT_OPTIONS:MDOCS} |
133 |
.if ${PORT_OPTIONS:MDOCS} |
| 71 |
@${MKDIR} ${STAGEDIR}${DOCSDIR} |
134 |
@${MKDIR} ${STAGEDIR}${DOCSDIR} |