aboutsummaryrefslogtreecommitdiff
path: root/games/apoolGL/Makefile
blob: b3873d9c8615a1c5b24d24517d69f9d491c97b29 (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
PORTNAME=	apoolGL
PORTVERSION=	0.99.22
PORTREVISION=	9
CATEGORIES=	games
MASTER_SITES=	http://www.planetjahn.de/files/
DISTNAME=	${PORTNAME}-099-pre22

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Another billiards simulator
WWW=		https://www.planetjahn.de/apool/

LICENSE=	GPLv2+

USES=		dos2unix gl sdl
USE_SDL=	sdl
USE_GL=		gl
DOS2UNIX_FILES=	ApoolGL.txt
# Seems dead upstream. Don't expect a proper fix.
CFLAGS+=	-fcommon

PORTDOCS=	ApoolGL.txt CHANGELOG OpenGL-Features

OPTIONS_DEFINE=	DOCS

post-patch:
	@${REINPLACE_CMD} -e 's|SDL/||' ${WRKSRC}/*.c

do-build:
	${CC} ${CFLAGS} -DDATADIR="\"${DATADIR}\"" \
		`${SDL_CONFIG} --cflags --libs` \
		-I${LOCALBASE}/include -L${LOCALBASE}/lib -lGL -lGLU -lm \
		-o ${WRKSRC}/apool ${WRKSRC}/*.c

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/apool ${STAGEDIR}${PREFIX}/bin
.for i in hi lo med
	@${MKDIR} ${STAGEDIR}${DATADIR}/textures-${i}
	${INSTALL_DATA} ${WRKSRC}/textures-${i}/*.bmp ${STAGEDIR}${DATADIR}/textures-${i}
.endfor
	${INSTALL_DATA} ${WRKSRC}/*.dat ${STAGEDIR}${DATADIR}

do-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>