pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc/groff Make build/work on Interix.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3c6678829387
branches:  trunk
changeset: 490512:3c6678829387
user:      tv <tv%pkgsrc.org@localhost>
date:      Mon Mar 14 04:36:52 2005 +0000

description:
Make build/work on Interix.

How ugly: a hypot(near0, near0) can result in a NaN if round-off error
somehow makes the a^2+b^2 result negative.  Work around it with an
"#ifdef __INTERIX"-only fix.

diffstat:

 textproc/groff/Makefile         |   4 +---
 textproc/groff/distinfo         |   3 ++-
 textproc/groff/patches/patch-af |  21 +++++++++++++++++++++
 3 files changed, 24 insertions(+), 4 deletions(-)

diffs (59 lines):

diff -r d1d3204ea9b0 -r 3c6678829387 textproc/groff/Makefile
--- a/textproc/groff/Makefile   Mon Mar 14 04:08:42 2005 +0000
+++ b/textproc/groff/Makefile   Mon Mar 14 04:36:52 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2005/01/18 12:54:59 tv Exp $
+# $NetBSD: Makefile,v 1.23 2005/03/14 04:36:52 tv Exp $
 #
 
 DISTNAME=      groff-1.19.1
@@ -13,8 +13,6 @@
 DEPENDS+=      netpbm>=10.0:../../graphics/netpbm
 DEPENDS+=      psutils>=1.17:../../print/psutils
 
-NOT_FOR_PLATFORM= Interix-*-* # endless loop in build
-
 USE_LANGUAGES=         c c++
 GNU_CONFIGURE=         YES
 USE_PERL5=             YES
diff -r d1d3204ea9b0 -r 3c6678829387 textproc/groff/distinfo
--- a/textproc/groff/distinfo   Mon Mar 14 04:08:42 2005 +0000
+++ b/textproc/groff/distinfo   Mon Mar 14 04:36:52 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.10 2005/02/24 14:48:42 agc Exp $
+$NetBSD: distinfo,v 1.11 2005/03/14 04:36:53 tv Exp $
 
 SHA1 (groff-1.19.1.tar.gz) = 82ba1b29b01c36bf41149ce8813cea712e3e6cbf
 RMD160 (groff-1.19.1.tar.gz) = 6c0732088cbdce3fde2d31f0cd2b149ee5022210
@@ -8,5 +8,6 @@
 SHA1 (patch-ac) = 38f75d8261ca39aff8a37771a283c99ad39142bd
 SHA1 (patch-ad) = 3480c6ebf29aa986cffcf9bba705153e5335224d
 SHA1 (patch-ae) = 18d553fe99ca6915d42de5f6edf74fc56e2fc650
+SHA1 (patch-af) = b7329a5606c5979c3676685b0e3421eb500cf6b8
 SHA1 (patch-ba) = cdafeefbde9490d0ed599a118fd34c06afac0f96
 SHA1 (patch-bb) = ddd9ef807a09eaaf7b09a3c05be3443945c67379
diff -r d1d3204ea9b0 -r 3c6678829387 textproc/groff/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/groff/patches/patch-af   Mon Mar 14 04:36:52 2005 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-af,v 1.3 2005/03/14 04:36:53 tv Exp $
+
+--- src/preproc/pic/object.cpp.orig    Wed Apr  7 11:27:56 2004
++++ src/preproc/pic/object.cpp
+@@ -202,7 +202,15 @@ double operator*(const position &a, cons
+ 
+ double hypot(const position &a)
+ {
+-  return hypot(a.x, a.y);
++  double result = hypot(a.x, a.y);
++
++#ifdef __INTERIX
++  /* prevents an endless loop that pops up particularly on Interix */
++  if (isnan(result) && !isnan(a.x) && !isnan(a.y))
++    return 0.0;
++#endif
++
++  return result;
+ }
+ 
+ struct arrow_head_type {



Home | Main Index | Thread Index | Old Index