sagemath/sagemath-rpmbuild.patch
2014-05-27 10:47:12 -03:00

73 lines
2.8 KiB
Diff

--- src/module_list.py.orig 2014-05-10 15:38:39.635229222 -0300
+++ src/module_list.py 2014-05-10 15:40:06.410222998 -0300
@@ -5,7 +5,7 @@ from distutils.core import setup
from distutils.extension import Extension
from sage.env import *
-SAGE_INC = os.path.join(SAGE_LOCAL, 'include')
+SAGE_INC = '/usr/include'
#########################################################
### BLAS setup
@@ -36,10 +36,11 @@ else:
### Commonly used definitions
#########################################################
-numpy_include_dirs = [SAGE_LOCAL + '/lib/python/site-packages/numpy/core/include']
+from distutils.sysconfig import get_python_lib
+numpy_include_dirs = [get_python_lib(1) + '/numpy/core/include']
# We pick a file from numpy which is autogenerated so it has the
# timestamp of the numpy build.
-numpy_depends = [SAGE_LOCAL + '/lib/python/site-packages/numpy/core/include/numpy/_numpyconfig.h']
+numpy_depends = [get_python_lib(1) + '/numpy/core/include/numpy/_numpyconfig.h']
flint_depends = [SAGE_INC + '/flint/flint.h']
singular_depends = [SAGE_INC + '/libsingular.h', SAGE_INC + '/givaro/givconfig.h']
@@ -70,7 +71,7 @@ givaro_extra_compile_args =['-D__STDC_LI
### PolyBoRi settings
#########################################################
-polybori_extra_compile_args = []
+polybori_extra_compile_args = ['-DPBORI_USE_ORIGINAL_CUDD']
polybori_major_version = '0.8'
@@ -702,7 +703,7 @@ ext_modules = [
sources = ['sage/libs/lcalc/lcalc_Lfunction.pyx'],
libraries = ['m', 'ntl', 'mpfr', 'gmp', 'gmpxx',
'Lfunction'],
- include_dirs = [SAGE_INC + "/libLfunction"],
+ include_dirs = [SAGE_INC + "/Lfunction"],
extra_compile_args=["-O3", "-ffast-math"],
language = 'c++'),
--- src/setup.py.orig 2014-05-10 15:40:24.650221690 -0300
+++ src/setup.py 2014-05-10 15:43:52.993206746 -0300
@@ -36,11 +36,11 @@ except KeyError:
compile_result_dir = None
keep_going = False
-SAGE_INC = os.path.join(SAGE_LOCAL,'include')
+SAGE_INC = '/usr/include'
# search for dependencies and add to gcc -I<path>
include_dirs = [SAGE_INC,
- os.path.join(SAGE_INC, 'csage'),
+ 'c_lib/include',
SAGE_SRC,
os.path.join(SAGE_SRC, 'sage', 'ext')]
@@ -171,10 +171,12 @@ for m in ext_modules:
m.libraries = ['csage'] + m.libraries
if m.language == 'c++':
m.libraries.append('stdc++')
+ m.libraries.append('ntl')
+ m.libraries = m.libraries + ['gmp', 'm', 'dl']
m.extra_compile_args = m.extra_compile_args + extra_compile_args
m.extra_link_args = m.extra_link_args + extra_link_args
- m.library_dirs = m.library_dirs + [os.path.join(SAGE_LOCAL, "lib")]
+ m.library_dirs += ['c_lib', '%s/lib' % SAGE_LOCAL]
#############################################