pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/games/vvvvvv games: Add vvvvvv



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b7c0682e071f
branches:  trunk
changeset: 407830:b7c0682e071f
user:      nia <nia%pkgsrc.org@localhost>
date:      Fri Jan 10 18:27:18 2020 +0000

description:
games: Add vvvvvv

VVVVVV is a platform game all about exploring one simple mechanical idea -
what if you reversed gravity instead of jumping?

The game is designed not to artificially gate your progress. In VVVVVV there
are no locks, no power-ups, no switches, nothing to stop you progressing
except the challenges themselves.

diffstat:

 games/vvvvvv/DESCR                                         |   6 +
 games/vvvvvv/MESSAGE                                       |   6 +
 games/vvvvvv/Makefile                                      |  27 ++++
 games/vvvvvv/PLIST                                         |   2 +
 games/vvvvvv/distinfo                                      |   9 +
 games/vvvvvv/patches/patch-physfs_physfs__platform__unix.c |  17 ++
 games/vvvvvv/patches/patch-src_FileSystemUtils.cpp         |  68 ++++++++++
 games/vvvvvv/patches/patch-src_SteamNetwork.c              |  87 ++++++++++++++
 8 files changed, 222 insertions(+), 0 deletions(-)

diffs (254 lines):

diff -r 47542adf1914 -r b7c0682e071f games/vvvvvv/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/vvvvvv/DESCR        Fri Jan 10 18:27:18 2020 +0000
@@ -0,0 +1,6 @@
+VVVVVV is a platform game all about exploring one simple mechanical idea -
+what if you reversed gravity instead of jumping?
+
+The game is designed not to artificially gate your progress. In VVVVVV there
+are no locks, no power-ups, no switches, nothing to stop you progressing
+except the challenges themselves.
diff -r 47542adf1914 -r b7c0682e071f games/vvvvvv/MESSAGE
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/vvvvvv/MESSAGE      Fri Jan 10 18:27:18 2020 +0000
@@ -0,0 +1,6 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2020/01/10 18:27:18 nia Exp $
+
+Copy all data files to ~/.local/share/VVVVVV before running the game.
+
+===========================================================================
diff -r 47542adf1914 -r b7c0682e071f games/vvvvvv/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/vvvvvv/Makefile     Fri Jan 10 18:27:18 2020 +0000
@@ -0,0 +1,27 @@
+# $NetBSD: Makefile,v 1.1 2020/01/10 18:27:18 nia Exp $
+
+DISTNAME=      VVVVVVV-0.0.0.20200110
+PKGNAME=       ${DISTNAME:tl}
+CATEGORIES=    games
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=TerryCavanagh/}
+GITHUB_PROJECT=        VVVVVV
+GITHUB_TAG=    9e5e9f3e670a0cc48475a20486b0630e83ae14b4
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/TerryCavanagh/VVVVVV
+COMMENT=       2D puzzle platform video game with gravity reversal
+LICENSE=       vvvvvv-license
+
+WRKSRC=                ${WRKDIR}/VVVVVV-${GITHUB_TAG}/desktop_version
+USE_CMAKE=     yes
+USE_TOOLS+=    pkg-config
+USE_LANGUAGES= c c++
+
+INSTALLATION_DIRS+=    bin
+
+do-install:
+       ${INSTALL_PROGRAM} ${WRKSRC}/vvvvvv* ${DESTDIR}${PREFIX}/bin/vvvvvv
+
+.include "../../audio/SDL2_mixer/buildlink3.mk"
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 47542adf1914 -r b7c0682e071f games/vvvvvv/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/vvvvvv/PLIST        Fri Jan 10 18:27:18 2020 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2020/01/10 18:27:18 nia Exp $
+bin/vvvvvv
diff -r 47542adf1914 -r b7c0682e071f games/vvvvvv/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/vvvvvv/distinfo     Fri Jan 10 18:27:18 2020 +0000
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1 2020/01/10 18:27:18 nia Exp $
+
+SHA1 (VVVVVVV-0.0.0.20200110-9e5e9f3e670a0cc48475a20486b0630e83ae14b4.tar.gz) = 7efdc53b9c86bcdbcbbdaced32390cd64e9ee4a0
+RMD160 (VVVVVVV-0.0.0.20200110-9e5e9f3e670a0cc48475a20486b0630e83ae14b4.tar.gz) = b12109fa84a6a87573210a2ffc99fb54cf62a605
+SHA512 (VVVVVVV-0.0.0.20200110-9e5e9f3e670a0cc48475a20486b0630e83ae14b4.tar.gz) = 
5e1ab96261afa091496bb79b6c2a5f5c5f304dbf03214cc87bfb01e722fe26fde14e9a659fff2ac9411be2247fd53bf0d6e400ea2ac2a78637bda0ddd8f87078
+Size (VVVVVVV-0.0.0.20200110-9e5e9f3e670a0cc48475a20486b0630e83ae14b4.tar.gz) = 828498 bytes
+SHA1 (patch-physfs_physfs__platform__unix.c) = 6c84e653c3058d614d08783925b35892e3f0950c
+SHA1 (patch-src_FileSystemUtils.cpp) = 6ad10e2827e0453abdb50036fc156f7ec9504c28
+SHA1 (patch-src_SteamNetwork.c) = 8e86050961b0a623e1794eeef03ce312c8fcefe9
diff -r 47542adf1914 -r b7c0682e071f games/vvvvvv/patches/patch-physfs_physfs__platform__unix.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/vvvvvv/patches/patch-physfs_physfs__platform__unix.c        Fri Jan 10 18:27:18 2020 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-physfs_physfs__platform__unix.c,v 1.1 2020/01/10 18:27:18 nia Exp $
+
+Support NetBSD.
+
+--- physfs/physfs_platform_unix.c.orig 2020-01-10 16:45:29.000000000 +0000
++++ physfs/physfs_platform_unix.c
+@@ -57,6 +57,10 @@
+ #include <sys/sysctl.h>
+ #endif
+ 
++#ifdef __NetBSD__
++#include <sys/statvfs.h>
++#define statfs statvfs
++#endif
+ 
+ #include "physfs_internal.h"
+ 
diff -r 47542adf1914 -r b7c0682e071f games/vvvvvv/patches/patch-src_FileSystemUtils.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/vvvvvv/patches/patch-src_FileSystemUtils.cpp        Fri Jan 10 18:27:18 2020 +0000
@@ -0,0 +1,68 @@
+$NetBSD: patch-src_FileSystemUtils.cpp,v 1.1 2020/01/10 18:27:18 nia Exp $
+
+Support non-Linux
+
+--- src/FileSystemUtils.cpp.orig       2020-01-10 16:45:29.000000000 +0000
++++ src/FileSystemUtils.cpp
+@@ -14,7 +14,7 @@
+ #include <shlobj.h>
+ #define mkdir(a, b) CreateDirectory(a, NULL)
+ #define VNEEDS_MIGRATION (mkdirResult != 0)
+-#elif defined(__linux__) || defined(__APPLE__)
++#elif defined(__unix__) || defined(__APPLE__)
+ #include <sys/stat.h>
+ #include <limits.h>
+ #define VNEEDS_MIGRATION (mkdirResult == 0)
+@@ -141,7 +141,13 @@ std::vector<std::string> FILESYSTEM_getL
+ 
+ void PLATFORM_getOSDirectory(char* output)
+ {
+-#if defined(__linux__)
++#if defined(__APPLE__)
++      strcpy(output, PHYSFS_getUserDir());
++      strcat(output, "Library/Application Support/VVVVVV/");
++#elif defined(_WIN32)
++      SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, output);
++      strcat(output, "\\VVVVVV\\");
++#else
+       const char *homeDir = getenv("XDG_DATA_HOME");
+       if (homeDir == NULL)
+       {
+@@ -153,14 +159,6 @@ void PLATFORM_getOSDirectory(char* outpu
+               strcpy(output, homeDir);
+               strcat(output, "/VVVVVV/");
+       }
+-#elif defined(__APPLE__)
+-      strcpy(output, PHYSFS_getUserDir());
+-      strcat(output, "Library/Application Support/VVVVVV/");
+-#elif defined(_WIN32)
+-      SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, output);
+-      strcat(output, "\\VVVVVV\\");
+-#else
+-#error See PLATFORM_getOSDirectory
+ #endif
+ }
+ 
+@@ -169,7 +167,7 @@ void PLATFORM_migrateSaveData(char* outp
+       char oldLocation[MAX_PATH];
+       char newLocation[MAX_PATH];
+       char oldDirectory[MAX_PATH];
+-#if defined(__linux__) || defined(__APPLE__)
++#if defined(__unix__) || defined(__APPLE__)
+       DIR *dir = NULL;
+       struct dirent *de = NULL;
+       DIR *subDir = NULL;
+@@ -182,10 +180,10 @@ void PLATFORM_migrateSaveData(char* outp
+               return;
+       }
+       strcpy(oldDirectory, homeDir);
+-#if defined(__linux__)
+-      strcat(oldDirectory, "/.vvvvvv/");
+-#elif defined(__APPLE__)
++#if defined(__APPLE__)
+       strcat(oldDirectory, "/Documents/VVVVVV/");
++#else
++      strcat(oldDirectory, "/.vvvvvv/");
+ #endif
+       dir = opendir(oldDirectory);
+       if (!dir)
diff -r 47542adf1914 -r b7c0682e071f games/vvvvvv/patches/patch-src_SteamNetwork.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/vvvvvv/patches/patch-src_SteamNetwork.c     Fri Jan 10 18:27:18 2020 +0000
@@ -0,0 +1,87 @@
+$NetBSD: patch-src_SteamNetwork.c,v 1.1 2020/01/10 18:27:18 nia Exp $
+
+Don't depend on proprietary steam libs
+
+--- src/SteamNetwork.c.orig    2020-01-10 16:45:29.000000000 +0000
++++ src/SteamNetwork.c
+@@ -15,10 +15,8 @@
+ #define NETWORK_LIBRARY "steam_api.dll"
+ #elif defined(__APPLE__)
+ #define NETWORK_LIBRARY "libsteam_api.dylib"
+-#elif defined(__linux__)
+-#define NETWORK_LIBRARY "libsteam_api.so"
+ #else
+-#error NETWORK_LIBRARY: Unrecognized platform!
++#define NETWORK_LIBRARY "libsteam_api.so"
+ #endif
+ 
+ /* Function Pointer Types */
+@@ -97,68 +95,6 @@ static void ClearPointers()
+ 
+ int NETWORK_init()
+ {
+-      intptr_t steamClient;
+-      int32_t steamUser, steamPipe;
+-
+-      libHandle = SDL_LoadObject(NETWORK_LIBRARY);
+-      if (!libHandle)
+-      {
+-              printf("%s not found!\n", NETWORK_LIBRARY);
+-              return 0;
+-      }
+-
+-      #define LOAD_FUNC(name) \
+-              name = (name##Func) SDL_LoadFunction(libHandle, #name); \
+-              if (!name) \
+-              { \
+-                      printf("%s symbol %s not found!\n", NETWORK_LIBRARY, #name); \
+-                      ClearPointers(); \
+-                      return 0; \
+-              }
+-      LOAD_FUNC(SteamAPI_Init)
+-      LOAD_FUNC(SteamAPI_Shutdown)
+-      LOAD_FUNC(SteamAPI_RunCallbacks)
+-      LOAD_FUNC(SteamInternal_CreateInterface)
+-      LOAD_FUNC(SteamAPI_GetHSteamUser)
+-      LOAD_FUNC(SteamAPI_GetHSteamPipe)
+-      LOAD_FUNC(SteamAPI_ISteamClient_GetISteamUserStats)
+-      LOAD_FUNC(SteamAPI_ISteamUserStats_RequestCurrentStats)
+-      LOAD_FUNC(SteamAPI_ISteamUserStats_StoreStats)
+-      LOAD_FUNC(SteamAPI_ISteamUserStats_GetStat)
+-      LOAD_FUNC(SteamAPI_ISteamUserStats_SetStat)
+-      LOAD_FUNC(SteamAPI_ISteamUserStats_SetAchievement)
+-      #undef LOAD_FUNC
+-
+-      if (!SteamAPI_Init())
+-      {
+-              printf("Steamworks not initialized!\n");
+-              ClearPointers();
+-              return 0;
+-      }
+-      steamClient = SteamInternal_CreateInterface(VVVVVV_STEAMCLIENT);
+-      steamUser = SteamAPI_GetHSteamUser();
+-      steamPipe = SteamAPI_GetHSteamPipe();
+-      if (!steamClient || !steamUser || !steamPipe)
+-      {
+-              SteamAPI_Shutdown();
+-              printf(VVVVVV_STEAMCLIENT " not created!\n");
+-              ClearPointers();
+-              return 0;
+-      }
+-      steamUserStats = SteamAPI_ISteamClient_GetISteamUserStats(
+-              steamClient,
+-              steamUser,
+-              steamPipe,
+-              VVVVVV_STEAMUSERSTATS
+-      );
+-      if (!steamUserStats)
+-      {
+-              SteamAPI_Shutdown();
+-              printf(VVVVVV_STEAMUSERSTATS " not created!\n");
+-              ClearPointers();
+-              return 0;
+-      }
+-      SteamAPI_ISteamUserStats_RequestCurrentStats(steamUserStats);
+       return 1;
+ }
+ 



Home | Main Index | Thread Index | Old Index