blob: f087a3fffadf48ddc4702ac74f86b17c2c352d9e (
plain)
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
|
# New ports collection makefile for: quake2
# Date created: 20.01.2003
# Whom: Ulrich Spoerlein <q@uni.de>
#
# $FreeBSD$
#
PORTNAME= quake2forge
PORTVERSION= 0.3
CATEGORIES= games
MASTER_SITES= ftp://ftp.quakeforge.net/quake2forge/ \
http://www.galgenberg.net/~q/
DISTNAME= quake2-${PORTVERSION}
MAINTAINER= q@galgenberg.net
COMMENT= First Person Shooter with many addons available
USE_BZIP2= yes
USE_GMAKE= yes
USE_LIBTOOL_VER=15
USE_AUTOCONF_VER=259
USE_REINPLACE= yes
WANT_SDL= yes
.include <bsd.port.pre.mk>
CONFIGURE_ARGS= --program-transform-name='s/^quake2$$/q2f/'
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
.if ${HAVE_SDL:Msdl}!=""
WITH_SDL= yes
.endif
.if exists(${LOCALBASE}/lib/libvga.so.1)
WITH_SVGALIB= yes
.endif
.if exists(${LOCALBASE}/lib/libao.so.3)
WITH_LIBAO= yes
.endif
.if !defined (WITHOUT_LIBAO) && defined(WITH_LIBAO)
LIB_DEPENDS+= ao.3:${PORTSDIR}/audio/libao
CONFIGURE_ARGS+=--with-ao=${LOCALBASE}
PLIST_SUB+= AO=""
.else
CONFIGURE_ARGS+=--without-ao
PLIST_SUB+= AO="@comment "
.endif
.if !defined (WITHOUT_SVGALIB) && defined(WITH_SVGALIB)
LIB_DEPENDS+= vga.1:${PORTSDIR}/graphics/svgalib
CONFIGURE_ARGS+=--with-svgalib=${LOCALBASE}
PLIST_SUB+= SVGA=""
.else
CONFIGURE_ARGS+=--with-svgalib=no
PLIST_SUB+= SVGA="@comment "
.endif
.if !defined(WITHOUT_X11)
USE_XLIB= yes
CONFIGURE_ARGS+=--with-x
PLIST_SUB+= X11=""
.else
WITHOUT_GL= yes
CONFIGURE_ARGS+=--without-x
PLIST_SUB+= X11="@comment "
.endif
.if !defined(WITHOUT_GL)
CONFIGURE_ARGS+=--with-opengl=${X11BASE}
PLIST_SUB+= GL=""
.else
CONFIGURE_ARGS+=--with-opengl=no
PLIST_SUB+= GL="@comment "
.endif
.if !defined(WITHOUT_SDL) && defined(WITH_SDL)
USE_SDL= yes
CONFIGURE_ARGS+=--with-sdl=${LOCALBASE}
.if !defined(WITHOUT_GL)
PLIST_SUB+= SDLGL=""
.else
PLIST_SUB+= SDLGL="@comment "
.endif
PLIST_SUB+= SDL=""
.else
CONFIGURE_ARGS+=--disable-sdl --disable-sdltest
PLIST_SUB+= SDL="@comment "
PLIST_SUB+= SDLGL="@comment "
.endif
pre-everything::
.if !defined(WITH_LIBAO)
@${ECHO_MSG} "Define WITH_LIBAO to use libao"
.endif
.if !defined(WITH_SVGALIB)
@${ECHO_MSG} "Define WITH_SVGALIB to use svgalib"
.endif
.if !defined(WITH_SDL)
@${ECHO_MSG} "Define WITH_SDL to use SDL"
.endif
.if !defined(WITHOUT_X11)
@${ECHO_MSG} "Define WITHOUT_X11 to disable X11 and OpenGL support"
.endif
.if !defined(WITHOUT_GL)
@${ECHO_MSG} "Define WITHOUT_GL to disable OpenGL support"
.endif
.if ( ${OSVERSION} < 500000 )
post-patch:
@${REINPLACE_CMD} -e 's/%zu/%u/g' ${WRKSRC}/src/main.c
.endif
do-install:
@(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
.if !defined(NOPORTDOCS)
${MKDIR} ${PREFIX}/share/doc/quake2/ctf
${INSTALL_MAN} ${WRKSRC}/docs/README.* ${WRKSRC}/docs/*.txt ${PREFIX}/share/doc/quake2
${INSTALL_MAN} ${WRKSRC}/docs/ctf/*.html ${WRKSRC}/docs/ctf/*.gif \
${WRKSRC}/docs/ctf/*.jpg ${PREFIX}/share/doc/quake2/ctf
.endif
post-install:
@${SED} -e 's#$${PREFIX}#${PREFIX}#g' ${PKGMESSAGE}
.include <bsd.port.post.mk>
|