diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2015-01-16 16:18:45 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2015-01-16 16:18:45 +0000 |
| commit | 03cb69220632b0c674efff5be3aab8be35d23eff (patch) | |
| tree | 464a1f74c57b796604ceb38c1687d579d2891800 /packaging/macosx/ports/python/py-numpy/files | |
| parent | update to trunk (diff) | |
| parent | Test implementation of 'shape-padding'. (diff) | |
| download | inkscape-03cb69220632b0c674efff5be3aab8be35d23eff.tar.gz inkscape-03cb69220632b0c674efff5be3aab8be35d23eff.zip | |
update to trunk
(bzr r13708.1.7)
Diffstat (limited to 'packaging/macosx/ports/python/py-numpy/files')
5 files changed, 251 insertions, 0 deletions
diff --git a/packaging/macosx/ports/python/py-numpy/files/patch-f2py_setup.py.diff b/packaging/macosx/ports/python/py-numpy/files/patch-f2py_setup.py.diff new file mode 100644 index 000000000..1e3164e73 --- /dev/null +++ b/packaging/macosx/ports/python/py-numpy/files/patch-f2py_setup.py.diff @@ -0,0 +1,39 @@ +--- numpy/f2py/setup.py ++++ numpy/f2py/setup.py +@@ -41,21 +41,21 @@ def configuration(parent_package='',top_ + ) + + config.make_svn_version_py() + + def generate_f2py_py(build_dir): +- f2py_exe = 'f2py'+os.path.basename(sys.executable)[6:] ++ f2py_exe = 'f2py' + if f2py_exe[-4:]=='.exe': + f2py_exe = f2py_exe[:-4] + '.py' + if 'bdist_wininst' in sys.argv and f2py_exe[-3:] != '.py': + f2py_exe = f2py_exe + '.py' + target = os.path.join(build_dir, f2py_exe) + if newer(__file__, target): + log.info('Creating %s', target) + f = open(target, 'w') + f.write('''\ +-#!%s ++#!@@MPORTS_PYTHON@@ + # See http://cens.ioc.ee/projects/f2py2e/ + import os, sys + for mode in ["g3-numpy", "2e-numeric", "2e-numarray", "2e-numpy"]: + try: + i=sys.argv.index("--"+mode) +@@ -75,11 +75,11 @@ elif mode=="2e-numpy": + from numpy.f2py import main + else: + sys.stderr.write("Unknown mode: " + repr(mode) + "\\n") + sys.exit(1) + main() +-'''%(sys.executable)) ++''') + f.close() + return target + + config.add_scripts(generate_f2py_py) + diff --git a/packaging/macosx/ports/python/py-numpy/files/patch-fcompiler_g95.diff b/packaging/macosx/ports/python/py-numpy/files/patch-fcompiler_g95.diff new file mode 100644 index 000000000..b95a2609a --- /dev/null +++ b/packaging/macosx/ports/python/py-numpy/files/patch-fcompiler_g95.diff @@ -0,0 +1,15 @@ +--- numpy/distutils/fcompiler/__init__.py ++++ numpy/distutils/fcompiler/__init__.py +@@ -708,11 +708,11 @@ + ('win32', ('gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', + 'intelvem', 'intelem')), + ('cygwin.*', ('gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95')), + ('linux.*', ('gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq', + 'intele', 'intelem', 'gnu', 'g95', 'pathf95')), +- ('darwin.*', ('gnu95', 'nag', 'absoft', 'ibm', 'intel', 'gnu', 'g95', 'pg')), ++ ('darwin.*', ('gnu95', 'nag', 'absoft', 'ibm', 'intel', 'gnu', 'pg')), + ('sunos.*', ('sun', 'gnu', 'gnu95', 'g95')), + ('irix.*', ('mips', 'gnu', 'gnu95',)), + ('aix.*', ('ibm', 'gnu', 'gnu95',)), + # os.name mappings + ('posix', ('gnu', 'gnu95',)), diff --git a/packaging/macosx/ports/python/py-numpy/files/patch-numpy_core_setup.py.diff b/packaging/macosx/ports/python/py-numpy/files/patch-numpy_core_setup.py.diff new file mode 100644 index 000000000..1c9a09c34 --- /dev/null +++ b/packaging/macosx/ports/python/py-numpy/files/patch-numpy_core_setup.py.diff @@ -0,0 +1,34 @@ +--- numpy/core/setup.py.orig 2014-03-25 19:03:06.000000000 -0400 ++++ numpy/core/setup.py 2014-03-25 19:03:26.000000000 -0400 +@@ -485,7 +485,14 @@ + if isinstance(d, str): + target_f.write('#define %s\n' % (d)) + else: +- target_f.write('#define %s %s\n' % (d[0], d[1])) ++ if d[0]!='SIZEOF_LONG' and d[0]!='SIZEOF_PY_INTPTR_T': ++ target_f.write('#define %s %s\n' % (d[0], d[1])) ++ else: ++ target_f.write('#ifdef __LP64__\n') ++ target_f.write('#define %s %s\n' % (d[0], 8)) ++ target_f.write('#else\n') ++ target_f.write('#define %s %s\n' % (d[0], 4)) ++ target_f.write('#endif\n') + + # define inline to our keyword, or nothing + target_f.write('#ifndef __cplusplus\n') +@@ -585,7 +592,14 @@ + if isinstance(d, str): + target_f.write('#define %s\n' % (d)) + else: +- target_f.write('#define %s %s\n' % (d[0], d[1])) ++ if d[0]!='NPY_SIZEOF_LONG' and d[0]!='NPY_SIZEOF_PY_INTPTR_T': ++ target_f.write('#define %s %s\n' % (d[0], d[1])) ++ else: ++ target_f.write('#ifdef __LP64__\n') ++ target_f.write('#define %s %s\n' % (d[0], 8)) ++ target_f.write('#else\n') ++ target_f.write('#define %s %s\n' % (d[0], 4)) ++ target_f.write('#endif\n') + + # Define __STDC_FORMAT_MACROS + target_f.write(""" diff --git a/packaging/macosx/ports/python/py-numpy/files/patch-numpy_linalg_setup.py.diff b/packaging/macosx/ports/python/py-numpy/files/patch-numpy_linalg_setup.py.diff new file mode 100644 index 000000000..848d46186 --- /dev/null +++ b/packaging/macosx/ports/python/py-numpy/files/patch-numpy_linalg_setup.py.diff @@ -0,0 +1,20 @@ +--- numpy/linalg/setup.py.orig 2013-11-16 08:30:31.000000000 -0500 ++++ numpy/linalg/setup.py 2013-11-16 08:39:27.000000000 -0500 +@@ -37,7 +37,8 @@ + config.add_extension('lapack_lite', + sources = [get_lapack_lite_sources], + depends = ['lapack_litemodule.c'] + lapack_lite_src, +- extra_info = lapack_info ++ extra_info = lapack_info, ++ extra_link_args=['-undefined dynamic_lookup -bundle'] + ) + + # umath_linalg module +@@ -47,6 +48,7 @@ + depends = ['umath_linalg.c.src'] + lapack_lite_src, + extra_info = lapack_info, + libraries = ['npymath'], ++ extra_link_args=['-undefined dynamic_lookup -bundle'] + ) + + return config diff --git a/packaging/macosx/ports/python/py-numpy/files/wrapper-template b/packaging/macosx/ports/python/py-numpy/files/wrapper-template new file mode 100755 index 000000000..48936d107 --- /dev/null +++ b/packaging/macosx/ports/python/py-numpy/files/wrapper-template @@ -0,0 +1,143 @@ +#!/bin/sh +COMPILER='@@@' +SUFFIX='---' +PREFIX='&&&' +OUTPUT_O='NO' +OUTPUT='' +NAMED_OUTPUT='' +LASTFILE='' +INTEL='NO' +SIZE32='NO' +SIZE64='NO' +NEWARGS='' + +SKIP='NO' + +for arg in $@ +do + if [ $SKIP = 'ARCH' ]; then + # intercept -arch option and set SIZEXX + SKIP='NO' + if [ $arg = 'x86_64' ] || [ $arg = 'ppc64' ]; then + SIZE64='YES' + else + SIZE32='YES' + fi + + # which architecture are we compiling for? + if [ $arg = 'x86_64' ] || [ $arg = 'i386' ]; then + INTEL='YES' + fi + + elif [ $arg = '-arch' ]; then + SKIP='ARCH' + + elif [ $arg = '--version' ]; then + ${COMPILER} --version + exit 0 + + else + NEWARGS+="$arg " + + # if the -c option is given, the output is .o + if [ $arg = '-c' ]; then + OUTPUT_O='YES' + fi + + # if the output file is given by a -o option, record it + if [ $SKIP = 'O' ]; then + SKIP='NO' + NAMED_OUTPUT=$arg + fi + + if [ $arg = '-o' ]; then + SKIP='O' + fi + + # Note each file ending by ${SUFFIX} and remember the last one + # Transform them in .o + if `echo $arg | grep -q "${SUFFIX}$"`; then + LASTFILE=$arg + OUTPUT+=`echo $arg | sed "s/${SUFFIX}/\.o/"` + OUTPUT+=' ' + fi + fi +done + +# What is the output? + +if [ ${NAMED_OUTPUT}"X" != "X" ]; then + OUTPUT=$NAMED_OUTPUT + +elif [ $OUTPUT_O = 'NO' ]; then + # It is an executable whose is name is the LASTFILE without suffix + OUTPUT=`echo ${LASTFILE} | sed "s/${SUFFIX}//"` +fi + +# Othewise, the output is just the ${OUTPUT} variable as computed before + +# For some reason, -dynamiclib and -lpython2.6 are missing when linking +# .so files. Add them, except if -bundle is set (incompatible switches) +if [ `echo $OUTPUT | sed -E 's|.*\.||'` = "so" ] && \ + ! `echo $NEWARGS | grep -q bundle`; then + NEWARGS="${NEWARGS} ${PREFIX}/lib/libpython2.6.dylib -dynamiclib" +fi + +# Now, compile + +if [ $SIZE32 = 'NO' ] && [ $SIZE64 = 'NO' ]; then + # No size indication given, just proceed with default + if `${COMPILER} $NEWARGS`; then + exit 0 + else + exit 1 + fi + +elif [ $SIZE32 = 'YES' ] && [ $SIZE64 = 'NO' ]; then + # 32-bit + if `${COMPILER} -m32 $NEWARGS`; then + exit 0 + else + exit 1 + fi + +elif [ $SIZE32 = 'NO' ] && [ $SIZE64 = 'YES' ]; then + # 64-bit + if `${COMPILER} -m64 $NEWARGS`; then + exit 0 + else + exit 1 + fi + +else + # Universal case + if `${COMPILER} -m32 $NEWARGS`; then + for filename in ${OUTPUT} + do + mv ${filename} ${filename}.32 + done + + if `${COMPILER} -m64 $NEWARGS`; then + for filename in ${OUTPUT} + do + mv ${filename} ${filename}.64 + if [ $INTEL = 'YES' ]; then + lipo -create -arch x86_64 ${filename}.64 \ + -arch i386 ${filename}.32 \ + -output ${filename} + else + lipo -create -arch ppc64 ${filename}.64 \ + -arch ppc ${filename}.32 \ + -output ${filename} + fi + + rm -f ${filename}.32 ${filename}.64 + done + else + exit 1 + fi + else + exit 1 + fi +fi +exit 0 |
