aboutsummaryrefslogtreecommitdiff
path: root/games/xlife/Makefile
blob: 7907c419bcc3d82cd9b02af376e25b1689fb6af6 (plain) (blame)
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
67
68
# Created by: asami
# $FreeBSD$

PORTNAME=	xlife
PORTVERSION=	6.7.5
CATEGORIES=	games
MASTER_SITES=	http://litwr2.atspace.eu/xlife/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	John Horton Conway's Game of Life

LICENSE=	MIT GPLv2
LICENSE_COMB=	multi

RUN_DEPENDS=	gawk:${PORTSDIR}/lang/gawk

OPTIONS_DEFINE=	DOCS

WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION:R}

USE_BZIP2=	yes
USES=		imake:notall
USE_XORG=	x11

PORTDOCS=	*

DESKTOP_ENTRIES="XLife" "" "" "${PORTNAME}" "" false

DOC_FILES=	CHANGES HACKING HOW-TO-INSTALL INSTALL MISSED README \
		SHORT-INFO XLIFE-HISTORY.dot changelog.debian changelog.openbsd

.include <bsd.port.options.mk>

post-extract:
	@${LN} -sf xlife.man ${WRKSRC}/xlife.6

pre-patch:
.for i in xlife6.7to6.7.1.patch xlife6.7.1to6.7.2.patch xlife6.7.2to6.7.3.patch
	@(${CAT} ${WRKDIR}/${i} | ${PATCH} -d ${WRKSRC} -p1 -s)
.endfor

post-patch:
	@${REINPLACE_CMD} -e \
		'/CDEBUGFLAGS[[:space:]]/s|^|XCOMM | ; \
		 s|/usr/share/xlife|${DATADIR}|' ${WRKSRC}/Imakefile
	@${REINPLACE_CMD} -e \
		's|GAWKPATH|${LOCALBASE}/bin/gawk|' ${WRKSRC}/table2r

do-install:
	(cd ${WRKSRC} && ${INSTALL_PROGRAM} gen-multirules xlife \
		${STAGEDIR}${PREFIX}/bin)
	@${LN} -sf xlife ${STAGEDIR}${PREFIX}/bin/lifeconv
	(cd ${WRKSRC} && ${INSTALL_SCRIPT} table2r \
		${STAGEDIR}${PREFIX}/bin)
	(cd ${WRKSRC} && ${INSTALL_MAN} xlife.6 \
		${STAGEDIR}${MAN6PREFIX}/man/man6)
	@${LN} -sf xlife.6 ${STAGEDIR}${MAN6PREFIX}/man/man6/lifeconv.6
	@${MKDIR} ${STAGEDIR}${DATADIR}/patterns
	(cd ${WRKSRC}/patterns && ${COPYTREE_SHARE} . \
		${STAGEDIR}${DATADIR}/patterns)
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	(cd ${WRKSRC} && ${INSTALL_DATA} ${DOC_FILES} \
		${STAGEDIR}${DOCSDIR})
	@${MKDIR} ${STAGEDIR}${DOCSDIR}/doc
	(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . \
		${STAGEDIR}${DOCSDIR}/doc)

.include <bsd.port.mk>