commit: 8e4a31551c1ab5081d8f0a3f5684549eea0de6ce Author: David Seifert <soap <AT> gentoo <DOT> org> AuthorDate: Thu Jan 11 10:34:51 2018 +0000 Commit: David Seifert <soap <AT> gentoo <DOT> org> CommitDate: Thu Jan 11 10:35:42 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e4a3155
x11-libs/gtkmathview: Fix building with GCC 7 Closes: https://bugs.gentoo.org/639448 Package-Manager: Portage-2.3.19, Repoman-2.3.6 .../gtkmathview/files/gtkmathview-0.8.0-gcc7.patch | 22 ++++++++++++++++++++++ x11-libs/gtkmathview/gtkmathview-0.8.0-r3.ebuild | 4 +++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/x11-libs/gtkmathview/files/gtkmathview-0.8.0-gcc7.patch b/x11-libs/gtkmathview/files/gtkmathview-0.8.0-gcc7.patch new file mode 100644 index 00000000000..917f41bc288 --- /dev/null +++ b/x11-libs/gtkmathview/files/gtkmathview-0.8.0-gcc7.patch @@ -0,0 +1,22 @@ +Patch from FreeBSD + +--- a/src/widget/gtkmathview_common.cc ++++ b/src/widget/gtkmathview_common.cc +@@ -909,7 +909,7 @@ gtk_math_view_button_release_event(GtkWi + math_view->select_state == SELECT_STATE_NO && + fabs(math_view->button_press_x - event->x) <= CLICK_SPACE_RANGE && + fabs(math_view->button_press_y - event->y) <= CLICK_SPACE_RANGE && +- abs(math_view->button_press_time - event->time) <= CLICK_TIME_RANGE) ++ abs((long)math_view->button_press_time - (long)event->time) <= CLICK_TIME_RANGE) + { + // the mouse should have not moved more than one pixel in each direction + // and the time elapsed from the press event should be no more than 250ms +@@ -969,7 +969,7 @@ gtk_math_view_motion_notify_event(GtkWid + (math_view->select_state == SELECT_STATE_YES || + fabs(math_view->button_press_x - x) > CLICK_SPACE_RANGE || + fabs(math_view->button_press_y - y) > CLICK_SPACE_RANGE || +- abs(math_view->button_press_time - event->time) > CLICK_TIME_RANGE)) ++ abs((long)math_view->button_press_time - (long)event->time) > CLICK_TIME_RANGE)) + { + if (math_view->select_state == SELECT_STATE_NO) + { diff --git a/x11-libs/gtkmathview/gtkmathview-0.8.0-r3.ebuild b/x11-libs/gtkmathview/gtkmathview-0.8.0-r3.ebuild index 07ae521431c..1e4f1c3bf83 100644 --- a/x11-libs/gtkmathview/gtkmathview-0.8.0-r3.ebuild +++ b/x11-libs/gtkmathview/gtkmathview-0.8.0-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -44,6 +44,8 @@ PATCHES=( "${FILESDIR}"/${P}-underlinking.patch "${FILESDIR}"/${P}-gcc47.patch "${FILESDIR}"/${P}-gcc6.patch + # Fix building against GCC 7, bug #639448 + "${FILESDIR}"/${P}-gcc7.patch ) src_prepare() {
