#13309: Build Sage on OS X Mountain Lion
----------------------------+-----------------------------------------------
       Reporter:  hedtke    |         Owner:  GeorgSWeber                       
  
           Type:  defect    |        Status:  needs_review                      
  
       Priority:  critical  |     Milestone:  sage-5.4                          
  
      Component:  build     |    Resolution:                                    
  
       Keywords:            |   Work issues:  add caffeinate to installation 
guide
Report Upstream:  N/A       |     Reviewers:                                    
  
        Authors:            |     Merged in:                                    
  
   Dependencies:            |      Stopgaps:                                    
  
----------------------------+-----------------------------------------------

Comment (by jhpalmieri):

 Two possible ideas, although these could go on new tickets instead: we
 could always use `caffeinate` on Mountain Lion, with a patch like this to
 the root repository:
 {{{
 #!diff
 diff --git a/spkg/install b/spkg/install
 --- a/spkg/install
 +++ b/spkg/install
 @@ -481,10 +481,19 @@ echo "*** ALL ENVIRONMENT VARIABLES BEFO
  env | sort
  echo "***********************************************"

 +# Use 'caffeinate' to prevent sleep if on OS X Mountain Lion.
 +CAFFEINATE=''
 +if [ `uname` = "Darwin" ]; then
 +    DARWIN_VERSION=`uname -r | cut '-d.' -f1`
 +    if [ $DARWIN_VERSION -eq 12 ]; then
 +       CAFFEINATE=caffeinate
 +    fi
 +fi
 +
 ###############################################################################
  # NOW do the actual build:
 ###############################################################################
 -time $MAKE "$@"
 +time $CAFFEINATE $MAKE "$@"
  if [ $? -ne 0 ]; then
      echo >&2 "Error building Sage."
      exit 1
 }}}
 We could also try to avoid potential issues with gs pointing to gs-X11 by
 creating a new link, for example with this possible change to the
 matplotlib spkg:
 {{{
 #!diff
 diff --git a/spkg-install b/spkg-install
 --- a/spkg-install
 +++ b/spkg-install
 @@ -12,6 +12,18 @@ if [ "x$SAGE64" = xyes ]; then
     LDFLAGS="-m64 "; export LDFLAGS
  fi

 +# If on OS X Mountain Lion: see if 'gs' points to
 +# /usr/local/bin/gs-X11. If so, link instead to
 +# /usr/local/bin/gs-noX11.
 +if [ `uname` = "Darwin" ]; then
 +    DARWIN_VERSION=`uname -r | cut '-d.' -f1`
 +    GS=`command -v gs`
 +    GSNOX11=`command -v gs-noX11`
 +    if [ $DARWIN_VERSION -eq 12 ] && [ `readlink "$GS"` = "gs-X11" ] && [
 -x "$GSNOX11" ]; then
 +       ln -s "$GSNOX11" "$SAGE_LOCAL"/bin/gs
 +    fi
 +fi
 +
  # Write a configuration file to src/setup.cfg
  python make-setup-config.py

 }}}
 I'm not sure about this second idea, though, because the user might
 actually have X11 installed, so we would want a more sophisticated check.
 The linbox configure script also calls gs, so we would need a similar
 change there.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13309#comment:18>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to