summaryrefslogtreecommitdiff
path: root/games/flightgear-atlas/Makefile
blob: 11d6fb90c9419b1a3c5472d28f7b59b522f1a537 (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
47
48
49
50
51
52
53
54
55
# New ports collection makefile for:	flightgear-atlas
# Date created:				16 Sep 2005
# Whom:					Jean-Yves Lefort <jylefort@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=	flightgear-atlas
PORTVERSION=	0.3.1.20090529
PORTREVISION=	8
CATEGORIES=	games
MASTER_SITES=	http://contribs.martymac.org/FreeBSD-ports/distfiles/ \
		http://freebsd.unixfreunde.de/sources/
DISTNAME=	Atlas-${PORTVERSION}

MAINTAINER=	martymac@FreeBSD.org
COMMENT=	A map viewer for use with the FlightGear flight simulator

LICENSE=	GPLv2

BUILD_DEPENDS=	${LOCALBASE}/lib/libplibsl.a:${PORTSDIR}/x11-toolkits/plib \
		${LOCALBASE}/include/simgear/version.h:${PORTSDIR}/devel/simgear
LIB_DEPENDS=	png.6:${PORTSDIR}/graphics/png \
		jpeg.11:${PORTSDIR}/graphics/jpeg \
		curl.6:${PORTSDIR}/ftp/curl
RUN_DEPENDS=	${LOCALBASE}/lib/libplibsl.a:${PORTSDIR}/x11-toolkits/plib \
		${LOCALBASE}/include/simgear/version.h:${PORTSDIR}/devel/simgear \
		${LOCALBASE}/share/flightgear/version:${PORTSDIR}/games/flightgear-data

BROKEN=	does not build with SimGear 2.4.0

USE_AUTOTOOLS=	aclocal autoheader automake autoconf
AUTOMAKE_ARGS=	--add-missing

GNU_CONFIGURE=	yes
USE_XORG=	ice sm x11 xext xi xt xmu
USE_GL=		gl glu glut

CPPFLAGS+=	-I${LOCALBASE}/include ${PTHREAD_CFLAGS} \
		-DSG_GLUT_H='<GL/glut.h>' \
		-DSG_GL_H='<GL/gl.h>' \
		-DSTL_STRING='<string>'
LDFLAGS+=	-L${LOCALBASE}/lib
CONFIGURE_ARGS=	--with-fgbase="${LOCALBASE}/share/flightgear"

post-patch:
	@${REINPLACE_CMD} -e 's|^base_LIBS="$$LIBS"|base_LIBS="$$LIBS ${PTHREAD_LIBS}"|' ${WRKSRC}/configure.ac
	@${REINPLACE_CMD} -e 's|^AC_CHECK_LIB(pthread, pthread_exit)||' ${WRKSRC}/configure.ac
	@${REINPLACE_CMD} -e 's|-lpthread||' ${WRKSRC}/src/Makefile.am

post-install:
	${INSTALL_DATA} ${WRKSRC}/src/AtlasPalette ${LOCALBASE}/share/flightgear
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>