diff options
author | nia <nia@pkgsrc.org> | 2019-10-01 12:30:31 +0000 |
---|---|---|
committer | nia <nia@pkgsrc.org> | 2019-10-01 12:30:31 +0000 |
commit | b426641af6a9d0b4061e44e969b577bdce7c19cc (patch) | |
tree | 15511ebd89976dbe9e2cfac24c31bbb12eebe980 /games | |
parent | c16fa5654fed95fa51a4abdf3ee63cedfafe3dca (diff) | |
download | pkgsrc-b426641af6a9d0b4061e44e969b577bdce7c19cc.tar.gz |
Add games/srb2.
Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog fangame built
using a modified version of the Doom Legacy port of Doom. SRB2 is closely
inspired by the original Sonic games from the Sega Genesis, and attempts to
recreate the design in 3D. While SRB2 isn't fully completed, it already
features tons of levels, enemies, speed, and quite a lot of the fun that
the original Sonic games provided.
Diffstat (limited to 'games')
-rw-r--r-- | games/srb2/DESCR | 6 | ||||
-rw-r--r-- | games/srb2/Makefile | 74 | ||||
-rw-r--r-- | games/srb2/PLIST | 10 | ||||
-rw-r--r-- | games/srb2/distinfo | 15 | ||||
-rw-r--r-- | games/srb2/files/srb2.desktop | 9 | ||||
-rw-r--r-- | games/srb2/patches/patch-src_sdl_i__system.c | 31 |
6 files changed, 145 insertions, 0 deletions
diff --git a/games/srb2/DESCR b/games/srb2/DESCR new file mode 100644 index 00000000000..a8f028d2b4d --- /dev/null +++ b/games/srb2/DESCR @@ -0,0 +1,6 @@ +Sonic Robo Blast 2 is a 3D open-source Sonic the Hedgehog fangame built +using a modified version of the Doom Legacy port of Doom. SRB2 is closely +inspired by the original Sonic games from the Sega Genesis, and attempts to +recreate the design in 3D. While SRB2 isn't fully completed, it already +features tons of levels, enemies, speed, and quite a lot of the fun that +the original Sonic games provided. diff --git a/games/srb2/Makefile b/games/srb2/Makefile new file mode 100644 index 00000000000..7f7ad3d48f3 --- /dev/null +++ b/games/srb2/Makefile @@ -0,0 +1,74 @@ +# $NetBSD: Makefile,v 1.1 2019/10/01 12:30:31 nia Exp $ + +PKGNAME= srb2-2.1.25 +CATEGORIES= games + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= https://www.srb2.org/ +COMMENT= Sonic the Hedgehog fan game built using the Doom Legacy engine +LICENSE= gnu-gpl-v2 + +DIST_SUBDIR= ${PKGNAME_NOREV} +DISTFILES+= srb2.tar.gz +DISTFILES+= srb2-assets.7z +DISTFILES+= srb2-assets-opt.7z + +SITES.srb2.tar.gz= \ + -https://github.com/STJr/SRB2/archive/SRB2_release_${PKGVERSION_NOREV}.tar.gz + +SITES.srb2-assets.7z= \ + -https://github.com/mazmazz/SRB2/releases/download/SRB2_assets/SRB2-v2122-assets.7z + +SITES.srb2-assets-opt.7z= \ + -https://github.com/mazmazz/SRB2/releases/download/SRB2_assets/SRB2-v2122-optional-assets.7z + +WRKSRC= ${WRKDIR}/SRB2-SRB2_release_${PKGVERSION_NOREV} +USE_CMAKE= yes +USE_TOOLS+= pkg-config +CONFIGURE_DIRS= build +CMAKE_ARG_PATH= .. + +CMAKE_ARGS+= -DGME_INCLUDE_DIR=${BUILDLINK_DIR}/include +CMAKE_ARGS+= -DSDL2_INCLUDE_DIR=${BUILDLINK_DIR}/include + +.include "../../mk/bsd.prefs.mk" + +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" +TOOL_DEPENDS+= nasm>=1.1:../../devel/nasm +.endif + +SUBST_CLASSES+= prefix +SUBST_STAGE.prefix= pre-configure +SUBST_MESSAGE.prefix= Setting PREFIX search paths. +SUBST_FILES.prefix+= src/sdl/i_system.c +SUBST_VARS.prefix+= PREFIX + +INSTALLATION_DIRS+= bin +INSTALLATION_DIRS+= share/applications +INSTALLATION_DIRS+= share/pixmaps +INSTALLATION_DIRS+= share/srb2 + +CHECK_PORTABILITY_SKIP+= libs/miniupnpc/testminiwget.sh + +pre-configure: + ${MKDIR} ${WRKSRC}/assets/installer + ${MV} ${WRKDIR}/*.dta ${WRKDIR}/*.srb ${WRKSRC}/assets/installer + ${MKDIR} ${WRKSRC}/build + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/build/bin/srb2 \ + ${DESTDIR}${PREFIX}/bin/srb2 + ${INSTALL_DATA} ${WRKSRC}/assets/installer/* \ + ${DESTDIR}${PREFIX}/share/srb2 + ${INSTALL_DATA} ${FILESDIR}/srb2.desktop \ + ${DESTDIR}${PREFIX}/share/applications/srb2.desktop + ${INSTALL_DATA} ${WRKSRC}/srb2.png \ + ${DESTDIR}${PREFIX}/share/pixmaps/srb2.png + +.include "../../audio/game-music-emu/buildlink3.mk" +.include "../../audio/SDL2_mixer/buildlink3.mk" +.include "../../devel/SDL2/buildlink3.mk" +.include "../../devel/zlib/buildlink3.mk" +.include "../../graphics/png/buildlink3.mk" +.include "../../sysutils/desktop-file-utils/desktopdb.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/games/srb2/PLIST b/games/srb2/PLIST new file mode 100644 index 00000000000..4e4e6f6ec41 --- /dev/null +++ b/games/srb2/PLIST @@ -0,0 +1,10 @@ +@comment $NetBSD: PLIST,v 1.1 2019/10/01 12:30:31 nia Exp $ +bin/srb2 +share/applications/srb2.desktop +share/pixmaps/srb2.png +share/srb2/music.dta +share/srb2/patch.dta +share/srb2/player.dta +share/srb2/rings.dta +share/srb2/srb2.srb +share/srb2/zones.dta diff --git a/games/srb2/distinfo b/games/srb2/distinfo new file mode 100644 index 00000000000..02e49b20cb0 --- /dev/null +++ b/games/srb2/distinfo @@ -0,0 +1,15 @@ +$NetBSD: distinfo,v 1.1 2019/10/01 12:30:31 nia Exp $ + +SHA1 (srb2-2.1.25/srb2-assets-opt.7z) = f09f5efee621fe1bc1a7068896b510b694ab8a9b +RMD160 (srb2-2.1.25/srb2-assets-opt.7z) = 1cbe9232e14160c3e12b385aea4532b4f76469cc +SHA512 (srb2-2.1.25/srb2-assets-opt.7z) = 3731da769a0c252978491bb870dbc9543cb128436a1378deaf8998ae4df49d1e4f2ecb15460f0c84589b41642e78d5f40b9397aa81c404ad92409b986632924f +Size (srb2-2.1.25/srb2-assets-opt.7z) = 62331891 bytes +SHA1 (srb2-2.1.25/srb2-assets.7z) = 2bf6accbcb5c3da98ed3cb9941206cb6c443de11 +RMD160 (srb2-2.1.25/srb2-assets.7z) = 222b720ef90c48cbf1986e5369ca7937bb7e9723 +SHA512 (srb2-2.1.25/srb2-assets.7z) = 35d4a9c37471a0bae02ee02b5fa219c58267dd302abf9db192bdb7caa04480827dabcff563ded1cc5d2a835d5d5b2f565471d433bd223701885e96d4267b5e74 +Size (srb2-2.1.25/srb2-assets.7z) = 30548941 bytes +SHA1 (srb2-2.1.25/srb2.tar.gz) = 95b2b6dee5e12a461186aa77bef59fa06f045cbc +RMD160 (srb2-2.1.25/srb2.tar.gz) = 9ad85067c1fe60afa6fa94ac21dfd96cf3b65419 +SHA512 (srb2-2.1.25/srb2.tar.gz) = 4f31bd3423aac00950b3ef148f9c27e6065b67630743d8ffcba452f4f75e5c62cc01955d621317ce765b9347545a96e3b087680d9b75577e94d86440c49636d8 +Size (srb2-2.1.25/srb2.tar.gz) = 50635514 bytes +SHA1 (patch-src_sdl_i__system.c) = 6b57a1b61acff2db54869b610f1bca5d5b2d7126 diff --git a/games/srb2/files/srb2.desktop b/games/srb2/files/srb2.desktop new file mode 100644 index 00000000000..b3b684f1b99 --- /dev/null +++ b/games/srb2/files/srb2.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Application +Name=Sonic Robo Blast 2 +Comment=Sonic the Hedgehog fan game using the Doom Legacy engine +Icon=srb2 +Exec=srb2 +Categories=Game;ActionGame; +Terminal=false +StartupNotify=false diff --git a/games/srb2/patches/patch-src_sdl_i__system.c b/games/srb2/patches/patch-src_sdl_i__system.c new file mode 100644 index 00000000000..e9745a3c9a2 --- /dev/null +++ b/games/srb2/patches/patch-src_sdl_i__system.c @@ -0,0 +1,31 @@ +$NetBSD: patch-src_sdl_i__system.c,v 1.1 2019/10/01 12:30:32 nia Exp $ + +Hunk 1: Support searching PREFIX for data files. + +Hunk 2: Support NetBSD's spelling of statfs. + +--- src/sdl/i_system.c.orig 2019-08-17 18:07:04.000000000 +0000 ++++ src/sdl/i_system.c +@@ -133,7 +133,7 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) + + // Locations for searching the srb2.srb + #if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) +-#define DEFAULTWADLOCATION1 "/usr/local/share/games/SRB2" ++#define DEFAULTWADLOCATION1 "@PREFIX@/share/srb2" + #define DEFAULTWADLOCATION2 "/usr/local/games/SRB2" + #define DEFAULTWADLOCATION3 "/usr/share/games/SRB2" + #define DEFAULTWADLOCATION4 "/usr/games/SRB2" +@@ -2375,8 +2375,13 @@ void I_GetDiskFreeSpace(INT64 *freespace + *freespace = INT32_MAX; + return; + #else // Both Linux and BSD have this, apparently. ++#ifndef __NetBSD__ + struct statfs stfs; + if (statfs(".", &stfs) == -1) ++#else ++ struct statvfs stfs; ++ if (statvfs(".", &stfs) == -1) ++#endif + { + *freespace = INT32_MAX; + return; |