[packages] dosfstools: update to 3.0.9
[openwrt/svn-archive/archive.git] / lang / numpy / patches / 100-compile.patch
1 diff -urN numpy-1.0.4/numpy/core/include/numpy/ufuncobject.h numpy-1.0.4.patched/numpy/core/include/numpy/ufuncobject.h
2 --- numpy-1.0.4/numpy/core/include/numpy/ufuncobject.h 2007-11-07 22:05:15.000000000 +0000
3 +++ numpy-1.0.4.patched/numpy/core/include/numpy/ufuncobject.h 2008-05-25 11:07:14.000000000 +0100
4 @@ -284,7 +284,7 @@
5 #elif defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__)
6
7 #if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__)
8 -#include <fenv.h>
9 +#include "fenv/fenv.h"
10 #elif defined(__CYGWIN__)
11 #include "fenv/fenv.c"
12 #endif
13 diff -urN numpy-1.0.4/numpy/core/setup.py numpy-1.0.4.patched/numpy/core/setup.py
14 --- numpy-1.0.4/numpy/core/setup.py 2007-11-07 22:06:43.000000000 +0000
15 +++ numpy-1.0.4.patched/numpy/core/setup.py 2008-05-25 11:07:14.000000000 +0100
16 @@ -36,6 +36,7 @@
17
18 def generate_config_h(ext, build_dir):
19 target = join(build_dir,'config.h')
20 + log.info("-----------------------abc")
21 if newer(__file__,target):
22 config_cmd = config.get_config_cmd()
23 log.info('Generating %s',target)
24 @@ -73,6 +74,7 @@
25 nosmp = 1
26 except KeyError:
27 nosmp = 0
28 + nosmp = 1
29 if nosmp: moredefs = [('NPY_ALLOW_THREADS', '0')]
30 else: moredefs = []
31 #
32 @@ -123,8 +125,9 @@
33 target_f.write('#define %s\n' % (d))
34 else:
35 target_f.write('#define %s %s\n' % (d[0],d[1]))
36 - if not nosmp: # default is to use WITH_THREAD
37 - target_f.write('#ifdef WITH_THREAD\n#define NPY_ALLOW_THREADS 1\n#else\n#define NPY_ALLOW_THREADS 0\n#endif\n')
38 + log.info("-----------------------abc")
39 + #if not nosmp: # default is to use WITH_THREAD
40 + target_f.write('#ifdef WITH_THREAD\n#define NPY_ALLOW_THREADS 1\n#else\n#define NPY_ALLOW_THREADS 0\n#endif\n')
41 target_f.close()
42 print 'File:',target
43 target_f = open(target)
44 diff -urN numpy-1.0.4/numpy/distutils/unixccompiler.py numpy-1.0.4.patched/numpy/distutils/unixccompiler.py
45 --- numpy-1.0.4/numpy/distutils/unixccompiler.py 2007-11-07 22:05:15.000000000 +0000
46 +++ numpy-1.0.4.patched/numpy/distutils/unixccompiler.py 2008-05-25 11:07:14.000000000 +0100
47 @@ -9,11 +9,36 @@
48 from numpy.distutils.ccompiler import replace_method
49
50 import log
51 +def UnixCCompiler__link_executable (self,
52 + objects,
53 + output_progname,
54 + output_dir=None,
55 + libraries=None,
56 + library_dirs=None,
57 + runtime_library_dirs=None,
58 + debug=0,
59 + extra_preargs=None,
60 + extra_postargs=None,
61 + target_lang=None):
62 + if output_progname == "_configtest":
63 + self.spawn(['gcc', '-lm', '-o',output_progname]+objects, display = "")
64 + else:
65 + print "#### Running " + str(CCompiler.EXECUTABLE)
66 + self.link(CCompiler.EXECUTABLE, objects,
67 + self.executable_filename(output_progname), output_dir,
68 + libraries, library_dirs, runtime_library_dirs, None,
69 + debug, extra_preargs, extra_postargs+ ['-lm'], None, target_lang)
70 +
71 +replace_method(UnixCCompiler, 'link_executable', UnixCCompiler__link_executable)
72
73 # Note that UnixCCompiler._compile appeared in Python 2.3
74 def UnixCCompiler__compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
75 display = '%s: %s' % (os.path.basename(self.compiler_so[0]),src)
76 try:
77 + if src == "_configtest.c":
78 + self.spawn(['gcc', '-fwrapv', '-O2', '-Wall', '-Wstrict-prototypes', '-I/umc/blogic/olpc/staging_dir/i386/usr/include', '-I/umc/blogic/olpc/staging_dir/i386/include', '-I/umc/blogic/olpc/staging_dir/i386/usr/include/python2.5','-I/umc/blogic/olpc/staging_dir/i386/usr/include', '-I/umc/blogic/olpc/staging_dir/i386/include', '-fPIC'] + cc_args + [src, '-o', obj] +
79 + extra_postargs, display = display)
80 + else:
81 self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
82 extra_postargs, display = display)
83 except DistutilsExecError, msg:
84 diff -urN numpy-1.0.4/numpy/numarray/_capi.c numpy-1.0.4.patched/numpy/numarray/_capi.c
85 --- numpy-1.0.4/numpy/numarray/_capi.c 2007-11-07 22:05:16.000000000 +0000
86 +++ numpy-1.0.4.patched/numpy/numarray/_capi.c 2008-05-25 11:07:14.000000000 +0100
87 @@ -5,7 +5,7 @@
88 #include <float.h>
89
90 #if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__)
91 -#include <fenv.h>
92 +#include "numpy/fenv/fenv.h"
93 #elif defined(__CYGWIN__)
94 #include "numpy/fenv/fenv.h"
95 #include "numpy/fenv/fenv.c"
96 diff -urN numpy-1.0.4.p2/numpy/core/setup.py numpy-1.0.4/numpy/core/setup.py
97 --- numpy-1.0.4.p2/numpy/core/setup.py 2008-05-25 11:18:19.000000000 +0100
98 +++ numpy-1.0.4/numpy/core/setup.py 2008-05-25 11:18:52.000000000 +0100
99 @@ -6,13 +6,11 @@
100 from distutils.dep_util import newer
101
102 FUNCTIONS_TO_CHECK = [
103 - ('expl', 'HAVE_LONGDOUBLE_FUNCS'),
104 ('expf', 'HAVE_FLOAT_FUNCS'),
105 ('log1p', 'HAVE_LOG1P'),
106 ('expm1', 'HAVE_EXPM1'),
107 ('asinh', 'HAVE_INVERSE_HYPERBOLIC'),
108 ('atanhf', 'HAVE_INVERSE_HYPERBOLIC_FLOAT'),
109 - ('atanhl', 'HAVE_INVERSE_HYPERBOLIC_LONGDOUBLE'),
110 ('isnan', 'HAVE_ISNAN'),
111 ('isinf', 'HAVE_ISINF'),
112 ('rint', 'HAVE_RINT'),