From jylefort@brutele.be  Fri Sep 16 18:08:10 2005
Return-Path: <jylefort@brutele.be>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 3090E16A420
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 16 Sep 2005 18:08:10 +0000 (GMT)
	(envelope-from jylefort@brutele.be)
Received: from 212.68.242.136.brutele.be (212.68.242.136.brutele.be [212.68.242.136])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 4D2D043D53
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 16 Sep 2005 18:08:09 +0000 (GMT)
	(envelope-from jylefort@brutele.be)
Received: from jsite.lefort.net (jsite.lefort.net [192.168.1.2])
	by gateway.lefort.net (Postfix) with ESMTP id 77152556B
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 16 Sep 2005 20:08:07 +0200 (CEST)
Received: by jsite.lefort.net (Postfix, from userid 1000)
	id 12220C78D; Fri, 16 Sep 2005 20:08:07 +0200 (CEST)
Message-Id: <20050916180807.12220C78D@jsite.lefort.net>
Date: Fri, 16 Sep 2005 20:08:07 +0200 (CEST)
From: Jean-Yves Lefort <jylefort@FreeBSD.org>
Reply-To: Jean-Yves Lefort <jylefort@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: games/flightgear: ignore SIGFPE
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         86220
>Category:       ports
>Synopsis:       games/flightgear: ignore SIGFPE
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    des
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Sep 16 18:10:13 GMT 2005
>Closed-Date:    Mon Oct 03 17:15:45 GMT 2005
>Last-Modified:  Mon Oct 03 17:15:45 GMT 2005
>Originator:     Jean-Yves Lefort
>Release:        FreeBSD 5.4-RELEASE i386
>Organization:
>Environment:
System: FreeBSD jsite.lefort.net 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Wed Jul 27 11:27:58 CEST 2005 jylefort@jsite.lefort.net:/usr/obj/usr/src/sys/JSITE i386
>Description:
Flightgear often crashes because it triggers a floating point
exception in the nvidia GL library. The problem can be worked around
by ignoring SIGFPE.
>How-To-Repeat:
>Fix:
diff -ruN /usr/ports/games/flightgear/Makefile flightgear/Makefile
--- /usr/ports/games/flightgear/Makefile	Thu Sep 15 01:29:14 2005
+++ flightgear/Makefile	Thu Sep 15 20:51:49 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	FlightGear
 PORTVERSION=	0.9.8
+PORTREVISION=	1
 CATEGORIES=	games
 MASTER_SITES=	ftp://ftp.flightgear.org/pub/fgfs/Source/ \
 		ftp://ftp.de.flightgear.org/pub/fgfs/Source/
diff -ruN /usr/ports/games/flightgear/files/patch-src_Main_bootstrap.cxx flightgear/files/patch-src_Main_bootstrap.cxx
--- /usr/ports/games/flightgear/files/patch-src_Main_bootstrap.cxx	Thu Jan  1 01:00:00 1970
+++ flightgear/files/patch-src_Main_bootstrap.cxx	Thu Sep 15 20:51:34 2005
@@ -0,0 +1,20 @@
+--- src/Main/bootstrap.cxx.orig	Thu Sep 15 20:48:39 2005
++++ src/Main/bootstrap.cxx	Thu Sep 15 20:51:05 2005
+@@ -28,6 +28,8 @@
+ #if defined(__linux__) && defined(__i386__)
+ #  include <fpu_control.h>
+ #  include <signal.h>
++#elif defined(__FreeBSD__)
++#  include <signal.h>
+ #endif
+ 
+ #include <stdlib.h>
+@@ -144,6 +146,8 @@
+     // Enable floating-point exceptions for Linux/x86
+ #if defined(__linux__) && defined(__i386__)
+     initFPE();
++#elif defined(__FreeBSD__)
++    signal(SIGFPE, SIG_IGN);
+ #endif
+ 
+ #if defined(sgi)
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->des 
Responsible-Changed-By: pav 
Responsible-Changed-When: Fri Sep 16 19:22:04 GMT 2005 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=86220 
State-Changed-From-To: open->closed 
State-Changed-By: jylefort 
State-Changed-When: Mon Oct 3 17:15:41 GMT 2005 
State-Changed-Why:  
Committed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=86220 
>Unformatted:
