aboutsummaryrefslogtreecommitdiffstats
path: root/games/heretic/Makefile
blob: 4e38abe84034b481d624c6c5a68c4c059a6eb74b (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# New ports collection makefile for:    glheretic
# Date created:     04 Feb 2000
# Whom:         Will Andrews <andrews@technologist.com>
#
# $FreeBSD$
#

PORTNAME=   heretic
PORTVERSION=    1.1
PORTREVISION=   1
CATEGORIES= games
MASTER_SITES=   http://heretic.linuxgames.com/heretic/src/ \
        http://heretic.linuxgames.com/wad/
DISTNAME=   gl${PORTNAME}-${PORTVERSION}
.if !defined(WITHOUT_WAD)
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX} heretic_share.wad.gz
EXTRACT_ONLY=   ${DISTNAME}${EXTRACT_SUFX}
.endif

MAINTAINER= lehmann@ans-netz.de
COMMENT=    Unix source-port of the famous Heretic game by id Software

USE_X_PREFIX=   yes
USE_GMAKE=  yes
MAKE_ENV=   PTHREAD_LIBS=${PTHREAD_LIBS}

ALL_TARGET= x11
BINARY=     xheretic

.if defined(WITH_FASTX11)
ALL_TARGET= fastx11
BINARY=     xaheretic
.endif

.if defined(WITH_SDL)
ALL_TARGET= sdl
BINARY=     sdlheretic
SDL_CONFIG= ${LOCALBASE}/bin/sdl11-config
LIB_DEPENDS=    SDL-1.1:${PORTSDIR}/devel/sdl12
MAKE_ENV+=  SDL_CONFIG="${SDL_CONFIG}"
CFLAGS+=    `${SDL_CONFIG} --cflags`
.endif

.if defined(WITHOUT_WAD)
PLIST_SUB=  WAD:="@comment "
.else
PLIST_SUB=  WAD:=""
.endif

pre-everything::
    @${ECHO} ""
    @${ECHO} "You may use the following build options:"
    @${ECHO} ""
    @${ECHO} "      WITH_FASTX11=yes  Use FastX11 support"
    @${ECHO} "      WITH_SDL=yes      Use SDL."
    @${ECHO} "      WITHOUT_WAD=yes   Don't install the wad file."
    @${ECHO} ""

post-extract:
.if !defined(WITHOUT_WAD)
    @${GZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/heretic_share.wad.gz \
        > ${WRKSRC}/heretic_share.wad
.endif

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/${BINARY} ${PREFIX}/bin/heretic
    ${INSTALL_PROGRAM} ${WRKSRC}/sndserver ${PREFIX}/bin/sndserver
.if !defined(WITHOUT_WAD)
    @${MKDIR} ${PREFIX}/share/heretic
    ${INSTALL_DATA} ${WRKSRC}/heretic_share.wad ${PREFIX}/share/heretic
.endif
.if !defined(NOPORTDOCS)
    @${MKDIR} ${PREFIX}/share/doc/heretic
    ${INSTALL_DATA} ${WRKSRC}/doc/* ${PREFIX}/share/doc/heretic
.endif

.include <bsd.port.mk>