From 4a9b97775cace98d4faa54d54383d7805a77c7a3 Mon Sep 17 00:00:00 2001 From: bsiegert Date: Sun, 8 Nov 2015 08:41:48 +0000 Subject: Pullup ticket #4851 - requested by he x11/gtk3: build fix Revisions pulled up: - x11/gtk3/Makefile 1.70 - x11/gtk3/distinfo 1.32 - x11/gtk3/patches/patch-gtk_fallback-c89.c 1.1 --- Module Name: pkgsrc Committed By: he Date: Sat Nov 7 15:49:38 UTC 2015 Modified Files: pkgsrc/x11/gtk3: Makefile distinfo Log Message: Improve compatibility with systems which lack either round(), rint() or nearbyint(), but might still have them declared in . Bump PKGREVISION. --- Module Name: pkgsrc Committed By: he Date: Sat Nov 7 15:51:40 UTC 2015 Added Files: pkgsrc/x11/gtk3/patches: patch-gtk_fallback-c89.c Log Message: Improve compatibility with systems which lack either round(), rint() or nearbyint(), but might still have them declared in . Bump PKGREVISION. --- x11/gtk3/Makefile | 3 +- x11/gtk3/distinfo | 3 +- x11/gtk3/patches/patch-gtk_fallback-c89.c | 49 +++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 x11/gtk3/patches/patch-gtk_fallback-c89.c (limited to 'x11') diff --git a/x11/gtk3/Makefile b/x11/gtk3/Makefile index 74023f9fcfc..6f30d7bada6 100644 --- a/x11/gtk3/Makefile +++ b/x11/gtk3/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.69 2015/08/22 12:08:52 prlw1 Exp $ +# $NetBSD: Makefile,v 1.69.2.1 2015/11/08 08:41:48 bsiegert Exp $ DISTNAME= gtk+-3.16.6 PKGNAME= ${DISTNAME:S/gtk/gtk3/} +PKGREVISION= 1 CATEGORIES= x11 gnome MASTER_SITES= ftp://ftp.gtk.org/pub/gtk/${PKGVERSION_NOREV:R}/ \ ${MASTER_SITE_GNOME:=sources/gtk+/${PKGVERSION_NOREV:R}/} diff --git a/x11/gtk3/distinfo b/x11/gtk3/distinfo index 7078f6d5c56..f215dc4c069 100644 --- a/x11/gtk3/distinfo +++ b/x11/gtk3/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.30 2015/08/22 12:08:52 prlw1 Exp $ +$NetBSD: distinfo,v 1.30.2.1 2015/11/08 08:41:48 bsiegert Exp $ SHA1 (gtk+-3.16.6.tar.xz) = 1f1acf9f54598abc1ee245bd75810ec8ee63ec5c RMD160 (gtk+-3.16.6.tar.xz) = 225edcba11f04afbe4bfd3437f7d334937e09b9d @@ -9,3 +9,4 @@ SHA1 (patch-configure) = 1dca87c6a85ee927b85d4edc14b0985c5130c0d9 SHA1 (patch-configure.ac) = 68793f40752f25ccaecc958c72c23a504670bea5 SHA1 (patch-gdk_x11_gdkwindow-x11.h) = c80f7c9d5a570817e54fd74fa903a53400dc6f64 SHA1 (patch-gtk_a11y_gtkaccessibility.c) = 13232c85bd570f21ea03153dacde4ca98c7c76a8 +SHA1 (patch-gtk_fallback-c89.c) = f9cdcf3e6e1bc05913da1f933c95eabcfea70494 diff --git a/x11/gtk3/patches/patch-gtk_fallback-c89.c b/x11/gtk3/patches/patch-gtk_fallback-c89.c new file mode 100644 index 00000000000..2468fc4382c --- /dev/null +++ b/x11/gtk3/patches/patch-gtk_fallback-c89.c @@ -0,0 +1,49 @@ +$NetBSD: patch-gtk_fallback-c89.c,v 1.2.2.2 2015/11/08 08:41:49 bsiegert Exp $ + +Work around the fact that math.h may declare these functions +non-static. + +--- gtk/fallback-c89.c.orig 2014-03-06 04:42:58.000000000 +0000 ++++ gtk/fallback-c89.c +@@ -22,19 +22,20 @@ + /* Workaround for round() for non-GCC/non-C99 compilers */ + #ifndef HAVE_ROUND + static inline double +-round (double x) ++my_round (double x) + { + if (x >= 0) + return floor (x + 0.5); + else + return ceil (x - 0.5); + } ++#define round(x) my_round(x) + #endif + + /* Workaround for rint() for non-GCC/non-C99 compilers */ + #ifndef HAVE_RINT + static inline double +-rint (double x) ++my_rint (double x) + { + if (ceil (x + 0.5) == floor (x + 0.5)) + { +@@ -53,6 +54,7 @@ rint (double x) + return ceil (x - 0.5); + } + } ++#define rint(x) my_rint(x) + #endif + + #ifndef HAVE_NEARBYINT +@@ -60,8 +62,9 @@ rint (double x) + /* This is quite similar to rint() in most respects */ + + static inline double +-nearbyint (double x) ++my_nearbyint (double x) + { + return floor (x + 0.5); + } ++#define nearbyint(x) my_nearbyint(x) + #endif -- cgit v1.2.3