grzegorzmazur / yacas

Computer calculations made easy
http://www.yacas.org
GNU Lesser General Public License v2.1
125 stars 23 forks source link

Old gentoo ebuild failes with "yacas-1.6.1/JavaYacas: No such file or directory" in the 1.6.1 release #227

Closed Petross404 closed 7 years ago

Petross404 commented 7 years ago

I modified the old ebuild for 1.6.1 release and if java is disabled, it compiles and works fine. The old ebuilds had a snipset of code that installed some java-related stuff, if java was enabled. I took a look at the source and I think the error message is correct and there is no such file or directory a JavaYacas.

So, should I remove these snipsets? : if use java; then cd "${WORKDIR}/${P}"/JavaYacas || die emake -f makefile.yacas fi

I am asking you, because this directory could as well be moved somewhere else, that I should point the ebuild to.

The whole build.log: http://dpaste.com/16M9FBK The ebuild: https://github.com/Petross404/local/blob/master/sci-mathematics/yacas/yacas-1.6.1.ebuild

grzegorzmazur commented 7 years ago

JavaYacas is jyacas now; but more importantly, the .jar build is now integrated into the unified build system. Hence, whether the jar is built or not depends on ENABLE_JYACAS cmake option being enabled or disabled. Actually, enabling and disabling any part of yacas can be achieved with cmake options (which you set in src_configure()), hence the modification of CMakeLists.txt in src_prepare() should not be necessary.

Petross404 commented 7 years ago

Ok so there is no need for the failing code snipset. I will hapilly remove it.

I am not sure it was clear what src_prepare does. Basically if I disable CYACAS_KERNEL, Yacas still searches for boost, openssl and other stuff because cyacas/CMakeLists.txt is commanding that way. It is best if one disables CYACAS_KERNEL, openssl, boost should not be "pulled" by portage or be linked to.

That's why I am removing this line* from cyacas/CMakeLists.txt, so that cmake search and link to them no more. Please correct me if I am wrong.

I hope this is quite self-explanatory: https://paste.pound-python.org/show/FIw6brPm7gkIzftq3yz1/

*sed -i '/add_subdirectory (yacas-kernel)/d' cyacas/CMakeLists.txt

EDIT: Scratch that, you are right. cmake option just does the job.

grzegorzmazur commented 7 years ago

Ups, sorry, I've answered before getting to the last line of your comment, so now my answer below is not reaaly needed.

When CYACAS_KERNEL is disabled, its dependencies should not be pulled in. Looking at the log at https://paste.pound-python.org/show/FIw6brPm7gkIzftq3yz1/ I think I've found a typo; there's --DENABLE_CYACAS_KERNEL=no instead of -DENABLE_CYACAS_KERNEL=no.

BTW, the setting --with-html-dir=/usr/share/doc/yacas-1.6.1/html is no longer applicable. And you've set ENABLE_DOCS to no anyway :)

grzegorzmazur commented 7 years ago

I've taken your file and cleaned it up a bit: https://gist.github.com/grzegorzmazur/f35c05145f88cf6c44f2868f55047f21

The changes are:

I've done my best, but I'm no gentoo expert and I haven't tested it

Petross404 commented 7 years ago

The changes seem to be ok. Thanks for your time editing it. 👍

The typo you mentioned is just the minus (-) and plus(+) signs that diff placed there. --DENABLE_CYACAS_KERNEL=no +-DENABLE_CYACAS_KERNEL=yes In the the ebuild, or in the actual build.log it is just -DENABLE_CYACAS_KERNEL=something. Good that you noticed though.

Last day I opened a bug @bugs.gentoo in order for someone to take a look. Is there something else that can be done? Should we contact Gentoo Mathematics Project @ sci-mathematics@gentoo.org?

grzegorzmazur commented 7 years ago

Yeah, I think so. First of all the old version is badly outdated. The ebuild file you've created looks clean and reasonable. Even better, the yacas build system should be fairly stable now, so subsequent yacas versions should not require any significant changes to the structure of the ebuild file. So, if you don't mind, please push the changes to them. On the other hand, I'll be more than happy to accept your pull request with the ebuild file somewhere in cyacas/packaging subdirectory (this way it can be updated every time a new version is released)

Petross404 commented 7 years ago

Well, yacas-1.6.1 is now in portage! Within an hour after the bug was assigned to Gentoo Mathematics Project, Andrey Grozin made a commit (2 actually, one for net-libs/zmqpp) and everything is up to date :-) https://bugs.gentoo.org/show_bug.cgi?id=607108

I am not sure what a pull request is (and how it is done) but you can take the fixed, official ebuild of the link below and do whatever you think best with it. 👍 https://gitweb.gentoo.org/repo/gentoo.git/tree/sci-mathematics/yacas/yacas-1.6.1.ebuild

Thank you very much for all your help and patience.

grzegorzmazur commented 7 years ago

Congratulations! And thanks a lot for bringing up-to-date yacas to gentoo!