gargoyle: -fno-common fixes from upstream
This commit is contained in:
parent
5963b49178
commit
c267965e5d
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.31 2020/08/01 11:30:36 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.32 2021/02/01 20:04:53 sthen Exp $
|
||||
|
||||
COMMENT = cross-platform interactive fiction player
|
||||
|
||||
@ -46,7 +46,7 @@ DESTDIRNAME = DESTPREFIX
|
||||
# @cd ${WRKSRC} && perl -i -pe 's/\r$$//' [...]
|
||||
|
||||
pre-configure:
|
||||
${SUBST_CMD} ${WRKSRC}/garglk/launchgtk.c
|
||||
sed -i 's,/usr/local,${TRUEPREFIX},' ${WRKSRC}/garglk/launchgtk.c
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} jam -j${MAKE_JOBS} ${JAMDEBUG}
|
||||
|
30
games/gargoyle/patches/patch-garglk_launcher_c
Normal file
30
games/gargoyle/patches/patch-garglk_launcher_c
Normal file
@ -0,0 +1,30 @@
|
||||
$OpenBSD: patch-garglk_launcher_c,v 1.1 2021/02/01 20:04:53 sthen Exp $
|
||||
|
||||
From 91c0b740ef4224f25e1595cb2e456452dc5e25b9 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:01:05 -0700
|
||||
Subject: [PATCH 1/2] Increase internal linkage in garglk.
|
||||
|
||||
From e7038f7e899a73992c3bbfbbfb91abdd32064092 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:10:09 -0700
|
||||
Subject: [PATCH 2/2] Fix incorrect global declarations.
|
||||
|
||||
Index: garglk/launcher.c
|
||||
--- garglk/launcher.c.orig
|
||||
+++ garglk/launcher.c
|
||||
@@ -49,10 +49,10 @@
|
||||
#define ID_GLUL (giblorb_make_id('G','L','U','L'))
|
||||
|
||||
#define MaxBuffer 1024
|
||||
-char tmp[MaxBuffer];
|
||||
-char terp[MaxBuffer];
|
||||
-char exe[MaxBuffer];
|
||||
-char flags[MaxBuffer];
|
||||
+static char tmp[MaxBuffer];
|
||||
+static char terp[MaxBuffer];
|
||||
+static char exe[MaxBuffer];
|
||||
+static char flags[MaxBuffer];
|
||||
|
||||
int runblorb(char *path, char *game)
|
||||
{
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-garglk_launchgtk_c,v 1.4 2019/11/19 14:49:11 sthen Exp $
|
||||
$OpenBSD: patch-garglk_launchgtk_c,v 1.5 2021/02/01 20:04:53 sthen Exp $
|
||||
|
||||
Remove Linux'ism to figure out the libexec dir.
|
||||
OpenBSD doesn't remember the path to the running executable.
|
||||
|
||||
Index: garglk/launchgtk.c
|
||||
--- garglk/launchgtk.c.orig
|
||||
@ -11,7 +11,7 @@ Index: garglk/launchgtk.c
|
||||
{
|
||||
-#ifdef __FreeBSD__
|
||||
+#if defined(__OpenBSD__)
|
||||
+ char exepath[MaxBuffer] = "${TRUEPREFIX}/libexec/gargoyle/";
|
||||
+ char exepath[MaxBuffer] = "/usr/local/libexec/gargoyle/";
|
||||
+ snprintf(buffer, sizeof(exepath), "%s", exepath );
|
||||
+#elif defined(__FreeBSD__)
|
||||
int mib[4];
|
||||
|
34
games/gargoyle/patches/patch-garglk_launchmac_m
Normal file
34
games/gargoyle/patches/patch-garglk_launchmac_m
Normal file
@ -0,0 +1,34 @@
|
||||
$OpenBSD: patch-garglk_launchmac_m,v 1.1 2021/02/01 20:04:53 sthen Exp $
|
||||
|
||||
From 91c0b740ef4224f25e1595cb2e456452dc5e25b9 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:01:05 -0700
|
||||
Subject: [PATCH 1/2] Increase internal linkage in garglk.
|
||||
|
||||
From e7038f7e899a73992c3bbfbbfb91abdd32064092 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:10:09 -0700
|
||||
Subject: [PATCH 2/2] Fix incorrect global declarations.
|
||||
|
||||
Index: garglk/launchmac.m
|
||||
--- garglk/launchmac.m.orig
|
||||
+++ garglk/launchmac.m
|
||||
@@ -40,13 +40,13 @@ static const char * AppName = "Gargoyle " VERSION;
|
||||
static const char * LaunchingTemplate = "%s/%s";
|
||||
static const char * DirSeparator = "/";
|
||||
|
||||
-char dir[MaxBuffer];
|
||||
-char buf[MaxBuffer];
|
||||
-char tmp[MaxBuffer];
|
||||
-char etc[MaxBuffer];
|
||||
+static char dir[MaxBuffer];
|
||||
+static char buf[MaxBuffer];
|
||||
+static char tmp[MaxBuffer];
|
||||
+static char etc[MaxBuffer];
|
||||
|
||||
enum FILEFILTERS { FILTER_SAVE, FILTER_TEXT, FILTER_ALL };
|
||||
-char *winfilters[] =
|
||||
+static char *winfilters[] =
|
||||
{
|
||||
"sav",
|
||||
"txt",
|
40
games/gargoyle/patches/patch-garglk_launchwin_c
Normal file
40
games/gargoyle/patches/patch-garglk_launchwin_c
Normal file
@ -0,0 +1,40 @@
|
||||
$OpenBSD: patch-garglk_launchwin_c,v 1.1 2021/02/01 20:04:53 sthen Exp $
|
||||
|
||||
From 91c0b740ef4224f25e1595cb2e456452dc5e25b9 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:01:05 -0700
|
||||
Subject: [PATCH 1/2] Increase internal linkage in garglk.
|
||||
|
||||
From e7038f7e899a73992c3bbfbbfb91abdd32064092 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:10:09 -0700
|
||||
Subject: [PATCH 2/2] Fix incorrect global declarations.
|
||||
|
||||
Index: garglk/launchwin.c
|
||||
--- garglk/launchwin.c.orig
|
||||
+++ garglk/launchwin.c
|
||||
@@ -33,11 +33,11 @@ static const char * AppName = "Gargoyle " VERSION;
|
||||
static const char * LaunchingTemplate = "\"%s\\%s.exe\" %s \"%s\"";
|
||||
static const char * DirSeparator = "\\";
|
||||
|
||||
-char dir[MaxBuffer];
|
||||
-char buf[MaxBuffer];
|
||||
-char tmp[MaxBuffer];
|
||||
+static char dir[MaxBuffer];
|
||||
+static char buf[MaxBuffer];
|
||||
+static char tmp[MaxBuffer];
|
||||
|
||||
-char filterlist[] =
|
||||
+static char filterlist[] =
|
||||
"All Games\0*.taf;*.agx;*.d$$;*.acd;*.a3c;*.asl;*.cas;*.ulx;*.hex;*.jacl;*.j2;*.gam;*.t3;*.z?;*.l9;*.sna;*.mag;*.dat;*.saga;*.blb;*.glb;*.zlb;*.blorb;*.gblorb;*.zblorb\0"
|
||||
"Adrift Games (*.taf)\0*.taf\0"
|
||||
"AdvSys Games (*.dat)\0*.dat\0"
|
||||
@@ -65,7 +65,7 @@ void winmsg(const char *msg)
|
||||
MessageBox(NULL, msg, AppName, MB_ICONERROR);
|
||||
}
|
||||
|
||||
-int urldecode(char *decoded, unsigned int maxlen, const char *encoded)
|
||||
+static int urldecode(char *decoded, unsigned int maxlen, const char *encoded)
|
||||
{
|
||||
unsigned int i;
|
||||
int convert, ascii;
|
26
games/gargoyle/patches/patch-terps_alan2_glkio_h
Normal file
26
games/gargoyle/patches/patch-terps_alan2_glkio_h
Normal file
@ -0,0 +1,26 @@
|
||||
$OpenBSD: patch-terps_alan2_glkio_h,v 1.1 2021/02/01 20:04:53 sthen Exp $
|
||||
|
||||
From 91c0b740ef4224f25e1595cb2e456452dc5e25b9 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:01:05 -0700
|
||||
Subject: [PATCH 1/2] Increase internal linkage in garglk.
|
||||
|
||||
From e7038f7e899a73992c3bbfbbfb91abdd32064092 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:10:09 -0700
|
||||
Subject: [PATCH 2/2] Fix incorrect global declarations.
|
||||
|
||||
Index: terps/alan2/glkio.h
|
||||
--- terps/alan2/glkio.h.orig
|
||||
+++ terps/alan2/glkio.h
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
#include "glk.h"
|
||||
|
||||
-winid_t glkMainWin;
|
||||
-winid_t glkStatusWin;
|
||||
+extern winid_t glkMainWin;
|
||||
+extern winid_t glkStatusWin;
|
||||
|
||||
/* NB: this header must be included in any file which calls printf() */
|
||||
|
25
games/gargoyle/patches/patch-terps_alan2_main_c
Normal file
25
games/gargoyle/patches/patch-terps_alan2_main_c
Normal file
@ -0,0 +1,25 @@
|
||||
$OpenBSD: patch-terps_alan2_main_c,v 1.1 2021/02/01 20:04:53 sthen Exp $
|
||||
|
||||
From 91c0b740ef4224f25e1595cb2e456452dc5e25b9 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:01:05 -0700
|
||||
Subject: [PATCH 1/2] Increase internal linkage in garglk.
|
||||
|
||||
From e7038f7e899a73992c3bbfbbfb91abdd32064092 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:10:09 -0700
|
||||
Subject: [PATCH 2/2] Fix incorrect global declarations.
|
||||
|
||||
Index: terps/alan2/main.c
|
||||
--- terps/alan2/main.c.orig
|
||||
+++ terps/alan2/main.c
|
||||
@@ -43,6 +43,9 @@
|
||||
|
||||
/* PUBLIC DATA */
|
||||
|
||||
+winid_t glkMainWin;
|
||||
+winid_t glkStatusWin;
|
||||
+
|
||||
/* The Amachine memory */
|
||||
Aword *memory;
|
||||
static AcdHdr dummyHeader; /* Dummy to use until memory allocated */
|
26
games/gargoyle/patches/patch-terps_alan3_glkio_h
Normal file
26
games/gargoyle/patches/patch-terps_alan3_glkio_h
Normal file
@ -0,0 +1,26 @@
|
||||
$OpenBSD: patch-terps_alan3_glkio_h,v 1.1 2021/02/01 20:04:53 sthen Exp $
|
||||
|
||||
From 91c0b740ef4224f25e1595cb2e456452dc5e25b9 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:01:05 -0700
|
||||
Subject: [PATCH 1/2] Increase internal linkage in garglk.
|
||||
|
||||
From e7038f7e899a73992c3bbfbbfb91abdd32064092 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:10:09 -0700
|
||||
Subject: [PATCH 2/2] Fix incorrect global declarations.
|
||||
|
||||
Index: terps/alan3/glkio.h
|
||||
--- terps/alan3/glkio.h.orig
|
||||
+++ terps/alan3/glkio.h
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
#include "glk.h"
|
||||
|
||||
-winid_t glkMainWin;
|
||||
-winid_t glkStatusWin;
|
||||
+static winid_t glkMainWin;
|
||||
+static winid_t glkStatusWin;
|
||||
|
||||
/* NB: this header must be included in any file which calls printf() */
|
||||
|
27
games/gargoyle/patches/patch-terps_alan3_output_h
Normal file
27
games/gargoyle/patches/patch-terps_alan3_output_h
Normal file
@ -0,0 +1,27 @@
|
||||
$OpenBSD: patch-terps_alan3_output_h,v 1.1 2021/02/01 20:04:53 sthen Exp $
|
||||
|
||||
From 91c0b740ef4224f25e1595cb2e456452dc5e25b9 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:01:05 -0700
|
||||
Subject: [PATCH 1/2] Increase internal linkage in garglk.
|
||||
|
||||
From e7038f7e899a73992c3bbfbbfb91abdd32064092 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:10:09 -0700
|
||||
Subject: [PATCH 2/2] Fix incorrect global declarations.
|
||||
|
||||
Index: terps/alan3/output.h
|
||||
--- terps/alan3/output.h.orig
|
||||
+++ terps/alan3/output.h
|
||||
@@ -22,9 +22,9 @@ extern bool capitalize;
|
||||
/* Log file */
|
||||
#ifdef HAVE_GLK
|
||||
#include "glk.h"
|
||||
-strid_t logFile;
|
||||
+extern strid_t logFile;
|
||||
#else
|
||||
-FILE *logFile;
|
||||
+extern FILE *logFile;
|
||||
#endif
|
||||
|
||||
|
24
games/gargoyle/patches/patch-terps_alan3_term_h
Normal file
24
games/gargoyle/patches/patch-terps_alan3_term_h
Normal file
@ -0,0 +1,24 @@
|
||||
$OpenBSD: patch-terps_alan3_term_h,v 1.1 2021/02/01 20:04:53 sthen Exp $
|
||||
|
||||
From 91c0b740ef4224f25e1595cb2e456452dc5e25b9 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:01:05 -0700
|
||||
Subject: [PATCH 1/2] Increase internal linkage in garglk.
|
||||
|
||||
From e7038f7e899a73992c3bbfbbfb91abdd32064092 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:10:09 -0700
|
||||
Subject: [PATCH 2/2] Fix incorrect global declarations.
|
||||
|
||||
Index: terps/alan3/term.h
|
||||
--- terps/alan3/term.h.orig
|
||||
+++ terps/alan3/term.h
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
|
||||
/* DATA */
|
||||
-bool onStatusLine;
|
||||
+extern bool onStatusLine;
|
||||
|
||||
|
||||
/* FUNCTIONS */
|
24
games/gargoyle/patches/patch-terps_jacl_glk_startup_c
Normal file
24
games/gargoyle/patches/patch-terps_jacl_glk_startup_c
Normal file
@ -0,0 +1,24 @@
|
||||
$OpenBSD: patch-terps_jacl_glk_startup_c,v 1.1 2021/02/01 20:04:53 sthen Exp $
|
||||
|
||||
From 91c0b740ef4224f25e1595cb2e456452dc5e25b9 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:01:05 -0700
|
||||
Subject: [PATCH 1/2] Increase internal linkage in garglk.
|
||||
|
||||
From e7038f7e899a73992c3bbfbbfb91abdd32064092 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:10:09 -0700
|
||||
Subject: [PATCH 2/2] Fix incorrect global declarations.
|
||||
|
||||
Index: terps/jacl/glk_startup.c
|
||||
--- terps/jacl/glk_startup.c.orig
|
||||
+++ terps/jacl/glk_startup.c
|
||||
@@ -31,7 +31,7 @@ extern short int release;
|
||||
glkunix_startup_t *arguments;
|
||||
|
||||
/* THE STREAM FOR OPENING UP THE ARCHIVE CONTAINING GRAPHICS AND SOUND */
|
||||
-strid_t blorb_stream;
|
||||
+extern strid_t blorb_stream;
|
||||
|
||||
/* PROTOTYPE FOR NEEDED UTILITY FUNCTION */
|
||||
void create_paths();
|
24
games/gargoyle/patches/patch-terps_jacl_parser_c
Normal file
24
games/gargoyle/patches/patch-terps_jacl_parser_c
Normal file
@ -0,0 +1,24 @@
|
||||
$OpenBSD: patch-terps_jacl_parser_c,v 1.1 2021/02/01 20:04:53 sthen Exp $
|
||||
|
||||
From 91c0b740ef4224f25e1595cb2e456452dc5e25b9 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:01:05 -0700
|
||||
Subject: [PATCH 1/2] Increase internal linkage in garglk.
|
||||
|
||||
From e7038f7e899a73992c3bbfbbfb91abdd32064092 Mon Sep 17 00:00:00 2001
|
||||
From: Chris Spiegel <cspiegel@gmail.com>
|
||||
Date: Sun, 10 May 2020 21:10:09 -0700
|
||||
Subject: [PATCH 2/2] Fix incorrect global declarations.
|
||||
|
||||
Index: terps/jacl/parser.c
|
||||
--- terps/jacl/parser.c.orig
|
||||
+++ terps/jacl/parser.c
|
||||
@@ -62,7 +62,7 @@ char *from_word;
|
||||
|
||||
int object_expected = FALSE;
|
||||
|
||||
-char default_function[84];
|
||||
+extern char default_function[84];
|
||||
char object_name[84];
|
||||
|
||||
char base_function[84];
|
Loading…
x
Reference in New Issue
Block a user