Update games/xonotic to version 0.8.2_1
[dports.git] / games / eboard / Makefile
1 # Created by: petef@FreeBSD.org
2 # $FreeBSD$
3
4 PORTNAME=       eboard
5 PORTVERSION=    1.1.1
6 PORTREVISION=   7
7 CATEGORIES=     games
8 MASTER_SITES=   SF \
9                 SF/${PORTNAME}/eboard-extras/pack%201%20patchlevel%202/:p1 \
10                 SF/${PORTNAME}/eboard-extras/pack%202/:p2
11 DISTFILES=      ${DISTNAME}${EXTRACT_SUFX} \
12                 eboard-extras-1pl2.tar.gz:p1 \
13                 eboard-extras-2.tar.gz:p2
14 EXTRACT_ONLY=   ${DISTNAME}${EXTRACT_SUFX}
15
16 MAINTAINER=     johans@FreeBSD.org
17 COMMENT=        GTK+ chess board interface (mainly for FICS and chessd)
18
19 LIB_DEPENDS=    libpng.so:graphics/png
20
21 EXTRAS=         1pl2 2
22 USES=           shebangfix pkgconfig perl5 tar:bzip2
23 HAS_CONFIGURE=  yes
24 USE_PERL5=      build
25 USE_GNOME=      gtk20
26 SHEBANG_FILES=  configure
27
28 CONFIGURE_ARGS= --prefix=${PREFIX} \
29                 --extra-inc=${LOCALBASE}/include \
30                 --extra-ld=${LOCALBASE}/lib
31
32 INSTALL_TARGET= install install-man
33
34 OPTIONS_DEFINE= JOYSTICK DOCS
35 JOYSTICK_DESC=  Enable joystick support
36
37 DESKTOP_ENTRIES="eboard" \
38                 "Play chess" \
39                 "${PREFIX}/share/pixmaps/eboard.xpm" \
40                 "eboard" \
41                 "Game;BoardGame;GTK;" \
42                 true
43
44 .include <bsd.port.options.mk>
45
46 .if ${PORT_OPTIONS:MJOYSTICK}
47 BUILD_DEPENDS+= ${LOCALBASE}/include/linux/joystick.h:devel/linux-js
48 RUN_DEPENDS+=   ${LOCALBASE}/include/linux/joystick.h:devel/linux-js
49 .endif
50
51 post-extract:
52 .for e in ${EXTRAS}
53         @cd ${WRKDIR} && ${GZIP_CMD} -dc \
54                 ${_DISTDIR}/eboard-extras-${e}.tar.gz | ${TAR} -xf -
55 .endfor
56
57 post-patch:
58         @${REINPLACE_CMD} -e 's,g++,${CXX},' -e 's,-O6,${CXXFLAGS},' \
59                 ${WRKSRC}/configure
60
61 .if empty(PORT_OPTIONS:MJOYSTICK)
62 post-configure:
63         @${REINPLACE_CMD} -e '/^#define HAVE_LINUX_JOYSTICK_H 1/ d' \
64                 ${WRKSRC}/config.h
65 .endif
66
67 post-install:
68         @${LN} -sf ${LOCALBASE}/bin/timeseal \
69                 ${STAGEDIR}${DATADIR}/timeseal.FreeBSD
70 .if ${PORT_OPTIONS:MDOCS}
71         @${MKDIR} ${STAGEDIR}${DOCSDIR}
72         ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
73 .for file in Crafty.txt FICS-Timeseal.txt GNUChess4.txt GNUChess5.txt \
74         Scripts.txt Sjeng.txt Themes.txt
75         ${INSTALL_DATA} ${WRKSRC}/Documentation/${file} ${STAGEDIR}${DOCSDIR}
76 .endfor
77 .endif
78 .for extra in ${EXTRAS}
79         @cd ${WRKDIR}/eboard-extras-${extra} && ${SETENV} EBOARDCONFIG=${STAGEDIR}${PREFIX}/bin/eboard-config ${CONFIGURE_CMD} --prefix=${PREFIX}
80         @cd ${WRKDIR}/eboard-extras-${extra} && ${SETENV} ${MAKE_ENV} ${MAKE} install DATADIR=${STAGEDIR}${DATADIR}
81 .endfor
82         @${INSTALL_DATA} ${WRKSRC}/icon-eboard.xpm ${STAGEDIR}${PREFIX}/share/pixmaps/eboard.xpm
83
84 .include <bsd.port.mk>