diff options
| author | Shlomi Fish <shlomif@shlomifish.org> | 2017-01-03 23:18:39 +0000 |
|---|---|---|
| committer | Shlomi Fish <shlomif@shlomifish.org> | 2017-01-03 23:18:39 +0000 |
| commit | 20124f96375afdfbf8ab58b6090db95ba0d2687b (patch) | |
| tree | 0f7e003dd9707b751c3b51e7b8133a21437ead95 /packaging/macosx/ports/python/py-numpy/files/wrapper-template | |
| parent | Merged. (diff) | |
| parent | Fix build on Windows (see http://inkscape.13.x6.nabble.com/compile-error-on-W... (diff) | |
| download | inkscape-20124f96375afdfbf8ab58b6090db95ba0d2687b.tar.gz inkscape-20124f96375afdfbf8ab58b6090db95ba0d2687b.zip | |
Merged.
(bzr r15369.1.5)
Diffstat (limited to 'packaging/macosx/ports/python/py-numpy/files/wrapper-template')
| -rwxr-xr-x | packaging/macosx/ports/python/py-numpy/files/wrapper-template | 143 |
1 files changed, 0 insertions, 143 deletions
diff --git a/packaging/macosx/ports/python/py-numpy/files/wrapper-template b/packaging/macosx/ports/python/py-numpy/files/wrapper-template deleted file mode 100755 index 48936d107..000000000 --- a/packaging/macosx/ports/python/py-numpy/files/wrapper-template +++ /dev/null @@ -1,143 +0,0 @@ -#!/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 |
