blob: 0c53fa09a043be4d1115cf499dd4603e8d373b68 (
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
|
# New ports collection makefile for: FuhQuake
# Date created: 01 Jun 2003
# Whom: Alexey Dokuchaev <danfe@regency.nsu.ru>
#
# $FreeBSD$
#
PORTNAME= fuhquake
PORTVERSION= 0.31
PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= http://www.fuhquake.net/files/releases/v${PORTVERSION}/:q \
http://www.fuhquake.net/files/extras/:s \
ftp://gibbage.mine.nu/clients/fuhquake/releases/v${PORTVERSION}/:q \
http://gamefiles.blueyonder.co.uk/blueyondergames/quake/quakeworld/clients/fuhquake/source/:q \
http://gamefiles.blueyonder.co.uk/blueyondergames/quake/quakeworld/clients/fuhquake/addons/:s \
http://danfe.machos.ru/distfiles/qw/:p \
http://freebsd.nsu.ru/distfiles/qw/:p
DISTNAME= ${PORTNAME}-source-v${PORTVERSION}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:q \
${PORTNAME}-linux-v${PORTVERSION}${EXTRACT_SUFX}:q
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} \
${PORTNAME}-linux-v${PORTVERSION}${EXTRACT_SUFX}
MAINTAINER= danfe@FreeBSD.org
COMMENT= An excellent QuakeWorld client
.if defined(WITH_SHAREWARE_DATA)
DISTFILES+= q1-shareware-pak0.pak:p
PLIST_SUB+= SHAREWARE=""
.else
PLIST_SUB+= SHAREWARE="@comment "
.endif
.if defined(WITH_SKYBOXES)
DISTFILES+= ${PORTNAME}-skyboxes${EXTRACT_SUFX}:s
EXTRACT_ONLY+= ${PORTNAME}-skyboxes${EXTRACT_SUFX}
PLIST_SUB+= SKYBOXES=""
.else
PLIST_SUB+= SKYBOXES="@comment "
.endif
.if exists(${LOCALBASE}/lib/libvga.so.1)
WITH_SVGA= yes
.endif
.if exists(${X11BASE}/lib/libxmms.so.4)
WITH_XMMS= yes
.endif
USE_ZIP= yes
.include <bsd.port.pre.mk>
.if ${ARCH} == "i386" && !defined(WITHOUT_SVGA) && defined(WITH_SVGA)
LIB_DEPENDS+= vga.1:${PORTSDIR}/graphics/svgalib
END_TARGETS+= ${PORTNAME}-svga
PLIST_SUB+= SVGA=""
.else
PLIST_SUB+= SVGA="@comment "
.endif
.if !defined(WITHOUT_X11)
USE_XLIB= yes
END_TARGETS+= ${PORTNAME}-x11
PLIST_SUB+= X11=""
.else
PLIST_SUB+= X11="@comment "
.endif
.if !defined(WITHOUT_GLX)
USE_GL= yes
LIB_DEPENDS+= png.5:${PORTSDIR}/graphics/png \
jpeg.9:${PORTSDIR}/graphics/jpeg
END_TARGETS+= ${PORTNAME}-glx
PLIST_SUB+= GLX=""
.else
PLIST_SUB+= GLX="@comment "
.endif
.if !defined(WITHOUT_XMMS) && defined(WITH_XMMS) && !(defined(WITHOUT_X11) && defined(WITHOUT_GLX))
LIB_DEPENDS+= xmms.4:${PORTSDIR}/multimedia/xmms
MAKE_ARGS+= -DWITH_XMMS PTHREAD_CFLAGS=${PTHREAD_CFLAGS} PTHREAD_LIBS=${PTHREAD_LIBS}
.endif
PKGMESSAGE= ${WRKDIR}/pkg-message
pre-everything::
.if ${ARCH} == "i386" && !defined(WITH_SVGA)
@${ECHO_MSG} "Define WITH_SVGA to build SVGA client"
.elif !defined(WITHOUT_SVGA)
@${ECHO_MSG} "Define WITHOUT_SVGA to disable building of SVGA client"
.endif
.if !defined(WITH_XMMS)
@${ECHO_MSG} "Define WITH_XMMS to enable \`\`MP3 Player'' feature"
.elif !defined(WITHOUT_XMMS)
@${ECHO_MSG} "Define WITHOUT_XMMS to build without \`\`MP3 Player'' feature"
.endif
.if !defined(WITHOUT_X11)
@${ECHO_MSG} "Define WITHOUT_X11 to disable building of X11 client"
.endif
.if !defined(WITHOUT_GLX)
@${ECHO_MSG} "Define WITHOUT_GLX to disable building of GLX client"
.endif
.if !defined(WITH_SHAREWARE_DATA)
@${ECHO_MSG} "Define WITH_SHAREWARE_DATA to install demo version game data"
.endif
.if !defined(WITH_SKYBOXES)
@${ECHO_MSG} "Define WITH_SKYBOXES to install additional skyboxes pak"
.endif
.if !defined(WITH_OPTIMIZED_CFLAGS)
@${ECHO_MSG} "Define WITH_OPTIMIZED_CFLAGS to enable extra optimization options"
.endif
.if ${ARCH} == "i386" && !defined(WITHOUT_X86_ASM)
@${ECHO_MSG} "Define WITHOUT_X86_ASM to disable x86 assembly code"
.endif
MAKEFILE= ${FILESDIR}/Makefile
USE_REINPLACE= yes
WRKSRC= ${WRKDIR}/source
post-patch:
@${REINPLACE_CMD} -e 's|%%BASEDIR%%|${DATADIR}|' ${WRKSRC}/common.c
@${REINPLACE_CMD} -e 's|%%X11BASE%%|${X11BASE}|' ${WRKSRC}/mp3_player.c
@${CP} ${FILESDIR}/*.c ${WRKSRC}
do-build:
.if !defined(WITHOUT_X11)
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} clean x11)
.endif
.if !defined(WITHOUT_GLX)
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} clean glx)
.endif
.if ${ARCH} == "i386" && defined(WITH_SVGA)
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} clean svga)
.endif
do-install:
.for tgt in ${END_TARGETS}
${INSTALL_PROGRAM} ${WRKSRC}/${tgt} ${PREFIX}/bin
.endfor
@${MKDIR} ${DATADIR}/qw ${DATADIR}/${PORTNAME}
${INSTALL_DATA} ${WRKDIR}/qw/fragfile.dat ${DATADIR}/qw
${INSTALL_DATA} ${WRKDIR}/qw/qwprogs.dat ${DATADIR}/qw
${INSTALL_DATA} ${WRKDIR}/qw/spprogs.dat ${DATADIR}/qw
${INSTALL_DATA} ${WRKDIR}/${PORTNAME}/pak0.pak ${DATADIR}/${PORTNAME}
.if defined(WITH_SHAREWARE_DATA)
@${MKDIR} ${DATADIR}/id1
${INSTALL_DATA} ${_DISTDIR}/q1-shareware-pak0.pak \
${DATADIR}/id1/pak0.pak
.endif
.if defined(WITH_SKYBOXES)
${INSTALL_DATA} ${WRKDIR}/pakX.pak ${DATADIR}/qw/pak0.pak
.endif
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
. for txt in FAQ-v0.30-b585 FuhQuake-v0.31-FAQ benchmark config_manager crosshairs \
linux logitech match_tools mp3 particles pointing rulesets track
${INSTALL_DATA} ${WRKDIR}/${PORTNAME}/doc/${txt}.txt ${DOCSDIR}
. endfor
${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.txt ${DOCSDIR}
.endif
post-install:
@${SED} -e 's|$${DATADIR}|${DATADIR}|g' ${.CURDIR}/pkg-message >${PKGMESSAGE}
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
|