summaryrefslogtreecommitdiffstats
path: root/games/megaglest/Makefile
blob: 27105060fdab6d01b4235210be29567c53ce45ac (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# New ports collection makefile for:	megaglest
# Date created:				2011-02-10
# Whom:					Sven Moeller <smoeller@nichthelfer.de>
#
# $FreeBSD$
#

PORTNAME=	megaglest
PORTVERSION=	3.5.2
PORTREVISION=	2
CATEGORIES=	games
MASTER_SITES=	SF/${PORTNAME}/current_release/
DISTNAME=	${PORTNAME}-source-${PORTVERSION}.3

MAINTAINER=	smoeller@nichthelfer.de
COMMENT=	Open source 3D real-time strategy game

LIB_DEPENDS=	curl.6:${PORTSDIR}/ftp/curl \
		jpeg.11:${PORTSDIR}/graphics/jpeg \
		png15:${PORTSDIR}/graphics/png \
		xerces-c.27:${PORTSDIR}/textproc/xerces-c2 \
		vorbis.4:${PORTSDIR}/audio/libvorbis
RUN_DEPENDS=	${DATADIR}/tutorials/basic_tutorial/basic_tutorial.xml:${PORTSDIR}/games/megaglest-data

SUB_FILES=	pkg-message

USE_XZ=		yes
USE_CMAKE=	yes
USE_DOS2UNIX=	yes
USE_GL=		yes
USE_LUA=	5.1
USE_OPENAL=	al alut
USE_SDL=	yes
USE_WX=		2.8+

CFLAGS+=	-I${LOCALBASE}/include/libpng15
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}

OPTIONS=	EDITOR "Install MegaGlest Editor" off

.include <bsd.port.options.mk>

.if defined(WITH_EDITOR)
PLIST_SUB+=	EDITOR=""
.else
PLIST_SUB+=	EDITOR="@comment "
.endif

post-patch:
	@${REINPLACE_CMD} -e '/<curl\/types.h>/d' \
		${WRKSRC}/source/shared_lib/sources/platform/posix/miniftpclient.cpp

do-install:
	${STRIP_CMD} ${WRKSRC}/mk/linux/megaglest
	@${MKDIR} ${DATADIR}
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
.endif
	${INSTALL_PROGRAM} ${WRKSRC}/mk/linux/megaglest ${PREFIX}/bin/${PORTNAME}
.for f in glest.ini glestkeys.ini servers.ini
	${INSTALL_DATA} ${WRKSRC}/${f} ${DATADIR}
.endfor
.for f in AUTHORS.source_code.txt CHANGELOG.txt README.txt COPYRIGHT.source_code.txt
	${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
.endfor
.if defined(WITH_EDITOR)
	${INSTALL_PROGRAM} ${WRKSRC}/mk/linux/megaglest_editor ${PREFIX}/bin/megaglest_editor
.endif

post-install:
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.pre.mk>

.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
BROKEN=		Does not compile on ia64, powerpc, or sparc64: unrecognized compiler flags
.endif

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