git: 4c0701da9093 - main - lang/lafontaine: fix build with -fcommon

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Mon, 17 Apr 2023 09:30:34 UTC
The branch main has been updated by fuz:

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

commit 4c0701da9093218a5e39f64a4441803d3bbd2238
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2023-04-16 14:03:55 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-04-17 09:27:26 +0000

    lang/lafontaine: fix build with -fcommon
    
    Turn two duplicate definitions into declarations.
    This fixes the build with FreeBSD 13+.
    Add missing LIB_DEPENDS and USE_GNOME entries.
    Define LICENSE.
---
 lang/lafontaine/Makefile             | 19 +++++++++++--------
 lang/lafontaine/files/patch-mc.c     | 10 ----------
 lang/lafontaine/files/patch-src_mc.c | 13 +++++++++++++
 lang/lafontaine/files/patch-src_rc.c | 16 +++++++++-------
 4 files changed, 33 insertions(+), 25 deletions(-)

diff --git a/lang/lafontaine/Makefile b/lang/lafontaine/Makefile
index f21f2856cb73..bfa3557dab05 100644
--- a/lang/lafontaine/Makefile
+++ b/lang/lafontaine/Makefile
@@ -1,24 +1,27 @@
 PORTNAME=	lafontaine
-PORTVERSION=	0.4.1
-PORTREVISION=	10
+DISTVERSION=	0.4-1
+PORTREVISION=	11
 CATEGORIES=	lang
 MASTER_SITES=	http://www.nongnu.org/lafontaine/archives/
-DISTNAME=	${PORTNAME}_0.4-1
+DISTNAME=	lafontaine_${DISTVERSION}
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Graphical logo interpreter
 WWW=		https://www.nongnu.org/lafontaine/en/eubaout.html
 
-BROKEN_FreeBSD_13=	ld: error: duplicate symbol: my_turtle
-BROKEN_FreeBSD_14=	ld: error: duplicate symbol: my_turtle
+LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/COPYING
 
-WRKSRC=		${WRKDIR}/${PORTNAME}-0.4
+LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
+		libfreetype.so:print/freetype2 \
+		libharfbuzz.so:print/harfbuzz
 
 USES=		gmake gnome pathfix pkgconfig
-USE_GNOME=	gtk20
-GNU_CONFIGURE=	yes
 USE_CSTD=	gnu89
+USE_GNOME=	cairo gdkpixbuf2 gtk20
+GNU_CONFIGURE=	yes
 LDFLAGS+=	-lm
+WRKSRC=		${WRKDIR}/${PORTNAME}-0.4
 
 OPTIONS_DEFINE=	NLS
 OPTIONS_SUB=	yes
diff --git a/lang/lafontaine/files/patch-mc.c b/lang/lafontaine/files/patch-mc.c
deleted file mode 100644
index 89863a045ea7..000000000000
--- a/lang/lafontaine/files/patch-mc.c
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/mc.c.orig	Sun Aug 15 20:00:39 2004
-+++ src/mc.c	Sun Aug 15 20:01:11 2004
-@@ -36,6 +36,7 @@
- /*>>> here is the declaration of the turtle            */
- struct s_turtle my_turtle;
- 
-+void mc_free(void);
- 
- /**
-    Freeing and reinitializing all middle-code informations.<br>
diff --git a/lang/lafontaine/files/patch-src_mc.c b/lang/lafontaine/files/patch-src_mc.c
new file mode 100644
index 000000000000..96e02f8f5086
--- /dev/null
+++ b/lang/lafontaine/files/patch-src_mc.c
@@ -0,0 +1,13 @@
+--- src/mc.c.orig	2002-05-18 22:11:05 UTC
++++ src/mc.c
+@@ -34,8 +34,9 @@
+ #include "debug.h"
+ 
+ /*>>> here is the declaration of the turtle            */
+-struct s_turtle my_turtle;
++extern struct s_turtle my_turtle;
+ 
++void mc_free(void);
+ 
+ /**
+    Freeing and reinitializing all middle-code informations.<br>
diff --git a/lang/lafontaine/files/patch-src_rc.c b/lang/lafontaine/files/patch-src_rc.c
index 1c05514eb02b..f1556a97c7d9 100644
--- a/lang/lafontaine/files/patch-src_rc.c
+++ b/lang/lafontaine/files/patch-src_rc.c
@@ -1,9 +1,11 @@
---- src/rc.c.orig	Thu Jul 27 22:40:17 2006
-+++ src/rc.c	Thu Jul 27 22:43:36 2006
-@@ -39,6 +39,12 @@
+--- src/rc.c.orig	2002-09-17 20:06:21 UTC
++++ src/rc.c
+@@ -38,7 +38,13 @@
+ #include "turtle.h"
  #include "rc.h"
  
- struct s_turtle my_turtle;
+-struct s_turtle my_turtle;
++extern struct s_turtle my_turtle;
 +void rc_parse_group(GScanner *scanner);
 +void rc_parse_coresave(GScanner *scanner);
 +void rc_parse_history(GScanner *scanner);
@@ -13,7 +15,7 @@
  
  
  static const GScannerConfig gtk_rc_scanner_config =
-@@ -152,6 +158,7 @@
+@@ -152,6 +158,7 @@ void rc_parse_group(GScanner *scanner)
        rc_parse_coresave(scanner);
        break;
      default:
@@ -21,7 +23,7 @@
      }
  
  }
-@@ -176,6 +183,7 @@
+@@ -176,6 +183,7 @@ void rc_parse_coresave(GScanner *scanner)
  	  printf("coredump file: %s\n", keyval.value);
  	  break;
  	default:
@@ -29,7 +31,7 @@
  	}
      }
  
-@@ -203,6 +211,7 @@
+@@ -203,6 +211,7 @@ void rc_parse_history(GScanner *scanner)
  	  printf("history file: %s\n", keyval.value);
  	  break;
  	default: