freebsd-ports/math/py-numpy/files/fenv.patch
Wen Heping eac732e354 - Update to 1.6.1
PR:		162894
Submitted by:	Gereon Kaiping <kta1c10!gereon@linta.de>
Approved by:	"Li-Lun Leland Wang" <llwang@infor.org> (maintainer)
Feature safe:	yes
2011-12-09 08:01:13 +00:00

66 lines
2.3 KiB
Diff

--- numpy/core/include/numpy/ufuncobject.h.orig 2011-07-20 13:25:27.000000000 -0500
+++ numpy/core/include/numpy/ufuncobject.h 2011-12-07 20:42:53.811178415 -0600
@@ -229,7 +229,11 @@
#if defined(__GLIBC__) || defined(__APPLE__) || \
defined(__MINGW32__) || defined(__FreeBSD__)
+#if defined(__FreeBSD__) && (__FreeBSD_version <= 900009)
+#include "fenv/fenv.c"
+#else
#include <fenv.h>
+#endif
#elif defined(__CYGWIN__)
#include "fenv/fenv.c"
#endif
--- numpy/numarray/_capi.c.orig 2010-11-21 01:34:43.000000000 -0600
+++ numpy/numarray/_capi.c 2011-12-07 20:45:35.038394561 -0600
@@ -10,7 +10,12 @@
#endif
#if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
+#if defined(__FreeBSD__) && (__FreeBSD_version <= 900009)
+#include "numpy/fenv/fenv.h"
+#include "numpy/fenv/fenv.c"
+#else
#include <fenv.h>
+#endif
#elif defined(__CYGWIN__)
#include "numpy/fenv/fenv.h"
#include "numpy/fenv/fenv.c"
--- numpy/core/setupscons.py.orig 2010-11-21 01:34:42.000000000 -0600
+++ numpy/core/setupscons.py 2011-12-07 21:48:34.674089097 -0600
@@ -98,7 +98,7 @@
config.numpy_include_dirs.extend(config.paths('include'))
# Don't install fenv unless we need them.
- if sys.platform == 'cygwin':
+ if sys.platform == 'cygwin' or sys.platform.startswith('freebsd'):
config.add_data_dir('include/numpy/fenv')
config.add_data_dir('tests')
--- numpy/core/setup.py.orig 2011-07-20 13:25:27.000000000 -0500
+++ numpy/core/setup.py 2011-12-07 21:48:51.360904277 -0600
@@ -664,7 +664,7 @@
]
# Don't install fenv unless we need them.
- if sys.platform == 'cygwin':
+ if sys.platform == 'cygwin' or sys.platform.startswith('freebsd'):
config.add_data_dir('include/numpy/fenv')
config.add_extension('_sort',
--- numpy/core/src/npymath/ieee754.c.src.orig 2011-03-10 23:56:15.000000000 -0600
+++ numpy/core/src/npymath/ieee754.c.src 2011-12-07 20:52:14.671971546 -0600
@@ -585,7 +585,11 @@
# if defined(__GLIBC__) || defined(__APPLE__) || \
defined(__MINGW32__) || defined(__FreeBSD__)
-# include <fenv.h>
+# if defined(__FreeBSD__) && (__FreeBSD_version <= 900009)
+# include "numpy/fenv/fenv.h"
+# else
+# include <fenv.h>
+# endif
# elif defined(__CYGWIN__)
# include "fenv/fenv.c"
# endif