aboutsummaryrefslogtreecommitdiffstats
path: root/games/deng/Makefile
blob: 8b060d8bfe0846e2b394e0690b3cc7d6b83e21e9 (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
# New ports collection makefile for:    deng
# Date created:     25 Aug 2004
# Whom:         Igor Pokrovsky <ip@doom.homeunix.org>
#
# $FreeBSD$
#

PORTNAME=   deng
PORTVERSION=    1.8.3
CATEGORIES= games
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}

MAINTAINER= ip@doom.homeunix.org
COMMENT=    An enhanced Doom, Heretic and Hexen source port

LIB_DEPENDS=    png.5:${PORTSDIR}/graphics/png
RUN_DEPENDS=    ${LOCALBASE}/bin/timidity:${PORTSDIR}/audio/timidity

USE_REINPLACE=  yes
REINPLACE_ARGS= -i ""
USE_LIBTOOL_VER=    15
CONFIGURE_TARGET=   --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV=  CFLAGS="${CFLAGS} `${SDL_CONFIG} --cflags` -I${LOCALBASE}/include -I${X11BASE}/include" \
        CPPFLAGS="`${SDL_CONFIG} --cflags` -I${LOCALBASE}/include -I${X11BASE}/include"
USE_SDL=    sdl mixer net
USE_GL=     yes
INSTALLS_SHLIB= yes
NOT_FOR_ARCHS=  amd64

PKGMESSAGE= ${WRKDIR}/pkg-message

.if exists(${LOCALBASE}/lib/libopenal.so.0) || defined(WITH_OPENAL)
WITH_OPENAL=    yes
LIB_DEPENDS+=   openal.0:${PORTSDIR}/audio/openal
.endif

.if !defined(WITH_OPENAL)
PLIST_SUB=  WITH_OPENAL="@comment "
.else
PLIST_SUB=  WITH_OPENAL=""
.endif

.ifndef (WITH_OPENAL)
pre-everything::
    @${ECHO_CMD} ""
    @${ECHO_CMD} "Optionally define WITH_OPENAL=yes to build OpenAL sound plugin"
    @${ECHO_CMD} ""
.endif

post-patch:
    @${REINPLACE_CMD} -E -e 's/-Wunused-.+ / /g; \
                 s/SDL(\\|\/)//g' ${WRKSRC}/configure
    @${FIND} ${WRKSRC} -name '*.[ch]' | \
        ${XARGS} ${REINPLACE_CMD} -E -e 's/SDL(\\|\/)//g'

post-install:
.ifndef (NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/Doc/*.txt ${DOCSDIR}
.for i in jDoom jHeretic jHexen
    @${MKDIR} ${DOCSDIR}/${i}
    ${INSTALL_DATA} ${WRKSRC}/Doc/${i}/*.txt ${DOCSDIR}/${i}
.endfor
.endif
    @(${SED} -e 's|%%PREFIX%%|${PREFIX}|; s|%%DOCSDIR%%|${DOCSDIR}|' \
        <pkg-message >${PKGMESSAGE} && ${CAT} ${PKGMESSAGE})

.include <bsd.port.mk>