pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

crispy-doom: Import version 5.8.0



Module Name:	pkgsrc-wip
Committed By:	Michael Baeuerle <micha%NetBSD.org@localhost>
Pushed By:	micha
Date:		Thu Apr 30 13:59:17 2020 +0200
Changeset:	4071879e96df5a05d07a72ccb0a944bccc79fa1a

Added Files:
	crispy-doom/DESCR
	crispy-doom/Makefile
	crispy-doom/PLIST
	crispy-doom/distinfo
	crispy-doom/files/INSTALL.pkgsrc
	crispy-doom/patches/patch-Source_d__iwad.c
	crispy-doom/patches/patch-src_doom_p__extnodes.c

Log Message:
crispy-doom: Import version 5.8.0

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4071879e96df5a05d07a72ccb0a944bccc79fa1a

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 crispy-doom/DESCR                                |   2 +
 crispy-doom/Makefile                             |  48 ++++++++
 crispy-doom/PLIST                                |  22 ++++
 crispy-doom/distinfo                             |   8 ++
 crispy-doom/files/INSTALL.pkgsrc                 |   6 +
 crispy-doom/patches/patch-Source_d__iwad.c       |  16 +++
 crispy-doom/patches/patch-src_doom_p__extnodes.c | 143 +++++++++++++++++++++++
 7 files changed, 245 insertions(+)

diffs:
diff --git a/crispy-doom/DESCR b/crispy-doom/DESCR
new file mode 100644
index 0000000000..35f9af3ab0
--- /dev/null
+++ b/crispy-doom/DESCR
@@ -0,0 +1,2 @@
+Crispy Doom is a limit-removing enhanced-resolution Doom source port
+based on Chocolate Doom.
diff --git a/crispy-doom/Makefile b/crispy-doom/Makefile
new file mode 100644
index 0000000000..9261fb1ac6
--- /dev/null
+++ b/crispy-doom/Makefile
@@ -0,0 +1,48 @@
+# $NetBSD$
+
+DISTNAME=	crispy-doom-5.8.0
+CATEGORIES=	games
+MASTER_SITES=	${MASTER_SITE_GITHUB:=fabiangreffrath/}
+GITHUB_TAG=	${DISTNAME}
+EXTRACT_USING=	bsdtar
+
+MAINTAINER=	micha%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/fabiangreffrath/crispy-doom/
+COMMENT=	Limit-removing enhanced-resolution Doom source port
+LICENSE=	gnu-gpl-v2
+
+USE_LANGUAGES=	c99
+USE_TOOLS+=	autoconf automake pkg-config
+
+GNU_CONFIGURE=	yes
+WRKSRC=		${WRKDIR}/crispy-doom-${DISTNAME}
+
+# DOOMWADDIR is intentionally shared with other Doom packages
+DOOMWADDIR=	share/doom
+
+# Add DOOMWADDIR to search path
+SUBST_CLASSES+=		waddir
+SUBST_STAGE.waddir=	pre-configure
+SUBST_MESSAGE.waddir=	Preparing d_iwad.c file ...
+SUBST_FILES.waddir=	src/d_iwad.c
+SUBST_SED.waddir=	-e 's,PKGSRC_PREFIX,"${PREFIX}",'
+SUBST_SED.waddir+=	-e 's,PKGSRC_DOOMWADDIR,"/${DOOMWADDIR}",'
+
+pre-configure:
+	cd ${WRKSRC} && ./autogen.sh
+	${CP} ${FILESDIR}/INSTALL.pkgsrc ${WRKDIR}
+
+post-install:
+	${INSTALL_DATA} ${WRKDIR}/INSTALL.pkgsrc \
+		${DESTDIR}${PREFIX}/share/doc/crispy-doom/INSTALL.pkgsrc
+
+.include "../../audio/SDL2_mixer/buildlink3.mk"
+.include "../../audio/libsamplerate/buildlink3.mk"
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../graphics/png/buildlink3.mk"
+.include "../../net/SDL2_net/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/crispy-doom/PLIST b/crispy-doom/PLIST
new file mode 100644
index 0000000000..59c3a4b623
--- /dev/null
+++ b/crispy-doom/PLIST
@@ -0,0 +1,22 @@
+@comment $NetBSD$
+bin/crispy-doom
+bin/crispy-doom-setup
+bin/crispy-heretic
+bin/crispy-heretic-setup
+bin/crispy-server
+share/applications/io.github.fabiangreffrath.Doom.desktop
+share/applications/io.github.fabiangreffrath.Heretic.desktop
+share/applications/io.github.fabiangreffrath.Setup.desktop
+share/applications/screensavers/io.github.fabiangreffrath.Doom_Screensaver.desktop
+share/doc/crispy-doom/COPYING.md
+share/doc/crispy-doom/ChangeLog
+share/doc/crispy-doom/INSTALL.pkgsrc
+share/doc/crispy-doom/NEWS.md
+share/doc/crispy-doom/NOT-BUGS.md
+share/doc/crispy-doom/PHILOSOPHY.md
+share/doc/crispy-doom/README.Music.md
+share/doc/crispy-doom/README.md
+share/icons/hicolor/128x128/apps/crispy-doom.png
+share/icons/hicolor/128x128/apps/crispy-setup.png
+share/metainfo/io.github.fabiangreffrath.Doom.metainfo.xml
+share/metainfo/io.github.fabiangreffrath.Heretic.metainfo.xml
diff --git a/crispy-doom/distinfo b/crispy-doom/distinfo
new file mode 100644
index 0000000000..8ac7764d60
--- /dev/null
+++ b/crispy-doom/distinfo
@@ -0,0 +1,8 @@
+$NetBSD$
+
+SHA1 (crispy-doom-5.8.0.tar.gz) = 3b4b4873783d4414ddc4a2d3de08e83b42ecde98
+RMD160 (crispy-doom-5.8.0.tar.gz) = 4f4dc7d28d67279dfe501125bdb2fc1eccbb24ae
+SHA512 (crispy-doom-5.8.0.tar.gz) = c6a4833c27b81e9808565b352214001a0d621f8bf6dbb7f4235d2bedaa35db68a1cf2567f77e7139da29df1d56a1097419e16791d1b49e5882674e33ce8c4649
+Size (crispy-doom-5.8.0.tar.gz) = 2627570 bytes
+SHA1 (patch-Source_d__iwad.c) = 96a2ea9bba5a62431f99e3b35b7bd8bba36b34ff
+SHA1 (patch-src_doom_p__extnodes.c) = 59be17f740c90749ed6fdce750e87ca3fc5e44ab
diff --git a/crispy-doom/files/INSTALL.pkgsrc b/crispy-doom/files/INSTALL.pkgsrc
new file mode 100644
index 0000000000..d077a196a0
--- /dev/null
+++ b/crispy-doom/files/INSTALL.pkgsrc
@@ -0,0 +1,6 @@
+The location of the crispy-doom WAD directory has been set to:
+
+   DOOMWADDIR
+
+This is the pkgsrc standard Doom WAD directory location (shared with other
+Doom packages).
diff --git a/crispy-doom/patches/patch-Source_d__iwad.c b/crispy-doom/patches/patch-Source_d__iwad.c
new file mode 100644
index 0000000000..6709513972
--- /dev/null
+++ b/crispy-doom/patches/patch-Source_d__iwad.c
@@ -0,0 +1,16 @@
+$NetBSD$
+
+Add pkgsrc ${PREFIX}/share/doom to WAD file search path.
+
+--- src/d_iwad.c.orig	2020-04-14 06:39:44.000000000 +0000
++++ src/d_iwad.c
+@@ -653,6 +653,9 @@ static void AddXdgDirs(void)
+         env = "/usr/local/share:/usr/share";
+     }
+ 
++    // Add pkgsrc location for WADs
++    AddIWADPath(PKGSRC_PREFIX, PKGSRC_DOOMWADDIR);
++
+     // The "standard" location for IWADs on Unix that is supported by most
+     // source ports is /usr/share/games/doom - we support this through the
+     // XDG_DATA_DIRS mechanism, through which it can be overridden.
diff --git a/crispy-doom/patches/patch-src_doom_p__extnodes.c b/crispy-doom/patches/patch-src_doom_p__extnodes.c
new file mode 100644
index 0000000000..657d724b95
--- /dev/null
+++ b/crispy-doom/patches/patch-src_doom_p__extnodes.c
@@ -0,0 +1,143 @@
+$NetBSD$
+
+Fix endianess for import of extended nodes.
+
+--- src/doom/p_extnodes.c.orig	2020-04-16 07:24:32.000000000 +0000
++++ src/doom/p_extnodes.c
+@@ -102,9 +102,14 @@ void P_LoadSegs_DeePBSP (int lump)
+ 	mapseg_deepbsp_t *ml = data + i;
+ 	int side, linedef;
+ 	line_t *ldef;
++	int vn1, vn2;
+ 
+-	li->v1 = &vertexes[ml->v1];
+-	li->v2 = &vertexes[ml->v2];
++	// [MB] 2020-04-30: Fix endianess for DeePBSDP V4 nodes
++	vn1 = LONG(ml->v1);
++	vn2 = LONG(ml->v2);
++
++	li->v1 = &vertexes[vn1];
++	li->v2 = &vertexes[vn2];
+ 
+ 	li->angle = (SHORT(ml->angle))<<FRACBITS;
+ 
+@@ -167,8 +172,9 @@ void P_LoadSubsectors_DeePBSP (int lump)
+ 
+     for (i = 0; i < numsubsectors; i++)
+     {
+-	subsectors[i].numlines = (int)data[i].numsegs;
+-	subsectors[i].firstline = (int)data[i].firstseg;
++	// [MB] 2020-04-30: Fix endianess for DeePBSDP V4 nodes
++	subsectors[i].numlines = (unsigned short)SHORT(data[i].numsegs);
++	subsectors[i].firstline = LONG(data[i].firstseg);
+     }
+ 
+     W_ReleaseLumpNum(lump);
+@@ -210,7 +216,8 @@ void P_LoadNodes_DeePBSP (int lump)
+ 	for (j = 0; j < 2; j++)
+ 	{
+ 	    int k;
+-	    no->children[j] = (unsigned int)(mn->children[j]);
++	    // [MB] 2020-04-30: Fix endianess for DeePBSDP V4 nodes
++	    no->children[j] = LONG(mn->children[j]);
+ 
+ 	    for (k = 0; k < 4; k++)
+ 		no->bbox[j][k] = SHORT(mn->bbox[j][k])<<FRACBITS;
+@@ -228,6 +235,7 @@ void P_LoadNodes_DeePBSP (int lump)
+ // - inlined P_LoadZSegs()
+ // - added support for compressed ZDBSP nodes
+ // - added support for flipped levels
++// [MB] 2020-04-30: Fix endianess for ZDoom extended nodes
+ void P_LoadNodes_ZDBSP (int lump, boolean compressed)
+ {
+     byte *data;
+@@ -305,10 +313,10 @@ void P_LoadNodes_ZDBSP (int lump, boolea
+ 
+     // 1. Load new vertices added during node building
+ 
+-    orgVerts = *((unsigned int*)data);
++    orgVerts = LONG(*((unsigned int*)data));
+     data += sizeof(orgVerts);
+ 
+-    newVerts = *((unsigned int*)data);
++    newVerts = LONG(*((unsigned int*)data));
+     data += sizeof(newVerts);
+ 
+     if (orgVerts + newVerts == (unsigned int)numvertexes)
+@@ -325,11 +333,11 @@ void P_LoadNodes_ZDBSP (int lump, boolea
+     for (i = 0; i < newVerts; i++)
+     {
+ 	newvertarray[i + orgVerts].r_x =
+-	newvertarray[i + orgVerts].x = *((unsigned int*)data);
++	newvertarray[i + orgVerts].x = LONG(*((unsigned int*)data));
+ 	data += sizeof(newvertarray[0].x);
+ 
+ 	newvertarray[i + orgVerts].r_y =
+-	newvertarray[i + orgVerts].y = *((unsigned int*)data);
++	newvertarray[i + orgVerts].y = LONG(*((unsigned int*)data));
+ 	data += sizeof(newvertarray[0].y);
+     }
+ 
+@@ -348,7 +356,7 @@ void P_LoadNodes_ZDBSP (int lump, boolea
+ 
+     // 2. Load subsectors
+ 
+-    numSubs = *((unsigned int*)data);
++    numSubs = LONG(*((unsigned int*)data));
+     data += sizeof(numSubs);
+ 
+     if (numSubs < 1)
+@@ -362,15 +370,15 @@ void P_LoadNodes_ZDBSP (int lump, boolea
+ 	mapsubsector_zdbsp_t *mseg = (mapsubsector_zdbsp_t*) data + i;
+ 
+ 	subsectors[i].firstline = currSeg;
+-	subsectors[i].numlines = mseg->numsegs;
+-	currSeg += mseg->numsegs;
++	subsectors[i].numlines = LONG(mseg->numsegs);
++	currSeg += LONG(mseg->numsegs);
+     }
+ 
+     data += numsubsectors * sizeof(mapsubsector_zdbsp_t);
+ 
+     // 3. Load segs
+ 
+-    numSegs = *((unsigned int*)data);
++    numSegs = LONG(*((unsigned int*)data));
+     data += sizeof(numSegs);
+ 
+     // The number of stored segs should match the number of segs used by subsectors
+@@ -389,9 +397,12 @@ void P_LoadNodes_ZDBSP (int lump, boolea
+ 	unsigned char side;
+ 	seg_t *li = segs + i;
+ 	mapseg_zdbsp_t *ml = (mapseg_zdbsp_t *) data + i;
++	unsigned int v1, v2;
+ 
+-	li->v1 = &vertexes[ml->v1];
+-	li->v2 = &vertexes[ml->v2];
++	v1 = LONG(ml->v1);
++	v2 = LONG(ml->v2);
++	li->v1 = &vertexes[v1];
++	li->v2 = &vertexes[v2];
+ 
+ 	linedef = (unsigned short)SHORT(ml->linedef);
+ 	ldef = &lines[linedef];
+@@ -437,7 +448,7 @@ void P_LoadNodes_ZDBSP (int lump, boolea
+ 
+     // 4. Load nodes
+ 
+-    numNodes = *((unsigned int*)data);
++    numNodes = LONG(*((unsigned int*)data));
+     data += sizeof(numNodes);
+ 
+     numnodes = numNodes;
+@@ -456,8 +467,8 @@ void P_LoadNodes_ZDBSP (int lump, boolea
+ 
+ 	for (j = 0; j < 2; j++)
+ 	{
+-	    no->children[j] = (unsigned int)(mn->children[j]);
+-
++	    no->children[j] = LONG(mn->children[j]);
++	
+ 	    for (k = 0; k < 4; k++)
+ 		no->bbox[j][k] = SHORT(mn->bbox[j][k])<<FRACBITS;
+ 	}


Home | Main Index | Thread Index | Old Index