openbsd-ports/games/quake/Makefile

84 lines
2.1 KiB
Makefile

# $OpenBSD: Makefile,v 1.34 2011/06/10 19:49:11 naddy Exp $
COMMENT-main= Quake/Quake-world client
COMMENT-server= Quake world server
CATEGORIES= games
FULLPKGNAME-server= quakeworld-server-20000101
FULLPKGPATH-server= games/quake,-server
EPOCH-server= 0
PKGNAME-main= quake-20000101
REVISION-main= 10
DISTNAME= quake-v6-bsd-kame
PATCHFILES= quake6-00-v6-20000202b.diff.gz:0
PATCH_DIST_STRIP= -p1
HOMEPAGE= http://www.viagenie.qc.ca/en/ipv6-quake.shtml
MASTER_SITES= ${MASTER_SITE_BACKUP}
MASTER_SITES0= ftp://ftp.kame.net/pub/kame/misc/
# GPLv2
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
WANTLIB= c m
USE_GMAKE= Yes
MULTI_PACKAGES= -main -server
FLAVORS= sdl ggi x11 gl
FLAVOR?= sdl
CONFIGURE_ENV=LDFLAGS='-L${LOCALBASE}/lib -L${X11BASE}/lib'
CONFIGURE_ENV+=CPPFLAGS='-I${LOCALBASE}/include -I${X11BASE}/include'
CONFIGURE_STYLE= autoconf
CONFIGURE_ARGS = --bindir=/bin \
--with-opengl=no --with-opengl-includes=no
WANTLIB-main= ${WANTLIB} sndio
.if ${FLAVOR:L} == sdl
WANTLIB+= pthread
LIB_DEPENDS-main= devel/sdl
WANTLIB-main += SDL
CONFIGURE_ARGS+= --with-sdl=${LOCALBASE} --without-ggi
MAKE_FLAGS= HAS_X11=no
CFLAGS+= -pthread
.elif ${FLAVOR:L} == ggi
WANTLIB+= pthread
LIB_DEPENDS-main= graphics/ggi
WANTLIB-main += ggi
CONFIGURE_ARGS+= --with-ggi=${LOCALBASE} --without-sdl
MAKE_FLAGS= HAS_X11=no
CFLAGS+= -pthread
.elif ${FLAVOR:L} == x11
CONFIGURE_ARGS+= --without-sdl --without-ggi
MAKE_FLAGS=
WANTLIB-main= X11 Xext c m sndio
.elif ${FLAVOR:L} == gl
CONFIGURE_ARGS+= --with-opengl=yes \
--with-opengl-includes=${X11BASE}/include \
--without-ggi
WANTLIB-main+= GL X11 Xext pthread
.else
ERRORS+= choose either sdl, ggi, gl or x11
.endif
WRKDIST= ${WRKDIR}/quakeforge
post-extract:
@rm ${WRKDIST}/{config.cache,config.log}
@find ${WRKDIST} -name \*.o |xargs rm
@cp ${FILESDIR}/snd_sndio.c ${WRKDIST}/common
post-patch:
cd ${WRKDIST}; PATH=${PORTPATH} AUTOCONF_VERSION="${AUTOCONF_VERSION}" autoreconf
post-install:
@chown -R ${BINOWN}:${BINGRP} ${PREFIX}/bin/*
.include <bsd.port.mk>