Re: [PATCH] added pkgconfig support for popt

2009-07-24 Thread Jeff Johnson


On Jul 21, 2009, at 11:21 AM, devzero2000 wrote:


Very thiny patch for integrating pkg-config(1) support for popt
library into popt itself.



Sorry for the delay.

I applied the pkgconfig patch with these changes:

1) I'd rather see "popt.pc", not "libpo...@[email protected]". That's
consistent with "neon.pc", another library used widely where
version makes a difference. It also seems kinda silly to add
pkgconfig functionality to discover popt's version with the version
in the *.pc file name itself.

2) popt is strange in that it typically installs (on linux) into /lib  
or /lib64

rather than into $(libdir). Which means I had to use this construct
in Makefile.am (which likely breaks with multilib):
   pkgconfigdir = $(prefix)/lib/pkgconfig
   pkgconfig_DATA = popt.pc
and this construct in popt.spec (which likely works with multlib)
   %{_prefix}/%{_lib}/pkgconfig/libpopt-%{version}.pc
lest popt become the very first and only package to start populating
/lib/pkconfig/*, or the first/only per-arch package that installs
into /usr/share/pkgconfig. I _REALLY_ wish not to break new
ground.

Transitive install option discovery is of course mostly insane if/when  
pkgconfig
has a different prefix than $(libdir): if you know where to put  
"popt.pc" when
building popt (alternatively how to configure pkgconfig differently  
than default

--libdir), then you also know both of these datum-di-dums:

Libs: -L${libdir} -lpopt
Cflags: -I${includedir}

But hey, whatever needs to be done to avoid the endless bikeshed  
discussions

about --prefix and The One True Way To Build Software.

w00t! popt uses pkgconfig!

73 de Jeff




popt-pkgconfig.patch
Description: Binary data


Re: [PATCH] added pkgconfig support for popt

2009-07-24 Thread Jeff Johnson


On Jul 24, 2009, at 11:03 AM, Ralf S. Engelschall wrote:



Only true if you install POPT into standard system locations. But if I
install POPT with --includedir=/usr/include/popt --libdir=/usr/lib/ 
popt

the pkg-config file still allows me to build and link against POPT
without having to know its particular install locations (assuming that
at least the popt.pc is in a standard location or at least in the
PKG_CONFIG_PATH -- or whatever the name of this variable is). So, yes
and no, it can be considered a little bit overkill for POPT, but in
general it is already useful just because it encapsulates/remembers  
the

install locations.



Point taken. Good, there's a usage case at least. There's so
much fussing with popt for little known purpose.

73 de Jeff
__
POPT Library   http://rpm5.org
Developer Communication List   [email protected]


Re: [PATCH] added pkgconfig support for popt

2009-07-24 Thread Ralf S. Engelschall
On Thu, Jul 23, 2009, Jeff Johnson wrote:

> On Jul 23, 2009, at 3:36 PM, Ralf S. Engelschall wrote:
>
>> Well, the main point of pkg-config is not querying the version of a
>> library, but to _transitively_ query the build-time flags required to
>> build against a library. For this reason even our RPM_CHECK_LIB is
>> able
>> to use pkg-config files ;-)
>
> That's the point, transitivity doesn't apply.
>
> popt has no flags, links nothing else, all that is needed is -lpopt.
>
> But I will apply the patch, easier than describing why pkg-config
> is useless (and will remain useless forever) for popt.

Only true if you install POPT into standard system locations. But if I
install POPT with --includedir=/usr/include/popt --libdir=/usr/lib/popt
the pkg-config file still allows me to build and link against POPT
without having to know its particular install locations (assuming that
at least the popt.pc is in a standard location or at least in the
PKG_CONFIG_PATH -- or whatever the name of this variable is). So, yes
and no, it can be considered a little bit overkill for POPT, but in
general it is already useful just because it encapsulates/remembers the
install locations.

   Ralf S. Engelschall
   [email protected]
   www.engelschall.com

__
POPT Library   http://rpm5.org
Developer Communication List   [email protected]


Re: [PATCH] added pkgconfig support for popt

2009-07-23 Thread Jeff Johnson


On Jul 23, 2009, at 3:36 PM, Ralf S. Engelschall wrote:





Well, the main point of pkg-config is not querying the version of a
library, but to _transitively_ query the build-time flags required to
build against a library. For this reason even our RPM_CHECK_LIB is  
able

to use pkg-config files ;-)



That's the point, transitivity doesn't apply.

popt has no flags, links nothing else, all that is needed is -lpopt.

But I will apply the patch, easier than describing why pkg-config
is useless (and will remain useless forever) for popt.

73 de Jeff
__
POPT Library   http://rpm5.org
Developer Communication List   [email protected]


Re: [PATCH] added pkgconfig support for popt

2009-07-23 Thread Ralf S. Engelschall
On Wed, Jul 22, 2009, Jeff Johnson wrote:

> On Jul 22, 2009, at 3:05 PM, Ralf S. Engelschall wrote:
>> On Tue, Jul 21, 2009, devzero2000 wrote:
>>
>>> Very thiny patch for integrating pkg-config(1) support for popt
>>> library into popt itself.
>>
>> Exept for the hard-coded version "1.15" in configure.ac
>> this looks good and should be taken over.
>
> I mostly agree, but pkg-config is surely a complicated
> way to determinbe a version for a library that never
> changes.

Well, the main point of pkg-config is not querying the version of a
library, but to _transitively_ query the build-time flags required to
build against a library. For this reason even our RPM_CHECK_LIB is able
to use pkg-config files ;-)

   Ralf S. Engelschall
   [email protected]
   www.engelschall.com

__
POPT Library   http://rpm5.org
Developer Communication List   [email protected]


Re: [PATCH] added pkgconfig support for popt

2009-07-22 Thread Jeff Johnson


On Jul 22, 2009, at 3:05 PM, Ralf S. Engelschall wrote:


On Tue, Jul 21, 2009, devzero2000 wrote:


Very thiny patch for integrating pkg-config(1) support for popt
library into popt itself.


Exept for the hard-coded version "1.15" in configure.ac
this looks good and should be taken over.



I mostly agree, but pkg-config is surely a complicated
way to determinbe a version for a library that never
changes.

But that opinion has nothing to do with the patch.

73 de Jeff
__
POPT Library   http://rpm5.org
Developer Communication List   [email protected]


Re: [PATCH] added pkgconfig support for popt

2009-07-22 Thread Ralf S. Engelschall
On Tue, Jul 21, 2009, devzero2000 wrote:

> Very thiny patch for integrating pkg-config(1) support for popt
> library into popt itself.

Exept for the hard-coded version "1.15" in configure.ac
this looks good and should be taken over.

   Ralf S. Engelschall
   [email protected]
   www.engelschall.com

__
POPT Library   http://rpm5.org
Developer Communication List   [email protected]


[PATCH] added pkgconfig support for popt

2009-07-21 Thread devzero2000
Very thiny patch for integrating pkg-config(1) support for popt
library into popt itself.


Regards


0001--added-pkgconfig-support.patch
Description: Binary data


[PATCH] added pkgconfig support for popt

2009-07-21 Thread devzero2000
Very thiny patch for integrating pkg-config(1) support for popt
library into popt itself.


Regards


0001--added-pkgconfig-support.patch
Description: Binary data