Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Feb 2006 11:02:45 +0100 (CET)
From:      "Frank W. Josellis" <frank@dynamical-systems.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/93520: Patch for astro/libnova to relieve gcc33 dependency 
Message-ID:  <200602181002.k1IA2jvS010543@pollux.senax.net>
Resent-Message-ID: <200602181010.k1IAA4tK000283@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         93520
>Category:       ports
>Synopsis:       Patch for astro/libnova to relieve gcc33 dependency
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 18 10:10:04 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Frank W. Josellis
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD pollux.senax.net 5.4-STABLE FreeBSD 5.4-STABLE #4: Thu Jan 26 16:06:41 CET 2006 root@pollux.senax.net:/usr/obj/usr/src/sys/POLLUX i386


>Description:
Currently the port requires gcc33 to build, apparently because of a double
occurrence of the nan() function call. This function is a GNU extension
(conforming to C99) which came builtin with gcc33 and is otherwise not 
available on FreeBSD. However, according to the GNU documentation, calling 
`nan("chars")` is equivalent to `strtod("NAN(chars)", NULL)`. The latter 
form is acceptable for FreeBSD and the patch below thus simply provides a 
substitution of equivalent expressions.  

Please note that the patch would add the following file:
files/patch-src_hyperbolic_motion.c

>How-To-Repeat:
	
>Fix:

--- libnova.patch begins here ---
diff -Nur libnova.BAK/Makefile libnova/Makefile
--- libnova.BAK/Makefile	Mon Nov 28 21:04:52 2005
+++ libnova/Makefile	Sat Feb 18 09:05:20 2006
@@ -8,6 +8,7 @@
 
 PORTNAME=	libnova
 PORTVERSION=	0.11.0
+PORTREVISION=	1
 CATEGORIES=	astro
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
@@ -19,7 +20,6 @@
 USE_REINPLACE=	yes
 USE_AUTOTOOLS=	libtool:15
 INSTALLS_SHLIB=	yes
-USE_GCC=	3.3
 
 .include <bsd.port.pre.mk>
 
diff -Nur libnova.BAK/files/patch-src_hyperbolic_motion.c libnova/files/patch-src_hyperbolic_motion.c
--- libnova.BAK/files/patch-src_hyperbolic_motion.c	Thu Jan  1 01:00:00 1970
+++ libnova/files/patch-src_hyperbolic_motion.c	Sat Feb 18 09:05:20 2006
@@ -0,0 +1,17 @@
+--- src/hyperbolic_motion.c.orig	Tue Jul  5 11:09:22 2005
++++ src/hyperbolic_motion.c	Sat Feb 18 02:17:12 2006
+@@ -69,12 +69,12 @@
+                 F = Z1 * G1;
+                 Q3 = Q3 + F;
+                 if (Z > 100 || fabs(F) > 10000)
+-                        return nan("0");
++                        return strtod("NAN(0)", NULL);
+                 if (fabs(F) > PREC)
+                         goto next_z;
+                 L++;
+                 if (L > 100)
+-                        return nan("0");
++                        return strtod("NAN(0)", NULL);
+                 do
+                 {
+                         S1 = S;
--- libnova.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602181002.k1IA2jvS010543>