blob: 22c310e989a49457378123055b3dd1be13de9d75 (
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
# New ports collection makefile for: r1q2
# Date created: 16 May 2006
# Whom: Alejandro Pulver <alepulver@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= r1q2
PORTVERSION= 7904
PORTREVISION= 5
CATEGORIES= games
MASTER_SITES= http://www.r1ch.net/stuff/r1q2/src/
DISTNAME= ${PORTNAME}-b${PORTVERSION}-src
MAINTAINER= danfe@FreeBSD.org
COMMENT= Enhanced Quake II client/server focusing on stability
LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo
ONLY_FOR_ARCHS= i386 amd64
ONLY_FOR_ARCHS_REASON= sets the FPU rounding mode and precision (latter not available in fenv.h)
USE_ZIP= yes
USE_DOS2UNIX= yes
USE_GMAKE= yes
NO_WRKSUBDIR= yes
BUILD_WRKSRC= ${WRKSRC}/binaries
ALL_TARGET= #
OPTIONS= CLIENT "Build client" on \
DEDICATED "Build dedicated server" on \
GAME "Build a main game .so file" off \
REF_GL "Build renderer (required by CLIENT)" on
MAKE_ENV= LIBDIR="${LIBDIR}" PTHREAD_LIBS="${PTHREAD_LIBS}"
PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}"
LIBDIR= ${PREFIX}/lib/${PORTNAME}
.include "${.CURDIR}/../quake2-data/Makefile.include"
.include <bsd.port.pre.mk>
.if defined(WITHOUT_CLIENT) && defined(WITHOUT_DEDICATED)
IGNORE= needs at least one executable (CLIENT and DEDICATED)
.endif
.if !defined(WITHOUT_CLIENT)
ALL_TARGET+= client
PLIST_SUB+= CLIENT=""
.else
PLIST_SUB+= CLIENT="@comment "
.endif
.if !defined(WITHOUT_DEDICATED)
ALL_TARGET+= r1q2ded
PLIST_SUB+= DEDICATED=""
.else
PLIST_SUB+= DEDICATED="@comment "
.endif
.if defined(WITH_GAME)
ALL_TARGET+= game
PLIST_SUB+= GAME=""
.else
PLIST_SUB+= GAME="@comment "
.endif
.if !defined(WITHOUT_REF_GL)
USE_GL= yes
USE_SDL= sdl
LIB_DEPENDS+= jpeg.11:${PORTSDIR}/graphics/jpeg \
png15:${PORTSDIR}/graphics/png
ALL_TARGET+= ref_gl
CFLAGS+= -I${LOCALBASE}/include/libpng15
PLIST_SUB+= REF_GL=""
.else
PLIST_SUB+= REF_GL="@comment "
.endif
.if ${ARCH} == "sparc64"
BROKEN= Does not compile on sparc64
.endif
post-patch:
@${REINPLACE_CMD} -e 's|game$$(ARCH)|game|g' \
${BUILD_WRKSRC}/game/Makefile
pre-build:
@${FIND} ${BUILD_WRKSRC} -type d -depth 1 -exec ${MKDIR} {}/.depends \;
do-install:
.if !defined(WITHOUT_CLIENT)
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/client/quake2 \
${PREFIX}/bin/${PORTNAME}
.endif
.if !defined(WITHOUT_DEDICATED)
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/r1q2ded/r1q2ded ${PREFIX}/bin
.endif
${MKDIR} ${LIBDIR}/baseq2
.if defined(WITH_GAME)
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/game/game.so ${LIBDIR}/baseq2
.endif
.if !defined(WITHOUT_REF_GL)
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/ref_gl/ref_gl.so ${LIBDIR}
.endif
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/r1q2.txt ${WRKSRC}/readme.txt ${DOCSDIR}
.endif
.include <bsd.port.post.mk>
|