diff --git a/games/cpat/Makefile b/games/cpat/Makefile index e426dcb9f32..d323e9b70d3 100644 --- a/games/cpat/Makefile +++ b/games/cpat/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.5 2019/07/12 20:46:16 sthen Exp $ +# $OpenBSD: Makefile,v 1.6 2021/01/31 04:02:52 bcallah Exp $ COMMENT = curses-based solitaire collection suite DISTNAME = cpat-1.4.1 CATEGORIES = games -REVISION = 0 +REVISION = 1 HOMEPAGE = http://cpat.sourceforge.net/ diff --git a/games/cpat/patches/patch-src_common_c b/games/cpat/patches/patch-src_common_c new file mode 100644 index 00000000000..fa631919815 --- /dev/null +++ b/games/cpat/patches/patch-src_common_c @@ -0,0 +1,18 @@ +$OpenBSD: patch-src_common_c,v 1.1 2021/01/31 04:02:52 bcallah Exp $ + +Fix -fno-common + +Index: src/common.c +--- src/common.c.orig ++++ src/common.c +@@ -14,6 +14,10 @@ + #include "common.h" + #include "document.h" + ++struct timespec pauselength; ++struct timespec pauseleft; ++HighScores hs; ++ + /* Creates empty board windows. Needs to be called once at the + * beginning of each game */ + int diff --git a/games/cpat/patches/patch-src_cpat_h b/games/cpat/patches/patch-src_cpat_h new file mode 100644 index 00000000000..4753384e3cd --- /dev/null +++ b/games/cpat/patches/patch-src_cpat_h @@ -0,0 +1,21 @@ +$OpenBSD: patch-src_cpat_h,v 1.1 2021/01/31 04:02:52 bcallah Exp $ + +Fix -fno-common + +Index: src/cpat.h +--- src/cpat.h.orig ++++ src/cpat.h +@@ -224,10 +224,10 @@ typedef struct { + bool available; + } HighScores; + +-struct timespec pauselength; +-struct timespec pauseleft; ++extern struct timespec pauselength; ++extern struct timespec pauseleft; + +-HighScores hs; ++extern HighScores hs; + + /* This is the background color of the boards */ + static chtype boardbkgd = ' ' | COLOR_PAIR(BKGD_COLOR);