Update games/hexalate to version 1.1.6
[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=     ports@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=           compiler:c++11-lang gnome perl5 pkgconfig shebangfix 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 JOYSTICK_BUILD_DEPENDS= ${LOCALBASE}/include/linux/joystick.h:devel/evdev-proto
37
38 DESKTOP_ENTRIES="eboard" \
39                 "Play chess" \
40                 "${PREFIX}/share/pixmaps/eboard.xpm" \
41                 "eboard" \
42                 "Game;BoardGame;GTK;" \
43                 true
44
45 .include <bsd.port.options.mk>
46
47 post-extract:
48 .for e in ${EXTRAS}
49         @cd ${WRKDIR} && ${GZIP_CMD} -dc \
50                 ${_DISTDIR}/eboard-extras-${e}.tar.gz | ${TAR} -xf -
51 .endfor
52
53 post-patch:
54         @${REINPLACE_CMD} -e 's,g++,${CXX},' -e 's|-O6|${CXXFLAGS}|' \
55                 ${WRKSRC}/configure
56
57 .if empty(PORT_OPTIONS:MJOYSTICK)
58 post-configure:
59         @${REINPLACE_CMD} -e '/^#define HAVE_LINUX_JOYSTICK_H 1/ d' \
60                 ${WRKSRC}/config.h
61 .endif
62
63 post-install:
64         @${LN} -sf ${LOCALBASE}/bin/timeseal \
65                 ${STAGEDIR}${DATADIR}/timeseal.FreeBSD
66 .if ${PORT_OPTIONS:MDOCS}
67         @${MKDIR} ${STAGEDIR}${DOCSDIR}
68         ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
69 .for file in Crafty.txt FICS-Timeseal.txt GNUChess4.txt GNUChess5.txt \
70         Scripts.txt Sjeng.txt Themes.txt
71         ${INSTALL_DATA} ${WRKSRC}/Documentation/${file} ${STAGEDIR}${DOCSDIR}
72 .endfor
73 .endif
74 .for extra in ${EXTRAS}
75         @cd ${WRKDIR}/eboard-extras-${extra} && ${SETENV} EBOARDCONFIG=${STAGEDIR}${PREFIX}/bin/eboard-config ${CONFIGURE_CMD} --prefix=${PREFIX}
76         @cd ${WRKDIR}/eboard-extras-${extra} && ${SETENV} ${MAKE_ENV} ${MAKE} install DATADIR=${STAGEDIR}${DATADIR}
77 .endfor
78         @${INSTALL_DATA} ${WRKSRC}/icon-eboard.xpm ${STAGEDIR}${PREFIX}/share/pixmaps/eboard.xpm
79
80 .include <bsd.port.mk>