* [ptxdist] Hardcoded path in pkg-config file
@ 2014-12-10 16:14 Guillermo Rodriguez Garcia
2014-12-11 10:46 ` Juergen Borleis
0 siblings, 1 reply; 6+ messages in thread
From: Guillermo Rodriguez Garcia @ 2014-12-10 16:14 UTC (permalink / raw)
To: ptxdist
Hello all,
I am trying to port a package to ptxdist (libzip). This package
creates a pkg-config .pc file that contains some hardcoded paths.
During the install stage, it looks like ptxdist already does some
magic to "fix" the hardcoded paths (where is this done?), however not
all paths are fixed.
Here's the .pc file that gets copied to sysroot-target:
prefix=${pcfiledir}/../..
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
libincludedir=/usr/lib/libzip/include
^^^^^^^^^^^
[...]
Can someone help?
Thank you,
Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] Hardcoded path in pkg-config file
2014-12-10 16:14 [ptxdist] Hardcoded path in pkg-config file Guillermo Rodriguez Garcia
@ 2014-12-11 10:46 ` Juergen Borleis
2014-12-11 11:12 ` Guillermo Rodriguez Garcia
0 siblings, 1 reply; 6+ messages in thread
From: Juergen Borleis @ 2014-12-11 10:46 UTC (permalink / raw)
To: ptxdist; +Cc: Guillermo Rodriguez Garcia
Hi Guillermo,
On Wednesday 10 December 2014 17:14:06 Guillermo Rodriguez Garcia wrote:
> I am trying to port a package to ptxdist (libzip). This package
> creates a pkg-config .pc file that contains some hardcoded paths.
> During the install stage, it looks like ptxdist already does some
> magic to "fix" the hardcoded paths (where is this done?), however not
> all paths are fixed.
>
> Here's the .pc file that gets copied to sysroot-target:
>
> prefix=${pcfiledir}/../..
> exec_prefix=${prefix}
> libdir=${exec_prefix}/lib
> includedir=${prefix}/include
> libincludedir=/usr/lib/libzip/include
> ^^^^^^^^^^^
> [...]
What is the difference between 'includedir' and 'libincludedir'?
What kind of files does the install stage install to these locations?
Regards,
Juergen
--
Pengutronix e.K. | Juergen Borleis |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] Hardcoded path in pkg-config file
2014-12-11 10:46 ` Juergen Borleis
@ 2014-12-11 11:12 ` Guillermo Rodriguez Garcia
2014-12-12 10:22 ` Michael Olbrich
0 siblings, 1 reply; 6+ messages in thread
From: Guillermo Rodriguez Garcia @ 2014-12-11 11:12 UTC (permalink / raw)
To: Juergen Borleis; +Cc: ptxdist
Hi Juergen,
Thank you for your answer.
2014-12-11 11:46 GMT+01:00 Juergen Borleis <jbe@pengutronix.de>:
> Hi Guillermo,
>
> On Wednesday 10 December 2014 17:14:06 Guillermo Rodriguez Garcia wrote:
>> I am trying to port a package to ptxdist (libzip). This package
>> creates a pkg-config .pc file that contains some hardcoded paths.
>> During the install stage, it looks like ptxdist already does some
>> magic to "fix" the hardcoded paths (where is this done?), however not
>> all paths are fixed.
>>
>> Here's the .pc file that gets copied to sysroot-target:
>>
>> prefix=${pcfiledir}/../..
>> exec_prefix=${prefix}
>> libdir=${exec_prefix}/lib
>> includedir=${prefix}/include
>> libincludedir=/usr/lib/libzip/include
>> ^^^^^^^^^^^
>> [...]
>
> What is the difference between 'includedir' and 'libincludedir'?
> What kind of files does the install stage install to these locations?
Apparently these are just two locations for header files. Here's the
complete .pc.in file:
===
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
libincludedir=@libdir@/@PACKAGE@/include
zipcmp=@prefix@/bin/zipcmp
Name: libzip
Description: library for handling zip archives
Version: @VERSION@
Libs: -L${libdir} -lzip @LIBS@
Cflags: -I${includedir} -I${libincludedir}
===
This is probably not very common (they could have just used includedir
for all paths) but as far as I can see it is valid syntax.
After some digging (the post-install processing does not seem to be
documented anywhere) I already found where ptxdist is patching these
files (ptxd_make_world_install_mangle_pc.awk), which was my original
question. Now the question is, should this awk script handle all paths
in the .pc file? Or only the "common cases" prefix / exec_prefix /
libdir / includedir?
Thank you,
Guillermo
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] Hardcoded path in pkg-config file
2014-12-11 11:12 ` Guillermo Rodriguez Garcia
@ 2014-12-12 10:22 ` Michael Olbrich
2014-12-12 15:48 ` Guillermo Rodriguez Garcia
0 siblings, 1 reply; 6+ messages in thread
From: Michael Olbrich @ 2014-12-12 10:22 UTC (permalink / raw)
To: ptxdist
Hi,
On Thu, Dec 11, 2014 at 12:12:40PM +0100, Guillermo Rodriguez Garcia wrote:
> 2014-12-11 11:46 GMT+01:00 Juergen Borleis <jbe@pengutronix.de>:
> > Hi Guillermo,
> >
> > On Wednesday 10 December 2014 17:14:06 Guillermo Rodriguez Garcia wrote:
> >> I am trying to port a package to ptxdist (libzip). This package
> >> creates a pkg-config .pc file that contains some hardcoded paths.
> >> During the install stage, it looks like ptxdist already does some
> >> magic to "fix" the hardcoded paths (where is this done?), however not
> >> all paths are fixed.
> >>
> >> Here's the .pc file that gets copied to sysroot-target:
> >>
> >> prefix=${pcfiledir}/../..
> >> exec_prefix=${prefix}
> >> libdir=${exec_prefix}/lib
> >> includedir=${prefix}/include
> >> libincludedir=/usr/lib/libzip/include
> >> ^^^^^^^^^^^
> >> [...]
> >
> > What is the difference between 'includedir' and 'libincludedir'?
> > What kind of files does the install stage install to these locations?
>
> Apparently these are just two locations for header files. Here's the
> complete .pc.in file:
Yes, some packages have (generated) headers that are platform specific.
Those are installed separately to handle multiarch correctly.
> ===
> prefix=@prefix@
> exec_prefix=@exec_prefix@
> libdir=@libdir@
> includedir=@includedir@
> libincludedir=@libdir@/@PACKAGE@/include
Patch this to change this to:
libincludedir=${libdir}/@PACKAGE@/include
> zipcmp=@prefix@/bin/zipcmp
>
> Name: libzip
> Description: library for handling zip archives
> Version: @VERSION@
> Libs: -L${libdir} -lzip @LIBS@
> Cflags: -I${includedir} -I${libincludedir}
> ===
>
> This is probably not very common (they could have just used includedir
> for all paths) but as far as I can see it is valid syntax.
>
> After some digging (the post-install processing does not seem to be
> documented anywhere) I already found where ptxdist is patching these
> files (ptxd_make_world_install_mangle_pc.awk), which was my original
> question. Now the question is, should this awk script handle all paths
> in the .pc file? Or only the "common cases" prefix / exec_prefix /
> libdir / includedir?
ptxd_make_world_install_mangle_pc.awk tries to do the right thing, but that
only goes so far. We already have some other corner-cases where patching
the pc file is necessary.
Michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] Hardcoded path in pkg-config file
2014-12-12 10:22 ` Michael Olbrich
@ 2014-12-12 15:48 ` Guillermo Rodriguez Garcia
2015-01-09 11:32 ` Guillermo Rodriguez Garcia
0 siblings, 1 reply; 6+ messages in thread
From: Guillermo Rodriguez Garcia @ 2014-12-12 15:48 UTC (permalink / raw)
To: ptxdist
Hi Michael,
2014-12-12 11:22 GMT+01:00 Michael Olbrich <m.olbrich@pengutronix.de>:
> Hi,
>
> On Thu, Dec 11, 2014 at 12:12:40PM +0100, Guillermo Rodriguez Garcia wrote:
>> 2014-12-11 11:46 GMT+01:00 Juergen Borleis <jbe@pengutronix.de>:
>> > Hi Guillermo,
>> >
>> > On Wednesday 10 December 2014 17:14:06 Guillermo Rodriguez Garcia wrote:
>> >> I am trying to port a package to ptxdist (libzip). This package
>> >> creates a pkg-config .pc file that contains some hardcoded paths.
>> >> During the install stage, it looks like ptxdist already does some
>> >> magic to "fix" the hardcoded paths (where is this done?), however not
>> >> all paths are fixed.
>> >>
>> >> Here's the .pc file that gets copied to sysroot-target:
>> >>
>> >> prefix=${pcfiledir}/../..
>> >> exec_prefix=${prefix}
>> >> libdir=${exec_prefix}/lib
>> >> includedir=${prefix}/include
>> >> libincludedir=/usr/lib/libzip/include
>> >> ^^^^^^^^^^^
>> >> [...]
>> >
>> > What is the difference between 'includedir' and 'libincludedir'?
>> > What kind of files does the install stage install to these locations?
>>
>> Apparently these are just two locations for header files. Here's the
>> complete .pc.in file:
>
> Yes, some packages have (generated) headers that are platform specific.
> Those are installed separately to handle multiarch correctly.
>
>> ===
>> prefix=@prefix@
>> exec_prefix=@exec_prefix@
>> libdir=@libdir@
>> includedir=@includedir@
>> libincludedir=@libdir@/@PACKAGE@/include
>
> Patch this to change this to:
>
> libincludedir=${libdir}/@PACKAGE@/include
Yes, thank you. At the end I followed a similar approach. But instead
of patching the sources, I am patching the generated .pc file in the
install.pack stage. I'll be submitting a patch for this in minutes, so
you can hopefully have a look and let me know if this is OK.
Thanks,
Guillermo
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [ptxdist] Hardcoded path in pkg-config file
2014-12-12 15:48 ` Guillermo Rodriguez Garcia
@ 2015-01-09 11:32 ` Guillermo Rodriguez Garcia
0 siblings, 0 replies; 6+ messages in thread
From: Guillermo Rodriguez Garcia @ 2015-01-09 11:32 UTC (permalink / raw)
To: ptxdist
[-- Attachment #1.1: Type: text/plain, Size: 2291 bytes --]
Hi Michael, all,
After this discussion I submitted patches for two new packages, libzip and
fuse-zip. Have you had the chance to look at them? Any feedback is welcome.
Thank you,
Guillermo
2014-12-12 16:48 GMT+01:00 Guillermo Rodriguez Garcia <
guille.rodriguez@gmail.com>:
> Hi Michael,
>
> 2014-12-12 11:22 GMT+01:00 Michael Olbrich <m.olbrich@pengutronix.de>:
> > Hi,
> >
> > On Thu, Dec 11, 2014 at 12:12:40PM +0100, Guillermo Rodriguez Garcia
> wrote:
> >> 2014-12-11 11:46 GMT+01:00 Juergen Borleis <jbe@pengutronix.de>:
> >> > Hi Guillermo,
> >> >
> >> > On Wednesday 10 December 2014 17:14:06 Guillermo Rodriguez Garcia
> wrote:
> >> >> I am trying to port a package to ptxdist (libzip). This package
> >> >> creates a pkg-config .pc file that contains some hardcoded paths.
> >> >> During the install stage, it looks like ptxdist already does some
> >> >> magic to "fix" the hardcoded paths (where is this done?), however not
> >> >> all paths are fixed.
> >> >>
> >> >> Here's the .pc file that gets copied to sysroot-target:
> >> >>
> >> >> prefix=${pcfiledir}/../..
> >> >> exec_prefix=${prefix}
> >> >> libdir=${exec_prefix}/lib
> >> >> includedir=${prefix}/include
> >> >> libincludedir=/usr/lib/libzip/include
> >> >> ^^^^^^^^^^^
> >> >> [...]
> >> >
> >> > What is the difference between 'includedir' and 'libincludedir'?
> >> > What kind of files does the install stage install to these locations?
> >>
> >> Apparently these are just two locations for header files. Here's the
> >> complete .pc.in file:
> >
> > Yes, some packages have (generated) headers that are platform specific.
> > Those are installed separately to handle multiarch correctly.
> >
> >> ===
> >> prefix=@prefix@
> >> exec_prefix=@exec_prefix@
> >> libdir=@libdir@
> >> includedir=@includedir@
> >> libincludedir=@libdir@/@PACKAGE@/include
> >
> > Patch this to change this to:
> >
> > libincludedir=${libdir}/@PACKAGE@/include
>
> Yes, thank you. At the end I followed a similar approach. But instead
> of patching the sources, I am patching the generated .pc file in the
> install.pack stage. I'll be submitting a patch for this in minutes, so
> you can hopefully have a look and let me know if this is OK.
>
> Thanks,
>
> Guillermo
>
--
Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com
[-- Attachment #1.2: Type: text/html, Size: 3465 bytes --]
[-- Attachment #2: Type: text/plain, Size: 48 bytes --]
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-01-09 11:32 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-10 16:14 [ptxdist] Hardcoded path in pkg-config file Guillermo Rodriguez Garcia
2014-12-11 10:46 ` Juergen Borleis
2014-12-11 11:12 ` Guillermo Rodriguez Garcia
2014-12-12 10:22 ` Michael Olbrich
2014-12-12 15:48 ` Guillermo Rodriguez Garcia
2015-01-09 11:32 ` Guillermo Rodriguez Garcia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox