Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Dec 2021 17:03:56 GMT
From:      Dmitry Marakasov <amdmi3@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: fea15e77ebc9 - main - games/jumpnbump: fix upstream patch handling
Message-ID:  <202112291703.1BTH3uwG008187@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by amdmi3:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fea15e77ebc932dbe89cb6410d6fc454c03533bc

commit fea15e77ebc932dbe89cb6410d6fc454c03533bc
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2021-12-28 17:33:58 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2021-12-29 16:55:37 +0000

    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
---
 games/jumpnbump/Makefile            |  3 --
 games/jumpnbump/distinfo            |  2 -
 games/jumpnbump/files/patch-b72b70a | 89 +++++++++++++++++++++++++++++++++++++
 3 files changed, 89 insertions(+), 5 deletions(-)

diff --git a/games/jumpnbump/Makefile b/games/jumpnbump/Makefile
index ea333c425586..2f8c7e51f402 100644
--- a/games/jumpnbump/Makefile
+++ b/games/jumpnbump/Makefile
@@ -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 #'
 
diff --git a/games/jumpnbump/distinfo b/games/jumpnbump/distinfo
index cc0ee4fcaf31..59c709b840e5 100644
--- a/games/jumpnbump/distinfo
+++ b/games/jumpnbump/distinfo
@@ -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
diff --git a/games/jumpnbump/files/patch-b72b70a b/games/jumpnbump/files/patch-b72b70a
new file mode 100644
index 000000000000..e062bef5dfae
--- /dev/null
+++ b/games/jumpnbump/files/patch-b72b70a
@@ -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
+



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202112291703.1BTH3uwG008187>