Update sage

This commit is contained in:
Manuel 2012-04-26 05:31:30 +00:00
parent 70ae5c3116
commit 1b3e8722ad
10 changed files with 333 additions and 59 deletions

109
atlas-lapack/PKGBUILD Normal file
View File

@ -0,0 +1,109 @@
#
# Platform packages for Chakra
#
pkgname=atlas-lapack
pkgver=3.8.4
_lapackver=3.4.0
pkgrel=1
pkgdesc="Complete LAPACK and BLAS implementation using optimised ATLAS routines"
url="http://math-atlas.sourceforge.net/"
depends=('gcc-libs')
makedepends=('binutils' 'sed' 'gcc-fortran')
arch=('i686' 'x86_64')
conflicts=('blas' 'lapack' 'cblas')
provides=("blas" "lapack=$_lapackver" 'cblas')
license=('custom:blas' 'custom:lapack' 'custom:atlas')
source=(http://www.netlib.org/lapack/lapack-$_lapackver.tgz http://downloads.sourceforge.net/math-atlas/atlas${pkgver}.tar.bz2 blas-license.txt atlas-license.txt lapack.patch makefile.shared.mt makefile.shared.st misdetects_i1_as_i2.patch)
md5sums=('02d5706ec03ba885fc246e5fa10d8c70'
'1bb3abde499b492b4be1f1a0759fbfa2'
'38b6acb8ed5691d25863319d30a8b365'
'4903eb06072dfbf94710691ccb6660bf'
'c681f11a9e17d31247570a26e266a506'
'235db0272fc5a17100115d5c45f29700'
'16691a5b602dcb5a20abc525b2ae9cfc'
'628b8f61b0403f23558ce6bf4c723bbc')
build() {
NCPU=`grep "^processor" /proc/cpuinfo | wc -l`
[ -x /usr/bin/cpufreq-info ] && [ $(cpufreq-info -d) != '' ] && {
ICPU=0
while [ $ICPU -lt $NCPU ]; do
STATUS=`cpufreq-info -c $ICPU -p | cut -d' ' -f3`
[ "$STATUS" != "performance" ] && {
msg 'Before building this package, as root you must run'
msg '"cpufreq-set -g performance -c <CPU nr>" for each CPU (<CPU'
msg 'nr> is 0, 1, 2 up to the number of your CPUS.'
return 1
}
let ICPU=ICPU+1
done
}
if [ "$CARCH" = "x86_64" ]; then
ARCHITECTURE_BUILD_OPTS="-b 64" # for x86_64
else
ARCHITECTURE_BUILD_OPTS="-b 32" # for i686
fi
mkdir -p "$srcdir/ATLAS/build"
cd "$srcdir/ATLAS"
patch -p0 -i "$srcdir/misdetects_i1_as_i2.patch"
cd "$srcdir/ATLAS/build"
msg 'Determine compiler and options for LAPACK'
../configure --prefix=/usr/ $ARCHITECTURE_BUILD_OPTS -Fa alg -fPIC
FORTRAN=`grep "F77 =" Make.inc|sed -e 's/ *F77 = //'`
FORTRANOPS=`grep "F77FLAGS =" Make.inc|sed -e 's/ *F77FLAGS = //'`
NOPTS=`echo $FORTRANOPS|sed -e 's/-O[0-9]/-O0/'`
msg 'Build LAPACK'
cd "$srcdir/lapack-$_lapackver"
cp INSTALL/make.inc.gfortran make.inc
patch -Np0 -i "$srcdir/lapack.patch"
make FORTRAN=$FORTRAN OPTS="$FORTRANOPS" NOOPT="$NOPTS" lib
LAPACKLIB="$srcdir/lapack-$_lapackver/liblapack.a"
msg 'Build ATLAS'
cd "$srcdir/ATLAS/build"
rm -rf *
../configure --prefix=/usr/ $ARCHITECTURE_BUILD_OPTS -Fa alg -fPIC \
--with-netlib-lapack="$LAPACKLIB"
make -j1 build
make -j1 check
make -j1 time
msg 'Build shared libraries'
cd lib
if [ 1 -lt $NCPU ]; then
cp "$srcdir/makefile.shared.mt" makefile
else
cp "$srcdir/makefile.shared.st" makefile
fi
make -f makefile
}
package() {
NCPU=`grep "^processor" /proc/cpuinfo | wc -l`
cd "$srcdir/ATLAS/build"
make DESTDIR="$pkgdir/usr" install
cp -d lib/*.so* "$pkgdir/usr/lib"
cd "$pkgdir/usr/lib"
if [ 1 -lt $NCPU ]; then
mv -f libptcblas.a libcblas.a
mv -f libptf77blas.a libf77blas.a
else
rm -f *pt*
fi
ln -s libf77blas.so libblas.so.3
ln -s liblapack.so.$_lapackver liblapack.so.3
ln -s liblapack.so.3 liblapack.so
install -Dm644 "${srcdir}/blas-license.txt" \
"${pkgdir}/usr/share/licenses/$pkgname/blas-license.txt"
install -Dm644 "${srcdir}/lapack-$_lapackver/LICENSE" \
"${pkgdir}/usr/share/licenses/$pkgname/lapack-license.txt"
install -Dm644 "${srcdir}/atlas-license.txt" \
"${pkgdir}/usr/share/licenses/$pkgname/atlas-license.txt"
}

View File

@ -0,0 +1,29 @@
Automatically Tuned Linear Algebra Software v3.8.2
(C) Copyright 1999 R. Clint Whaley
Code contributers : R. Clint Whaley, Antoine P. Petitet
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the ATLAS group or the names of its contributers may
not be used to endorse or promote products derived from this
software without specific written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ATLAS GROUP OR ITS CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

View File

@ -0,0 +1,19 @@
From: http://www.netlib.org/blas/faq.html
2) Are there legal restrictions on the use of BLAS reference
implementation software?
The reference BLAS is a freely-available software package. It is
available from netlib via anonymous ftp and the World Wide Web. Thus,
it can be included in commercial software packages (and has been). We
only ask that proper credit be given to the authors.
Like all software, it is copyrighted. It is not trademarked, but we do
ask the following:
If you modify the source for these routines we ask that you change the
name of the routine and comment the changes made to the original.
We will gladly answer any questions regarding the software. If a
modification is done, however, it is the responsibility of the person
who modified the routine to provide support.

20
atlas-lapack/lapack.patch Normal file
View File

@ -0,0 +1,20 @@
--- SRC/Makefile.old 2011-02-08 17:39:23.966666767 +0100
+++ SRC/Makefile 2011-02-08 17:40:52.990000016 +0100
@@ -146,7 +146,7 @@
sgeequb.o ssyequb.o spoequb.o sgbequb.o \
sbbcsd.o slapmr.o sorbdb.o sorcsd.o
-DSLASRC = spotrs.o sgetrs.o spotrf.o sgetrf.o
+DSLASRC = spotrs.o sgetrs.o sgetrf.o
SXLASRC = sgesvxx.o sgerfsx.o sla_gerfsx_extended.o sla_geamv.o \
sla_gercond.o sla_rpvgrw.o ssysvxx.o ssyrfsx.o \
@@ -227,7 +227,7 @@
cla_hercond_c.o cla_hercond_x.o cla_herpvgrw.o \
cla_lin_berr.o clarscl2.o clascl2.o cla_wwaddw.o
-ZCLASRC = cpotrs.o cgetrs.o cpotrf.o cgetrf.o
+ZCLASRC =
DLASRC = \
dgbbrd.o dgbcon.o dgbequ.o dgbrfs.o dgbsv.o \

View File

@ -0,0 +1,23 @@
include Make.inc
all: libatlas.so libf77blas.so libcblas.so libblas.so liblapack.so.3.4.0
libatlas.so: libatlas.a
ld $(LDFLAGS) -shared -soname $@ -o $@ --whole-archive libatlas.a \
--no-whole-archive -lc $(LIBS)
libf77blas.so : libptf77blas.a libatlas.so
ld $(LDFLAGS) -shared -soname libblas.so.3 -o $@ --whole-archive \
libptf77blas.a --no-whole-archive $(F77SYSLIB) -L. -latlas
libcblas.so : libptcblas.a libatlas.so
ld $(LDFLAGS) -shared -soname libcblas.so -o $@ --whole-archive \
libptcblas.a -L. -latlas
libblas.so: libf77blas.so
ln -s $< $@
liblapack.so.3.4.0 : liblapack.a libcblas.so libblas.so
ld $(LDFLAGS) -shared -soname liblapack.so.3 -o $@ --whole-archive \
liblapack.a --no-whole-archive $(F77SYSLIB) -L. -lcblas -lblas -lgcc_s

View File

@ -0,0 +1,23 @@
include Make.inc
all: libatlas.so libf77blas.so libcblas.so libblas.so liblapack.so.3.4.0
libatlas.so: libatlas.a
ld $(LDFLAGS) -shared -soname $@ -o $@ --whole-archive libatlas.a \
--no-whole-archive -lc $(LIBS)
libf77blas.so : libf77blas.a libatlas.so
ld $(LDFLAGS) -shared -soname libblas.so.3 -o $@ --whole-archive \
libf77blas.a --no-whole-archive $(F77SYSLIB) -L. -latlas
libcblas.so : libcblas.a libatlas.so
ld $(LDFLAGS) -shared -soname $@ -o $@ --whole-archive libcblas.a \
-L. -latlas
libblas.so: libf77blas.so
ln -s $< $@
liblapack.so.3.4.0 : liblapack.a libcblas.so libblas.so
ld $(LDFLAGS) -shared -soname liblapack.so.3 -o $@ --whole-archive \
liblapack.a --no-whole-archive $(F77SYSLIB) -L. -lcblas -lblas -lgcc_s

View File

@ -0,0 +1,13 @@
--- CONFIG/src/backend/archinfo_x86.c.orig 2011-12-10 13:25:13.145469768 +0100
+++ CONFIG/src/backend/archinfo_x86.c 2011-12-10 13:26:23.358198406 +0100
@@ -309,9 +309,9 @@
case 0x1A:
case 0x1E:
case 0x1F:
+ case 0x25:
iret = IntCorei1;
break;
- case 0x25:
case 0x2A:
iret = IntCorei2;
break;

View File

@ -1,96 +1,115 @@
#
# Platform Packages for Chakra, part of chakra-project.org
#
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
# include global config
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
# maintainer: Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
pkgname=sage-mathematics
pkgver=4.7
pkgver=4.8
pkgrel=1
pkgdesc='SAGE: Open Source Mathematics Software, a viable free alternative to Magma, Maple, Mathematica, and Matlab.'
pkgdesc='Open Source Mathematics Software, a viable free alternative to Magma, Maple, Mathematica, and Matlab.'
url='http://www.sagemath.org'
arch=('i686' 'x86_64')
license=('GPL')
depends=('ppl')
makedepends=('gcc-fortran' 'gcc-libs' 'desktop-file-utils' 'imagemagick' 'texlive-core')
optdepends=('imagemagick: some plotting functionality benefits from it'
'texlive-core: some plotting functionality benefits from it')
options=('!makeflags')
install="${pkgname}.install"
source=("http://sage.math.washington.edu/home/release/sage-${pkgver}/sage-${pkgver}.tar"
'SAGE-notebook.desktop')
md5sums=('db4d891feed487e1696b8d01ae3b6469'
'dc391f12b7d17dd37326343ec0e99bbd')
depends=('atlas-lapack')
makedepends=('gcc-fortran' 'desktop-file-utils' 'texlive-core')
optdepends=('ffmpeg: to show animations' 'imagemagick: to show animations and some LaTeX output in the notebook'
'texlive-core: to view LaTeX output in the notebook and to use SageTeX'
'jsmath-fonts: native TeX fonts for the notebook'
'openssh: to use the notebook in secure mode')
install="$pkgname.install"
source=("http://boxen.math.washington.edu/home/release/sage-$pkgver/sage-$pkgver.tar"
"http://boxen.math.washington.edu/home/leif/Sage/spkgs/gfan-0.4plus.p3.spkg"
"http://boxen.math.washington.edu/home/leif/Sage/spkgs/givaro-3.2.13.rc1.p4.spkg"
'SAGE-notebook.desktop' 'polybori_gcc47.patch')
noextract=("gfan-0.4plus.p3.spkg" "givaro-3.2.13.rc1.p4.spkg")
md5sums=('3e9725846a20f624a9a6811107fc5cb0'
'2e35abd57788571faf6b638802bff470'
'a84996518e39a1197eaf63562d8fe734'
'cc47a29bc32fbdea48f8a19e2ad70441'
'21462df65ca8bc72988022ba572a0753')
build() {
cd sage-${pkgver}
cd sage-$pkgver
# modularization of sage, sort of :)
#mkdir -p spkg/installed
#touch spkg/installed/readline-6.1
mkdir -p spkg/installed
touch spkg/installed/ppl-0.11.2
# fix gfan build with GCC 4.7 http://trac.sagemath.org/sage_trac/ticket/12760
mv ../gfan-0.4plus.p3.spkg spkg/standard
rm spkg/standard/gfan-0.4plus.p1.spkg
# fix sage library build with GCC 4.7 http://trac.sagemath.org/sage_trac/ticket/12760
mv ../givaro-3.2.13.rc1.p4.spkg spkg/standard
rm spkg/standard/givaro-3.2.13.rc1.p3.spkg
# fix polybori build with GCC 4.7 http://trac.sagemath.org/sage_trac/ticket/12750
cd spkg/standard
tar xjf polybori-0.7.1.p6.spkg
patch -p0 -i $srcdir/polybori_gcc47.patch
tar cjf polybori-0.7.1.p6.spkg polybori-0.7.1.p6
rm -r polybori-0.7.1.p6
cd ../..
# fix missing symbol _ZN23Parma_Polyhedra_Library13have_sse_unitE on i686 http://trac.sagemath.org/sage_trac/ticket/11391
if [[ "$CARCH" == "i686" ]]; then
cd spkg/standard
tar xjf ppl-0.11.2.p0.spkg
sed -i 's/--enable-interfaces=c++/--enable-interfaces="c++ c"/' ppl-0.11.2.p0/spkg-install
tar cjf ppl-0.11.2.p0.spkg ppl-0.11.2.p0
rm -r ppl-0.11.2.p0
cd ../..
fi
# fix "missing sage.all error" during build
unset CFLAGS
unset CXXFLAGS
# fix build errors
unset LDFLAGS
# enable multiple threads while building, is this really needed? check if uses MAKEFLAGS
export SAGE_BUILD_THREADS=$(lscpu | awk '/^CPU\(s\):/ { print $2 }')
export MAKE="make -j${SAGE_BUILD_THREADS}"
# fix polybori, linbox and sage library build with GCC 4.7 http://trac.sagemath.org/sage_trac/ticket/12751
export CXX="g++ -fpermissive"
# use Chakra's fortran rather then the one that ships with sage to compile sage's fortran
# parallel build
export MAKE="make -j2"
# use archlinux's fortran
export SAGE_FORTRAN='/usr/bin/gfortran'
export SAGE_FORTRAN_LIB='/usr/lib/libgfortran.so'
# use external ATLAS
[[ $USE_EXTERNAL_ATLAS ]] && export SAGE_ATLAS_LIB='/usr/lib'
# disable building with debugging support
export SAGE_DEBUG='no'
# enable fat binaries (disables processor specific optimizations)
# comment out if you're only building it for yourself
export SAGE_FAT_BINARY='yes'
# can't write to root in a clean chroot
export DOT_SAGE='/build/src/'
# only build sage, no documents
#make build
# export SAGE_FAT_BINARY='yes'
make
}
# uncomment if we want to run all the tests (warning: very long)
#make ptestlong
check() {
cd sage-$pkgver
make ptest || /bin/true
# uncomment if you want to run all the tests (warning: very long)
# make ptestlong || /bin/true
}
package() {
cd sage-${pkgver}
cd sage-$pkgver
# cp because make install is experimental and will corrupt the install
install -d ${pkgdir}/opt/sage
cp -r * ${pkgdir}/opt/sage
install -d $pkgdir/opt/sage
cp -r * $pkgdir/opt/sage
# move SageTeX files to more appropriate directory
install -d ${pkgdir}/usr/share
mv ${pkgdir}/opt/sage/local/share/texmf \
${pkgdir}/usr/share
desktop-file-install ${srcdir}/SAGE-notebook.desktop \
--dir ${pkgdir}/usr/share/applications
desktop-file-install $srcdir/SAGE-notebook.desktop --dir $pkgdir/usr/share/applications
# create link to main binary
install -d ${pkgdir}/usr/bin
ln -s /opt/sage/sage ${pkgdir}/usr/bin/sage
install -d $pkgdir/usr/bin
ln -s /opt/sage/sage $pkgdir/usr/bin/sage
# remove build logs
rm -f ${pkgdir}/opt/sage/install.log
rm -rf ${pkgdir}/opt/sage/spkg/logs
rm -f $pkgdir/opt/sage/install.log
# remove source packages, since they are rarely needed, they are 300mb in size (compressed), and no need to compile them, put them into aur/sage-mathematics-spkgs
rm -f ${pkgdir}/opt/sage/spkg/base/*spkg
rm -f ${pkgdir}/opt/sage/spkg/standard/*spkg
# remove source packages
rm -rf $pkgdir/opt/sage/spkg/{base,standard,logs}
}

View File

@ -1,8 +1,8 @@
[Desktop Entry]
Version=1.0
Name=SAGE
Comment=SAGE NOTEBOOK
Comment[en_US]=SAGE NOTEBOOK
Comment=SAGE notebook
Comment[en_US]=SAGE notebook
Exec=/opt/sage/sage -notebook
GenericName=
GenericName[de]=
@ -12,7 +12,7 @@ Name[de]=SAGE
StartupNotify=true
Terminal=true
Type=Application
Categories=Science;Math;
Categories=Education;Science;Math;
X-DCOP-ServiceType=
X-KDE-SubstituteUID=false
X-KDE-Username=

View File

@ -0,0 +1,19 @@
# HG changeset patch
# User Alexander Dreyer <adreyer@gmx.de>
# Date 1332364717 -3600
# Node ID 43b3931ceed7b57c4c5385442de6ff45bd0f477c
# Parent 617ce1a715329d16e5ebde0bfdde9c4d09072451
FIX explict name lookups (in template base)
diff -r 617ce1a715329d16e5ebde0bfdde9c4d09072451 -r 43b3931ceed7b57c4c5385442de6ff45bd0f477c libpolybori/include/polybori/orderings/CBlockOrderingFacade.h
--- polybori-0.7.1.p6/src/polybori-0.7/polybori/include/CBlockOrderingFacade.h Mon Mar 19 22:53:46 2012 +0100
+++ polybori-0.7.1.p6/src/polybori-0.7/polybori/include/CBlockOrderingFacade.h Wed Mar 21 22:18:37 2012 +0100
@@ -91,7 +91,7 @@
CacheManager<order_lead_tag> cache_mgr(poly.ring());
typename base_type::descending_property descending;
- return monom( dd_block_degree_lead(cache_mgr, blockDegCache,
+ return base_type::monom( dd_block_degree_lead(cache_mgr, blockDegCache,
poly.navigation(), m_indices.begin(),
set_type(poly.ring()), descending) );
}