blob: d516fe668da0160437d81f7a08057f9624b1ffe3 (
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
# Created by: Alejandro Pulver <alepulver@FreeBSD.org>
# $FreeBSD$
PORTNAME= q2pro
PORTVERSION= ${SVN_REV}
PORTREVISION= 7
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= alepulver
MAINTAINER= danfe@FreeBSD.org
COMMENT= Quake II engine modification compatible with R1Q2
USES= dos2unix gmake tar:bzip2
WRKSRC= ${WRKDIR}/${PORTNAME}
ALL_TARGET= #
SVN_REV= 142
MAKE_ENV= LIBDIR="${LIBDIR}"
PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}"
LIBDIR= ${PREFIX}/lib/${PORTNAME}
OPTIONS_DEFINE= GAME GL SOFT UI
OPTIONS_DEFINE_i386= ASM
OPTIONS_MULTI= FLAVOR
OPTIONS_MULTI_FLAVOR= CLIENT DEDICATED
OPTIONS_DEFAULT= CLIENT DEDICATED GL SOFT UI
OPTIONS_DEFAULT_I386= ASM
CLIENT_DESC= Build client
DEDICATED_DESC= Build dedicated server
GAME_DESC= Build main game (default mod)
GL_DESC= Build OpenGL render
SOFT_DESC= Build software render
UI_DESC= Build user interface (for client menus)
NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MCLIENT}
USE_SDL+= sdl
ALL_TARGET+= client
PLIST_SUB+= CLIENT=""
.else
PLIST_SUB+= CLIENT="@comment "
.endif
.if ${PORT_OPTIONS:MDEDICATED}
ALL_TARGET+= server
PLIST_SUB+= DEDICATED=""
.else
PLIST_SUB+= DEDICATED="@comment "
.endif
.if ${PORT_OPTIONS:MGAME}
ALL_TARGET+= game
PLIST_SUB+= GAME=""
.else
PLIST_SUB+= GAME="@comment "
.endif
.if ${PORT_OPTIONS:MGL}
USE_GL= gl
LIB_DEPENDS+= jpeg:${PORTSDIR}/graphics/jpeg \
png15:${PORTSDIR}/graphics/png
ALL_TARGET+= ref_newgl
PLIST_SUB+= GL=""
.else
PLIST_SUB+= GL="@comment "
.endif
.if ${PORT_OPTIONS:MSOFT}
ALL_TARGET+= ref_soft
PLIST_SUB+= SOFT=""
.else
PLIST_SUB+= SOFT="@comment "
.endif
.if ${PORT_OPTIONS:MUI}
ALL_TARGET+= ui
PLIST_SUB+= UI=""
.else
PLIST_SUB+= UI="@comment "
.endif
.if ${PORT_OPTIONS:MASM}
MAKE_ENV+= USE_X86_ASM=yes
.endif
post-patch:
# Resolve name collision with jpeg-8
${REINPLACE_CMD} -e 's|jpeg_mem_src|local_jpeg_mem_src|' \
${WRKSRC}/ref_shared/r_images.c
do-install:
@${MKDIR} ${LIBDIR}/baseq2
.if ${PORT_OPTIONS:MCLIENT}
${INSTALL_PROGRAM} ${WRKSRC}/build/release/q2pro ${PREFIX}/bin
.endif
.if ${PORT_OPTIONS:MDEDICATED}
${INSTALL_PROGRAM} ${WRKSRC}/build/release/q2proded ${PREFIX}/bin
.endif
.if ${PORT_OPTIONS:MGAME}
${INSTALL_PROGRAM} ${WRKSRC}/build/release/game.so ${LIBDIR}/baseq2
.endif
.if ${PORT_OPTIONS:MGL}
${INSTALL_PROGRAM} ${WRKSRC}/build/release/ref_newgl.so ${LIBDIR}
.endif
.if ${PORT_OPTIONS:MSOFT}
${INSTALL_PROGRAM} ${WRKSRC}/build/release/ref_soft.so ${LIBDIR}
.endif
.if ${PORT_OPTIONS:MUI}
${INSTALL_PROGRAM} ${WRKSRC}/build/release/ui.so ${LIBDIR}
.endif
generate-distfile:
@if [ -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \
${ECHO_CMD} "ERROR: the distfile already exists."; \
${FALSE}; \
fi
svn export -r${SVN_REV} \
https://svn.sourceforge.net/svnroot/q2pro/q2pro q2pro
${TAR} jcf ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} q2pro
${RM} -rf q2pro
.include "${.CURDIR}/../quake2-data/Makefile.include"
.include <bsd.port.mk>
|