aboutsummaryrefslogtreecommitdiffstats
path: root/games/redeclipse/Makefile
blob: ea47a583434be59cfc899484c09bfd30bb4dc0de (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
# New ports collection makefile for:    sauerbraten
# Date created:     2006-02-01
# Whom:         Jose Alonso Cardenas Marquez <acardenas@bsd.org.pe>
#
# $FreeBSD$
#

PORTNAME=   sauerbraten
PORTVERSION=    20060611
CATEGORIES= games
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= sauerbraten
DISTNAME=   ${PORTNAME}_2006_06_11_sp_edition_linux

MAINTAINER= acardenas@bsd.org.pe
COMMENT=    First person shooter based on Cube

USE_GL=     yes
USE_SDL=    sdl image mixer
USE_GMAKE=  yes
USE_AUTOTOOLS=  autoconf:259 aclocal:19 automake:19
GNU_CONFIGURE=  yes
AUTOMAKE_ARGS=  -a -c --foreign --add-missing
CONFIGURE_WRKSRC=   ${WRKSRC}/src/enet
BUILD_WRKSRC=   ${WRKSRC}/src
WRKSRC= ${WRKDIR}/${PORTNAME}
SAUDATDIR=  packages data
SUB_FILES=  sauer_client sauer_server pkg-message

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 500000
BROKEN=     Does not build on 4.x
.endif

post-extract:
    @${FIND} ${WRKSRC} -type d -name CVS -type d -print0 | ${XARGS} -0 ${RM} -R

post-patch:
    @${REINPLACE_CMD} -e 's|%%CXX%%|${CXX}|g ; \
        s|%%CXXFLAGS%%|${CXXFLAGS}|g ; s|%%X11BASE%%|${X11BASE}|g' \
            ${WRKSRC}/src/Makefile

do-install:
    @${INSTALL_SCRIPT} ${WRKDIR}/sauer_client ${WRKDIR}/sauer_server ${PREFIX}/bin
    @${INSTALL_PROGRAM} ${BUILD_WRKSRC}/sauer_client ${BUILD_WRKSRC}/sauer_server ${PREFIX}/libexec
    @${MKDIR} ${DATADIR}
    @cd ${WRKSRC} && \
        ${FIND} -E ${SAUDATDIR} -type d -exec ${MKDIR} "${DATADIR}/{}" \; && \
        ${FIND} -E ${SAUDATDIR} -type f -iregex ".*\.(png|cfg|cgz|jpg|ogg|ogz|txt|md2|md3|ms3d|qc|wav)" \
            -exec ${INSTALL_DATA} "{}" "${DATADIR}/{}" \;
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    @cd ${WRKSRC}/docs && \
        ${FIND} -E * -type d -exec ${MKDIR} "${DOCSDIR}/{}" \; && \
        ${FIND} -E * -type f -iregex ".*\.(html|css|jpg)" -exec ${INSTALL_DATA} "{}" "${DOCSDIR}/{}" \;
.endif

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

.include <bsd.port.post.mk>