I was not aware of that. Thanks. And in fact I just discovered yesterday
the *. pc files for executables. I do not say it's of no use.

__
Greg

Le lun. 4 sept. 2023, 08:27, Dima Pasechnik <[email protected]> a écrit :

>
>
> On Mon, 4 Sept 2023, 09:12 Grégory Vanuxem, <[email protected]> wrote:
>
>> Hello Dima,
>>
>> I agree with you, Dima, about the usefulness of pkg-config and I am
>> not surprised the SAGE Team uses it; they incorporate tons of external
>> libraries.
>>
>> <digression>
>> In fact I discovered this utility some time ago, at the beginning of
>> Gnome 2 development. I thought this utility was developed by this team
>> since from my point of view at that time this is the team who really
>> popularised this utility. I used it because I needed a quick image
>> visualisator, 'eog' was becoming too library dependent, too large and
>> too long to start to just see a pic. I have been doing photography for
>> many years and to visualise pics I do not need a lot of functionality.
>> The Evas library from DR16 (Enlightenment window manager)  started to
>> use this utility and was useful to me to have linker arguments,
>> cflags, say -DSOMETHING=1, and eventually the include path.
>> </digression>
>>
>> But I see this application as an utility to know
>> *settings/configuration* about a library, and now some applications,
>> more than to know the version or (quick) help of an application. For
>> example on my computer I have in /usr/share/pkg-config/ 'fontutil.pc'
>> which contains:
>>
>> prefix=/usr
>> exec_prefix=${prefix}
>> libdir=${prefix}/lib/x86_64-linux-gnu
>> datarootdir=${prefix}/share
>> datadir=${datarootdir}
>> fontrootdir=${datadir}/fonts/X11
>> mapdir=${prefix}/share/fonts/X11/util
>>
>> Name: FontUtil
>> Description: Font utilities dirs
>> Version: 1.3.1
>>
>> I agree that the Name, Description and Version information could be
>> useful, particularly for my needs, but its primary purpose is to
>> display informations above in this file for me. To add to this, I do
>> not even have the pkg-config or pkgconf package installed. I do not
>> need them as of now. I totally agree with the package description:
>> ===========================================================
>> Description: manage compile and link flags for libraries (transitional
>> package)
>>  pkgconf is an implementation of the pkg-config system, which helps to
>> configure
>>  compiler and linker flags for development frameworks.
>>  .
>>  pkgconf is a replacement for pkg-config, providing additional
>> functionality
>>  while also maintaining compatibility.
>>  .
>>  This package only provides a dependency link to the pkgconf package to
>> help
>>  with package upgrades. It can be safely removed.
>> Description-md5: df0bd7e16369ac7330df23f92a214b3a
>> Multi-Arch: same
>> Homepage: http://pkgconf.org/
>> Tag: admin::configuring, devel::buildtools, interface::commandline,
>>  role::program, scope::utility
>> Section: devel
>> ============================================================
>>
>
> applications/systems which have ability to call external command line
> executables have interfaces to pkg-config.
> E.g. there is a Python pkgconfig module.
>
> There are also autoconf macros to call pkg-config. And cmake, too.
>
> So it's, by far, not limited to libraries.
>
>
>
>
>> So, yes, why not use this utility to display some information about
>> FriCAS, even if I do not see a lot of information to write in it, I
>> would prefer to keep version information available from the 'fricas'
>> executable as you suggest I guess (but add a pkg-config file).
>> Personally I would also prefer to add to the fricas script the ability
>> to execute code and return to the shell. As of now 'fricas -eval'
>> executes code at startup but does not leave the fricas REPL. What
>> could also be useful is something like:
>> └─$ perl -e 'print 2+2'
>> 4
>> ┌──(greg㉿ellipse)-[~]
>> └─$ python3 -c 'print(2+2)'
>> 4
>>
>> ┌──(greg㉿ellipse)-[~]
>> └─$ julia -e 'print(2+2)'
>> 4
>> etc. (read a file also, why not)
>>
>> That way I could use, say, 'fricas -c ')lisp
>> (lisp-implementation-type)' or other things. This information is
>> already in the fricas startup script though, it is just an example.
>>
>> By the way I attached the primary patch, as an illustration, that just
>> moves the code related to HyperDoc and Graphics availability.
>>
>> __
>> Greg
>>
>>
>> Le ven. 1 sept. 2023 à 23:39, Dima Pasechnik <[email protected]> a écrit
>> :
>> >
>> > 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
>> .
>>
>> --
>> 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/CAHnU2dY445y34scW5UkoqoCOTJ6PeGzkiXp%3DqVp1zcmrOjg6Yw%40mail.gmail.com
>> .
>>
> --
> 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/CAAWYfq0OvnSUkc6KXApmwgifLLeAz%2BpuNHDsnqL4e4je8jBHxw%40mail.gmail.com
> <https://groups.google.com/d/msgid/fricas-devel/CAAWYfq0OvnSUkc6KXApmwgifLLeAz%2BpuNHDsnqL4e4je8jBHxw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAHnU2dYQhDgqNi%2B3ze3Ty%2Bsoa4R65a75xRYzGnvFDp%2BpEZcuSA%40mail.gmail.com.

Reply via email to