aboutsummaryrefslogtreecommitdiff
path: root/games/quakeforge/Makefile
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2005-11-15 20:55:29 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2005-11-15 20:55:29 +0000
commit4519a751d0dc7832c5150c37a764d825a4c7dc1e (patch)
tree8c4c2d0e1d7634005baaa25bfa8886bd6abe4d22 /games/quakeforge/Makefile
parentc102162b3ad647d08a0df0d3bb3581fe444bc071 (diff)
downloadports-4519a751d0dc7832c5150c37a764d825a4c7dc1e.tar.gz
ports-4519a751d0dc7832c5150c37a764d825a4c7dc1e.zip
Notes
Diffstat (limited to 'games/quakeforge/Makefile')
-rw-r--r--games/quakeforge/Makefile209
1 files changed, 69 insertions, 140 deletions
diff --git a/games/quakeforge/Makefile b/games/quakeforge/Makefile
index 5f0efaeb4056..493b47db1215 100644
--- a/games/quakeforge/Makefile
+++ b/games/quakeforge/Makefile
@@ -5,201 +5,130 @@
# $FreeBSD$
#
-PORTNAME= QuakeForge
+PORTNAME= quakeforge
PORTVERSION= 0.5.5
CATEGORIES= games
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S/$/:qf/} \
- ftp://ftp.idsoftware.com/idstuff/quakeworld/unix/:qw
-MASTER_SITE_SUBDIR= quake/:qf
-DISTNAME= quakeforge-${PORTVERSION}
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:qf ${PROGFILE}:qw
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:S/$/:sf/}
+MASTER_SITE_SUBDIR= quake/:sf
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:sf
+DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
-.if !defined(NO_WAD)
-MASTER_SITES+= http://www.libsdl.org/projects/quake/data/:wad
-DISTFILES+= ${WADFILE}:wad
-.endif
-.if !defined(NO_SKINS)
-MASTER_SITES+= ftp://ftp.idsoftware.com/idstuff/quakeworld/skins/:skins
-DISTFILES+= ${SKINFILES:S/$/:skins/}
-.endif
MAINTAINER= q@galgenberg.net
COMMENT= Cleaned up copy of the GPLd Quake 1 source code
-WADFILE= quakesw-1.0.6.tar.gz
-PROGFILE= qwsv-2.30-glibc-i386-unknown-linux2.0.tar.gz
-SKINFILES= skinbase.zip qw_skins.zip
-
USE_AUTOTOOLS= libtool:15
+USE_BZIP2= yes
USE_GMAKE= yes
-USE_XLIB= yes
USE_REINPLACE= yes
-INSTALLS_SHLIB= yes
+USE_BISON= yes
WANT_SDL= yes
-MAN1= pak.1 qfcc.1 qflight.1 qfvis.1 wad.1
-
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "sparc64"
-BROKEN= "Does not compile on sparc64"
-.endif
-
CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS+=--with-global-cfg=${PREFIX}/etc/quakeforge.conf \
- --with-sharepath=${PREFIX}/share/quakeforge \
+ --with-sharepath=${DATADIR} \
--disable-optimize
-BUILD_DEPENDS+= bison:${PORTSDIR}/devel/bison
+OPTIONS= CLIENTS "Build clients" on \
+ OPTIMIZED_CFLAGS "Enable compilation optimizations" on \
+ SDL "Build SDL client" off \
+ SERVERS "Build dedicated servers" on \
+ SKYBOXES "Install skyboxes pak" off \
+ STATIC_PLUGINS "Build plugins into executable" off \
+ VORBIS "Enable Ogg Vorbis support in clients" off \
+ XMMS "Enable XMMS support in clients" off
-.if defined(WITH_OPTIMIZED_CFLAGS) && !defined(WITHOUT_OPTIMIZED_CFLAGS)
-CFLAGS+= -O3 -funroll-loops -fomit-frame-pointer -fno-common \
- -fexpensive-optimizations -fstrict-aliasing
-.if ${ARCH} != "alpha"
-CFLAGS+= -ffast-math
-.endif
-.endif
+MAN1= pak.1 qfcc.1 qflight.1 qfvis.1 wad.1
-.if ${HAVE_SDL:Msdl}!=""
-WITH_SDL= yes
-.endif
+INSTALLS_SHLIB= yes
+LDCONFIG_DIRS= %%PREFIX%%/lib/quakeforge
-.if exists(${LOCALBASE}/lib/libvga.so.1)
-WITH_SVGALIB= yes
-.endif
+.include "${.CURDIR}/../quake-data/Makefile.include"
-.if exists(${X11BASE}/lib/libxmms.so.4)
-WITH_XMMS= yes
-.endif
+.include <bsd.port.pre.mk>
-.if exists(${LOCALBASE}/lib/libvorbis.so.3)
-WITH_VORBIS= yes
+.if ${ARCH} == "sparc64"
+BROKEN= "Does not compile on sparc64"
.endif
-.if defined(WITHOUT_CLIENTS)
-CONFIGURE_ARGS+=--without-clients
-PLIST_SUB+= CLIENT="@comment "
-WITHOUT_XMMS= yes
-WITHOUT_SVGALIB= yes
-WITHOUT_SDL= yes
-WITHOUT_VORBIS= yes
-.else
-PLIST_SUB+= CLIENT=""
-.endif
+.if defined(WITH_CLIENTS)
+USE_XLIB= yes
+PLIST_SUB+= CLIENTS=""
-.if !defined(WITHOUT_SVGALIB) && defined(WITH_SVGALIB)
-LIB_DEPENDS+= vga.1:${PORTSDIR}/graphics/svgalib
-CONFIGURE_ARGS+=--with-svga=${LOCALBASE}
-PLIST_SUB+= SVGA=""
+.if defined(WITH_SDL) || ${HAVE_SDL:Msdl}!=""
+USE_SDL= sdl
+CONFIGURE_ARGS+=--with-sdl=${LOCALBASE}
+PLIST_SUB+= SDL=""
.else
-CONFIGURE_ARGS+=--without-svga
-PLIST_SUB+= SVGA="@comment "
+CONFIGURE_ARGS+=--without-sdl
+PLIST_SUB+= SDL="@comment "
.endif
-.if !defined(WITHOUT_VORBIS) && defined(WITH_VORBIS)
+.if defined(WITH_VORBIS) || exists(${LOCALBASE}/lib/libvorbis.so.3)
LIB_DEPENDS+= vorbis.3:${PORTSDIR}/audio/libvorbis
CONFIGURE_ARGS+=--with-ogg=${LOCALBASE} --with-vorbis=${LOCALBASE}
PLIST_SUB+= VORBIS=""
.else
-CONFIGURE_ARGS+=--disable-vorbis --without-ogg --without-ogg-libraries \
- --without-ogg-includes --disable-oggtest
+CONFIGURE_ARGS+=--without-ogg --without-vorbis
PLIST_SUB+= VORBIS="@comment "
.endif
-.if !defined(WITHOUT_XMMS) && defined(WITH_XMMS)
+.if defined(WITH_XMMS) || exists(${X11BASE}/lib/libxmms.so.4)
LIB_DEPENDS+= xmms.4:${PORTSDIR}/multimedia/xmms
CONFIGURE_ARGS+=--with-xmms-prefix=${X11BASE}
PLIST_SUB+= XMMS=""
.else
-CONFIGURE_ARGS+=--disable-xmms
+CONFIGURE_ARGS+=--without-xmms
PLIST_SUB+= XMMS="@comment "
.endif
-.if !defined(WITHOUT_SDL) && defined(WITH_SDL)
-USE_SDL= sdl
-CONFIGURE_ARGS+=--with-sdl=${LOCALBASE}
-PLIST_SUB+= SDL=""
.else
-CONFIGURE_ARGS+=--disable-sdl --disable-sdltest
-PLIST_SUB+= SDL="@comment "
-.endif
+CONFIGURE_ARGS+=--without-clients
+PLIST_SUB+= CLIENTS="@comment "
+.endif # WITH_CLIENTS
-.if defined(WITH_STATIC_PLUGINS)
-PLIST_SUB+= PLUGIN="@comment "
-CONFIGURE_ARGS+=--with-static-plugins
-.else
-PLIST_SUB+= PLUGIN=""
+.if defined(WITH_OPTIMIZED_CFLAGS)
+CFLAGS+= -O3 -funroll-loops -fomit-frame-pointer -fno-common \
+ -fexpensive-optimizations -fstrict-aliasing
+. if ${ARCH} != "alpha"
+CFLAGS+= -ffast-math
+. endif
.endif
-.if !defined(NO_WAD)
-PLIST_SUB+= WAD=""
+.if defined(WITH_SERVERS)
+PLIST_SUB+= SERVERS=""
.else
-PLIST_SUB+= WAD="@comment "
+CONFIGURE_ARGS+=--without-servers
+PLIST_SUB+= SERVERS="@comment "
.endif
-.if !defined(NO_SKINS)
-PLIST_SUB+= SKIN=""
-BUILD_DEPENDS+= unzip:${PORTSDIR}/archivers/unzip
+.if defined(WITH_SKYBOXES)
+MASTER_SITES+= http://www.quakeforge.net/files/:qf
+DISTFILES+= skyboxes.pak:qf
+PLIST_SUB+= SKYBOXES=""
.else
-PLIST_SUB+= SKIN="@comment "
+PLIST_SUB+= SKYBOXES="@comment "
.endif
-pre-everything::
-.if !defined(NO_WAD)
- @${ECHO_MSG} "Define NO_WAD to stop from using shareware version!"
-.endif
-.if !defined(NO_SKINS)
- @${ECHO_MSG} "Define NO_SKINS to stop from installing skins"
-.endif
-.if !defined(WITH_OPTIMIZED_CFLAGS)
- @${ECHO_MSG} "Define WITH_OPTIMIZED_CFLAGS to optimize for speed"
-.endif
-.if !defined(WITH_SVGALIB)
- @${ECHO_MSG} "Define WITH_SVGALIB to use svgalib"
-.endif
-.if !defined(WITH_VORBIS)
- @${ECHO_MSG} "Define WITH_VORBIS to use Ogg Vorbis"
-.endif
-.if !defined(WITH_XMMS)
- @${ECHO_MSG} "Define WITH_XMMS to use XMMS"
-.endif
-.if !defined(WITH_SDL)
- @${ECHO_MSG} "Define WITH_SDL to use SDL"
-.endif
-.if !defined(WITHOUT_CLIENTS)
- @${ECHO_MSG} "Define WITHOUT_CLIENTS to disable building of the clients"
-.endif
-.if !defined(WITH_STATIC_PLUGINS)
- @${ECHO_MSG} "Define WITH_STATIC_PLUGINS to disable building plugins as shared objects"
+.if defined(WITH_STATIC_PLUGINS)
+PLIST_SUB+= PLUGINS="@comment "
+CONFIGURE_ARGS+=--with-static-plugins
+.else
+PLIST_SUB+= PLUGINS=""
.endif
-post-patch:
- @${REINPLACE_CMD} -e 's/-lpthread/${PTHREAD_LIBS}/g' ${WRKSRC}/configure
-
-do-install:
- @(cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
-.if !defined(NO_WAD)
- ${MKDIR} ${PREFIX}/share/quakeforge/id1 && \
- ${TAR} xzf ${DISTDIR}/${WADFILE} -C ${PREFIX}/share/quakeforge --no-same-owner id1/pak0.pak
-.endif
- ${TAR} xzf ${DISTDIR}/${PROGFILE} -C ${PREFIX}/share/quakeforge qw/
-.if !defined(NO_SKINS)
-.for file in ${SKINFILES}
- ${UNZIP_CMD} -n ${DISTDIR}/${file} -d ${PREFIX}/share/quakeforge/qw/skins
-.endfor
- @cd ${PREFIX}/share/quakeforge/qw/skins && LANG=C ./fixskins.sh *
+post-install:
+.if defined(WITH_SKYBOXES)
+ ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/skyboxes.pak ${DATADIR}/QF
.endif
.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}/config ${DOCSDIR}/data/docs ${DOCSDIR}/ideas
- cd ${WRKSRC}/doc && \
- ${INSTALL_MAN} *.txt *.q1 *.q2 *.ico *.gif *.fig *.h CodingStyle ${DOCSDIR} && \
- ${INSTALL_MAN} config/*.cfg ${DOCSDIR}/config && \
- ${INSTALL_MAN} data/*.txt ${DOCSDIR}/data && \
- ${INSTALL_MAN} data/docs/* ${DOCSDIR}/data/docs && \
- ${INSTALL_MAN} ideas/*.txt ${DOCSDIR}/ideas
+ ${MKDIR} ${DOCSDIR}
+. for f in *.txt *.q1 *.q2 *.ico *.gif *.fig *.h CodingStyle
+ ${INSTALL_DATA} ${WRKSRC}/doc/${f} ${DOCSDIR}
+. endfor
+. for d in config data ideas
+ ${CP} -R ${WRKSRC}/doc/${d} ${DOCSDIR}
+. endfor
.endif
-post-install:
- @${SED} -e 's#$${PREFIX}#${PREFIX}#g' ${PKGMESSAGE}
-
.include <bsd.port.post.mk>