summaryrefslogtreecommitdiff
path: root/sci-mathematics/giac
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
commit40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch)
tree758c221bad35c9288d0bd6df9c7dfc226728e52c /sci-mathematics/giac
parent8d5dbd847cbc704a6a06405856e94b461011afe3 (diff)
gentoo resync : 28.04.2021
Diffstat (limited to 'sci-mathematics/giac')
-rw-r--r--sci-mathematics/giac/Manifest5
-rw-r--r--sci-mathematics/giac/files/giac-1.6.0-pari-2.11.patch17
-rw-r--r--sci-mathematics/giac/files/giac-1.7.0.1-gsl_lapack.patch84
-rw-r--r--sci-mathematics/giac/giac-1.7.0.1.ebuild163
-rw-r--r--sci-mathematics/giac/metadata.xml39
5 files changed, 308 insertions, 0 deletions
diff --git a/sci-mathematics/giac/Manifest b/sci-mathematics/giac/Manifest
new file mode 100644
index 000000000000..b28327c84cd4
--- /dev/null
+++ b/sci-mathematics/giac/Manifest
@@ -0,0 +1,5 @@
+AUX giac-1.6.0-pari-2.11.patch 783 BLAKE2B f173015006fef4a9f8176965f923664f11b0b05151b126cf74a5bccf5036e1fd3aa97f12fd91808fab7fe23a3194e6a4a7a9f12be5b69a5dfda5aedec8a0117c SHA512 56102439f05f0e27bda49f1e9803bbba7921c87eab383fc2f068ccca6ef598f11e35d00f5a737076a6a41df08ef9065e567cb84030ba6ea928520f371d51b9ed
+AUX giac-1.7.0.1-gsl_lapack.patch 2912 BLAKE2B b0f9f05126316b9b76d5f1a5ad737cc88ecbc71dc450ef714f6da323128d9c945ada9d658c73647987f84638498aa4d3bbef49062424ab63b53c76defc127902 SHA512 14bfcb04e5a23933cfa4635789bf02f6d6e6a528c167504678b3d2ecb38f135d0c05583712005fe53afd7696cc9ebee5dc3ab90cac056d75bd43be786075b011
+DIST giac_1.7.0-1.tar.gz 82118267 BLAKE2B a9bb4cb260bfc7ba187907d054c737aa8f5de7baf132913dac2a054e886ec632d9077a52fb1e837a1db623223199592407734857725ee4b22c775f928893bb9d SHA512 05565ee22f4d81a4149935df9a32dc78ac07d06db1555a3d951169d184c746c61cd4d57407eabeb982fb8cb5b4a82726b5a553e6a9e689517a241eb0a8726929
+EBUILD giac-1.7.0.1.ebuild 4148 BLAKE2B 92bbb495a0b62c8a0e341cd6670fac2cf1203cb5561537b0f44e461b0470d3a60aed2f060ca98695c83cc56d4a32146994643d2d84878045aaec98c4714e2874 SHA512 0cb2124906eac884461a2b7628506b8782ab92d0b7852b741796eae9576f9b7f8fb9f6c1d34edd3974f5b427c21e0f4666c0dc1b922ca788daa02a8dfca2c855
+MISC metadata.xml 1314 BLAKE2B c38eadb22de3e64b39e144c8dd2e2c359b88ea7910390ea6044af9f8f83a6db08cb4f0142d1217ddd0f4ff051f2bb94f846a789adc521d02d4c704763da1c50a SHA512 7554640bd7ab2b2c1cb77d492d044d419b178497f8b5a6165168f4c3ab0c421121e98b0f0f25d3d10479a8fcd6635f28cfdae4562d6e0b5143b541155f697077
diff --git a/sci-mathematics/giac/files/giac-1.6.0-pari-2.11.patch b/sci-mathematics/giac/files/giac-1.6.0-pari-2.11.patch
new file mode 100644
index 000000000000..24142257a340
--- /dev/null
+++ b/sci-mathematics/giac/files/giac-1.6.0-pari-2.11.patch
@@ -0,0 +1,17 @@
+Change test output for PARI 2.11
+
+See https://trac.sagemath.org/ticket/25567
+and https://xcas.univ-grenoble-alpes.fr/forum/viewtopic.php?f=4&t=2102
+
+diff -ru a/check/TP11-sol.cas.out1 b/check/TP11-sol.cas.out1
+--- a/check/TP11-sol.cas.out1 2014-10-21 10:51:48.000000000 +0200
++++ b/check/TP11-sol.cas.out1 2018-08-07 17:04:12.528052773 +0200
+@@ -10,7 +10,7 @@
+ 1073741824000000000000000000061203284109000000000000000000000000008409,
+ 2^3*3*389*733*156904374622257604823879982847602392900751802349981470895277241,
+ "Done",
+-matrix[[2,7,1],[3,2,1],[389,2,1],[733,2,1],[156904374622257604823879982847602392900751802349981470895277241,2,matrix[[2,13,1],[3,3,1],[5,2,1],[7,2,1],[56467,2,1],[6553084925887974620811527,2,matrix[[2,5,1],[19,2,1],[71,2,1],[126823,2,1]]]]]],
++1,
+ 0,
+ [],
+ 1,
diff --git a/sci-mathematics/giac/files/giac-1.7.0.1-gsl_lapack.patch b/sci-mathematics/giac/files/giac-1.7.0.1-gsl_lapack.patch
new file mode 100644
index 000000000000..073762ec6a47
--- /dev/null
+++ b/sci-mathematics/giac/files/giac-1.7.0.1-gsl_lapack.patch
@@ -0,0 +1,84 @@
+diff --git a/configure.ac b/configure.ac
+index 44fd519..0a6bad7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -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
+@@ -225,47 +226,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], [])
+-
+-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([GSL], [gsl],[
++ AC_DEFINE(HAVE_LIBGSL,1, [Define if gsl is installed])
++ AC_SUBST(GSL_LIBS)])
++
++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)])
+
+ dnl if test "$CONFIG_PARI" = "yes"; then
+ dnl AC_MSG_CHECKING([whether PARI is configured with pthreads])
+diff --git a/src/Makefile.am b/src/Makefile.am
+index bb77986..d385fd0 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -16,7 +16,7 @@ libgiac_la_SOURCES = input_lexer.ll sym2poly.cc gausspol.cc threaded.cc \
+ caseval.c cutils.c graphic.c libbf.c libregexp.c libunicode.c \
+ qjsgiac.c quickjs.c quickjs-libc.c js.c
+
+-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 \
diff --git a/sci-mathematics/giac/giac-1.7.0.1.ebuild b/sci-mathematics/giac/giac-1.7.0.1.ebuild
new file mode 100644
index 000000000000..78894fa8a1e7
--- /dev/null
+++ b/sci-mathematics/giac/giac-1.7.0.1.ebuild
@@ -0,0 +1,163 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic xdg-utils
+
+FETCH_P="${PN}_"$(ver_rs 3 '-')
+MY_PV=$(ver_cut 1-3)
+DESCRIPTION="A free C++ Computer Algebra System library and its interfaces"
+HOMEPAGE="https://www-fourier.ujf-grenoble.fr/~parisse/giac.html"
+SRC_URI="https://www-fourier.ujf-grenoble.fr/~parisse/debian/dists/stable/main/source/${FETCH_P}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+LANGS="el en es pt"
+IUSE="ao doc +ecm examples gc +glpk gui static-libs test"
+for X in ${LANGS} ; do
+ IUSE="${IUSE} l10n_${X}"
+done
+
+# nauty and cliquer are automagical dependencies
+RDEPEND="dev-libs/gmp:=[cxx]
+ sys-libs/readline:=
+ gui? ( x11-libs/fltk
+ media-libs/libpng:= )
+ ao? ( media-libs/libao )
+ dev-libs/mpfr:=
+ sci-libs/mpfi
+ sci-libs/gsl:=
+ sci-mathematics/pari:=[threads]
+ dev-libs/ntl:=
+ virtual/lapack
+ virtual/blas
+ net-misc/curl
+ sci-mathematics/cliquer
+ sci-mathematics/nauty
+ ecm? ( sci-mathematics/gmp-ecm )
+ glpk? ( sci-mathematics/glpk )
+ gc? ( dev-libs/boehm-gc )"
+
+DEPEND="${RDEPEND}"
+
+BDEPEND="dev-tex/hevea
+ virtual/pkgconfig
+ virtual/yacc"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-1.7.0.1-gsl_lapack.patch"
+ "${FILESDIR}/${PN}-1.6.0-pari-2.11.patch"
+)
+
+REQUIRED_USE="test? ( gui )"
+
+# The mirror restriction is due to the French documentation for which
+# "Other kind of redistributions require the consent of the copyright
+# holder."
+RESTRICT="!test? ( test ) mirror"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_prepare(){
+ default
+ eautoreconf
+}
+
+src_configure(){
+ if use gui; then
+ append-cppflags -I$(fltk-config --includedir)
+ append-lfs-flags
+
+ # Get the big-L flags from fltk's LDFLAGS.
+ append-ldflags $(fltk-config --ldflags | sed -e 's/\(-L\S*\)\s.*/\1/')
+ fi
+
+ # Using libsamplerate is currently broken
+ #
+ # The giac build system supports --docdir, but the path /usr/share/giac/doc
+ # is hard-coded throughout the source code, so passing anything else to
+ # ./configure --docdir just causes problems. Later, we'll put things right.
+ #
+ # micropython is for specific use in an upstream project
+ econf \
+ --enable-gmpxx \
+ --disable-samplerate \
+ --disable-micropy \
+ --docdir=/usr/share/giac/doc \
+ $(use_enable static-libs static) \
+ $(use_enable gui) \
+ $(use_enable gui png) \
+ $(use_enable ao) \
+ $(use_enable ecm) \
+ $(use_enable glpk) \
+ $(use_enable gc)
+
+}
+
+src_install() {
+ docompress -x "/usr/share/doc/${PF}/"{aide_cas,doc,examples}
+ emake install DESTDIR="${D}"
+
+ # Move all of /usr/share/giac (which contains only documentation) to
+ # its /usr/share/doc/${PF} counterpart.
+ dodir /usr/share/doc
+ mv "${ED}"/usr/share/giac "${ED}/usr/share/doc/${PF}" || die
+
+ # and create a symlink from the original location to the new one
+ dosym "./doc/${PF}" /usr/share/giac
+
+ # This is duplicated in ${ED}/usr/share/doc/${PF}/examples
+ rm -r "${ED}/usr/share/doc/${PF}/doc/Exemples" || die
+
+ # These aren't supposed to be installed at all.
+ find "${ED}/usr/share/doc/${PF}" -type f -name 'Makefile*' -delete || die
+
+ # The French docs are not freely licensed according to the README.
+ rm -r "${ED}/usr/share/doc/${PF}/doc/fr" || die
+
+ dodoc AUTHORS ChangeLog INSTALL NEWS README TROUBLES
+ if ! use gui; then
+ rm -rf \
+ "${ED}"/usr/bin/x* \
+ "${ED}"/usr/share/application-registry \
+ "${ED}"/usr/share/applications \
+ "${ED}"/usr/share/icons \
+ || die "failed to clean up fltk files"
+ fi
+
+ if ! use doc; then
+ rm -r "${ED}/usr/share/doc/${PF}/doc" || die "failed to remove doc directory"
+ else
+ for lang in ${LANGS}; do
+ if use l10n_$lang; then
+ dosym ../aide_cas "/usr/share/doc/${PF}/doc/${lang}/aide_cas"
+ else
+ rm -r "${ED}/usr/share/giac/doc/${lang}" \
+ || die "failed to remove ${lang} documentation"
+ fi
+ done
+ fi
+
+ if ! use examples; then
+ rm -r "${ED}/usr/share/doc/${PF}/examples" \
+ || die "failed to remove examples"
+ fi
+
+ find "${ED}" -type f -name '*.la' -delete || die
+}
+
+pkg_postinst(){
+ if use gui; then
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+ fi
+}
+
+pkg_postrm(){
+ if use gui; then
+ xdg_desktop_database_update
+ xdg_icon_cache_update
+ fi
+}
diff --git a/sci-mathematics/giac/metadata.xml b/sci-mathematics/giac/metadata.xml
new file mode 100644
index 000000000000..3fadb3c53b01
--- /dev/null
+++ b/sci-mathematics/giac/metadata.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+
+ <maintainer type="person">
+ <email>mjo@gentoo.org</email>
+ </maintainer>
+
+ <maintainer type="person" proxied="yes">
+ <email>frp.bissey@gmail.com</email>
+ <name>Francois Bissey</name>
+ </maintainer>
+
+ <maintainer type="project" proxied="proxy">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+
+ <longdescription>
+ Giac is a free computer algebra system that can be used to perform
+ computer algebra, function graphs, interactive geometry (2-d and
+ 3-d), spreadsheet and statistics, programmation. It may be used as
+ a replacement for high end graphic calculators for example on
+ netbooks (for about the same price as a calculator but with much
+ more performances).
+ </longdescription>
+
+ <use>
+ <flag name="glpk">Enable the use of <pkg>sci-mathematics/glpk</pkg></flag>
+ <flag name="ecm">Enable the use of <pkg>sci-mathematics/gmp-ecm</pkg></flag>
+ <flag name="gc">Enable garbage collection support via <pkg>dev-libs/boehm-gc</pkg></flag>
+ </use>
+
+</pkgmetadata>