SageMath gained the ability to detect giac on the system in https://trac.sagemath.org/ticket/29541 The overlay ebuild looks relatively unscary... hopefully no surprises.
Ok, but only the 1.5.x for now. 1.6.x has broken bits upstream that I haven't fixed yet. OK, I am waiting for upstream to fix them since they have acknowledged the brokeness https://trac.sagemath.org/ticket/30537#comment:28
Ah, good to know. I will probably just wait a few days, then, and try 1.6.0.43. I need to figure out how to get the docs into the right place anyhow...
Sage only works with 1.5 at the moment too.
Hum, we only have pari-2.11+ left in the tree, I should remove the conditional in case we have an older pari.
It looks like the build system supports --docdir, but the value /usr/share/giac/doc is hard-coded throughout the source =/
Another thing I stumbled upon in the README: The French documentation is *not* released under the GPL. It is (c) by Renee de Graeve. It can be freely distributed for non commercial purpose. Other kind of redistributions require the consent of the copyright holder. Looks like that will have to go.
(In reply to Michael Orlitzky from comment #6) > Another thing I stumbled upon in the README: > > The French documentation is *not* released under the GPL. It is (c) > by Renee de Graeve. It can be freely distributed for non commercial > purpose. > Other kind of redistributions require the consent of the copyright holder. > > Looks like that will have to go. That's relatively easy to do. And yes it is known, that's why sage doesn't ship it either.
Cleaned the ebuild a little. For 1.6.0, I am really waiting for the next iteration that should also have configure options to disable micropython from building.
I don't think that last commit is going to delete the french docs. Removing "fr" from LANGS skips the line, rm -rf "${ED}"/usr/share/giac/doc/"${lang}" A few other easy things while I fight with the docs: 1. You can drop the pax stuff. There are no more pax kernels in Gentoo. 2. The desktop and icon files should be added to (or removed from) the cache upon (de)installation: inherit ... xdg-utils pkg_postinst(){ if use fltk; then xdg_desktop_database_update xdg_icon_cache_update fi } pkg_postrm(){ if use fltk; then xdg_desktop_database_update xdg_icon_cache_update fi } 3. We have a global USE=gui flag now that I think would be a lot more obvious than USE=fltk to enable the GUI.
Ok, so one secret to the docs is that you have to set the language to e.g. english in XCAS, and then choose Help -> Rebuild help cache from the menu. Otherwise all of the "Help" URLs contain a nonsense "local" component. Aside from that it mostly seems to be working if I, 1. Install everything to /usr/share/giac/doc 2. Move that to /usr/share/doc/${PF} 3. Symlink /usr/share/giac/doc to /usr/share/doc/${PF}
(In reply to Michael Orlitzky from comment #9) > I don't think that last commit is going to delete the french docs. Removing > "fr" from LANGS skips the line, > > rm -rf "${ED}"/usr/share/giac/doc/"${lang}" > You are right, it is not enough. > A few other easy things while I fight with the docs: > > 1. You can drop the pax stuff. There are no more pax kernels in Gentoo. > OK. > 2. The desktop and icon files should be added to (or removed from) the > cache upon (de)installation: > > inherit ... xdg-utils > > pkg_postinst(){ > if use fltk; then > xdg_desktop_database_update > xdg_icon_cache_update > fi > } > > pkg_postrm(){ > if use fltk; then > xdg_desktop_database_update > xdg_icon_cache_update > fi > } > Didn't know that. > 3. We have a global USE=gui flag now that I think would be a lot more > obvious than USE=fltk to enable the GUI. Right.
I still have https://github.com/cschwan/sage-on-gentoo/issues/608 on my todo list but it is not really towards the top of my priorities, feel free to do something about it.
I applied for a giac forum account but have yet to be approved. I would at least like to report the $(docdir) problems. It seems like the author prefers /usr/share/giac/doc to the default docdir, but rather than changing --docdir, he's made copies of everything in /usr/share/giac/doc and hard-coded that path in a lot of places. If he just doesn't know about --docdir, it might save a lot of trouble if /usr/share/giac/doc was replaced with $docdir everywhere, and --docdir=/usr/share/giac/doc was used by default. Aside from that... I've got something working for now. I'll deal with the rest of the USE=doc issues when the bugfix release arrives.
Created attachment 696300 [details] giac-1.7.0.1.ebuild How's v1.7.0.1? Here's the ebuild I've got. Most of the changes are somersaults that allow us to put the docs in the correct location.
That's a lot of stuff in src_install. Cursory look feels OK. I need to have a closer look this afternoon but I have some trust in your work.
All I've really done is set docdir to the wrong location (the one upstream prefers) so that everything, including the docs with hard-coded paths, gets installed to the same place. That makes it easy to move it all to the correct place (/usr/share/doc/${PF}) with a single command. Afterwards I symlink the two. This works around the fact that many things hard-code the path /usr/share/giac even when you specify --docdir=<something-else>. In any case, I was just checking in. If v1.7.0.1 won't work with sage yet, I'm happy to keep waiting. (I've CCed myself on those trac tickets.)
Antonio Rojas from arch says it does - he opened a ticket. I haven't tried yet but I believe him.
We are talking about 9.3 when it is released of course. Not 9.2.
I'm trying one more time to create a forum account to report the docdir issue upstream. Aside from that, v1.7.0.1 does work fine in the latest sage beta, so I'll merge it soon.
One more tiny change: I've added RESTRICT=mirror because of the French documentation license.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=320334104e3e56e4fff1f1f821e74f7a122dfd57 commit 320334104e3e56e4fff1f1f821e74f7a122dfd57 Author: Michael Orlitzky <mjo@gentoo.org> AuthorDate: 2021-03-31 12:42:19 +0000 Commit: Michael Orlitzky <mjo@gentoo.org> CommitDate: 2021-04-01 21:48:37 +0000 sci-mathematics/giac: new package for the Giac/Xcas math systems. We have bugzilla requests for this package going back to 2005! The SageMath suite has recently gained the ability to use Giac from the system, so now is an especially good time to add it to the tree. François Bissey has been maintaining this package for years in the sage-on-gentoo overlay and contributing fixes upstream, so the ebuild required only minor changes at this point. I personally thank him and you should too. Closes: https://bugs.gentoo.org/94539 Closes: https://bugs.gentoo.org/94542 Closes: https://bugs.gentoo.org/760684 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Michael Orlitzky <mjo@gentoo.org> sci-mathematics/giac/Manifest | 1 + .../giac/files/giac-1.6.0-pari-2.11.patch | 17 +++ .../giac/files/giac-1.7.0.1-gsl_lapack.patch | 84 +++++++++++ sci-mathematics/giac/giac-1.7.0.1.ebuild | 163 +++++++++++++++++++++ sci-mathematics/giac/metadata.xml | 39 +++++ 5 files changed, 304 insertions(+)