GNOME Bugzilla – Bug 118685
fix .pc files
Last modified: 2004-12-22 21:47:04 UTC
From John Belmonte: The .pc file doesn't work well because it's hard-coded to one crypto engine. Would it be possible to generate a .pc file for each crypto engine (xmlsec1-openssl.pc, xmlsec1-gnutls.pc, etc.)? Also, the cflags in the .pc file need some work: XMLSEC_NO_XKMS is defined twice, and I don't think the -g and -O2 options should be there. http://www.aleksey.com/pipermail/xmlsec/2003/001234.html
cc John
Created attachment 18763 [details] [review] the fix
Fixed in the trunk: Checking in ChangeLog; /cvs/gnome/xmlsec/ChangeLog,v <-- ChangeLog new revision: 1.121; previous revision: 1.120 done Checking in Makefile.am; /cvs/gnome/xmlsec/Makefile.am,v <-- Makefile.am new revision: 1.43; previous revision: 1.42 done Checking in configure.in; /cvs/gnome/xmlsec/configure.in,v <-- configure.in new revision: 1.77; previous revision: 1.76 done RCS file: /cvs/gnome/xmlsec/xmlsec-gnutls.pc.in,v done Checking in xmlsec-gnutls.pc.in; /cvs/gnome/xmlsec/xmlsec-gnutls.pc.in,v <-- xmlsec-gnutls.pc.in initial revision: 1.1 done RCS file: /cvs/gnome/xmlsec/xmlsec-nss.pc.in,v done Checking in xmlsec-nss.pc.in; /cvs/gnome/xmlsec/xmlsec-nss.pc.in,v <-- xmlsec-nss.pc.in initial revision: 1.1 done RCS file: /cvs/gnome/xmlsec/xmlsec-openssl.pc.in,v done Checking in xmlsec-openssl.pc.in; /cvs/gnome/xmlsec/xmlsec-openssl.pc.in,v <-- xmlsec-openssl.pc.in initial revision: 1.1 done
There are still several problems: * Cflags still shows -g and -O2 * Cflags repeats "-I/usr/include/libxml2" several times * Libs repeats "-lxml2 -lz -lpthread" several times * according to the pkg-config man page, Cflags and Libs should not contain any flags for packages listed in Requires (they are generated automatically) Also I wonder if you considered to make xmlsec1.pc just a symlink to xmlsec1-openssl.pc. Generally, I think that pkg-config is a better solution than proprietary config programs like xmlsec1-config, so I would like to see correct .pc files in the xmlsec package. Perhaps we should file bugs on the upstream openssl and gnutls libraries to provide pkg-config support so that these libraries can be added to the Requires line. (Mozilla-nss already provides pkg-config support.) (I don't have permission to reopen the bug.)
* Cflags still shows -g and -O2 xmlsec adds this only if you compile it with "--enable-debug" option. Probably it came from libxml/libxslt. I'll look into that after resolving the next issue. * Cflags repeats "-I/usr/include/libxml2" several times * Libs repeats "-lxml2 -lz -lpthread" several times * according to the pkg-config man page, Cflags and Libs should not contain any flags for packages listed in Requires (they are generated automatically) Ok, I'll fix that. * Mozilla-nss already provides pkg-config support Good! I'll use it.
Created attachment 18770 [details] [review] more *.pc files creation fixes
Checked in the trunk. John, don't close the bug until I get an approval from you :) Checking in ChangeLog; /cvs/gnome/xmlsec/ChangeLog,v <-- ChangeLog new revision: 1.122; previous revision: 1.121 done Checking in Makefile.am; /cvs/gnome/xmlsec/Makefile.am,v <-- Makefile.am new revision: 1.44; previous revision: 1.43 done Checking in configure.in; /cvs/gnome/xmlsec/configure.in,v <-- configure.in new revision: 1.78; previous revision: 1.77 done Checking in xmlsec-gnutls.pc.in; /cvs/gnome/xmlsec/xmlsec-gnutls.pc.in,v <-- xmlsec-gnutls.pc.in new revision: 1.2; previous revision: 1.1 done Checking in xmlsec-nss.pc.in; /cvs/gnome/xmlsec/xmlsec-nss.pc.in,v <-- xmlsec-nss.pc.in new revision: 1.2; previous revision: 1.1 done Checking in xmlsec-openssl.pc.in; /cvs/gnome/xmlsec/xmlsec-openssl.pc.in,v <-- xmlsec-openssl.pc.in new revision: 1.2; previous revision: 1.1 done Removing xmlsec.pc.in; /cvs/gnome/xmlsec/xmlsec.pc.in,v <-- xmlsec.pc.in new revision: delete; previous revision: 1.6 done
Thanks, it's looking good. I caught a few more issues: * Version should be a number only (without "-openssl", etc). I think it will be used when other packages use Require on xmlsec with some version requirement. * Perhaps Name should be xmlsec1-openssl instead of xmlsec-openssl, etc. * in xmlsec1-nss.pc, now the nss includes and libs aren't needed ("-I/usr/include/mozilla/nss -I/usr/include/mozilla/nspr" and "-lnss3 -lnspr4 -lplds4 -lplc4", respectively). But I realize you are trying to keep the config code orthogonal.
Created attachment 18775 [details] [review] and even more fixes
Checked 3rd patch "and even more fixes" in the trunk: Checking in ChangeLog; /cvs/gnome/xmlsec/ChangeLog,v <-- ChangeLog new revision: 1.123; previous revision: 1.122 done Checking in xmlsec-gnutls.pc.in; /cvs/gnome/xmlsec/xmlsec-gnutls.pc.in,v <-- xmlsec-gnutls.pc.in new revision: 1.3; previous revision: 1.2 done Checking in xmlsec-nss.pc.in; /cvs/gnome/xmlsec/xmlsec-nss.pc.in,v <-- xmlsec-nss.pc.in new revision: 1.3; previous revision: 1.2 done Checking in xmlsec-openssl.pc.in; /cvs/gnome/xmlsec/xmlsec-openssl.pc.in,v <-- xmlsec-openssl.pc.in new revision: 1.3; previous revision: 1.2 done
Ok to close. Thanks for your attention.
--> FIXED John, thanks for reporting the problem and testing my fixes! Sorry it took me 3 attempts to fix it :(
--> VERIFIED (based on John's comment)