1 |
commit: 6777c2a8d02373238566c8268c3d3acc5904837b |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 8 11:28:01 2017 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 8 11:29:07 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6777c2a8 |
7 |
|
8 |
sys-apps/diffutils: Added gcc-7 build fix (bug #617538). |
9 |
|
10 |
Thanks to lekto for providing a patch in GH PR #4553. |
11 |
|
12 |
Closes: https://github.com/gentoo/gentoo/pull/4553 |
13 |
Package-Manager: Portage-2.3.5, Repoman-2.3.2 |
14 |
|
15 |
sys-apps/diffutils/diffutils-3.5.ebuild | 18 ++++++++++++++---- |
16 |
.../diffutils/files/diffutils-3.5-fix_macros.patch | 19 +++++++++++++++++++ |
17 |
2 files changed, 33 insertions(+), 4 deletions(-) |
18 |
|
19 |
diff --git a/sys-apps/diffutils/diffutils-3.5.ebuild b/sys-apps/diffutils/diffutils-3.5.ebuild |
20 |
index da215965bb0..426af27f7e9 100644 |
21 |
--- a/sys-apps/diffutils/diffutils-3.5.ebuild |
22 |
+++ b/sys-apps/diffutils/diffutils-3.5.ebuild |
23 |
@@ -20,17 +20,27 @@ DEPEND="app-arch/xz-utils |
24 |
|
25 |
DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) |
26 |
|
27 |
+PATCHES=( |
28 |
+ "${FILESDIR}/${P}-fix_macros.patch" |
29 |
+) |
30 |
+ |
31 |
+src_prepare() { |
32 |
+ epatch "${PATCHES[@]}" |
33 |
+} |
34 |
+ |
35 |
src_configure() { |
36 |
use static && append-ldflags -static |
37 |
|
38 |
# Disable automagic dependency over libsigsegv; see bug #312351. |
39 |
export ac_cv_libsigsegv=no |
40 |
|
41 |
- econf \ |
42 |
- --with-packager="Gentoo" \ |
43 |
- --with-packager-version="${PVR}" \ |
44 |
- --with-packager-bug-reports="https://bugs.gentoo.org/" \ |
45 |
+ local myeconfargs=( |
46 |
+ --with-packager="Gentoo" |
47 |
+ --with-packager-version="${PVR}" |
48 |
+ --with-packager-bug-reports="https://bugs.gentoo.org/" |
49 |
$(use_enable nls) |
50 |
+ ) |
51 |
+ econf "${myeconfargs[@]}" |
52 |
} |
53 |
|
54 |
src_test() { |
55 |
|
56 |
diff --git a/sys-apps/diffutils/files/diffutils-3.5-fix_macros.patch b/sys-apps/diffutils/files/diffutils-3.5-fix_macros.patch |
57 |
new file mode 100644 |
58 |
index 00000000000..ae820fc372c |
59 |
--- /dev/null |
60 |
+++ b/sys-apps/diffutils/files/diffutils-3.5-fix_macros.patch |
61 |
@@ -0,0 +1,19 @@ |
62 |
+http://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/intprops.h?id=175b4e22f99e00996b72f822f5ae54dca8243d19 |
63 |
+ |
64 |
+--- diffutils-3.5/lib/intprops.h |
65 |
++++ diffutils-3.5/lib/intprops.h |
66 |
+@@ -230,11 +230,11 @@ |
67 |
+ (e.g., A and B) have the same type as MIN and MAX. Instead, they assume |
68 |
+ that the result (e.g., A + B) has that type. */ |
69 |
+ #if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL |
70 |
+-# define _GL_ADD_OVERFLOW(a, b, min, max) |
71 |
++# define _GL_ADD_OVERFLOW(a, b, min, max) \ |
72 |
+ __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0) |
73 |
+-# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) |
74 |
++# define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ |
75 |
+ __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0) |
76 |
+-# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) |
77 |
++# define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ |
78 |
+ __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0) |
79 |
+ #else |
80 |
+ # define _GL_ADD_OVERFLOW(a, b, min, max) \ |