summaryrefslogtreecommitdiff
path: root/games/xlife/Makefile
blob: 8b04082151afd0f6e6468af4b82397059d11cf7e (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
# Created by: asami
# $FreeBSD$

PORTNAME=	xlife
PORTVERSION=	6.6.1
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

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

USE_BZIP2=	yes
USE_XORG=	x11
MAKE_JOBS_SAFE=	yes

MLINKS=		xlife.6 lifeconv.6
MAN6=		xlife.6
PORTDOCS=	*

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

DOC_FILES=	CHANGES DEVELOPMENT-TREE HACKING HOW-TO-INSTALL INSTALL \
		MISSED README SHORT-INFO changelog.debian changelog.openbsd

.include <bsd.port.options.mk>

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

pre-patch:
	@(${CAT} ${WRKDIR}/xlife6.6to6.6.1.patch | ${PATCH} -d ${WRKSRC} -p1 -s)

do-configure:
	@(cd ${WRKSRC} && ${SED} -e \
		's|/usr/games|$$(PREFIX)/bin| ; \
		 s|/usr/share|$$(PREFIX)/share| ; \
		 s|/usr/X11R6|$$(LOCALBASE)| ; \
		 s|-g -O3|$$(CFLAGS)| ; \
		 s|-lstdc++|| ; \
		 s|$$(CC) -o|$$(CXX) -o|' < Makefile.common > Makefile)

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

.include <bsd.port.mk>