summaryrefslogtreecommitdiffstats
path: root/games/netspades/Makefile
blob: 4c9b0db1b6b825a466bd600515dff41d5b97da66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Created by: Frank Laszlo <laszlof@freebsdmatrix.net>
# $FreeBSD$

PORTNAME=	NetSpades
PORTVERSION=	4.2.0
PORTREVISION=	9
CATEGORIES=	games
MASTER_SITES=	TUCOWS/x11/entertain \
		http://www.ece.rice.edu/~brentmh/spades/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Very popular card game for 1-4 players over a network

LICENSE=	GPLv2+

OPTIONS_DEFINE=	GTK1 SLANG
OPTIONS_DEFAULT=	GTK1 SLANG

GNU_CONFIGURE=	yes

CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib

PLIST_FILES=	bin/spadesd man/man6/spadesd.6.gz

GTK1_USE=		GNOME=gtk12
GTK1_CONFIGURE_OFF=	--without-gtk
GTK1_PLIST_FILES=	bin/gspades man/man6/gspades.6.gz

SLANG_USES=		readline ncurses
SLANG_CONFIGURE_OFF=	--without-slang
SLANG_LIB_DEPENDS=	libslang.so:devel/libslang2
SLANG_LDFLAGS=		-lncurses
SLANG_PLIST_FILES=	bin/slspades man/man6/slspades.6.gz

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MGTK1}
DESKTOP_ENTRIES="GSpades" "" "" "gspades" "" ""
.endif

post-patch:
.for i in engine_func.c gtk_connect.c listen.c sl_io.c
	@${REINPLACE_CMD} -e \
		's| log| ns_log|g' ${WRKSRC}/src/${i}
.endfor

do-install:
	(cd ${WRKSRC}/src && ${INSTALL_PROGRAM} spadesd \
		${STAGEDIR}${PREFIX}/bin)
	(cd ${WRKSRC} && ${INSTALL_MAN} spadesd.6 \
		${STAGEDIR}${MANPREFIX}/man/man6)
.if ${PORT_OPTIONS:MGTK1}
	(cd ${WRKSRC}/src && ${INSTALL_PROGRAM} gspades \
		${STAGEDIR}${PREFIX}/bin)
	(cd ${WRKSRC} && ${INSTALL_MAN} gspades.6 \
		${STAGEDIR}${MANPREFIX}/man/man6)
.endif
.if ${PORT_OPTIONS:MSLANG}
	(cd ${WRKSRC}/src && ${INSTALL_PROGRAM} slspades \
		${STAGEDIR}${PREFIX}/bin)
	(cd ${WRKSRC} && ${INSTALL_MAN} slspades.6 \
		${STAGEDIR}${MANPREFIX}/man/man6)
.endif

.include <bsd.port.mk>
OpenPOWER on IntegriCloud