Skip to content

Commit

Permalink
Trac #29541: spkg-configure.m4 for giac
Browse files Browse the repository at this point in the history
This ticket adds an spkg-configure.m4 for giac, in order to use it from
a system package if possible.

https://repology.org/project/giac/versions

See also:
 - #30537 Upgrade giac to 1.6.0-7

URL: https://trac.sagemath.org/29541
Reported by: gh-thierry-FreeBSD
Ticket author(s): Thierry Thomas, Matthias Koeppe
Reviewer(s): Isuru Fernando
  • Loading branch information
Release Manager committed Sep 15, 2020
2 parents 70ea8fe + 0df15df commit dff7c61
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build/pkgs/giac/distros/arch.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
libgiac
libgiac giac
1 change: 1 addition & 0 deletions build/pkgs/giac/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
giac
2 changes: 2 additions & 0 deletions build/pkgs/giac/distros/debian.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
libgiac-dev
xcas
2 changes: 2 additions & 0 deletions build/pkgs/giac/distros/fedora.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
giac
giac-devel
1 change: 1 addition & 0 deletions build/pkgs/giac/distros/opensuse.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
giac
26 changes: 26 additions & 0 deletions build/pkgs/giac/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
SAGE_SPKG_CONFIGURE([giac], [
SAGE_SPKG_DEPCHECK([pari], [
dnl giac does not seem to reveal its patchlevel
m4_pushdef([GIAC_MIN_VERSION], [1.5.0])
m4_pushdef([GIAC_MAX_VERSION], [1.5.999])
AC_CACHE_CHECK([for giac >= ]GIAC_MIN_VERSION[, <= ]GIAC_MAX_VERSION, [ac_cv_path_GIAC], [
AC_PATH_PROGS_FEATURE_CHECK([GIAC], [giac], [
giac_version=$($ac_path_GIAC --version 2> /dev/null | tail -1)
AS_IF([test -n "$giac_version"], [
AX_COMPARE_VERSION([$giac_version], [ge], GIAC_MIN_VERSION, [
AX_COMPARE_VERSION([$giac_version], [le], GIAC_MAX_VERSION, [
ac_cv_path_GIAC="$ac_path_GIAC"
])
])
])
])
])
AS_IF([test -z "$ac_cv_path_GIAC"],
[sage_spkg_install_giac=yes])
AC_CHECK_HEADER([giac/giac.h], [
AC_SEARCH_LIBS([ConvertUTF16toUTF8], [giac], [
], [sage_spkg_install_giac=yes])
], [sage_spkg_install_giac=yes])
m4_popdef([GIAC_MIN_VERSION])
])
])

0 comments on commit dff7c61

Please sign in to comment.