#17510: Let pyzmq build on (really old?) 32-bit OS X machines
----------------------------+------------------------
       Reporter:  kcrisman  |        Owner:
           Type:  defect    |       Status:  new
       Priority:  major     |    Milestone:  sage-6.5
      Component:  build     |   Resolution:
       Keywords:            |    Merged in:
        Authors:            |    Reviewers:
Report Upstream:  N/A       |  Work issues:
         Branch:            |       Commit:
   Dependencies:            |     Stopgaps:
----------------------------+------------------------

Comment (by kcrisman):

 For reference.
 {{{#!diff
 diff --git a/build/pkgs/pyzmq/patches/buildutils.patch
 b/build/pkgs/pyzmq/patches/buildutils.patch
 new file mode 100644
 index 0000000..591578f
 --- /dev/null
 +++ b/build/pkgs/pyzmq/patches/buildutils.patch
 @@ -0,0 +1,21 @@
 +---- src/buildutils/detect.py
 +-+++ src-patched/buildutils/detect.py
 +-@@ -45,17 +45,7 @@
 ++
 ++     cpreargs = lpreargs = None
 ++     if sys.platform == 'darwin':
 ++-        # use appropriate arch for compiler
 ++-        if platform.architecture()[0]=='32bit':
 ++-            if platform.processor() == 'powerpc':
 ++-                cpu = 'ppc'
 ++-            else:
 ++-                cpu = 'i386'
 ++-            cpreargs = ['-arch', cpu]
 ++-            lpreargs = ['-arch', cpu, '-undefined', 'dynamic_lookup']
 ++-        else:
 ++-            # allow for missing UB arch, since it will still work:
 ++-            lpreargs = ['-undefined', 'dynamic_lookup']
 +++        lpreargs = ['-undefined', 'dynamic_lookup']
 ++     if sys.platform == 'sunos5':
 ++         if platform.architecture()[0]=='32bit':
 ++             lpreargs = ['-m32']
 diff --git a/build/pkgs/pyzmq/spkg-install b/build/pkgs/pyzmq/spkg-install
 index 269f055..310c460 100755
 --- a/build/pkgs/pyzmq/spkg-install
 +++ b/build/pkgs/pyzmq/spkg-install
 @@ -13,6 +13,15 @@ echo "include_dirs = $SAGE_LOCAL/include/" >>
 src/setup.cfg

  cd src

 +# Apply patches.
 +for patch in ../patches/*.patch; do
 +    patch -p1 <"$patch"
 +    if [ $? -ne 0 ]; then
 +        echo >&2 "Error applying '$patch'"
 +        exit 1
 +    fi
 +done
 +
  # Configure and install
  python setup.py configure --zmq="$SAGE_LOCAL"
  python setup.py install
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/17510#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to