Friday, January 29, 2021

Fix cad/gerbv -fno-common

Index: Makefile
===================================================================
RCS file: /cvs/ports/cad/gerbv/Makefile,v
retrieving revision 1.39
diff -u -p -r1.39 Makefile
--- Makefile 16 Nov 2020 20:34:39 -0000 1.39
+++ Makefile 29 Jan 2021 20:51:48 -0000
@@ -2,6 +2,7 @@

COMMENT= viewer for Gerber (RS-274X) files
DISTNAME= gerbv-2.7.0
+REVISION= 0
CATEGORIES= cad graphics

HOMEPAGE= http://gerbv.geda-project.org/
Index: patches/patch-src_callbacks_h
===================================================================
RCS file: patches/patch-src_callbacks_h
diff -N patches/patch-src_callbacks_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_callbacks_h 29 Jan 2021 20:51:48 -0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+
+From https://sources.debian.org/patches/gerbv/2.7.0-2/fixes/gcc10-extern.patch/
+
+Index: src/callbacks.h
+--- src/callbacks.h.orig
++++ src/callbacks.h
+@@ -26,7 +26,7 @@
+ \ingroup gerbv
+ */
+
+-enum {
++extern enum {
+ CALLBACKS_SAVE_PROJECT_AS,
+ CALLBACKS_SAVE_FILE_PS,
+ CALLBACKS_SAVE_FILE_PDF,
+@@ -43,7 +43,7 @@ enum {
+
+ } CALLBACKS_SAVE_FILE_TYPE;
+
+-enum {
++extern enum {
+ LAYER_SELECTED = -1,
+ LAYER_ALL_ON = -2,
+ LAYER_ALL_OFF = -3,
Hello ports --

Attached is a patch to fix cad/gerbv for -fno-common.
It is taken from Debian:
https://sources.debian.org/patches/gerbv/2.7.0-2/fixes/gcc10-extern.patch/

As it appears upstream is inactive.

OK?

~Brian

No comments:

Post a Comment