aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorinfo@mobile-stream.com <info@mobile-stream.com>2018-11-26 22:05:43 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2018-11-30 08:13:40 +0000
commita9d426237207d9e9dbce57df2430b0b8b69129e2 (patch)
tree4d78aa5441529045af29e58cc00b30a2ce9dfedc
parent51978afa8a1151a013383d4dfe8297e90c29ff31 (diff)
downloadaports-a9d426237207d9e9dbce57df2430b0b8b69129e2.tar.gz
aports-a9d426237207d9e9dbce57df2430b0b8b69129e2.tar.bz2
aports-a9d426237207d9e9dbce57df2430b0b8b69129e2.tar.xz
main/gnats: fix build with gcc8 (-Werror too strict)
gcc8 reports one meaningful -Wpointer-compare (mail.c) bug and a pair of harmless -Wimplicit-fallthrough (misc.c, regex.c) cases. The mail.c patch could be replaced with -Wno-error=pointer-compare if the code behaviour change is too risky (upstream seems dead).
-rw-r--r--main/gnats/APKBUILD11
-rw-r--r--main/gnats/gnats-gcc8.patch31
2 files changed, 37 insertions, 5 deletions
diff --git a/main/gnats/APKBUILD b/main/gnats/APKBUILD
index a0feb2d052..962db0e6eb 100644
--- a/main/gnats/APKBUILD
+++ b/main/gnats/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gnats
pkgver=4.2.0
-pkgrel=3
+pkgrel=4
pkgdesc="The GNU Bug Tracking System"
url="https://www.gnu.org/software/gnats/"
arch="all"
@@ -9,7 +9,9 @@ license="GPL-3.0"
depends="postfix"
makedepends="texinfo"
install=
-source="https://ftp.gnu.org/pub/gnu/$pkgname/$pkgname-$pkgver.tar.gz"
+source="https://ftp.gnu.org/pub/gnu/$pkgname/$pkgname-$pkgver.tar.gz
+ gnats-gcc8.patch
+ "
subpackages="$pkgname-doc"
pkgusers="gnats"
pkggroups="gnats"
@@ -35,6 +37,5 @@ package() {
rm -f "$pkgdir"/gnats.el
}
-md5sums="b2fb3bbaea6688b8341769569f4a6e70 gnats-4.2.0.tar.gz"
-sha256sums="54e3f4eb5e6ceaec3f9579332e5ff492ce743f763b9c9cdd7ad72fe9cc2b142d gnats-4.2.0.tar.gz"
-sha512sums="650faa87206889912e27a27daba4c86292fac90250a88e7e6272cc8488fc19dfd6098bdd450553cd6c2c1d446072a8da9395f1ce7b1cd284596994ce53744152 gnats-4.2.0.tar.gz"
+sha512sums="650faa87206889912e27a27daba4c86292fac90250a88e7e6272cc8488fc19dfd6098bdd450553cd6c2c1d446072a8da9395f1ce7b1cd284596994ce53744152 gnats-4.2.0.tar.gz
+616882229b0b0bfb26ed23fcf63c8888c51575eb92b82c19fe9d25128e8f5a20e6b52ed80ecff2ec4405c1c37e24268bab7fa7c068d2df47641d8e5b06d2895a gnats-gcc8.patch"
diff --git a/main/gnats/gnats-gcc8.patch b/main/gnats/gnats-gcc8.patch
new file mode 100644
index 0000000000..c832c72771
--- /dev/null
+++ b/main/gnats/gnats-gcc8.patch
@@ -0,0 +1,31 @@
+--- a/gnats/mail.c
++++ b/gnats/mail.c
+@@ -67,7 +67,7 @@
+ if (res != NULL)
+ {
+ if (res->admFields[ResponsibleAdmAlias] == NULL ||
+- res->admFields[ResponsibleAdmAlias] == '\0')
++ *res->admFields[ResponsibleAdmAlias] == '\0')
+ {
+ if (res->admFields[ResponsibleAdmAlias] != NULL)
+ {
+--- a/gnats/misc.c
++++ b/gnats/misc.c
+@@ -108,6 +108,7 @@
+ fprintf (gnats_logfile, "%s", buf);
+ break;
+ }
++ /* fallthrough */
+ /* No log file, log to stderr. */
+ case STDERR:
+ fprintf (stderr, "%s", buf);
+--- a/gnats/regex.c
++++ b/gnats/regex.c
+@@ -2310,6 +2310,7 @@
+ if ((syntax & RE_BK_PLUS_QM)
+ || (syntax & RE_LIMITED_OPS))
+ goto normal_char;
++ /* fallthrough */
+ handle_plus:
+ case '*':
+ /* If there is no previous pattern... */