Bug 86440 - [UPDATE] games/deng: integrate with "doom-data", fix segmentation fault
Summary: [UPDATE] games/deng: integrate with "doom-data", fix segmentation fault
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: Simon Barner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-22 01:10 UTC by Alejandro Pulver
Modified: 2005-11-17 12:09 UTC (History)
0 users

See Also:


Attachments
deng.diff (4.67 KB, patch)
2005-09-22 01:10 UTC, Alejandro Pulver
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alejandro Pulver 2005-09-22 01:10:07 UTC

Changes:
* Integrate with "doom-data".
* Add OPTIONS.
* Use SUB_FILES for generating pkg-message.
* Merge BROKEN and NOT_FOR_ARCHS into ONLY_FOR_ARCHS=i386.
* Add patch to fix the segmentation fault when exitting the program (it crashes when calling "lt_dlclose" from the "ltdl" library that comes with it, the call was removed).
Comment 1 Simon Barner freebsd_committer 2005-09-22 14:22:50 UTC
Dear maintainer,

Alejandro Pulver <alejandro@varnet.biz> submitted a various PRs in an
effort to the clean up DooM based ports on in the FreeBSD ports
collection.

He suggests adding a new port for the datafiles (ports/86439), and
modifying all doom ports to make use of it.

Please have a look at the changes, and say, if you approve them:

http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/86440

Simon
Comment 2 Simon Barner freebsd_committer 2005-09-22 14:30:20 UTC
State Changed
From-To: open->feedback

Awaiting maintainer's reply.
Comment 3 Igor Pokrovsky 2005-09-22 19:53:26 UTC
On Thu, Sep 22, 2005 at 03:22:50PM +0200, Simon Barner wrote:
> Dear maintainer,
> 
> Alejandro Pulver <alejandro@varnet.biz> submitted a various PRs in an
> effort to the clean up DooM based ports on in the FreeBSD ports
> collection.
> 
> He suggests adding a new port for the datafiles (ports/86439), and
> modifying all doom ports to make use of it.
> 
> Please have a look at the changes, and say, if you approve them:

Hi Simon,

It's really a very good idea to have only one dir with doom data for all
doom ports. But at the moment I can only agree with the part of his patch -
a part which fixes segmentation fault of deng on exit. I don't feel the rest
of submitted changes are really required at the moment.
I think I'll make some changes myself once/if port doom-data will be committed.

Regards,

-ip

-- 
Whenever you cut your fingernails you will find a
need for them an hour later.
Comment 4 Simon Barner freebsd_committer 2005-09-22 22:13:48 UTC
Responsible Changed
From-To: freebsd-ports-bugs->barner

Grab.
Comment 5 Igor Pokrovsky 2005-10-17 21:30:14 UTC
Hi Simon,

I modified proposed patch to my taste a bit. Here it goes.

diff -ruN /usr/ports/games/deng/Makefile deng/Makefile
--- /usr/ports/games/deng/Makefile	Tue Apr 12 07:25:31 2005
+++ deng/Makefile	Tue Oct 18 00:23:16 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	deng
 PORTVERSION=	1.8.6
+PORTREVISION=	1
 CATEGORIES=	games
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -18,7 +19,6 @@
 RUN_DEPENDS=	${LOCALBASE}/bin/timidity:${PORTSDIR}/audio/timidity
 
 USE_REINPLACE=	yes
-REINPLACE_ARGS=	-i ""
 USE_LIBTOOL_VER=	15
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
 CONFIGURE_ENV=	CFLAGS="${CFLAGS} `${SDL_CONFIG} --cflags` -I${LOCALBASE}/include -I${X11BASE}/include" \
@@ -26,9 +26,12 @@
 USE_SDL=	sdl mixer net
 USE_GL=		yes
 INSTALLS_SHLIB=	yes
-NOT_FOR_ARCHS=	amd64
+ONLY_FOR_ARCHS=	i386
 
-PKGMESSAGE=	${WRKDIR}/pkg-message
+SUB_FILES=	pkg-message
+SUB_LIST=	"PREFIX=${PREFIX}" "DOCSDIR=${DOCSDIR}"
+
+.include "${.CURDIR}/../doom-data/Makefile.include"
 
 .if exists(${LOCALBASE}/lib/libopenal.so.0) || defined(WITH_OPENAL)
 WITH_OPENAL=	yes
@@ -41,12 +44,6 @@
 PLIST_SUB=	WITH_OPENAL=""
 .endif
 
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "ia64" || ${ARCH} == "sparc64" || ${ARCH} == "alpha"
-BROKEN=		"Does not build on ia64, sparc64 or alpha"
-.endif
-
 .ifndef (WITH_OPENAL)
 pre-everything::
 	@${ECHO_CMD} ""
@@ -55,21 +52,20 @@
 .endif
 
 post-patch:
-	@${REINPLACE_CMD} -E -e 's/-Wunused-.+ / /g; \
+	@${REINPLACE_CMD} -E -i '' -e 's/-Wunused-.+ / /g; \
 				 s/SDL(\\|\/)//g' ${WRKSRC}/configure
 	@${FIND} ${WRKSRC} -name '*.[ch]' | \
-		${XARGS} ${REINPLACE_CMD} -E -e 's/SDL(\\|\/)//g'
+		${XARGS} ${REINPLACE_CMD} -i '' -E -e 's/SDL(\\|\/)//g'
 
 post-install:
 .ifndef (NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/Doc/*.txt ${DOCSDIR}
-.for i in jDoom jHeretic jHexen
-	@${MKDIR} ${DOCSDIR}/${i}
-	${INSTALL_DATA} ${WRKSRC}/Doc/${i}/*.txt ${DOCSDIR}/${i}
-.endfor
+.	for i in jDoom jHeretic jHexen
+		@${MKDIR} ${DOCSDIR}/${i}
+		${INSTALL_DATA} ${WRKSRC}/Doc/${i}/*.txt ${DOCSDIR}/${i}
+.	endfor
 .endif
-	@(${SED} -e 's|%%PREFIX%%|${PREFIX}|; s|%%DOCSDIR%%|${DOCSDIR}|' \
-		<pkg-message >${PKGMESSAGE} && ${CAT} ${PKGMESSAGE})
+	@${CAT} ${PKGMESSAGE}
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff -ruN /usr/ports/games/deng/files/patch-Src_dd__pinit.c deng/files/patch-Src_dd__pinit.c
--- /usr/ports/games/deng/files/patch-Src_dd__pinit.c	Thu Jan  1 03:00:00 1970
+++ deng/files/patch-Src_dd__pinit.c	Tue Oct 18 00:00:23 2005
@@ -0,0 +1,11 @@
+--- Src/dd_pinit.c.orig
++++ Src/dd_pinit.c
+@@ -227,7 +227,7 @@
+ 	FH_Clear();
+ 	ArgShutdown();
+ 	free(mainzone);
+-	DD_ShutdownDGL();
++//	DD_ShutdownDGL();
+ 
+ 	// Close the message output file.
+ 	fclose(outFile);
diff -ruN /usr/ports/games/deng/files/pkg-message.in deng/files/pkg-message.in
--- /usr/ports/games/deng/files/pkg-message.in	Thu Jan  1 03:00:00 1970
+++ deng/files/pkg-message.in	Mon Oct 17 23:55:16 2005
@@ -0,0 +1,21 @@
+******************************************************************************
+Now you can start playing Doomsday!
+
+All three games Doom, Heretic and Hexen could be launched with one executable.
+
+A quick start command could be:
+
+	%%PREFIX%%/bin/doomsday -g ${game} -f ${path_to_game_wad}
+
+where
+
+	game - could be jdoom, jheretic or jhexen;
+	path_to_game_wad - path to game main wad file.
+
+Check documentation in %%DOCSDIR%% for other options.
+
+NOTE: when you run Doomsday it will create about 7 files/dirs in the current
+directory (including temporary files, configuration, etc.) so it's preferable
+to run it in a separate directory.
+
+******************************************************************************
diff -ruN /usr/ports/games/deng/pkg-message deng/pkg-message
--- /usr/ports/games/deng/pkg-message	Fri Aug 27 19:18:35 2004
+++ deng/pkg-message	Thu Jan  1 03:00:00 1970
@@ -1,10 +0,0 @@
-******************************************************************************
-Now you can start playing Doomsday!
-All three games Doom, Heretic and Hexen could be launched with one executable.
-A quick start command could be:
-	%%PREFIX%%/bin/doomsday -g ${game} -f ${path_to_game_wad}
-where
-	game - could be jdoom, jheretic or jhexen;
-	path_to_game_wad - path to game main wad file.
-Check documentation in %%DOCSDIR%% for other options.
-******************************************************************************

Regards,

-ip

-- 
The boss who attempts to impress employees with his
knowledge of intricate details has lost sight of his
final objective.
Comment 6 Simon Barner freebsd_committer 2005-11-15 20:17:21 UTC
State Changed
From-To: feedback->patched

PR analysed, ready commit. Waiting for feedback on ports/86445, so we 
can do the whole DooM conversion in one sweep.
Comment 7 Simon Barner freebsd_committer 2005-11-17 12:09:06 UTC
State Changed
From-To: patched->closed

Committed. Thanks!