Dnia Sat, Sep 02, 2023 at 12:39:40AM +0300, Dima Pasechnik napisał(a):
> On Fri, Sep 1, 2023 at 11:51=E2=80=AFPM Ralf Hemmecke <r...@hemmecke.org> w=
> rote:
> 
> > > 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 t=
> hat
> > > 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=3D'2023-06-17' (in the current git master)

In git repo this is date of last modification of configure.ac.
Releases get three part version number with parts separated
by dots.  So it is easy to distinguish releases from git
snapshots, but meaning is different.  OTOH it _not_ expected
that anybody will depend on version numbers from git...
 
> >
> > 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/

There is 'install' target.

> 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=3Dlibdir gmp # print the value of libdir variable
> /usr/lib/x86_64-linux-gnu
> 
> etc.

Looks OK.  But AFAICS 'pkg-config' support is really additional to
'--version'.  So change to '--version' should go on.

-- 
                              Waldek Hebisch

-- 
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 fricas-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/ZPMmeWm9m0I13zOl%40mail.math.uni.wroc.pl.

Reply via email to