Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jul 2021 08:10:20 GMT
From:      Li-Wen Hsu <lwhsu@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: 7d4aa58587ee - 2021Q3 - lang/spl: patch and unbreak with -fno-common
Message-ID:  <202107210810.16L8AKJq029999@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch 2021Q3 has been updated by lwhsu:

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

commit 7d4aa58587ee9cbbada0016fb4b3157e923c66e6
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2021-07-20 09:42:55 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2021-07-21 08:09:45 +0000

    lang/spl: patch and unbreak with -fno-common
    
    PR:             257295
    (cherry picked from commit f11e9f154140bf1d042a9f7fce069e21c3eda2b7)
---
 lang/spl/Makefile             | 11 ++++-------
 lang/spl/files/patch-libspl.c | 10 ++++++++++
 lang/spl/files/patch-spl.h    | 26 ++++++++++++++++++++++++++
 3 files changed, 40 insertions(+), 7 deletions(-)

diff --git a/lang/spl/Makefile b/lang/spl/Makefile
index 7daa1e332505..3e8c808784a4 100644
--- a/lang/spl/Makefile
+++ b/lang/spl/Makefile
@@ -2,26 +2,23 @@
 
 PORTNAME=	spl
 PORTVERSION=	1.2.1
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	lang
 MASTER_SITES=	http://shakespearelang.sourceforge.net/download/
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	fuz@fuz.su
 COMMENT=	Shakespeare programming language
 
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-BROKEN_FreeBSD_13=	ld: error: duplicate symbol: cast
-BROKEN_FreeBSD_14=	ld: error: duplicate symbol: cast
-
 USES=		bison gmake
 
+OPTIONS_DEFINE=	EXAMPLES
+
 ALL_EXAMPLES=	Makefile fibonacci.spl fibonacci2.spl guess.spl hello.spl \
 		primes.spl reverse.spl shakesbeer.spl
 
-OPTIONS_DEFINE=	EXAMPLES
-
 post-patch:
 .for f in . examples
 	${REINPLACE_CMD} -e 's,= gcc,?= gcc,' -e 's,^CCFLAGS.*,CFLAGS += -Wall,' \
diff --git a/lang/spl/files/patch-libspl.c b/lang/spl/files/patch-libspl.c
new file mode 100644
index 000000000000..e1519edf96ba
--- /dev/null
+++ b/lang/spl/files/patch-libspl.c
@@ -0,0 +1,10 @@
+--- libspl.c.orig	2021-07-20 09:38:16 UTC
++++ libspl.c
+@@ -27,6 +27,7 @@ USA.
+ #include <stdio.h>
+ #include <stdlib.h>
+ 
++#define GLOBAL
+ #include "spl.h"
+ #include "strutils.h"
+ 
diff --git a/lang/spl/files/patch-spl.h b/lang/spl/files/patch-spl.h
new file mode 100644
index 000000000000..1ca7fc3b568d
--- /dev/null
+++ b/lang/spl/files/patch-spl.h
@@ -0,0 +1,26 @@
+--- spl.h.orig	2021-07-20 09:35:24 UTC
++++ spl.h
+@@ -43,13 +43,17 @@ typedef struct {
+ 
+ /* global variables */
+ 
+-CHARACTER **cast;
+-CHARACTER *first_person;
+-CHARACTER *second_person;
++#ifndef GLOBAL
++# define GLOBAL extern
++#endif
+ 
+-int truth_flag;
+-int num_on_stage;
+-int num_cast;
++GLOBAL CHARACTER **cast;
++GLOBAL CHARACTER *first_person;
++GLOBAL CHARACTER *second_person;
++
++GLOBAL int truth_flag;
++GLOBAL int num_on_stage;
++GLOBAL int num_cast;
+ 
+ /* function prototypes */
+ extern void activate_character(int line, CHARACTER *character);



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