summaryrefslogtreecommitdiff
path: root/games/gl-117/Makefile
blob: a09fcc51605b7b5b4cbea9c34ae097fde9b15eb9 (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
# ex:ts=8
# Ports collection makefile for:	gl-117
# Date created:			Aug 8, 2002
# Whom:				ijliao
#
# $FreeBSD$
#

PORTNAME=	gl-117
PORTVERSION=	0.8
CATEGORIES=	games
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	${PORTNAME}

MAINTAINER=	ports@FreeBSD.org

LIB_DEPENDS=	SDL_mixer.2:${PORTSDIR}/audio/sdl_mixer

SDL_CONFIG?=	${LOCALBASE}/bin/sdl11-config

USE_MESA=	yes
USE_REINPLACE=	yes
GNU_CONFIGURE=	yes
CONFIGURE_TARGET=	--build=${ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"

CPPFLAGS=	`${SDL_CONFIG} --cflags` -I${X11BASE}/include
LDFLAGS=	`${SDL_CONFIG} --libs` -L${X11BASE}/lib

post-patch:
.for file in configure src/audio.h src/glland.h src/main.h src/net.h
	@${REINPLACE_CMD} -e 's|^CPPFLAGS="-D|CPPFLAGS="\$$CPPFLAGS -D|g ; \
		 s|SDL/||g ; \
		 s|-lSDL |-lSDL-1.1 |g ; \
		 s|-lSDLmain|-lSDLmain-1.1|g' ${WRKSRC}/${file}
.endfor
	@cd ${WRKSRC}/src \
		&& ${MV} loader_tga.cpp loader_tga.cpp.bak \
		&& ${TR} -d '\015' < loader_tga.cpp.bak > loader_tga.cpp

.include <bsd.port.mk>