Skip to content

Commit

Permalink
Trac #29552: Upgrade giac to 1.5.0-87
Browse files Browse the repository at this point in the history
www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/

(from #29521)

Previous updates:

#26315 Upgrade to Giac 1.5
#28101 update giac to 1.5.0-63

URL: https://trac.sagemath.org/29552
Reported by: mkoeppe
Ticket author(s): Matthias Koeppe
Reviewer(s): Dima Pasechnik
  • Loading branch information
Release Manager committed Aug 23, 2020
2 parents 30cac80 + eb7995f commit 843bf6b
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 70 deletions.
6 changes: 3 additions & 3 deletions build/pkgs/giac/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=giac-VERSION.tar.bz2
sha1=c8b4b40dae98a83adda0142332a482c4fec2d4eb
md5=504151eb5f483a24c941822d792f0bb3
cksum=3611162964
sha1=873f44e8b6a8f43121c30587d99016763c9e047c
md5=52eda3193e16ab05b4fb2a727c8f3308
cksum=2879733923
upstream_url=https://trac.sagemath.org/raw-attachment/ticket/29552/giac-VERSION.tar.bz2
2 changes: 1 addition & 1 deletion build/pkgs/giac/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
readline libpng $(MP_LIBRARY) mpfr mpfi ntl gsl pari
readline libpng $(MP_LIBRARY) mpfr mpfi ntl gsl pari glpk curl

----------
All lines of this file are ignored except the first.
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/giac/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.0.87
1.5.0.87p0
12 changes: 0 additions & 12 deletions build/pkgs/giac/patches/autotools/configure-libpng.patch

This file was deleted.

83 changes: 83 additions & 0 deletions build/pkgs/giac/patches/autotools/giac-1.5.0.87-gsl_lapack.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
diff --git a/configure.in b/configure.in
index 204d17a..434e4c9 100644
--- a/configure.in
+++ b/configure.in
@@ -38,6 +38,7 @@ AC_LANG([C++])
AC_PROG_LIBTOOL
AC_PROG_YACC
AM_PROG_LEX
+PKG_PROG_PKG_CONFIG
AC_C_BIGENDIAN

dnl Check for standard C+headers
@@ -139,47 +140,17 @@ AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)

dnl Checking for Gnu Sci Lib
-CONFIG_GSL="yes"
-AC_ARG_ENABLE([gsl],[
- AS_HELP_STRING([--enable-gsl], [Use GNU scientific library [[default=yes]]])],
- [ if test "x$enableval" = "xno"; then CONFIG_GSL="no"; fi], [])
-
-if test "$CONFIG_GSL" = "yes"; then
- AC_CHECK_HEADERS(gsl/gsl_blas.h)
- AC_CHECK_HEADERS(gsl/gsl_eigen.h)
- if test "$ac_cv_header_gsl_gsl_blas_h" != "yes" -o "$ac_cv_header_gsl_gsl_eigen_h" != "yes"; then
- CONFIG_GSL="no"
- fi
-fi
-if test "$CONFIG_GSL" = "yes"; then
- save_LIBS="$LIBS"
- AC_CHECK_LIB(gslcblas, main, [], [CONFIG_GSL="no"])
- AC_CHECK_LIB(gsl, gsl_sf_gamma, [], [CONFIG_GSL="no"])
- LIBS="$save_LIBS"
- fi
-GSL_LIBS=""
-if test "$CONFIG_GSL" = "yes"; then
- GSL_LIBS="-lgsl -lgslcblas"
- fi
-AC_SUBST(CONFIG_GSL)
-AC_SUBST(GSL_LIBS)
-AM_CONDITIONAL(CONFIG_GSL, [test "$CONFIG_GSL" = "yes"])
-
-CONFIG_LAPACK="yes"
-AC_ARG_ENABLE([lapack],
- [AS_HELP_STRING([--enable-lapack], [Use LAPACK [[default=yes]]])],
- [ if test "$enableval" = "no"; then CONFIG_LAPACK="no"; fi], [])
+PKG_CHECK_MODULES([GSL], [gsl],[
+ AC_DEFINE(HAVE_LIBGSL,1, [Define if gsl is installed])
+ AC_SUBST(GSL_LIBS)])

-if test "$CONFIG_LAPACK" = "yes"; then
-# AC_CHECK_LIB(f2c, main, [], [CONFIG_LAPACK="no"])
-# AC_CHECK_LIB(blas, main, [], [CONFIG_LAPACK="no"])
-# AC_CHECK_LIB(tmglib, main, [], [CONFIG_LAPACK="no"])
- AC_CHECK_LIB(gfortran, main)
- AC_CHECK_LIB(blas, main)
- AC_CHECK_LIB(lapack, main, [], [CONFIG_LAPACK="no"])
-# AX_BLAS([have_blas=yes],[have_blas=no])
-# AX_LAPACK([have_lapack=yes],[have_lapack=no])
-fi
+PKG_CHECK_MODULES([LAPACK], [lapack],[
+ AC_DEFINE(HAVE_LIBLAPACK,1,[Define if LAPACK is installed])
+ AC_SUBST(LAPACK_LIBS)])
+
+PKG_CHECK_MODULES([BLAS], [blas],[
+ AC_DEFINE(HAVE_BLAS,1,[Define if BLAS is installed])
+ AC_SUBST(BLAS_LIBS)])

CONFIG_PARI="yes"
AC_ARG_ENABLE([pari],
diff --git a/src/Makefile.am b/src/Makefile.am
index b5dd325..d45b553 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -14,7 +14,7 @@ libgiac_la_SOURCES = input_lexer.ll sym2poly.cc gausspol.cc threaded.cc \
help.cc lpsolve.cc optimization.cc signalprocessing.cc \
graphe.cc graphtheory.cc nautywrapper.c markup.cc kdisplay.cc kadd.cc # Ugh..

-libgiac_la_LIBADD = $(NTL_LIBS) $(COCOA_LIBS) $(PARI_LIBS) $(GSL_LIBS)
+libgiac_la_LIBADD = $(NTL_LIBS) $(COCOA_LIBS) $(PARI_LIBS) $(GSL_LIBS) $(LAPACK_LIBS) $(BLAS_LIBS)

giacincludedir = $(includedir)/giac
giacinclude_HEADERS = dispatch.h fraction.h gen.h desolve.h misc.h ti89.h \
48 changes: 0 additions & 48 deletions build/pkgs/giac/patches/autotools/ticket-22315-autotools.patch

This file was deleted.

3 changes: 1 addition & 2 deletions build/pkgs/giac/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,14 @@ echo "Configuring giac..."


# --disable-ao (avoid libao deps)
# --disable-lapack (avoid lapack and blas deps because they could be from the base system)
# On OS X (10.12) the built in intl is broken
DISABLENLS=""
if [ "$UNAME" = "Darwin" ]; then
echo "OS X Building without Native Language Support"
DISABLENLS="--disable-nls"
fi

sdh_configure --disable-gui --disable-ao --disable-lapack "$DISABLENLS" --enable-png=no --disable-samplerate
sdh_configure --disable-gui --disable-ao "$DISABLENLS" --enable-png=no --disable-samplerate

#############################################################
# Build
Expand Down
15 changes: 12 additions & 3 deletions build/pkgs/giac/spkg-src
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set -e

VERSION="1.5.0"
VERSIONREV="87"
PATCHSUFFIX=""
PATCHSUFFIX="p0"

# The upstream tarball name is: giac"$SOURCEORIG".tar.gz
SOURCEORIG=_"$VERSION"-"$VERSIONREV"
Expand Down Expand Up @@ -67,9 +67,15 @@ touch html_mtt
touch html_vall
#


# building giac source tarball for the spkg
cd ../../../
cd ../../

for a in "$SAGE_ROOT"/build/pkgs/giac/patches/autotools/*.patch; do
patch -p1 < $a
done
autoreconf -fi

cd ..
tar -cjf "$OUTPUTFILEBASENAME".tar.bz2 src

# cleaning extracted dir.
Expand All @@ -78,3 +84,6 @@ rm -rf "$TARGET"

# going back to starting dir
cd "$ORIGDIR"
#$SAGE_ROOT/sage -package update giac "$VERSION"."$VERSIONREV""$PATCHSUFFIX"
echo "$VERSION"."$VERSIONREV""$PATCHSUFFIX" > build/pkgs/giac/package-version.txt
$SAGE_ROOT/sage -package fix-checksum giac

0 comments on commit 843bf6b

Please sign in to comment.