Hello,
As discussed in the freetype/fontconfig pkgconfig thread, here's a combined patch implementing installation of VDR's headers and generating a pkgconfig *.pc file.
This patch is mostly just a discussion draft - I haven't tried installing the headers and the pkgconfig file isn't installed yet by any "make install*" (mostly because very ironically, there's no way to query pkg-config for its default search path, which is something I've intended to report a bug about since a long time ago, but failed so far - maybe I'll do it right now :)).
Also, I don't know if all *.h are actually something that should be installed by "install-headers", but since they're all available in the current setup for plugins to use too, I suppose weeding through them is an orthogonal task to this patch if needed in the first place (and maybe better discussed in the "RFC: Makefile ravamp" [sic] thread from Sat 8th Mar).
On Montag, 10. März 2008, Ville Skyttä wrote:
Hello,
As discussed in the freetype/fontconfig pkgconfig thread, here's a combined patch implementing installation of VDR's headers and generating a pkgconfig *.pc file.
This patch is mostly just a discussion draft - I haven't tried installing the headers and the pkgconfig file isn't installed yet by any "make install*" (mostly because very ironically, there's no way to query pkg-config for its default search path, which is something I've intended to report a bug about since a long time ago, but failed so far - maybe I'll do it right now :)).
Citing pkg-config manpage: By default, pkg-config looks in the directory prefix/lib/pkgconfig for these files; it will also look in the colon-separated (on Windows, semicolon-separated) list of directories specified by the PKG_CONFIG_PATH environment variable.
So you can install .pc file anywhere you want if you add this location to PKG_CONFIG_PATH.
So /usr/bin/pkg-config will always look into /usr/lib/pkgconfig. We can either use A. $(DESTDIR)/usr/lib/pkgconfig or B. $(DESTDIR)$(PREFIX)/lib/pkgconfig
For most installations A should be fine.
Matthias
On Tue, Mar 11, 2008 at 12:27 AM, Matthias Schwarzott zzam@gentoo.org wrote:
On Montag, 10. März 2008, Ville Skyttä wrote:
So you can install .pc file anywhere you want if you add this location to PKG_CONFIG_PATH.
So /usr/bin/pkg-config will always look into /usr/lib/pkgconfig. We can either use A. $(DESTDIR)/usr/lib/pkgconfig or B. $(DESTDIR)$(PREFIX)/lib/pkgconfig
For most installations A should be fine.
definitly B, otherwise it will not work for parallel installs of different vdr versions in different $PREFIXes.
best regards ... clemens
On Dienstag, 11. März 2008, clemens kirchgatterer wrote:
On Tue, Mar 11, 2008 at 12:27 AM, Matthias Schwarzott zzam@gentoo.org
wrote:
On Montag, 10. März 2008, Ville Skyttä wrote:
So you can install .pc file anywhere you want if you add this location to PKG_CONFIG_PATH.
So /usr/bin/pkg-config will always look into /usr/lib/pkgconfig. We can either use A. $(DESTDIR)/usr/lib/pkgconfig or B. $(DESTDIR)$(PREFIX)/lib/pkgconfig
For most installations A should be fine.
definitly B, otherwise it will not work for parallel installs of different vdr versions in different $PREFIXes.
Ack! BUT: B with default values from Makefile gives /usr/local/lib/pkgconfig that by default is not in pkgconfig search-path.
And I wrote: "For most installations ..."
Matthias
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 11 Mar 2008, Matthias Schwarzott wrote:
On Dienstag, 11. März 2008, clemens kirchgatterer wrote:
On Tue, Mar 11, 2008 at 12:27 AM, Matthias Schwarzott zzam@gentoo.org
wrote:
On Montag, 10. März 2008, Ville Skyttä wrote:
So you can install .pc file anywhere you want if you add this location to PKG_CONFIG_PATH.
So /usr/bin/pkg-config will always look into /usr/lib/pkgconfig. We can either use A. $(DESTDIR)/usr/lib/pkgconfig or B. $(DESTDIR)$(PREFIX)/lib/pkgconfig
For most installations A should be fine.
definitly B, otherwise it will not work for parallel installs of different vdr versions in different $PREFIXes.
Ack! BUT: B with default values from Makefile gives /usr/local/lib/pkgconfig that by default is not in pkgconfig search-path.
And I wrote: "For most installations ..."
What would you think is the default?
case 1: download pkg-config, extract it, run configure, make, make install and you end up with pkg-config installed in /usr/local/bin and the default search path will be "/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig" as the configure script sets: pc_path='${libdir}/pkgconfig:${datadir}/pkgconfig' if there is no '--with-pc_path=/my/path' given to configure. case 2: install an openSuSE-10.3 (i386) system with the prepackaged pkg-config RPM and you end up with pkg-config installed in /usr/bin and the default search path is "/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig: /usr/lib/pkgconfig:/usr/share/pkgconfig:/opt/kde3/lib/pkgconfig" case 3: install a Debian-4.0 (x86_64) system with the prepackaged pkg-config DEB and you end up with pkg-config installed in /usr/bin and the default search path is "/usr/local/lib/pkgconfig: /usr/local/lib/pkgconfig/x86_64-linux-gnu:/usr/local/share/pkgconfig: /usr/lib/pkgconfig:/usr/lib/pkgconfig/x86_64-linux-gnu:/usr/share/pkgconfig" case 4: install FreeBSD and install the prebuilt pkg-config package or built it by hand out of the ports tree and you end up with pkg-config installed in /usr/local/bin and the default search path is "/usr/local/libdata/pkgconfig: /usr/local/lib/pkgconfig"
Out of this four cases (there are probably more, one for every Linux distribution on this planet), tell me which is the most reasonable default?
Joerg
- -- The beginning is the most important part of the work. -Plato
On Tue, Mar 11, 2008 at 3:46 PM, Joerg Pulz Joerg.Pulz@frm2.tum.de wrote:
Out of this four cases (there are probably more, one for every Linux distribution on this planet), tell me which is the most reasonable default?
the most reasonable default is simply to put vdr.pc in [$(DESTDIR)/]$(PREFIX)/lib/pkgconfig. for cases that this is not appropriate, there is $PKG_CONFIG_PATH.
best regards ... clemens
On Wed, Mar 12, 2008 at 8:13 AM, clemens kirchgatterer clemens@1541.org wrote:
On Tue, Mar 11, 2008 at 3:46 PM, Joerg Pulz Joerg.Pulz@frm2.tum.de wrote:
Out of this four cases (there are probably more, one for every Linux distribution on this planet), tell me which is the most reasonable default?
the most reasonable default is simply to put vdr.pc in [$(DESTDIR)/]$(PREFIX)/lib/pkgconfig. for cases that this is not appropriate, there is $PKG_CONFIG_PATH.
i may add the reasoning: the only way i (as user) and up with software installed in /usr/local/ is by compiling it myself. if i do so, i am well aware of setting all relevant PATH variables as $PATH, $LD_LIBRARY_PATH, $PKG_CONFIG_PATH. most likly these are allready set for /usr/local in the systems default /etc/profile.
clemens
On Wednesday 12 March 2008, clemens kirchgatterer wrote:
On Tue, Mar 11, 2008 at 3:46 PM, Joerg Pulz Joerg.Pulz@frm2.tum.de wrote:
Out of this four cases (there are probably more, one for every Linux distribution on this planet), tell me which is the most reasonable default?
the most reasonable default is simply to put vdr.pc in [$(DESTDIR)/]$(PREFIX)/lib/pkgconfig. for cases that this is not appropriate, there is $PKG_CONFIG_PATH.
Agreed. The second revision of the patch is attached; compared to the first one this also installs the *.pc file to the first (colon separated) component of $PKG_CONFIG_PATH, or to $(PREFIX)/lib/pkgconfig if $PKG_CONFIG_PATH is not set in the environment. Unless I've missed something, as far as I'm concerned this is good enough to go in.
By the way, if someone's interested, the bug I reported against pkg-config because it can't be queried for its default *.pc dirs is https://bugs.freedesktop.org/show_bug.cgi?id=14975
On Wednesday 12 March 2008, Ville Skyttä wrote:
On Wednesday 12 March 2008, clemens kirchgatterer wrote:
On Tue, Mar 11, 2008 at 3:46 PM, Joerg Pulz Joerg.Pulz@frm2.tum.de
wrote:
Out of this four cases (there are probably more, one for every Linux distribution on this planet), tell me which is the most reasonable default?
the most reasonable default is simply to put vdr.pc in [$(DESTDIR)/]$(PREFIX)/lib/pkgconfig. for cases that this is not appropriate, there is $PKG_CONFIG_PATH.
Agreed. The second revision of the patch is attached; compared to the first one this also installs the *.pc file to the first (colon separated) component of $PKG_CONFIG_PATH, or to $(PREFIX)/lib/pkgconfig if $PKG_CONFIG_PATH is not set in the environment. Unless I've missed something, as far as I'm concerned this is good enough to go in.
Here's the third revision, after a bit more testing. As a result of that, there were a couple of minor bug fixes, most notable of which was to the install-includes target.