summaryrefslogtreecommitdiffstats
path: root/devel/gauche-sdl/Makefile
blob: 4b47e2d2135d20f835ddc0515a3ca310f8547baf (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
# New ports collection makefile for:	gauche
# Date created:		9 September 2002
# Whom:			Akinori MUSHA aka knu <knu@idaemons.org>
#
# $FreeBSD$
#

PORTNAME=	gauche-sdl
PORTVERSION=	0.5.1
PORTREVISION=	3
CATEGORIES=	devel scheme
MASTER_SITES=	http://michaelvess.com/files/
DISTNAME=	${PORTFAKENAME}
EXTRACT_SUFX=	.tgz

MAINTAINER=	erik@smluc.org
COMMENT=	Scheme script interpreter with multibyte character handling

BUILD_DEPENDS=	gosh:${PORTSDIR}/lang/gauche \
		${X11BASE}/lib/X11/rgb.txt:${X_CLIENTS_PORT}
RUN_DEPENDS=	gosh:${PORTSDIR}/lang/gauche \
		${X11BASE}/lib/X11/rgb.txt:${X_CLIENTS_PORT}

PLIST_SUB=	GAUCHE_VERSION="`gauche-config -V`"\
		TARGET="${CONFIGURE_TARGET}"
PORTFAKENAME=	Gauche-sdl-${PORTVERSION}
USE_SDL=	image mixer sdl ttf
GNU_CONFIGURE=	yes
CFLAGS+=	-fPIC

pre-configure:
.for DIR in . image mixer ttf
		${REINPLACE_CMD} \
			-e "s|^CFLAGS .*|& `${SDL_CONFIG} --cflags`|"\
			-e "s|-lSDL|`${SDL_CONFIG} --libs`|"\
			${WRKSRC}/src/${DIR}/Makefile.in
.endfor
.for FILE in gfx/gauche-sdl-gfx.h image/gauche-sdl-image.h \
	mixer/gauche-sdl-mixer.h ttf/gauche-sdl-ttf.h gauche-sdl.h
	${REINPLACE_CMD} -e "s|SDL/SDL|SDL|g" ${WRKSRC}/src/${FILE}
.endfor
		${REINPLACE_CMD} \
			-e "s|SDL/SDL|SDL|g"\
			-e "s|%%SDL_CFLAGS%%|`${SDL_CONFIG} --cflags`|"\
			-e "s|\"-lSDL\"|\"`${SDL_CONFIG} --libs`\"|" \
			${WRKSRC}/configure
		${REINPLACE_CMD} -e "s|^CFLAGS.*|& `${SDL_CONFIG} --cflags`|" \
			${WRKSRC}/src/gfx/Makefile.in

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