summaryrefslogtreecommitdiffstats
path: root/games/asc/Makefile
blob: 53bd640f4b54165b68a478f535ac716396fbde66 (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
# New ports collection makefile for:	asc
# Date created:				16 February 2000
# Whom:					Maxim Sobolev <sobomax@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=	asc
PORTVERSION=	1.13.5.1
CATEGORIES=	games
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	asc-hq
DISTNAME=	${PORTNAME}-source-${PORTVERSION}

MAINTAINER=	yinjieh@csie.nctu.edu.tw
COMMENT=	A turn based, multiplayer strategic game with very nice graphics

LIB_DEPENDS=	SDL-1.1.5:${PORTSDIR}/devel/sdl12 \
		SDL_image.10:${PORTSDIR}/graphics/sdl_image \
		SDLmm.8:${PORTSDIR}/devel/sdlmm \
		SDL_mixer.2:${PORTSDIR}/audio/sdl_mixer \
		paragui.3:${PORTSDIR}/x11-toolkits/paragui
.if !exists(/usr/bin/bzip2)
LIB_DEPENDS+=	bz2.1:${PORTSDIR}/archivers/bzip2
.endif

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

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

USE_GMAKE=	yes
USE_REINPLACE=	yes
USE_LIBTOOL=	yes
USE_GETOPT_LONG=	yes
CONFIGURE_ENV=	SDL_CONFIG="${SDL_CONFIG}" \
		CPPFLAGS="`${SDL_CONFIG} --cflags`" \
		LIBS="`${SDL_CONFIG} --libs` -lgnugetopt -lm"

CONFIGURE_ARGS=	--disable-paraguitest

pre-patch:
	@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
	@find ${WRKSRC} \( -name "*.cpp" -or -name "*.h" \) | xargs \
		${REINPLACE_CMD} -e 's|malloc[.]h|stdlib.h|g'
	@find ${WRKSRC} -type f -name Makefile.in | xargs \
		${REINPLACE_CMD} -e 's|[(]datadir[)]/games|(datadir)|g'

pre-configure:
	@${RM} -f ${WRKSRC}/config.cache

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