variables given thru shell commands in *.pc files
LRN
lrn1986 at gmail.com
Fri Sep 20 05:29:32 PDT 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 20.09.2013 15:44, Basile Starynkevitch wrote:
> I was thinking of adding some syntax to get pkg-config variables shell expanded.
> So having in some *.pc a line like
> somevar =| some-command
> would like the backquote or the $(...) notation in shells assign to somevar
> the output given by some-command.
>
> Then we might have a file mysql.pc which could e.g. contain
>
> ## file mysql.pc
> ## command-expanded variables
> version =| mysql_config --version
> libdir =| mysql_config --variable=pkglibdir
> mysql_cflags =| mysql_config --cflags
> mysql_libs =| mysql_config --libs
>
> Name: mysql
> Version: ${version}
> Description: MySQL database version ${version}
> Cflags: ${mysql_cflags}
> Libs: ${mysql_libs}
> ## eof mysql.pc
>
> I would believe that such feature might be easy to implement (basically, calling popen).
That wouldn't work on W32, if pkg-config is not compiled against
Cygwin/MSYS or other compatibility layer (which is usually the case for
MinGW users).
IMO, .pc file generation should be patched in upstream. And if upstream
doesn't want it, package maintiners should patch it in locally (if the
system for which packages are made uses pkg-config heavily, for example,
if MELT is used in it).
- --
O< ascii ribbon - stop html email! - www.asciiribbon.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
iQEcBAEBAgAGBQJSPD+sAAoJEOs4Jb6SI2CwN64H/RWfkWArnBzG6s7iuuQDIy2K
jPgkpdD5+dpCTyByL92VO89V3fdaDoZOvTJx+PRS5LhJnrbX6eZd4NPHeokb/R14
dDUZOKpSzdpj5dH07pnxrGwUofR5l4Qbzv1mTM5461QM2mttw7G9Gwi1c6/R9vvC
rK45iV0LS5q5lnrxT4vmwNT57sV31h71wcYTyLNLxNpImMIllRPEszMQkgQpyyLF
xbEQc2BfUP88xgbxtNhFuiE58j/d6EXCwk3iI3H2kRIZ4CE7NX0vAyg9E9lDCL2r
TRMbWYP0kmrQNRHkFIc3IBXyfD51UJZOOt6Wv3gROE1KWTidM8zuRd3laTTvoUI=
=Tkcg
-----END PGP SIGNATURE-----
More information about the pkg-config
mailing list