On Fri, Sep 1, 2023 at 11:51 PM Ralf Hemmecke <[email protected]> wrote:

> > I'd propose to add the version support via pkg-config. If this is OK, I'd
> > provide a PR for this.
> >
> > pkg-config would output the version in an easily parceable format, so that
> > one would not need to call sed to santitize the output of
> >
> > fricas --version
>
> I cannot say whether the pkg-config stuff will make it into frica, but I
> would love to see how it works. Would it cost you too much effort to
> create such a PR?

it's not clear to me what the FriCAS version is meant to be. Is it
PACKAGE_VERSION='2023-06-17' (in the current git master)

>
> How is the underlying LISP recognized by pkg-config.

it's all very easy - one creates a template file fricas.pc.in with the
values filled in by ./configure, which writes fricas.pc
The latter is then installed by "make install" (does FriCAS have
install target in the main
Makefile?) into $prefix/lib/pkgconfig/

Then pkg-config reads fricas.pc when called, and prints the values it
is asked for. E.g. using GMP as
an example:

$ pkg-config --modversion gmp # GMP version
6.2.1
$ pkg-config --libs gmp # GMP libraries/flags fotr the linker
-lgmp

etc.

it allows custom fields to be added to fricas.pc, so it's easy to
fill/queue these, too, e.g. for the LIsp
name and Lisp version in the case of FriCAS.

$ pkg-config --print-variables gmp # show all the variable defined for GMP
exec_prefix
includedir
libdir
pcfiledir
prefix
$ pkg-config --variable=libdir gmp # print the value of libdir variable
/usr/lib/x86_64-linux-gnu

etc.



HTH
Dima






>
> Otherwise, I do as Waldek proposed and single out the --version option
> to simply output the fricas and lisp version and exit when it appears on
> the command line of the fricas script.
>
> Ralf
>
> --
> You received this message because you are subscribed to the Google Groups 
> "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/fricas-devel/931beec1-a2c4-3be2-7198-87d9fc86136c%40hemmecke.org.

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/CAAWYfq07TtLc4%3DPB0orTjZT3eRiU0e_Fvqw8ziWyN9PpfVP0rg%40mail.gmail.com.

Reply via email to