mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-22 08:58:47 +00:00
games/jumpnbump: fix upstream patch handling
Instead of using PATCHFILES, handled backported upstream commit as a patch under files/, where it is always available, manageable and where it doesn't break when patch format changes. Pointyhat to: tcberner, jbeich
This commit is contained in:
parent
9cb3316ecd
commit
fea15e77eb
@ -4,9 +4,6 @@ PORTREVISION= 1
|
||||
CATEGORIES= games
|
||||
MASTER_SITES= https://gitlab.com/LibreGames/jumpnbump/repository/${PORTVERSION}/archive.tar.bz2?dummy=/
|
||||
|
||||
PATCH_SITES= https://gitlab.com/LibreGames/jumpnbump/-/commit/
|
||||
PATCHFILES= b72b70a4233776bdaa6a683c89af2becefd53bd6.patch:-p1
|
||||
|
||||
MAINTAINER= amdmi3@FreeBSD.org
|
||||
COMMENT= Play cute bunnies jumping on each other's heads #'
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
TIMESTAMP = 1613838535
|
||||
SHA256 (jumpnbump-1.61.tar.bz2) = b6da729d4a7bdea81210b69cbf4d1f472b3aadf879d3e7b794b0fd70e5f291db
|
||||
SIZE (jumpnbump-1.61.tar.bz2) = 377685
|
||||
SHA256 (b72b70a4233776bdaa6a683c89af2becefd53bd6.patch) = f7f5fc9864c629162fe370189cde9e676a9fa1fe9d849beca93eab5e752bacd2
|
||||
SIZE (b72b70a4233776bdaa6a683c89af2becefd53bd6.patch) = 2333
|
||||
|
89
games/jumpnbump/files/patch-b72b70a
Normal file
89
games/jumpnbump/files/patch-b72b70a
Normal file
@ -0,0 +1,89 @@
|
||||
From b72b70a4233776bdaa6a683c89af2becefd53bd6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come@chilliet.eu>
|
||||
Date: Mon, 2 Mar 2020 15:27:42 +0100
|
||||
Subject: [PATCH] Add future gcc default -fno-common and fix code
|
||||
|
||||
Global var declarations needs to be in .c files to avoid having them in
|
||||
several .o files. So they need to be declared as extern in .h files if
|
||||
needed.
|
||||
This was already the case for other vars.
|
||||
|
||||
Related to issue #36
|
||||
---
|
||||
Makefile | 2 +-
|
||||
globals.pre | 2 +-
|
||||
main.c | 2 ++
|
||||
network.c | 4 ++++
|
||||
network.h | 2 +-
|
||||
5 files changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 51f7542..077cc52 100644
|
||||
--- Makefile
|
||||
+++ Makefile
|
||||
@@ -6,7 +6,7 @@ DATADIR ?= $(PREFIX)/share
|
||||
GAMEDATADIR ?= $(DATADIR)
|
||||
EXE ?=
|
||||
|
||||
-CFLAGS ?= -Wall -O2 -ffast-math -funroll-loops
|
||||
+CFLAGS ?= -Wall -O2 -ffast-math -funroll-loops -fno-common
|
||||
SDL_CFLAGS = `sdl2-config --cflags`
|
||||
DEFINES = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp -DNDEBUG -DUSE_SDL -DUSE_NET -DZLIB_SUPPORT -DBZLIB_SUPPORT
|
||||
INCLUDES = -I.
|
||||
diff --git a/globals.pre b/globals.pre
|
||||
index 0d4a738..781c8eb 100644
|
||||
--- globals.pre
|
||||
+++ globals.pre
|
||||
@@ -267,7 +267,7 @@ extern gob_t number_gobs;
|
||||
|
||||
/* main.c */
|
||||
|
||||
-int endscore_reached;
|
||||
+extern int endscore_reached;
|
||||
|
||||
void steer_players(void);
|
||||
void position_player(int player_num);
|
||||
diff --git a/main.c b/main.c
|
||||
index d03e5f0..87b4e95 100644
|
||||
--- main.c
|
||||
+++ main.c
|
||||
@@ -67,6 +67,8 @@ char cur_pal[768];
|
||||
|
||||
int ai[JNB_MAX_PLAYERS];
|
||||
|
||||
+int endscore_reached = 0;
|
||||
+
|
||||
unsigned int ban_map[17][22] = {
|
||||
{1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
|
||||
{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0},
|
||||
diff --git a/network.c b/network.c
|
||||
index 07227e7..b4a1e4e 100644
|
||||
--- network.c
|
||||
+++ network.c
|
||||
@@ -32,6 +32,10 @@ int is_server = 1;
|
||||
int is_net = 0;
|
||||
int server_said_bye = 0;
|
||||
|
||||
+#ifdef USE_NET
|
||||
+NetInfo net_info[JNB_MAX_PLAYERS];
|
||||
+#endif
|
||||
+
|
||||
void processMovePacket(NetPacket *pkt)
|
||||
{
|
||||
int playerid = pkt->arg;
|
||||
diff --git a/network.h b/network.h
|
||||
index 3058630..f591480 100644
|
||||
--- network.h
|
||||
+++ network.h
|
||||
@@ -74,7 +74,7 @@ typedef struct
|
||||
SDLNet_SocketSet socketset;
|
||||
} NetInfo;
|
||||
|
||||
-NetInfo net_info[JNB_MAX_PLAYERS];
|
||||
+extern NetInfo net_info[JNB_MAX_PLAYERS];
|
||||
|
||||
void bufToPacket(const char *buf, NetPacket *pkt);
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
Loading…
Reference in New Issue
Block a user