pkgsrc-WIP-changes archive

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

Add vvvvvv.



Module Name:	pkgsrc-wip
Committed By:	nia <nia%NetBSD.org@localhost>
Pushed By:	nee
Date:		Fri Jan 10 17:32:37 2020 +0000
Changeset:	c619b1454f1cdfdb67596d1ee3216d13faa1a036

Modified Files:
	Makefile
Added Files:
	vvvvvv/DESCR
	vvvvvv/Makefile
	vvvvvv/PLIST
	vvvvvv/TODO
	vvvvvv/distinfo
	vvvvvv/patches/patch-desktop__version_physfs_physfs__platform__unix.c
	vvvvvv/patches/patch-desktop__version_src_FileSystemUtils.cpp
	vvvvvv/patches/patch-desktop__version_src_SteamNetwork.c

Log Message:
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.

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

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

diffstat:
 Makefile                                           |  1 +
 vvvvvv/DESCR                                       |  6 ++
 vvvvvv/Makefile                                    | 24 ++++++
 vvvvvv/PLIST                                       |  0
 vvvvvv/TODO                                        |  1 +
 vvvvvv/distinfo                                    |  9 +++
 ...esktop__version_physfs_physfs__platform__unix.c | 17 +++++
 .../patch-desktop__version_src_FileSystemUtils.cpp | 68 +++++++++++++++++
 .../patch-desktop__version_src_SteamNetwork.c      | 87 ++++++++++++++++++++++
 9 files changed, 213 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index a1b58e4347..fab12a8612 100644
--- a/Makefile
+++ b/Makefile
@@ -4954,6 +4954,7 @@ SUBDIR+=	vsearch
 SUBDIR+=	vte
 SUBDIR+=	vulkan-headers
 SUBDIR+=	vulkan-loader
+SUBDIR+=	vvvvvv
 SUBDIR+=	wackamole
 SUBDIR+=	waffle
 SUBDIR+=	wanderer
diff --git a/vvvvvv/DESCR b/vvvvvv/DESCR
new file mode 100644
index 0000000000..b2be21c7a5
--- /dev/null
+++ b/vvvvvv/DESCR
@@ -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 --git a/vvvvvv/Makefile b/vvvvvv/Makefile
new file mode 100644
index 0000000000..cb075f0296
--- /dev/null
+++ b/vvvvvv/Makefile
@@ -0,0 +1,24 @@
+# $NetBSD$
+
+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
+
+USE_CMAKE=	yes
+USE_TOOLS+=	pkg-config
+USE_LANGUAGES=	c c++
+
+CONFIGURE_DIRS+=	desktop_version
+BUILD_DIRS+=		desktop_version
+
+.include "../../audio/SDL2_mixer/buildlink3.mk"
+.include "../../devel/SDL2/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/vvvvvv/PLIST b/vvvvvv/PLIST
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/vvvvvv/TODO b/vvvvvv/TODO
new file mode 100644
index 0000000000..5e2caa6e15
--- /dev/null
+++ b/vvvvvv/TODO
@@ -0,0 +1 @@
+Instantly segfaults.
diff --git a/vvvvvv/distinfo b/vvvvvv/distinfo
new file mode 100644
index 0000000000..95dffeec94
--- /dev/null
+++ b/vvvvvv/distinfo
@@ -0,0 +1,9 @@
+$NetBSD$
+
+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-desktop__version_physfs_physfs__platform__unix.c) = ea51d0a19203c3a1c7f4298f4774d080addf5892
+SHA1 (patch-desktop__version_src_FileSystemUtils.cpp) = ed58d10e669b6ed1e101be99d708f09b554df962
+SHA1 (patch-desktop__version_src_SteamNetwork.c) = 736b435c0df1df81ecd449b9440503d075a4f5e7
diff --git a/vvvvvv/patches/patch-desktop__version_physfs_physfs__platform__unix.c b/vvvvvv/patches/patch-desktop__version_physfs_physfs__platform__unix.c
new file mode 100644
index 0000000000..e52bf2888a
--- /dev/null
+++ b/vvvvvv/patches/patch-desktop__version_physfs_physfs__platform__unix.c
@@ -0,0 +1,17 @@
+$NetBSD$
+
+Support NetBSD.
+
+--- desktop_version/physfs/physfs_platform_unix.c.orig	2020-01-10 16:45:29.000000000 +0000
++++ desktop_version/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 --git a/vvvvvv/patches/patch-desktop__version_src_FileSystemUtils.cpp b/vvvvvv/patches/patch-desktop__version_src_FileSystemUtils.cpp
new file mode 100644
index 0000000000..a9fceaa8cf
--- /dev/null
+++ b/vvvvvv/patches/patch-desktop__version_src_FileSystemUtils.cpp
@@ -0,0 +1,68 @@
+$NetBSD$
+
+Support non-Linux
+
+--- desktop_version/src/FileSystemUtils.cpp.orig	2020-01-10 16:45:29.000000000 +0000
++++ desktop_version/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 --git a/vvvvvv/patches/patch-desktop__version_src_SteamNetwork.c b/vvvvvv/patches/patch-desktop__version_src_SteamNetwork.c
new file mode 100644
index 0000000000..852e2a1648
--- /dev/null
+++ b/vvvvvv/patches/patch-desktop__version_src_SteamNetwork.c
@@ -0,0 +1,87 @@
+$NetBSD$
+
+Don't depend on proprietary steam libs
+
+--- desktop_version/src/SteamNetwork.c.orig	2020-01-10 16:45:29.000000000 +0000
++++ desktop_version/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