Subject: [alpine-aports] [PATCH] main/aspell: fix build with gcc8

From: alpine-mips-patches <[email-masked]>
Date: Tue, 16 Nov 2018 00:04:11 +0000

This pulls upstream commit that fixes the real bug in the code.

Details are at http://github.com/GNUAspell/aspell/issues/519
---
 .../aspell/0001-Compile-Fixes-for-GCC-7.patch | 40 +++++++++++++++++++
 main/aspell/APKBUILD                          | 11 ++---
 2 files changed, 46 insertions(+), 5 deletions(-)
 create mode 100644 main/aspell/0001-Compile-Fixes-for-GCC-7.patch

diff --git a/main/aspell/0001-Compile-Fixes-for-GCC-7.patch b/main/aspell/0001-Compile-Fixes-for-GCC-7.patch
new file mode 100644
index 0000000000..892ce1136b
--- /dev/null
+++ b/main/aspell/0001-Compile-Fixes-for-GCC-7.patch
@@ -0,0 +1,40 @@
+From 8089fa02122fed0a6394eba14bbedcb1d18e2384 Mon Sep 17 00:00:00 2001
+From: Kevin Atkinson <[email-masked]>
+Date: Thu, 29 Dec 2016 00:50:31 -0500
+Subject: [PATCH] Compile Fixes for GCC 7.
+
+Closes #519.
+---
+ modules/filter/tex.cpp | 2 +-
+ prog/check_funs.cpp    | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/modules/filter/tex.cpp b/modules/filter/tex.cpp
+index a979539..19ab63c 100644
+--- a/modules/filter/tex.cpp
++++ b/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/prog/check_funs.cpp b/prog/check_funs.cpp
+index db54f3d..89ee09d 100644
+--- a/prog/check_funs.cpp
++++ b/prog/check_funs.cpp
+@@ -647,7 +647,7 @@ static void print_truncate(FILE * out, const char * word, int width) {
+     }
+   }
+   if (i == width-1) {
+-    if (word == '\0')
++    if (*word == '\0')
+       put(out,' ');
+     else if (word[len] == '\0')
+       put(out, word, len);
+-- 
+2.19.1
+
diff --git a/main/aspell/APKBUILD b/main/aspell/APKBUILD
index 7fe214a495..208b251e7e 100644
--- a/main/aspell/APKBUILD
+++ b/main/aspell/APKBUILD
@@ -2,7 +2,7 @@
 # Contributor: Valery Kartel <[email-masked]>
 pkgname=aspell
 pkgver=0.60.6.1
-pkgrel=12
+pkgrel=13
 pkgdesc="A spell checker designed to eventually replace Ispell"
 url="http://aspell.net/"
 arch="all"
@@ -13,7 +13,9 @@ depends=
 depends_dev="$pkgname-utils"
 makedepends="ncurses-dev perl gettext-dev"
 install=
-source="ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz"
+source="ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz
+	0001-Compile-Fixes-for-GCC-7.patch
+	"
 builddir="$srcdir"/$pkgname-$pkgver
 
 prepare() {
@@ -67,6 +69,5 @@ libs() {
 	rm -fr "$pkgdir"/usr/lib
 }
 
-md5sums="e66a9c9af6a60dc46134fdacf6ce97d7  aspell-0.60.6.1.tar.gz"
-sha256sums="f52583a83a63633701c5f71db3dc40aab87b7f76b29723aeb27941eff42df6e1  aspell-0.60.6.1.tar.gz"
-sha512sums="f310c7590be98406589b5c26ca36a2ecfe4733f0b40fd6c176b96b7955ef2b5cd0ec9a3d770cf132146ae7a896042b4b698945112995ee1ae66adcfa5542247f  aspell-0.60.6.1.tar.gz"
+sha512sums="f310c7590be98406589b5c26ca36a2ecfe4733f0b40fd6c176b96b7955ef2b5cd0ec9a3d770cf132146ae7a896042b4b698945112995ee1ae66adcfa5542247f  aspell-0.60.6.1.tar.gz
+05875eca05d3b5ba9b7577f193fd8b0a2a372b4392f7a7901aee250bacbde924622e27278dc50582be684ed5d289968a98ee70ae0d9f6cb44a50ed454805c58a  0001-Compile-Fixes-for-GCC-7.patch"
-- 
2.19.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---