aboutsummaryrefslogtreecommitdiffstats
path: root/games/tenebrae/Makefile
blob: 412ada7bc998512f98bd0d6d0793200be9512911 (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
# New ports collection makefile for: tenebrae
# Date created:     14 Mar 2004
# Whom:         Igor Pokrovsky <tiamat@comset.net>
#
# $FreeBSD$
#

PORTNAME=   tenebrae
PORTVERSION=    1.04
PORTREVISION=   8
CATEGORIES= games
MASTER_SITES=   http://tenebrae.sourceforge.net/downloads/
DISTFILES=  ${PORTNAME}_src${EXTRACT_SUFX} \
        ${PORTNAME}data${EXTRACT_SUFX}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Quake 1 source port with advanced graphics

LIB_DEPENDS=    png15:${PORTSDIR}/graphics/png

USE_ZIP=    yes
USE_DOS2UNIX=   yes
USE_GMAKE=  yes
USE_XORG=   xxf86dga
USE_GL=     gl
USE_SDL=    yes

OPTIONS_DEFINE= X86_ASM DOCS
OPTIONS_DEFAULT=    X86_ASM
X86_ASM_DESC=   Enable use of x86 assembly code

WRKSRC=     ${WRKDIR}/${PORTNAME}_0
BUILD_WRKSRC=   ${WRKSRC}/linux
MAKEFILE=   Makefile.i386linux
MAKE_ENV=   PTHREAD_LIBS="${PTHREAD_LIBS}"

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MX86_ASM}
MAKE_ENV+=  USE_ASM=1
.endif

post-patch:
    ${REINPLACE_CMD} -e 's|png_set_gray_1_2_4_to_8|png_set_expand_gray_1_2_4_to_8|' \
    ${WRKSRC}/gl_warp.c

pre-build:
    @cd ${BUILD_WRKSRC} && ${LN} -sf Makefile.i386linux Makefile

do-install:
    ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/bin/${PORTNAME} \
        ${PREFIX}/bin
    @${MKDIR} ${Q1DIR}/${PORTNAME}
    ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}/Pak0.pak ${Q1DIR}/${PORTNAME}
.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${DOCSDIR}
    ${TR} -d '\r' <${WRKDIR}/Tenebrae_Readme.txt \
        >${DOCSDIR}/Tenebrae_Readme.txt
.endif

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

.include "${.CURDIR}/../quake-data/Makefile.include"

.include <bsd.port.mk>