From 6408422021f5f3a47c052f3b42589c15ac644a3c Mon Sep 17 00:00:00 2001
From: Pav Lucistnik <pav@FreeBSD.org>
Date: Tue, 30 Aug 2005 18:52:04 +0000
Subject: - Use rint() instead of round() on FreeBSD 4.X

Suggested by:	vs
---
 graphics/gthumb/Makefile                     |  2 +-
 graphics/gthumb/files/extra-patch-round.diff | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 graphics/gthumb/files/extra-patch-round.diff

(limited to 'graphics')

diff --git a/graphics/gthumb/Makefile b/graphics/gthumb/Makefile
index f97036d60659..6185ac65d9ec 100644
--- a/graphics/gthumb/Makefile
+++ b/graphics/gthumb/Makefile
@@ -38,7 +38,7 @@ LIB_DEPENDS+=	gphoto2.2:${PORTSDIR}/graphics/libgphoto2
 .endif
 
 .if ${OSVERSION} < 500000
-BROKEN=		"does not compile, requires round() in libm"
+EXTRA_PATCHES=	${FILESDIR}/extra-patch-round.diff
 .endif
 
 .include <bsd.port.post.mk>
diff --git a/graphics/gthumb/files/extra-patch-round.diff b/graphics/gthumb/files/extra-patch-round.diff
new file mode 100644
index 000000000000..8a6030a16c29
--- /dev/null
+++ b/graphics/gthumb/files/extra-patch-round.diff
@@ -0,0 +1,20 @@
+--- src/dlg-scale-image.c.orig	Tue Aug 30 15:32:36 2005
++++ src/dlg-scale-image.c	Tue Aug 30 20:34:34 2005
+@@ -182,7 +182,7 @@
+ 						 w_spinbutton_value_changed,
+ 						 data);
+ 
+-		gtk_spin_button_set_value (GTK_SPIN_BUTTON (data->s_new_width_spinbutton), round (width));
++		gtk_spin_button_set_value (GTK_SPIN_BUTTON (data->s_new_width_spinbutton), rint (width));
+ 		
+ 		g_signal_handlers_unblock_by_func (data->s_new_width_spinbutton,
+ 						   w_spinbutton_value_changed,
+@@ -215,7 +215,7 @@
+ 						 h_spinbutton_value_changed,
+ 						 data);
+ 
+-		gtk_spin_button_set_value (GTK_SPIN_BUTTON (data->s_new_height_spinbutton), round (height));
++		gtk_spin_button_set_value (GTK_SPIN_BUTTON (data->s_new_height_spinbutton), rint (height));
+ 
+ 		g_signal_handlers_unblock_by_func (data->s_new_height_spinbutton,
+ 						   h_spinbutton_value_changed,
-- 
cgit debian/1.2.3+git2.25.1-1-2-gaceb0