Attachment 'sage-4.1.patch'

Download

   1 local/bin/sh000755 001752 001752 00000000000 11226071440 017141 2/usr/local/bin/bashustar00peterpeter000000 000000 local/bin/make000755 001752 001752 00000000000 11226071440 017613 2/usr/local/bin/gmakeustar00peterpeter000000 000000 local/bin/gfortran000755 001752 001752 00000000000 11236642376 021442 2/usr/local/bin/gfortran43ustar00peterpeter000000 000000 local/bin/gcc000755 001752 001752 00000000000 11226071440 017251 2/usr/local/bin/gcc43ustar00peterpeter000000 000000 local/bin/g++000755 001752 001752 00000000000 11226071440 016711 2/usr/local/bin/g++43ustar00peterpeter000000 000000 spkg/base/sage-spkg000755 001752 001752 00000024071 11226076675 015067 0ustar00peterpeter000000 000000 #!/usr/bin/env bash
   2 
   3 # William Stein, 2005-12-20 -- removed "m" option from tar,
   4 # which was seriously confusing the build process on some
   5 # (too fast?) machines, especially for mpfr. 
   6 
   7 #######################################################
   8 #  Install a SAGE package.  This script is
   9 #  typically invoked by giving the command
  10 #      sage -i <package name>
  11 #
  12 #  A package may assume that the following environment 
  13 #  variables are defined:
  14 #
  15 #      SAGE_ROOT   -- root directory of sage install
  16 #      SAGE_LOCAL  -- $SAGE_ROOT/local
  17 #      SAGE_DATA   -- $SAGE_ROOT/data
  18 #      LIBRARY_PATH, PYTHONPATH, LD_LIBRARY_PATH, DYLD_LIBRARY_PATH
  19 #      CC, CXX, CFLAGS, CXXFLAGS, LDFLAGS, MAKE
  20 #
  21 #  Your package script should try to build using the giving CC, CXX,
  22 #  CFLAGS, MAKE, etc, via a file spkg-install in your script.
  23 #
  24 #  This script does the following:
  25 #
  26 #      1. Set environment variables (by calling sage-env)
  27 #      2. Decompress package into a build directory
  28 #      3. Run the script in the package called spkg-install
  29 #      4. Return error 1 if anything goes wrong.
  30 #
  31 #######################################################
  32 
  33 mymkdir()
  34 {
  35     if [ ! -d $1 ]; then
  36 	mkdir $1
  37     fi
  38 }
  39 
  40 # The following sets environment variables for building
  41 # packages.  (Using dot suggested by W. Cheung.)
  42 
  43 . "$SAGE_ROOT/local/bin/sage-env"
  44 
  45 cd "$SAGE_PACKAGES"
  46 
  47 if [ $# -eq 0 ]; then
  48     echo "Currently installed packages:"
  49     /bin/ls -1 "$SAGE_PACKAGES/installed/"
  50     exit 0
  51 fi
  52 
  53 
  54 cd "$SAGE_PACKAGES"
  55 mymkdir "$BUILD"
  56 mymkdir installed
  57 cd "$BUILD"
  58 mymkdir old
  59 
  60 # the following two options are mutually exclusive -- i.e., you
  61 # can give only one. 
  62 
  63 INFO=0
  64 if [ $1 = '-info' ]; then
  65     INFO=1
  66     shift
  67 fi
  68 
  69 FORCE=0
  70 if [ $1 = '-f' ]; then
  71    FORCE=1
  72    shift
  73 fi
  74 export FORCE
  75 
  76 DELETE_TMP=1
  77 if [ $1 = '-s' -o $1 = '-m' ]; then
  78    DELETE_TMP=0
  79    shift
  80 fi
  81 
  82 INSTALLED="$SAGE_PACKAGES/installed/"
  83 PKG_NAME=`echo "$1" | sed -e "s/\.spkg$//"`
  84 PKG_NAME=`basename "$PKG_NAME"`
  85 PKG_SRC="$1"
  86 PKG_BASE=`echo "$PKG_NAME" | sed -e "s/-.*//"`
  87 # check if noclobber is set and warn about it
  88 if [ $PKG_SRC == "noclobber" ]; then
  89     echo "***********************************************************"
  90     echo "* WARNING WARNING WARNING WARNING WARNING WARNING WARNING *"
  91     echo "*                                                         *"
  92     echo "* noclobber is set in .bashrc and/or .bash_profile - you  *"
  93     echo "* should consider disabling it. The Sage install should   *"
  94     echo "* continue to work, so don't worry about it too much.     *"
  95     echo "*                                                         *"
  96     echo "* WARNING WARNING WARNING WARNING WARNING WARNING WARNING *"
  97     echo "***********************************************************"
  98     exit 0
  99 fi
 100 
 101 if [ ! -f "$PKG_SRC" ]; then
 102     if [ -f "$SAGE_PACKAGES/standard/$PKG_NAME.spkg" ]; then
 103         PKG_SRC="$SAGE_PACKAGES/standard/$PKG_NAME.spkg"
 104     else
 105         if [ -f "$SAGE_PACKAGES/optional/$PKG_NAME.spkg" ]; then
 106             PKG_SRC="$SAGE_PACKAGES/optional/$PKG_NAME.spkg"
 107         fi
 108     fi
 109 fi
 110 
 111 if [ $INFO -ne 0 ]; then
 112     if [ ! -f "$PKG_SRC" ]; then
 113         echo "Package $PKG_NAME not found"
 114     fi
 115     bunzip2 -c "$PKG_SRC" 2>/dev/null | tar Ofx - $PKG_NAME/SAGE.txt 2>/dev/null
 116     if [ $? -ne 0 ]; then
 117         tar Ofx  "$PKG_SRC" "$PKG_NAME/SAGE.txt" 2>/dev/null
 118     fi
 119     echo ""
 120     if [ $? -ne 0 ]; then
 121         echo "No file SAGE.txt in $PKG_NAME"
 122         exit 1
 123     fi
 124     exit 0
 125 fi
 126 
 127 echo "$PKG_NAME"
 128 
 129 echo "Machine:"
 130 uname -a
 131 
 132 if [ -f "$INSTALLED/$PKG_NAME" -a $FORCE -eq 0 ]; then
 133     echo "sage: $1 is already installed"
 134     touch "$INSTALLED/$PKG_NAME"
 135     exit 0
 136 fi
 137 
 138 cd "$SAGE_PACKAGES/build"
 139 
 140 if [ $DELETE_TMP -eq 1 ]; then
 141     echo "Deleting directories from past builds of previous/current versions of $PKG_NAME"
 142     # Make triply sure that we are in the build directory before doing 
 143     # a scary "rm -rf".
 144     cd "$SAGE_PACKAGES/build"
 145     if [ $? -ne 0 ]; then 
 146          echo "Unable to find build directory."
 147     else
 148         rm -rf "$PKG_BASE-"* 
 149     fi 
 150 else
 151     echo "Moving directories from past builds of previous/current versions of $PKG_NAME to build/old"
 152     mv -f "$PKG_BASE-"* old/  2>/dev/null
 153 fi
 154 
 155 if [ ! -f "$PKG_SRC" ]; then
 156 
 157     echo "$0: file $PKG_NAME does not exist" 
 158     echo "Attempting to download it."
 159     CUR=`pwd`
 160     cd "$SAGE_PACKAGES"
 161     if [ ! -d optional ]; then
 162         $MKDIR optional
 163     fi
 164     cd optional
 165     sage-download_package "$1"
 166     if [ ! -f "$PKG_NAME.spkg" ]; then 
 167 	echo "sage: Failed to download package $PKG_NAME from $SAGE_SERVER"
 168 	exit 1
 169     fi
 170     PKG_SRC="`pwd`/$PKG_NAME.spkg"
 171     cd "$CUR"
 172 fi
 173 
 174 # * The -i option below to ignore checksum errors, since 
 175 #   I've had problems with this on Solaris.
 176 # * The m option avoids clock skew problems.    
 177 
 178 echo "Extracting package $PKG_SRC ..."
 179 ls -l "$PKG_SRC"
 180 
 181 if [ -d "$PKG_NAME" ]; then
 182     echo "Removing previous version."
 183     rm -rf "$PKG_NAME"
 184 fi
 185 
 186 bunzip2 -c "$PKG_SRC" 2>/dev/null | tar fxv -  2>/dev/null
 187 if [ ! -d "$PKG_NAME" ]; then
 188     tar fxv "$PKG_SRC"
 189 fi
 190 echo "Finished extraction"
 191 
 192 if [ ! -d "$PKG_NAME" ]; then
 193    echo "sage: After decompressing the directory $PKG_NAME does not exist"
 194    echo "This means that the corresponding .spkg needs to be downloaded"
 195    echo "again."
 196    sage-download_package "$PKG_NAME"
 197    echo `pwd`
 198    bunzip2 -c "$PKG_NAME.spkg"  | tar fxv - 
 199    if [ ! -d "$PKG_NAME.spkg" ]; then
 200        tar fxv "$PKG_NAME.spkg"
 201    fi
 202    if [ ! -d "$PKG_NAME" ]; then
 203        echo "Second download resulted in a corrupted package."
 204        exit 1
 205    fi
 206 fi
 207 
 208 if [ -f "$SAGE_PACKAGES/patches/$PKG_NAME.patch" ]; then
 209     echo "Applying local patches for $PKG_NAME"
 210     if ! patch -p0 < "$SAGE_PACKAGES/patches/$PKG_NAME.patch"; then
 211 	echo "Patching failed"
 212 	exit 1
 213     fi
 214 fi
 215 
 216 cd "$PKG_NAME"
 217 if [ ! -f spkg-install ]; then
 218   echo "#!/usr/bin/env bash" > spkg-install
 219   echo "" >> spkg-install
 220   if [ -f setup.py ]; then
 221       echo "python setup.py install" >> spkg-install
 222   else
 223       if [ -f configure ]; then
 224          echo "./configure --prefix=\$SAGE_ROOT/local/" >> spkg-install
 225          echo "make" >> spkg-install
 226          echo "make install" >> spkg-install 
 227       else
 228          echo "There is no spkg-install script, no setup.py, and no configure script,"
 229          echo "so I do not know how to install $PKG_SRC."
 230          exit 1
 231       fi
 232   fi
 233 fi
 234 
 235 chmod +x spkg-install
 236 
 237 # this is just wrong... (so don't do it)
 238 #echo "TOUCHING"
 239 #touch * */* */*/* */*/*/* 1>/dev/null 2>/dev/null
 240 
 241 echo "****************************************************"
 242 echo "Host system"
 243 echo "uname -a:"
 244 uname -a
 245 if [ $? -ne 0 ]; then
 246    echo "Unable to determine host system information."
 247 fi
 248 echo "****************************************************"
 249 
 250 echo "****************************************************"
 251 echo "GCC Version"
 252 echo "gcc -v"
 253 gcc -v
 254 if [ $? -ne 0 ]; then
 255    echo "Unable to determine gcc version."
 256 fi
 257 echo "****************************************************"
 258 
 259 BASEDIR=`pwd`
 260 if [ -n "$DEBIAN_RELEASE" ]; then
 261     SAGE_CHECK=''
 262     if [ -e ./spkg-debian ]; then
 263 	time ./spkg-debian
 264     else
 265 	time sage-build-debian $BASEDIR
 266     fi
 267 else
 268     time ./spkg-install
 269 fi
 270 
 271 if [ $? -eq 0 ]; then
 272    cd $INSTALLED
 273    # TURNED OFF: Remove all old packages with the same name up to the first "-":
 274    # rm -f $PKG_BASE-*
 275 
 276    # Mark that the new package has been installed. 
 277    # This file will eventually be a certificate like in OS X.
 278    echo "PACKAGE NAME: $PKG_NAME" > "$PKG_NAME"
 279    echo "INSTALL DATE: `date`" >> "$PKG_NAME"
 280    echo "UNAME: `uname -a`" >> "$PKG_NAME"
 281    echo "Sage VERSION: `grep Sage $SAGE_LOCAL/bin/sage-banner`" >> "$PKG_NAME"
 282    echo "Successfully installed $PKG_NAME"
 283 
 284    cd $BASEDIR
 285    if [ "$SAGE_CHECK" != "" -a -f spkg-check ]; then
 286        echo "Running the test suite."
 287        chmod +x spkg-check
 288        ./spkg-check
 289        if [ $? -ne 0 ]; then
 290            echo "*************************************"
 291            echo "Error testing package ** $PKG_NAME **"
 292            echo "*************************************"
 293            rm -f $SAGE_ROOT/spkg/installed/$PKG_NAME
 294            echo "sage: An error occurred while testing $PKG_NAME"
 295            echo "Please email sage-devel http://groups.google.com/group/sage-devel"
 296            echo "explaining the problem and send the relevant part of"
 297            echo "of $SAGE_ROOT/install.log.  Describe your computer, operating system, etc."
 298            echo "If you want to try to fix the problem, yourself *don't* just cd to"
 299            echo "`pwd` and type 'make check' or whatever is appropriate."
 300            echo "Instead type \"$SAGE_ROOT/sage -sh\""
 301            echo "in order to set all environment variables correctly, then cd to"
 302            echo "`pwd`"
 303            echo "(When you are done debugging, you can type \"exit\" to leave the"
 304            echo "subshell.)"
 305            exit 1
 306        else 
 307            echo "TEST SUITE: passed" >> "$PKG_NAME"
 308        fi
 309    fi
 310 
 311 
 312    # Delete the temporary build directory if required.
 313    if [ $DELETE_TMP -eq 1 ]; then
 314        echo "Now cleaning up tmp files."
 315        if [ -d "$SAGE_PACKAGES/build/$PKG_NAME" ]; then
 316            # the if is there only to avoid the possibility of a weird bug.
 317            rm -rf "$SAGE_PACKAGES/build/$PKG_NAME"
 318        fi
 319    else
 320        echo "You can safely delete the temporary build directory"
 321        echo "$SAGE_PACKAGES/build/$PKG_NAME"
 322    fi
 323 
 324 else
 325 
 326    echo "sage: An error occurred while installing $PKG_NAME"
 327    echo "Please email sage-devel http://groups.google.com/group/sage-devel"
 328    echo "explaining the problem and send the relevant part of"
 329    echo "of $SAGE_ROOT/install.log.  Describe your computer, operating system, etc."
 330    echo "If you want to try to fix the problem, yourself *don't* just cd to"
 331    echo "`pwd` and type 'make'."
 332    echo "Instead type \"$SAGE_ROOT/sage -sh\""
 333    echo "in order to set all environment variables correctly, then cd to"
 334    echo "`pwd`"
 335    echo "(When you are done debugging, you can type \"exit\" to leave the"
 336    echo "subshell.)"
 337    exit 1
 338 fi
 339 
 340 
 341 echo "Making Sage/Python scripts relocatable..."
 342 
 343 cd "$SAGE_LOCAL"/bin
 344 ./sage-make_relative
 345 
 346 echo "Finished installing $PKG_NAME.spkg" 
 347 
 348 # It's OK if they above fails -- in fact it will until Python
 349 # itself gets installed. That's fine. 
 350 exit 0   
 351 spkg/patches/000755 001752 001752 00000000000 11237530254 013757 5ustar00peterpeter000000 000000 spkg/patches/base.patch000644 001752 001752 00000000730 11225763755 015725 0ustar00peterpeter000000 000000 --- spkg/base/sage-spkg~	2009-02-21 20:38:33.000000000 +1100
 352 +++ spkg/base/sage-spkg	2009-03-01 07:51:32.465298061 +1100
 353 @@ -205,6 +205,14 @@
 354     fi
 355  fi
 356  
 357 +if [ -f "$SAGE_PACKAGES/patches/$PKG_NAME.patch" ]; then
 358 +    echo "Applying local patches for $PKG_NAME"
 359 +    if ! patch -p0 < "$SAGE_PACKAGES/patches/$PKG_NAME.patch"; then
 360 +	echo "Patching failed"
 361 +	exit 1
 362 +    fi
 363 +fi
 364 +
 365  cd "$PKG_NAME"
 366  if [ ! -f spkg-install ]; then
 367    echo "#!/usr/bin/env bash" > spkg-install
 368 spkg/patches/numpy-1.3.0.p0.patch000644 001752 001752 00000002242 11237371221 017120 0ustar00peterpeter000000 000000 --- numpy-1.3.0.p0/patches/__init__.py~	2008-09-26 14:02:13.000000000 +1000
 369 +++ numpy-1.3.0.p0/patches/__init__.py	2009-03-09 21:38:51.369170316 +1100
 370 @@ -686,6 +686,7 @@
 371      ('linux.*', ('sage_fortran','gnu','intel','lahey','pg','absoft','nag','vast','compaq',
 372                  'intele','intelem','gnu95','g95')),
 373      ('darwin.*', ('sage_fortran','nag', 'absoft', 'ibm', 'intel', 'gnu', 'gnu95', 'g95')),
 374 +    ('freebsd.*', ('sage_fortran','gnu','gnu95','g95')),
 375      ('sunos.*', ('sage_fortran','sun','gnu','gnu95','g95')),
 376      ('irix.*', ('mips','gnu','gnu95',)),
 377      ('aix.*', ('ibm','gnu','gnu95',)),
 378 --- numpy-1.3.0.p0/src/numpy/distutils/system_info.py~	2008-09-26 09:10:02.000000000 +1000
 379 +++ numpy-1.3.0.p0/src/numpy/distutils/system_info.py	2009-03-11 05:21:41.081498204 +1100
 380 @@ -853,12 +853,8 @@
 381      section = 'atlas'
 382      dir_env_var = 'ATLAS'
 383      _lib_names = ['f77blas','cblas']
 384 -    if sys.platform[:7]=='freebsd':
 385 -        _lib_atlas = ['atlas_r']
 386 -        _lib_lapack = ['alapack_r']
 387 -    else:
 388 -        _lib_atlas = ['atlas']
 389 -        _lib_lapack = ['lapack']
 390 +    _lib_atlas = ['atlas']
 391 +    _lib_lapack = ['lapack']
 392  
 393      notfounderror = AtlasNotFoundError
 394 
 395 spkg/patches/sage_scripts-4.1.patch000644 001752 001752 00000001150 11226071624 017762 0ustar00peterpeter000000 000000 --- sage_scripts-4.1/sage-spkg~	2009-02-21 20:38:33.000000000 +1100
 396 +++ sage_scripts-4.1/sage-spkg	2009-03-01 07:51:32.465298061 +1100
 397 @@ -73,7 +73,7 @@
 398  fi
 399  export FORCE
 400  
 401 -DELETE_TMP=1
 402 +DELETE_TMP=0
 403  if [ $1 = '-s' -o $1 = '-m' ]; then
 404     DELETE_TMP=0
 405     shift
 406 @@ -205,6 +205,14 @@
 407     fi
 408  fi
 409  
 410 +if [ -f "$SAGE_PACKAGES/patches/$PKG_NAME.patch" ]; then
 411 +    echo "Applying local patches for $PKG_NAME"
 412 +    if ! patch -p0 < "$SAGE_PACKAGES/patches/$PKG_NAME.patch"; then
 413 +	echo "Patching failed"
 414 +	exit 1
 415 +    fi
 416 +fi
 417 +
 418  cd "$PKG_NAME"
 419  if [ ! -f spkg-install ]; then
 420    echo "#!/usr/bin/env bash" > spkg-install
 421 spkg/patches/r-2.6.1.p23.patch000644 001752 001752 00000002410 11237006537 016305 0ustar00peterpeter000000 000000 --- r-2.6.1.p23/spkg-install~	2009-01-20 21:22:33.000000000 +1100
 422 +++ r-2.6.1.p23/spkg-install	2009-03-20 05:46:02.702566714 +1100
 423 @@ -21,7 +21,7 @@
 424  CUR=`pwd`
 425  
 426  # set CPPFLAGS so that Sage's readline is picked up
 427 -CPPFLAGS=-I"$SAGE_LOCAL"/inlcude; export CPPFLAGS
 428 +CPPFLAGS="-I$SAGE_LOCAL/include $CPPFLAGS"; export CPPFLAGS
 429  
 430  # copy an R file that has corrected R includes, i.e. <foo.h> vs. "foo.h"
 431  cp patches/sys-std.c src/src/unix/sys-std.c
 432 @@ -74,8 +74,17 @@
 433  
 434  # These flags are *critical* so that R will be built against Sage's 
 435  # copy of readline and ATLAS.
 436 -CFLAGS="-I$SAGE_LOCAL/include -L$SAGE_LOCAL/lib/ "$CFLAGS; export CFLAGS
 437 -LDFLAGS="-L$SAGE_LOCAL/lib/ "$LDFLAGS; export LDFLAGS   
 438 +CFLAGS="-I$SAGE_LOCAL/include -L$SAGE_LOCAL/lib/ $CFLAGS"; export CFLAGS
 439 +LDFLAGS="-L$SAGE_LOCAL/lib/ $LDFLAGS"; export LDFLAGS   
 440 
 441 +# FreeBSD needs the path to libiconv to be explicitly specified.  In theory,
 442 +# --with-libiconv-prefix should work but configure script is broken and
 443 +# ignores that path when looking for libiconv.  Hard-wire via xxFLAGS.
 444 +if [ `uname` = "FreeBSD" ]; then
 445 +    CPPFLAGS="$CPPFLAGS -I/usr/local/include"
 446 +    CFLAGS="$CFLAGS -I/usr/local/include"
 447 +    LDFLAGS="$LDFLAGS -L/usr/local/lib"
 448 +fi
 449 +
 450  # do not build recommended packages for now, for speed.
 451  
 452 spkg/patches/matplotlib-0.98.5.3rc0-svn6910.p4.patch000644 001752 001752 00000004044 11236752717 022135 0ustar00peterpeter000000 000000 --- matplotlib-0.98.5.3rc0-svn6910.p4/patches/setupext.py~	2009-03-15 17:24:10.279608339 +1100
 453 +++ matplotlib-0.98.5.3rc0-svn6910.p4/patches/setupext.py	2009-03-15 21:52:55.397113345 +1100
 454 @@ -45,6 +45,7 @@
 455  import re
 456  import subprocess
 457  ### FOR SAGE
 458 +sage_base = os.environ['SAGE_LOCAL']
 459  sage_inc = os.environ['SAGE_LOCAL'] + '/include/'
 460  sage_lib = os.environ['SAGE_LOCAL'] + '/lib/'
 461  
 462 @@ -57,6 +58,8 @@
 463      'freebsd4' : ['/usr/local', '/usr'],
 464      'freebsd5' : ['/usr/local', '/usr'],
 465      'freebsd6' : ['/usr/local', '/usr'],
 466 +    'freebsd7' : [sage_base, '/usr/local', '/usr'],
 467 +    'freebsd8' : [sage_base, '/usr/local', '/usr'],
 468      'sunos5' : [os.getenv('MPLIB_BASE') or '/usr/local',],
 469      'gnukfreebsd5' : ['/usr/local', '/usr'],
 470      'gnukfreebsd6' : ['/usr/local', '/usr'],
 471 --- matplotlib-0.98.5.3rc0-svn6910.p4/src/ttconv/pprdrv.h~	2008-05-08 05:41:26.000000000 +1000
 472 +++ matplotlib-0.98.5.3rc0-svn6910.p4/src/ttconv/pprdrv.h	2009-03-19 06:00:07.875942989 +1100
 473 @@ -21,6 +21,7 @@
 474  
 475  #include <vector>
 476  #include <cassert>
 477 +#undef putchar		/* gcc43 is broken */
 478  
 479  /*
 480   * Encapsulates all of the output to write to an arbitrary output
 481 --- matplotlib-0.98.5.3rc0-svn6910.p4/src/ttconv/truetype.h~	2008-05-02 04:24:54.000000000 +1000
 482 +++ matplotlib-0.98.5.3rc0-svn6910.p4/src/ttconv/truetype.h	2009-03-19 20:13:28.247298109 +1100
 483 @@ -5,6 +5,7 @@
 484   */
 485  
 486  #include <stdio.h>
 487 +#undef putchar	/* Broken g++43 */
 488  
 489  /*
 490  ** ~ppr/src/include/typetype.h
 491 --- matplotlib-0.98.5.3rc0-svn6910.p4/src/lib/matplotlib/afm.py~	2008-10-05 21:14:42.000000000 +1100
 492 +++ matplotlib-0.98.5.3rc0-svn6910.p4/src/lib/matplotlib/afm.py	2009-03-29 08:16:04.656668429 +1100
 493 @@ -165,7 +165,7 @@
 494          num = _to_int(vals[0].split()[1])
 495          wx = _to_float(vals[1].split()[1])
 496          name = vals[2].split()[1]
 497 -        bbox = _to_list_of_ints(vals[3][2:])
 498 +        bbox = _to_list_of_floats(vals[3][2:])
 499          # Workaround: If the character name is 'Euro', give it the corresponding
 500          # character code, according to WinAnsiEncoding (see PDF Reference).
 501          if name == 'Euro':
 502 spkg/patches/atlas-3.8.3.p5.patch.thread000644 001752 001752 00000006274 11236741174 020361 0ustar00peterpeter000000 000000 --- atlas-3.8.3.p5/src/CONFIG/src/SpewMakeInc.c~	2009-02-19 05:47:37.000000000 +1100
 503 +++ atlas-3.8.3.p5/src/CONFIG/src/SpewMakeInc.c	2009-03-01 16:24:42.131861605 +1100
 504 @@ -664,6 +664,8 @@
 505           fprintf(fpout, " -melf_i386");
 506        else if (ptrbits == 64)
 507           fprintf(fpout, " -melf_x86_64");
 508 +      if (OS == OSFreeBSD)
 509 +	 fprintf(fpout, "_fbsd");
 510     }
 511     fprintf(fpout, "\n   F77SYSLIB = %s\n", f77lib ? f77lib : "");
 512     fprintf(fpout, "   BC = $(ICC)\n");
 513 --- atlas-3.8.3.p5/spkg-install-script.orig	2009-06-25 00:45:12.000000000 +1000
 514 +++ atlas-3.8.3.p5/spkg-install-script	2009-08-02 11:39:15.000000000 +1000
 515 @@ -37,7 +37,7 @@
 516  	cd ATLAS-build
 517  	# -Si cputhrchk 0: Ignore/heed CPU throttle probe
 518  	# -Fa alg -fPIC: set flags so we can build dynamic libraries
 519 -	# -t 0: disable threading for now.
 520 +	# -t 0: disable threading for now except on FreeBSD.
 521          # -A: select arch where 21 is Hammer
 522          # -V: select SIMD extensions, i.e. 24 is SSE1 + SSE2
 523          SIMD_FLAGS=""
 524 @@ -53,10 +53,53 @@
 525                SIMD_FLAGS="-V 24 -A 21"
 526             fi
 527          fi
 528 +	if [ `uname` != 'FreeBSD' ]; then
 529 +	    THREADED="-t 0"
 530 +	fi
 531  	../src/configure --prefix="$SAGE_LOCAL" --with-netlib-lapack="$SAGE_LOCAL"/lib/liblapack.a  \
 532 -	-Si cputhrchk 0 -Fa alg -fPIC -t 0 -C if $FCOMPILER -b $bitwidth $SIMD_FLAGS
 533 +	-v 2 -Si cputhrchk 0 -Fa alg -fPIC $THREADED -C if $FCOMPILER -b $bitwidth $SIMD_FLAGS
 534  }
 535  
 536 +# The FreeBSD atlas port links atlas in a somewhat different way to the
 537 +# process in the atlas Makefile and numpy assumes that libraries as per
 538 +# the port have been installed.  The following replicates the relevant
 539 +# parts of the FreeBSD atlas port link process
 540 +link_freebsd()
 541 +{
 542 +	set -ex
 543 +	# Build static atlas-enhanced lapack
 544 +	mkdir tmp
 545 +	cd tmp
 546 +	cp "$SAGE_LOCAL/lib/liblapack.a" .
 547 +	ar x liblapack.a
 548 +	ar x ../liblapack.a
 549 +	ar r ../libalapack.a *.o
 550 +	ranlib ../libalapack.a
 551 +	cd ..
 552 +	for i in alapack atlas cblas f77blas; do
 553 +	    ld -Bshareable -o lib${i}_r.so -x -soname lib${i}_r.so --whole-archive lib$i.a
 554 +	done
 555 +	for i in ptcblas ptf77blas; do
 556 +	    ld -Bshareable -o lib$i.so -x -soname lib$i.so --whole-archive lib$i.a
 557 +	done
 558 +	set +ex
 559 +}
 560 +
 561 +# FreeBSD atlas install - based on FreeBSD atlas port.
 562 +install_freebsd()
 563 +{
 564 +	set -ex
 565 +	for i in alapack atlas cblas f77blas; do
 566 +	    install -m 644 lib/lib${i}.a "$SAGE_LOCAL/lib/lib${i}_r.a"
 567 +	    install -m 755 lib/lib${i}_r.so "$SAGE_LOCAL/lib/lib${i}_r.so"
 568 +	done
 569 +	for i in ptcblas ptf77blas; do
 570 +	    install -m 644 lib/lib${i}.a "$SAGE_LOCAL/lib/lib${i}.a"
 571 +	    install -m 755 lib/lib${i}.so "$SAGE_LOCAL/lib/lib${i}.so"
 572 +	done
 573 +	install -m 644 ../src/include/cblas.h ../src/include/clapack.h "$SAGE_LOCAL/include"
 574 +	set +ex
 575 +}
 576  
 577  build()
 578  {
 579 @@ -98,7 +141,11 @@
 580            fi
 581          fi
 582  
 583 -	make shared cshared
 584 +	if [ `uname` = "FreeBSD" ]; then
 585 +	    link_freebsd
 586 +	else
 587 +	    make shared cshared
 588 +	fi
 589          if [ $? -ne 0 ]; then
 590              echo "Building shared ATLAS libraris failed"
 591              exit 1
 592 @@ -106,7 +153,11 @@
 593  
 594  	# and now install
 595  	cd ..
 596 -	make install
 597 +	if [ `uname` = "FreeBSD" ]; then
 598 +	    install_freebsd
 599 +	else
 600 +	    make install
 601 +	fi
 602          if [ $? -ne 0 ]; then
 603              echo "Make install for ATLAS failed"
 604              exit 1
 605 spkg/patches/atlas-3.8.3.p5.patch000644 001752 001752 00000002224 11237370366 017104 0ustar00peterpeter000000 000000 --- atlas-3.8.3.p5/src/CONFIG/src/SpewMakeInc.c~	2009-02-19 05:47:37.000000000 +1100
 606 +++ atlas-3.8.3.p5/src/CONFIG/src/SpewMakeInc.c	2009-03-01 16:24:42.131861605 +1100
 607 @@ -664,6 +664,8 @@
 608           fprintf(fpout, " -melf_i386");
 609        else if (ptrbits == 64)
 610           fprintf(fpout, " -melf_x86_64");
 611 +      if (OS == OSFreeBSD)
 612 +	 fprintf(fpout, "_fbsd");
 613     }
 614     fprintf(fpout, "\n   F77SYSLIB = %s\n", f77lib ? f77lib : "");
 615     fprintf(fpout, "   BC = $(ICC)\n");
 616 --- atlas-3.8.3.p5/make_correct_shared.sh.orig	2009-02-03 07:22:04.000000000 +1100
 617 +++ atlas-3.8.3.p5/make_correct_shared.sh	2009-03-09 20:40:10.327469958 +1100
 618 @@ -26,10 +26,10 @@
 619  
 620  
 621  
 622 -if [ `uname` = "Linux" ]; then
 623 +if [ `uname` = "Linux" -o `uname` = "FreeBSD" ]; then
 624      if [ `./fortran_type.pl` =  "g95" ]; then
 625  	cd "$SAGE_LOCAL"/lib
 626  	lapack_command="ld -L"$f95_dir" -L"$SAGE_LOCAL"/lib  -shared -soname liblapack.so -o liblapack.so  --whole-archive liblapack.a --no-whole-archive -lc -lm -lf95"
 627  	f77blas_command="ld -L"$f95_dir" -L"$SAGE_LOCAL"/lib  -shared -soname libf77blas.so -o libf77blas.so  --whole-archive libf77blas.a --no-whole-archive -lc -lm -lf95"
 628  
 629  	echo $lapack_command
 630 spkg/patches/numpy-1.3.0.p0.patch.thread000644 001752 001752 00000001142 11226076137 020372 0ustar00peterpeter000000 000000 --- numpy-1.3.0.p0/patches/__init__.py~	2008-09-26 14:02:13.000000000 +1000
 631 +++ numpy-1.3.0.p0/patches/__init__.py	2009-03-09 21:38:51.369170316 +1100
 632 @@ -686,6 +686,7 @@
 633      ('linux.*', ('sage_fortran','gnu','intel','lahey','pg','absoft','nag','vast','compaq',
 634                  'intele','intelem','gnu95','g95')),
 635      ('darwin.*', ('sage_fortran','nag', 'absoft', 'ibm', 'intel', 'gnu', 'gnu95', 'g95')),
 636 +    ('freebsd.*', ('sage_fortran','gnu','gnu95','g95')),
 637      ('sunos.*', ('sage_fortran','sun','gnu','gnu95','g95')),
 638      ('irix.*', ('mips','gnu','gnu95',)),
 639      ('aix.*', ('ibm','gnu','gnu95',)),
 640 spkg/patches/sage-4.1.patch000644 001752 001752 00000002446 11237531534 016227 0ustar00peterpeter000000 000000 --- sage-4.1/sage/ext/fast_eval.pyx.orig	2009-07-10 08:09:53.000000000 +1000
 641 +++ sage-4.1/sage/ext/fast_eval.pyx	2009-08-09 21:25:08.000000000 +1000
 642 @@ -127,13 +127,20 @@
 643      double exp(double)
 644      double log(double)
 645      double log10(double)
 646 -    double log2_ "log2"(double)
 647 +
 648 +IF UNAME_SYSNAME != "FreeBSD":
 649 +    cdef extern from "math.h":
 650 +        double log2_ "log2"(double)
 651  
 652  
 653  # This is only needed on Cygwin since log2 is a macro.
 654  # If we don't do this the cygwin GCC gets very confused.
 655 -cdef inline double log2(double x): 
 656 -    return log2_(x)
 657 +IF UNAME_SYSNAME != "FreeBSD":
 658 +    cdef inline double log2(double x): 
 659 +       return log2_(x)
 660 +ELSE:
 661 +    cdef inline double log2(double x):
 662 +        return 1.442695040888963407359924681*log(x)
 663  
 664  cdef extern from *:
 665      void* memcpy(void* dst, void* src, size_t len)
 666 --- sage-4.1/sage/combinat/partitions_c.cc.orig	2009-07-10 08:09:53.000000000 +1000
 667 +++ sage-4.1/sage/combinat/partitions_c.cc	2009-08-09 21:25:08.000000000 +1000
 668 @@ -94,6 +94,11 @@
 669  extern "C" long double coshl (long double);
 670  extern "C" long double sinhl (long double);
 671  #endif
 672 +/* FreeBSD pre-8.x doesn't have sqrtl() et al.  Hack around it for now
 673 + * since this sage code will be changed shortly */
 674 +#if defined(__FreeBSD__) && __FreeBSD__ < 8
 675 +#define sqrtl(x)	sqrt(x)
 676 +#endif
 677  
 678  
 679  
 680 

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2009-10-01 19:15:58, 32.0 KB) [[attachment:sage-4.1.1.patch]]
  • [get | view] (2009-08-10 18:57:12, 184.6 KB) [[attachment:sage-4.1.1.rc2.freebsd32.test.log]]
  • [get | view] (2009-08-10 18:57:29, 28.5 KB) [[attachment:sage-4.1.1.rc2.patch]]
  • [get | view] (2009-08-10 18:57:49, 184.4 KB) [[attachment:sage-4.1.freebsd32.test.log]]
  • [get | view] (2009-08-09 20:26:37, 34.0 KB) [[attachment:sage-4.1.patch]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.