diff -up sage-5.9/spkg/build/sage-5.9/module_list.py.orig sage-5.9/spkg/build/sage-5.9/module_list.py --- sage-5.9/spkg/build/sage-5.9/module_list.py.orig 2013-05-06 16:21:08.750095783 -0300 +++ sage-5.9/spkg/build/sage-5.9/module_list.py 2013-05-06 16:22:01.411097799 -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'] @@ -71,7 +72,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' @@ -662,7 +663,7 @@ ext_modules = [ sources = ['sage/libs/lcalc/lcalc_Lfunction.pyx'], libraries = ['m', 'ntl', 'mpfr', 'gmp', 'gmpxx', 'Lfunction', 'stdc++'], - include_dirs = [SAGE_INC + "/libLfunction"], + include_dirs = [SAGE_INC + "/Lfunction"], extra_compile_args=["-O3", "-ffast-math"], language = 'c++'), diff -up sage-5.9/spkg/build/sage-5.9/sage/numerical/backends/glpk_backend.pxd.orig sage-5.9/spkg/build/sage-5.9/sage/numerical/backends/glpk_backend.pxd --- sage-5.9/spkg/build/sage-5.9/sage/numerical/backends/glpk_backend.pxd.orig 2013-05-06 16:21:08.763095783 -0300 +++ sage-5.9/spkg/build/sage-5.9/sage/numerical/backends/glpk_backend.pxd 2013-05-06 16:21:12.815095939 -0300 @@ -16,7 +16,7 @@ cdef extern from *: cdef extern from "float.h": cdef double DBL_MAX -cdef extern from "../../../local/include/glpk.h": +cdef extern from "glpk.h": ctypedef struct c_glp_prob "glp_prob": pass ctypedef struct c_glp_iocp "glp_iocp": diff -up sage-5.9/spkg/build/sage-5.9/setup.py.orig sage-5.9/spkg/build/sage-5.9/setup.py --- sage-5.9/spkg/build/sage-5.9/setup.py.orig 2013-05-06 16:21:08.770095784 -0300 +++ sage-5.9/spkg/build/sage-5.9/setup.py 2013-05-06 16:21:12.817095939 -0300 @@ -38,21 +38,11 @@ except KeyError: SAGE_INC = os.path.join(SAGE_LOCAL,'include') -SITE_PACKAGES = '%s/lib/python%s/site-packages/'%(SAGE_LOCAL,platform.python_version().rsplit('.', 1)[0]) -if not os.path.exists(SITE_PACKAGES): - raise RuntimeError, "Unable to find site-packages directory (see setup.py file in sage python code)." - -if not os.path.exists('build/sage'): - os.makedirs('build/sage') - -sage_link = SITE_PACKAGES + '/sage' -if not os.path.islink(sage_link) or not os.path.exists(sage_link): - os.system('rm -rf "%s"'%sage_link) - os.system('cd %s; ln -sf ../../../../devel/sage/build/sage .'%SITE_PACKAGES) +SITE_PACKAGES = '%s/lib/python%s/site-packages'%(SAGE_LOCAL,platform.python_version().rsplit('.', 1)[0]) # search for dependencies and add to gcc -I include_dirs = [SAGE_INC, - os.path.join(SAGE_INC, 'csage'), + 'c_lib/include', os.path.join(SAGE_SRC, 'sage', 'ext')] # search for dependencies only @@ -170,11 +160,11 @@ for m in ext_modules: # FIMXE: Do NOT link the following libraries to each and # every module (regardless of the language btw.): - m.libraries = ['csage'] + m.libraries + ['stdc++', 'ntl'] + m.libraries = ['csage'] + m.libraries + ['stdc++', 'ntl', 'gmp', 'm', 'dl'] m.extra_compile_args += extra_compile_args m.extra_link_args += extra_link_args - m.library_dirs += ['%s/lib' % SAGE_LOCAL] + m.library_dirs += ['c_lib', '%s/lib' % SAGE_LOCAL] diff -up sage-5.9/spkg/build/conway_polynomials-0.4.p0/spkg-install.orig sage-5.9/spkg/build/conway_polynomials-0.4.p0/spkg-install --- sage-5.9/spkg/build/conway_polynomials-0.4.p0/spkg-install.orig 2013-05-06 17:47:06.493293291 -0300 +++ sage-5.9/spkg/build/conway_polynomials-0.4.p0/spkg-install 2013-05-06 17:48:27.883296408 -0300 @@ -2,9 +2,11 @@ import os from sage.all import save -from sage.misc.misc import SAGE_SHARE -install_root = os.path.join(SAGE_SHARE, 'conway_polynomials') +if 'SAGE_SHARE' not in os.environ: + raise RuntimeError("SAGE_SHARE undefined, maybe run `sage -sh`?") + +install_root = os.path.join(os.environ['SAGE_SHARE'], 'conway_polynomials') def create_db(): db = {}