From 1fe5e104de7f7ed2f0e7a9810417eaec1ce78810 Mon Sep 17 00:00:00 2001 From: naddy Date: Sat, 7 Apr 2018 22:50:15 +0000 Subject: [PATCH] Fix compilation with clang 6, from upstream. --- textproc/aspell/core/Makefile | 4 ++-- .../core/patches/patch-modules_filter_tex_cpp | 17 +++++++++++++++++ .../core/patches/patch-prog_check_funs_cpp | 17 +++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 textproc/aspell/core/patches/patch-modules_filter_tex_cpp create mode 100644 textproc/aspell/core/patches/patch-prog_check_funs_cpp diff --git a/textproc/aspell/core/Makefile b/textproc/aspell/core/Makefile index baea723ac29..8db161a90a7 100644 --- a/textproc/aspell/core/Makefile +++ b/textproc/aspell/core/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.40 2017/07/26 22:45:30 sthen Exp $ +# $OpenBSD: Makefile,v 1.41 2018/04/07 22:50:15 naddy Exp $ COMMENT= spell checker designed to eventually replace Ispell DISTNAME= aspell-0.60.6.1 -REVISION= 5 +REVISION= 6 SHARED_LIBS += aspell 17.0 # .16.4 SHARED_LIBS += pspell 17.0 # .16.4 DIST_SUBDIR= aspell diff --git a/textproc/aspell/core/patches/patch-modules_filter_tex_cpp b/textproc/aspell/core/patches/patch-modules_filter_tex_cpp new file mode 100644 index 00000000000..cb955840f27 --- /dev/null +++ b/textproc/aspell/core/patches/patch-modules_filter_tex_cpp @@ -0,0 +1,17 @@ +$OpenBSD: patch-modules_filter_tex_cpp,v 1.1 2018/04/07 22:50:15 naddy Exp $ + +Fix compilation with clang 6. +https://git.savannah.gnu.org/cgit/aspell.git/patch/?id=8089fa02122fed0a6394eba14bbedcb1d18e2384 + +Index: modules/filter/tex.cpp +--- modules/filter/tex.cpp.orig ++++ modules/filter/tex.cpp +@@ -174,7 +174,7 @@ namespace { + + if (c == '{') { + +- if (top.in_what == Parm || top.in_what == Opt || top.do_check == '\0') ++ if (top.in_what == Parm || top.in_what == Opt || *top.do_check == '\0') + push_command(Parm); + + top.in_what = Parm; diff --git a/textproc/aspell/core/patches/patch-prog_check_funs_cpp b/textproc/aspell/core/patches/patch-prog_check_funs_cpp new file mode 100644 index 00000000000..332696ecfc9 --- /dev/null +++ b/textproc/aspell/core/patches/patch-prog_check_funs_cpp @@ -0,0 +1,17 @@ +$OpenBSD: patch-prog_check_funs_cpp,v 1.1 2018/04/07 22:50:15 naddy Exp $ + +Fix compilation with clang 6. +https://git.savannah.gnu.org/cgit/aspell.git/patch/?id=8089fa02122fed0a6394eba14bbedcb1d18e2384 + +Index: prog/check_funs.cpp +--- prog/check_funs.cpp.orig ++++ prog/check_funs.cpp +@@ -647,7 +647,7 @@ static void print_truncate(FILE * out, const char * wo + } + } + if (i == width-1) { +- if (word == '\0') ++ if (*word == '\0') + put(out,' '); + else if (word[len] == '\0') + put(out, word, len);