Bug 85325 - [NEW PORT] games/darkplaces - Quake engine modification
Summary: [NEW PORT] games/darkplaces - Quake engine modification
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-26 20:40 UTC by Alejandro Pulver
Modified: 2005-10-04 19:43 UTC (History)
0 users

See Also:


Attachments
darkplaces.shar (5.30 KB, text/plain)
2005-08-26 20:40 UTC, Alejandro Pulver
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alejandro Pulver 2005-08-26 20:40:19 UTC

    
Comment 1 Alejandro Pulver 2005-08-27 17:50:21 UTC
>Submitter-Id:	current-users 
>Originator:	Alejandro Pulver 
>Organization:	 
>Confidential:	no 
>Synopsis:	Re: ports/85325: [NEW PORT] games/darkplaces - Quake engine modification 
>Severity:	non-critical 
>Priority:	low 
>Category:	ports 
>Class:		change-request 
>Release:	FreeBSD 5.4-RELEASE i386 
>Environment:





>Description:


This patch fixes some issues in the previous shar.

Changes:
* Use pkg-plist instead of PLIST variables.
* Make symbolic link "darkplaces" in "${PREFIX}/bin".
* Create data directory (${DATADIR}) and when removing the port notify the user to remove the data directory.


>How-To-Repeat:





>Fix:


--- darkplaces.diff begins here ---
diff -urN pkgd/sent/darkplaces/Makefile darkplaces/Makefile
--- pkgd/sent/darkplaces/Makefile	Sat Aug 27 13:45:10 2005
+++ darkplaces/Makefile	Sat Aug 27 13:44:10 2005
@@ -28,15 +28,16 @@
 		SERVER "Build dedicated server" on \
 		SDL_CLIENT "Build SDL client" on
 
-PLIST_FILES=	%%CLIENT%%bin/${PORTNAME}-glx \
-		%%SDL_CLIENT%%bin/${PORTNAME}-sdl \
-		%%SERVER%%bin/${PORTNAME}-dedicated
-
 SUB_FILES=	pkg-message
 PKGMESSAGE=	${WRKDIR}/pkg-message
 
 .include <bsd.port.pre.mk>
 
+.if !defined(WITH_CLIENT) && !defined(WITH_SDL_CLIENT) && \
+    !defined(WITH_DEDICATED)
+IGNORE=		You must choose at least one option of CLIENT, SDL_CLIENT and DEDICATED
+.endif
+
 .if defined(WITH_CLIENT) || defined(WITH_SDL_CLIENT)
 # Loads libraries on run-time, thus RUN_DEPENDS
 RUN_DEPENDS=	${LOCALBASE}/lib/libvorbis.so:${PORTSDIR}/audio/libvorbis \
@@ -86,9 +87,12 @@
 .endif
 
 do-install:
+	@${MKDIR} ${DATADIR}
 .for f in ${PORTNAME}-glx ${PORTNAME}-sdl ${PORTNAME}-dedicated
 	@${TEST} -f ${WRKSRC}/${f} && \
 		${INSTALL_PROGRAM} ${WRKSRC}/${f} ${PREFIX}/bin
+	@${TEST} -L ${PREFIX}/bin/${PORTNAME} || \
+		${LN} -s ${PREFIX}/bin/${f} ${PREFIX}/bin/${PORTNAME}
 .endfor
 
 post-install:
diff -urN pkgd/sent/darkplaces/pkg-plist darkplaces/pkg-plist
--- pkgd/sent/darkplaces/pkg-plist	Wed Dec 31 21:00:00 1969
+++ darkplaces/pkg-plist	Sat Aug 27 13:25:57 2005
@@ -0,0 +1,5 @@
+bin/darkplaces
+%%CLIENT%%bin/darkplaces-glx
+%%SDL_CLIENT%%bin/darkplaces-sdl
+%%SERVER%%bin/darkplaces-dedicated
+@unexec rmdir %D/%%DATADIR%% >/dev/null 2>&1 || echo "If you are permanently removing this port, you should remove the data files and mods left in %D/%%DATADIR%%." | fmt
--- darkplaces.diff ends here ---
Comment 2 Alejandro Pulver 2005-09-15 17:31:48 UTC
>Submitter-Id:	current-users 
>Originator:	Alejandro Pulver 
>Organization:	 
>Confidential:	no 
>Synopsis:	Re: ports/85325: [NEW PORT] games/darkplaces - Quake engine modification 
>Severity:	non-critical 
>Priority:	low 
>Category:	ports 
>Class:		change-request 
>Release:	FreeBSD 5.4-RELEASE i386 
>Environment:





>Description:


This new shar replaces the old one.


>How-To-Repeat:





>Fix:


--- darkplaces.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	darkplaces
#	darkplaces/files
#	darkplaces/files/patch-netconn.h
#	darkplaces/Makefile
#	darkplaces/pkg-descr
#	darkplaces/distinfo
#
echo c - darkplaces
mkdir -p darkplaces > /dev/null 2>&1
echo c - darkplaces/files
mkdir -p darkplaces/files > /dev/null 2>&1
echo x - darkplaces/files/patch-netconn.h
sed 's/^X//' >darkplaces/files/patch-netconn.h << 'END-of-darkplaces/files/patch-netconn.h'
X--- netconn.h.orig	Thu Aug 18 21:30:57 2005
X+++ netconn.h	Thu Aug 25 19:20:34 2005
X@@ -251,7 +251,7 @@
X 
X extern qboolean serverlist_consoleoutput;
X 
X-#if !defined(_WIN32) && !defined(__linux__) && !defined(SUNOS)
X+#if !defined(_WIN32) && !defined(__linux__) && !defined(SUNOS) && !defined(__FreeBSD__)
X #ifndef htonl
X extern unsigned long htonl (unsigned long hostlong);
X #endif
END-of-darkplaces/files/patch-netconn.h
echo x - darkplaces/Makefile
sed 's/^X//' >darkplaces/Makefile << 'END-of-darkplaces/Makefile'
X# New ports collection makefile for:	darkplaces
X# Date created:				25 Aug 2005
X# Whom:					Alejandro Pulver <alejandro@varnet.biz>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	darkplaces
XPORTVERSION=	20050818
XCATEGORIES=	games
XMASTER_SITES=	http://offload1.icculus.org/twilight/darkplaces/files/
XDISTNAME=	${PORTNAME}engine${PORTVERSION}
X
XMAINTAINER=	alejandro@varnet.biz
XCOMMENT=	Quake engine modification
X
XWRKSRC=		${WRKDIR}/${PORTNAME}
X
XUSE_GMAKE=	yes
XUSE_REINPLACE=	yes
XUSE_ZIP=	yes
X
XMAKEFILE=	makefile
XALL_TARGET=	
X
XOPTIONS=	DEDICATED "Build dedicated server" on \
X		GLX "Build GLX client" on \
X		OPTIMIZED_CFLAGS "Enable compilation optimizations" on \
X		SDL "Build SDL client" on
X
XPLIST_FILES=	bin/${PORTNAME} \
X		%%DEDICATED%%bin/${PORTNAME}-dedicated \
X		%%GLX%%bin/${PORTNAME}-glx \
X		%%SDL%%bin/${PORTNAME}-sdl
X
X.include "${.CURDIR}/../quake-data/Makefile.include"
X
X.include <bsd.port.pre.mk>
X
X.if !defined(WITH_DEDICATED) && !defined(WITH_GLX) && !defined(WITH_SDL)
XIGNORE=		You must choose at least one option of GLX, SDL and DEDICATED
X.endif
X
X.if defined(WITH_GLX) || defined(WITH_SDL)
X# Loads libraries on run-time, thus RUN_DEPENDS
XRUN_DEPENDS=	${LOCALBASE}/lib/libvorbis.so:${PORTSDIR}/audio/libvorbis \
X		${LOCALBASE}/lib/libjpeg.so:${PORTSDIR}/graphics/jpeg
X.endif
X
X.if defined(WITH_DEDICATED)
XALL_TARGET+=	sv-release
XPLIST_SUB+=	DEDICATED=""
X.else
XPLIST_SUB+=	DEDICATED="@comment "
X.endif
X
X.if defined(WITH_GLX)
XUSE_GL=		yes
XALL_TARGET+=	cl-release
XPLIST_SUB+=	GLX=""
X.else
XPLIST_SUB+=	GLX="@comment "
X.endif
X
X.if defined(WITH_SDL)
XUSE_SDL=	sdl
XALL_TARGET+=	sdl-release
XPLIST_SUB+=	SDL=""
X.else
XPLIST_SUB+=	SDL="@comment "
X.endif
X
Xpost-extract:
X	@${UNZIP_CMD} -a -q \
X		-o ${WRKDIR}/${PORTNAME}enginesource${PORTVERSION}.zip \
X		-d ${WRKDIR}
X
Xpost-patch:
X	@${REINPLACE_CMD} -e 's|sdl-config|${SDL_CONFIG}|g ; \
X			s|/usr/X11R6|${X11BASE}| ; \
X			s|gcc|${CC}| ; \
X			s|\(-MD\)|${CFLAGS} \1|' \
X				${WRKSRC}/${MAKEFILE} ${WRKSRC}/makefile.inc
X	@${REINPLACE_CMD} -e 's,"\.","${DATADIR}",' ${WRKSRC}/fs.c
X.if defined(WITHOUT_OPTIMIZED_CFLAGS)
X	@${REINPLACE_CMD} -e 's|$$(OPTIM_RELEASE)||' ${WRKSRC}/makefile.inc
X.endif
X.if ${ARCH} == "alpha"
X	@${REINPLACE_CMD} -e 's|-ffast-math||' ${WRKSRC}/makefile.inc
X.endif
X
Xdo-install:
X.for f in GLX SDL DEDICATED
X.   if defined(WITH_${f})
X	@${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}-${f:L} ${PREFIX}/bin
X	@${TEST} -L ${PREFIX}/bin/${PORTNAME} || \
X		${LN} -s ${PREFIX}/bin/${PORTNAME}-${f:L} \
X			${PREFIX}/bin/${PORTNAME}
X.   endif
X.endfor
X
X.include <bsd.port.post.mk>
END-of-darkplaces/Makefile
echo x - darkplaces/pkg-descr
sed 's/^X//' >darkplaces/pkg-descr << 'END-of-darkplaces/pkg-descr'
XDark Places is a Quake modification I have built over the course of 6 years on
Xand off experimenting, it got somewhat of an overhaul when the Quake engine
Xsource code was released, and I began developing a custom OpenGL-only engine
Xfor it and other mods, which supports Windows WGL and Linux GLX, and has
Xgreatly improved graphics and image quality.
X
XIt can not easily be described, as it is simply an improved Quake, not a total
Xconversion (yet, anyway).
X
XThe realism of shell casings falling to the floor, much improved bullet
Ximpacts, 32bit color alpha blended explosions, blood flying everywhere and
Xsticking to the walls...
X
XBehind the scenes the code has changed a great deal, I was not content with
Xthe original QuakeC code, and I have greatly changed the engine while
Xmaintaining compatibility with normal quake modifications.
X
XWWW: http://icculus.org/twilight/darkplaces/
END-of-darkplaces/pkg-descr
echo x - darkplaces/distinfo
sed 's/^X//' >darkplaces/distinfo << 'END-of-darkplaces/distinfo'
XMD5 (darkplacesengine20050818.zip) = 004713d24b3e4cc886cdda2c77494b03
XSIZE (darkplacesengine20050818.zip) = 6284553
END-of-darkplaces/distinfo
exit

--- darkplaces.shar ends here ---
Comment 3 Renato Botelho freebsd_committer freebsd_triage 2005-10-04 19:43:22 UTC
State Changed
From-To: open->closed

New port added. Thanks!