On Wed, Mar 07, 2012 at 11:56:44AM -0800, Ryan Freeman wrote: > I have had this sitting around for about a year, this > patch cleans up this port by removing the need for the patches, > instead opting to use some perl. > > it also fixes the port correctly ignoring python. > > I am unsure if the revision bump is required, as the resulting > packing list is exactly the same. >
I have updated the diff based on feedback received. here we are using MAKE_FLAGS instead of perl subst for the two rather generic matches for the Makefile.in files, the subst for d_iwad.c is still perfectly safe. Another diff to update the doom-data port to install to the correct data location will be along shortly -ryan Index: Makefile =================================================================== RCS file: /cvs/ports/games/chocolate-doom/Makefile,v retrieving revision 1.10 diff -u -p -u -r1.10 Makefile --- Makefile 24 May 2011 00:11:48 -0000 1.10 +++ Makefile 9 Mar 2012 08:55:10 -0000 @@ -2,6 +2,7 @@ COMMENT = portable version of iD Software's Doom DISTNAME = chocolate-doom-1.6.0 +REVISION = 0 CATEGORIES = games x11 HOMEPAGE = http://www.chocolate-doom.org/ @@ -28,14 +29,24 @@ USE_GROFF = Yes USE_GMAKE = Yes CONFIGURE_STYLE = gnu -CONFIGURE_ARGS += --without-python -MAN_5= chocolate-doom.cfg default.cfg -MAN_6= chocolate-doom chocolate-server chocolate-setup +# we don't need to require python to build +CONFIGURE_ENV += HAVE_PYTHON=false + +# set correct program directory +MAKE_FLAGS = gamesdir="${TRUEPREFIX}/bin" + +MAN_5 = chocolate-doom.cfg default.cfg +MAN_6 = chocolate-doom chocolate-server chocolate-setup + +post-extract: + # set correct data directory + @perl -pi -e "s,/usr/share/games/doom,${TRUEPREFIX}/share/doom," \ + ${WRKSRC}/src/d_iwad.c post-install: # Data files get installed to this directory. - ${INSTALL_DATA_DIR} ${PREFIX}/share/games/doom/ + ${INSTALL_DATA_DIR} ${PREFIX}/share/doom/ .for m in ${MAN_5} ${INSTALL_MAN} ${WRKBUILD}/man/$m.5 ${PREFIX}/man/man5/ .endfor Index: patches/patch-setup_Makefile_in =================================================================== RCS file: patches/patch-setup_Makefile_in diff -N patches/patch-setup_Makefile_in --- patches/patch-setup_Makefile_in 13 Jan 2011 10:30:49 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -$OpenBSD: patch-setup_Makefile_in,v 1.3 2011/01/13 10:30:49 jasper Exp $ ---- setup/Makefile.in.orig Sun Jan 2 10:17:16 2011 -+++ setup/Makefile.in Tue Jan 11 12:40:52 2011 -@@ -181,7 +181,7 @@ target_alias = @target_alias@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --gamesdir = $(prefix)/games -+gamesdir = $(prefix)/bin - AM_CFLAGS = -I../textscreen -I../src @SDLMIXER_CFLAGS@ - SOURCE_FILES = \ - compatibility.c compatibility.h \ Index: patches/patch-src_Makefile_in =================================================================== RCS file: patches/patch-src_Makefile_in diff -N patches/patch-src_Makefile_in --- patches/patch-src_Makefile_in 13 Jan 2011 10:30:49 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -$OpenBSD: patch-src_Makefile_in,v 1.3 2011/01/13 10:30:49 jasper Exp $ ---- src/Makefile.in.orig Sun Jan 2 10:17:17 2011 -+++ src/Makefile.in Tue Jan 11 12:41:03 2011 -@@ -252,7 +252,7 @@ target_alias = @target_alias@ - top_build_prefix = @top_build_prefix@ - top_builddir = @top_builddir@ - top_srcdir = @top_srcdir@ --gamesdir = $(prefix)/games -+gamesdir = $(prefix)/bin - AM_CFLAGS = -I../opl -I../textscreen -I../pcsound @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@ - DEDSERV_FILES = \ - d_dedicated.c \ Index: pkg/MESSAGE =================================================================== RCS file: /cvs/ports/games/chocolate-doom/pkg/MESSAGE,v retrieving revision 1.3 diff -u -p -u -r1.3 MESSAGE --- pkg/MESSAGE 24 May 2011 00:11:48 -0000 1.3 +++ pkg/MESSAGE 9 Mar 2012 08:55:10 -0000 @@ -1,6 +1,7 @@ To play the game you will need an original Doom, Ultimate Doom, Doom II or Final Doom IWAD. Place the doom.wad, doom2.wad, plutonia.wad, -tnt.wad, or all of the above in ${PREFIX}/share/games/doom/ to play. +tnt.wad, or all of the above in ${PREFIX}/share/doom/ to play. + If multiple IWADs are installed, you may specify the one you want to play via the -iwad command-line parameter e.g. @@ -9,7 +10,3 @@ play via the -iwad command-line paramete The Shareware IWAD is available in the doomdata package. Run `chocolate-setup' to generate a configuration file to your liking. -If you would like to enjoy the classic in-game Doom music, you may -install audio/timidity and Chocolate Doom will automatically make use -of it at runtime, no recompilation required. Be sure that the music is -enabled within chocolate-setup. Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/games/chocolate-doom/pkg/PLIST,v retrieving revision 1.2 diff -u -p -u -r1.2 PLIST --- pkg/PLIST 24 May 2011 00:11:48 -0000 1.2 +++ pkg/PLIST 9 Mar 2012 08:55:10 -0000 @@ -18,8 +18,7 @@ share/doc/chocolate-doom/NEWS share/doc/chocolate-doom/NOT-BUGS share/doc/chocolate-doom/README share/doc/chocolate-doom/README.OPL -share/games/ -share/games/doom/ +share/doom/ share/icons/ share/icons/chocolate-doom.png share/icons/chocolate-setup.png