Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding way to fetch version of library #105

Open
michal-josef-spacek opened this issue Jun 24, 2023 · 3 comments
Open

Adding way to fetch version of library #105

michal-josef-spacek opened this issue Jun 24, 2023 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@michal-josef-spacek
Copy link

There is no way to find out the library version programmatically. Could we improve it?

@wdlkmpx
Copy link
Contributor

wdlkmpx commented Jun 29, 2023

It's a bit late add version info, it should have happened years ago. I see people might want to detect version 1.19 and apply a different logic or something

Maybe two new defines should be added to popt.h:

  • POPT_VERSION
  • POPT_REVISION

@michal-josef-spacek
Copy link
Author

michal-josef-spacek commented Jun 29, 2023

It's a bit late add version info, it should have happened years ago.

yes :-)

I see people might want to detect version 1.19 and apply a different logic or something

My use case is Perl module Alien::libpopt (https://metacpan.org/pod/Alien::libpopt) which is going to detect the version. In the case of pkg-config, there is a way how to do it, but on other installations, it's not possible.

Maybe two new defines should be added to popt.h:

  • POPT_VERSION
  • POPT_REVISION

Should be fine.

@wdlkmpx
Copy link
Contributor

wdlkmpx commented Jun 29, 2023

Well the .pc files let the build system know about app/lib version, libraries usually include version info in the headers so that the code knows what to do

The .pc version is not accessible to C/C++ code unless it's passed as a definition -DPOPT_xxx=xxx by the build system (i.e. cmake)

I have some changes that look ok to me... I'll probably open a PR...

@ffesti ffesti added this to RPM Mar 27, 2024
@github-project-automation github-project-automation bot moved this to Backlog in RPM Mar 27, 2024
@ffesti ffesti added the enhancement New feature or request label Mar 27, 2024
@ffesti ffesti removed their assignment Jul 23, 2024
@pmatilai pmatilai added this to the popt 1.20 milestone Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

4 participants