Skip to content

Fix libpcsclite.pc fiel generated by Meson #232

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

Merged
merged 1 commit into from
Apr 13, 2025

Conversation

arrowd
Copy link
Contributor

@arrowd arrowd commented Apr 13, 2025

Running pkgconf --libs --cflags does not include -pthread without this change. It also matches what the autotools build generates.

The issue was brought up in FreeBSD Ports: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285857#c3

@LudovicRousseau
Copy link
Owner

The generated libpcsclite.pc file already includes -pthread in the Libs.private: field:

Name: PCSC Lite
Description: PC/SC smart card interface
Version: 2.3.2
Libs: -L${libdir} -lpcsclite
Libs.private: -pthread
Cflags: -I${includedir}/PCSC

It is the same configuration as I used with autotools.
https://github.com/LudovicRousseau/PCSC/blob/master/src/libpcsclite.pc.in#L12

If is was working before it should continue to work with the file generated by meson.

From pkg-config manpage https://linux.die.net/man/1/pkg-config

Libs.private:
This line should list any private libraries in use. Private libraries are libraries which are not exposed through your library, but are needed in the case of static linking.

@arrowd
Copy link
Contributor Author

arrowd commented Apr 13, 2025

I'm saying that the pkgconf --libs --cflags command output does not have -pthread without my change.

The autotools variant has @PTHREAD_CFLAGS@ in the Cflags field, which ends up being replaced with -pthread.

@LudovicRousseau LudovicRousseau merged commit 0c7c2c4 into LudovicRousseau:master Apr 13, 2025
7 checks passed
@LudovicRousseau
Copy link
Owner

Exact. I missed the Cflags field.

Thanks for the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants