Skip to content

Commit

Permalink
math/gkmap: fix build with -fno-common
Browse files Browse the repository at this point in the history
PR:		259615
Approved by:	javad.kouhi@gmail.com (maintainer timeout, 5 weeks)
  • Loading branch information
clausecker authored and tagattie committed Dec 8, 2021
1 parent 65236c8 commit 975c082
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 5 deletions.
8 changes: 3 additions & 5 deletions math/gkmap/Makefile
Expand Up @@ -2,7 +2,7 @@

PORTNAME= gkmap
PORTVERSION= 0.2
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= math
MASTER_SITES= SF/gkmap/gkmap/gkmap-${PORTVERSION}/

Expand All @@ -11,11 +11,9 @@ COMMENT= Simplification of Boolean Functions using Karnaugh Map

LICENSE= GPLv2

BROKEN_FreeBSD_13= ld: error: duplicate symbol: cell_array
BROKEN_FreeBSD_14= ld: error: duplicate symbol: cell_array

LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \
libfreetype.so:print/freetype2
libfreetype.so:print/freetype2 \
libharfbuzz.so:print/harfbuzz

USES= gnome pkgconfig dos2unix
USE_GNOME= cairo gdkpixbuf2 gtk20 libglade2 libxml2
Expand Down
14 changes: 14 additions & 0 deletions math/gkmap/files/patch-src_init.c
@@ -0,0 +1,14 @@
--- src/init.c.orig 2021-11-02 09:37:31 UTC
+++ src/init.c
@@ -1,5 +1,11 @@
#include "kmap_struct.h"

+/* globals */
+struct cell cell_array[4][4];
+struct output out_array[20];
+char semi_final_out[70];
+char final_out[100];
+
void init_kmap(void)
{
int i,j;
26 changes: 26 additions & 0 deletions math/gkmap/files/patch-src_kmap__struct.h
@@ -0,0 +1,26 @@
--- src/kmap_struct.h.orig 2021-11-02 09:33:21 UTC
+++ src/kmap_struct.h
@@ -36,7 +36,7 @@ struct cell
struct cell *left,*right,*down,*up;
char col_string[3], row_string[3];
};
-struct cell cell_array[4][4];
+extern struct cell cell_array[4][4];

struct output
{
@@ -44,10 +44,10 @@ struct output
char cell_num_string[10];
int status;
};
-struct output out_array[20];
-
-char semi_final_out[70];
-char final_out[100];
+extern struct output out_array[20];
+
+extern char semi_final_out[70];
+extern char final_out[100];



0 comments on commit 975c082

Please sign in to comment.