* How to sane replace a path in a pkgconfig file ?
@ 2010-02-14 14:23 bernhard.guillon
2010-02-14 17:04 ` Bernhard Reutner-Fischer
0 siblings, 1 reply; 12+ messages in thread
From: bernhard.guillon @ 2010-02-14 14:23 UTC (permalink / raw)
To: openembedded-devel
Hi all,
currently I am working on fixing blackbox. I had to add a lot of includes to fix compiler errors.
After fixing the compiler errors I came over a sed error of the recipe. sed was not able to find the pc file but the recipe inherits pkgconfig.
----snipped of blackbox_0.70.1.bb----
#fix path of pc file
do_install_append() {
sed -i s#${STAGING_LIBDIR}#${libdir}#g ${D}/${libdir}/pkgconfig/libbt.pc
}
do_stage () {
sed -i s#${STAGING_LIBDIR}#${libdir}#g ${STAGING_LIBDIR}/pkgconfig/libbt.pc
}
It looks like the pkgconfig class is called after do_stage()? What is the right place to replace the wrong path in the libbt.pc file?
I changed the above to this:
#fix path of pc file
do_install_prepend() {
sed -i s#${STAGING_LIBDIR}#${libdir}#g ${S}/lib/libbt.pc
}
But I am not sure if this is safe! Is there any place where the original path in the pkconfig file is needed? With my approach this file would have the wrong path inside.
What do you think about it? I am looking forward to any advice :)
Best regards
Bernhard Guillon
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: How to sane replace a path in a pkgconfig file ?
2010-02-14 14:23 How to sane replace a path in a pkgconfig file ? bernhard.guillon
@ 2010-02-14 17:04 ` Bernhard Reutner-Fischer
2010-02-14 17:33 ` = ? UTF-8 ? B ? Ww== ? =oe= ? UTF-8 ? B ? XQ== ? = " bernhard.guillon
0 siblings, 1 reply; 12+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-02-14 17:04 UTC (permalink / raw)
To: openembedded-devel
On Sun, Feb 14, 2010 at 03:23:09PM +0100, bernhard.guillon@opensimpad.org wrote:
>Hi all,
>currently I am working on fixing blackbox. I had to add a lot of includes to fix compiler errors.
I have an import of the CVS tree here, fyi:
http://git.busybox.net/~aldot/git/blackboxwm/
http://git.busybox.net/~aldot/git/bbkeys/
There were a couple of debian's patches applied (still by brad), i'd
recommend to use all blackbox-0.70.1..master patches and base off that.
HTH,
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: = ? UTF-8 ? B ? Ww== ? =oe= ? UTF-8 ? B ? XQ== ? = How to sane replace a path in a pkgconfig file ?
2010-02-14 17:04 ` Bernhard Reutner-Fischer
@ 2010-02-14 17:33 ` bernhard.guillon
2010-02-14 18:37 ` Bernhard Reutner-Fischer
0 siblings, 1 reply; 12+ messages in thread
From: bernhard.guillon @ 2010-02-14 17:33 UTC (permalink / raw)
To: openembedded-devel
> On Sun, Feb 14, 2010 at 03:23:09PM +0100, bernhard.guillon@opensimpad.org wrote:
> >Hi all,
> >currently I am working on fixing blackbox. I had to add a lot of includes to fix compiler errors.
>
> I have an import of the CVS tree here, fyi:
> http://git.busybox.net/~aldot/git/blackboxwm/
> http://git.busybox.net/~aldot/git/bbkeys/
>
> There were a couple of debian's patches applied (still by brad), i'd
> recommend to use all blackbox-0.70.1..master patches and base off that.
>
Hi,
thanks for the hint, the debian patch for the includes looks like mine so I will use the debian patch for updating the recipe :)
But my problem is not the compiler errors but openembeddeds pkgconfig class.
When will pkgconfig be called? Before or after do_stage()? What is the right function to place the code of replacing the wrong path of the pkgconfig file? The original package does it in do_stage() but it seems at least on my build system that pkgconfig class is called after do_stage().
Also is it safe to just replace the path in pkgconfig files in do_install_prepend()? Because then there is no file with the build path.
So I need a function which gets called after pkgconfig class?
Best regards
Bernhard Guillon
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: = ? UTF-8 ? B ? Ww== ? =oe= ? UTF-8 ? B ? XQ== ? = How to sane replace a path in a pkgconfig file ?
2010-02-14 17:33 ` = ? UTF-8 ? B ? Ww== ? =oe= ? UTF-8 ? B ? XQ== ? = " bernhard.guillon
@ 2010-02-14 18:37 ` Bernhard Reutner-Fischer
2010-02-14 20:20 ` Koen Kooi
0 siblings, 1 reply; 12+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-02-14 18:37 UTC (permalink / raw)
To: openembedded-devel
On Sun, Feb 14, 2010 at 06:33:45PM +0100, bernhard.guillon@opensimpad.org wrote:
>> On Sun, Feb 14, 2010 at 03:23:09PM +0100, bernhard.guillon@opensimpad.org wrote:
>> >Hi all,
>> >currently I am working on fixing blackbox. I had to add a lot of includes to fix compiler errors.
>>
>> I have an import of the CVS tree here, fyi:
>> http://git.busybox.net/~aldot/git/blackboxwm/
>> http://git.busybox.net/~aldot/git/bbkeys/
>>
>> There were a couple of debian's patches applied (still by brad), i'd
>> recommend to use all blackbox-0.70.1..master patches and base off that.
>>
>
>Hi,
>thanks for the hint, the debian patch for the includes looks like mine so I will use the debian patch for updating the recipe :)
>
>But my problem is not the compiler errors but openembeddeds pkgconfig class.
I'm aware of that but unfortunately i can't help you with the pkgconfig class.
>When will pkgconfig be called? Before or after do_stage()? What is the right function to place the code of replacing the wrong path of the pkgconfig file? The original package does it in do_stage() but it seems at least on my build system that pkgconfig class is called after do_stage().
classes/pkgconfig.bbclass suggests that .pc are fixed up in
do_install_prepend() (why does the efl class duplicate this, btw?)
and that this depends on stage.
btw.. someone should
sed -i -e s/vw/w/ docs/usermanual/reference/class_pkgconfig.xml
>Also is it safe to just replace the path in pkgconfig files in do_install_prepend()? Because then there is no file with the build path.
>
>So I need a function which gets called after pkgconfig class?
I'd try to remove that explicit .pc handling from blackbox and see what
happens and start from there (i.e. don't know yet).
cheers,
Bernhard
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: = ? UTF-8 ? B ? Ww== ? =oe= ? UTF-8 ? B ? XQ== ? = How to sane replace a path in a pkgconfig file ?
2010-02-14 18:37 ` Bernhard Reutner-Fischer
@ 2010-02-14 20:20 ` Koen Kooi
2010-02-14 20:38 ` bernhard.guillon
0 siblings, 1 reply; 12+ messages in thread
From: Koen Kooi @ 2010-02-14 20:20 UTC (permalink / raw)
To: openembedded-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 14-02-10 19:37, Bernhard Reutner-Fischer wrote:
> classes/pkgconfig.bbclass suggests that .pc are fixed up in
> do_install_prepend() (why does the efl class duplicate this, btw?)
> and that this depends on stage.
Because the efl classes suck, they also override things like PACKAGES.
With new-style staging and the current state of e svn we should be able
to get rid of that crap altogether.
That reminds me, I wanted to add
do_configure_prepend() {
autopoint
}
to those clase to make the modules build again.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFLeFscMkyGM64RGpERAi25AKCtuADXMEd569iE9OeUE6Yc6kXfTQCdEw2b
35Qg7/ZldiOSulSB71Pbo44=
=kiKn
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: = ? UTF-8 ? B ? Ww== ? =oe= ? UTF-8 ? B ? XQ== ? = How to sane replace a path in a pkgconfig file ?
2010-02-14 20:20 ` Koen Kooi
@ 2010-02-14 20:38 ` bernhard.guillon
2010-02-14 21:22 ` Bernhard Reutner-Fischer
2010-02-14 21:25 ` Phil Blundell
0 siblings, 2 replies; 12+ messages in thread
From: bernhard.guillon @ 2010-02-14 20:38 UTC (permalink / raw)
To: openembedded-devel
> > classes/pkgconfig.bbclass suggests that .pc are fixed up in
> > do_install_prepend() (why does the efl class duplicate this, btw?)
> > and that this depends on stage.
>
> Because the efl classes suck, they also override things like PACKAGES.
> With new-style staging and the current state of e svn we should be able
> to get rid of that crap altogether.
>
> That reminds me, I wanted to add
>
> do_configure_prepend() {
> autopoint
> }
>
> to those clase to make the modules build again.
I found the problem for blackbox. The path is in -rlink-path and this is currently ignored by pkgconfig.bbclass.
This fixed it on my system but I have no clue if this is a good idea at all :D
diff --git a/classes/pkgconfig.bbclass b/classes/pkgconfig.bbclass
index f3d9371..1da508f 100644
--- a/classes/pkgconfig.bbclass
+++ b/classes/pkgconfig.bbclass
@@ -3,7 +3,7 @@ DEPENDS_prepend = "pkgconfig-native "
do_install_prepend () {
for i in `find ${S}/ -name "*.pc" -type f` ; do
- sed -i -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' $i
+ sed -i -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' -e 's:-rpath-link,${STAGING_LIBDIR}::g' $i
done
}
Should I prepare a proper patch for pkgconfig.bbclass and send it to the list or is this approach the wrong way?
Best regards
Bernhard Guillon
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: = ? UTF-8 ? B ? Ww== ? =oe= ? UTF-8 ? B ? XQ== ? = How to sane replace a path in a pkgconfig file ?
2010-02-14 20:38 ` bernhard.guillon
@ 2010-02-14 21:22 ` Bernhard Reutner-Fischer
2010-02-14 21:31 ` Phil Blundell
2010-02-14 21:25 ` Phil Blundell
1 sibling, 1 reply; 12+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-02-14 21:22 UTC (permalink / raw)
To: openembedded-devel
On Sun, Feb 14, 2010 at 09:38:51PM +0100, bernhard.guillon@opensimpad.org wrote:
>> > classes/pkgconfig.bbclass suggests that .pc are fixed up in
>> > do_install_prepend() (why does the efl class duplicate this, btw?)
>> > and that this depends on stage.
>>
>> Because the efl classes suck, they also override things like PACKAGES.
>> With new-style staging and the current state of e svn we should be able
>> to get rid of that crap altogether.
>>
>> That reminds me, I wanted to add
>>
>> do_configure_prepend() {
>> autopoint
>> }
>>
>> to those clase to make the modules build again.
>
>I found the problem for blackbox. The path is in -rlink-path and this is currently ignored by pkgconfig.bbclass.
>
>This fixed it on my system but I have no clue if this is a good idea at all :D
>
>diff --git a/classes/pkgconfig.bbclass b/classes/pkgconfig.bbclass
>index f3d9371..1da508f 100644
>--- a/classes/pkgconfig.bbclass
>+++ b/classes/pkgconfig.bbclass
>@@ -3,7 +3,7 @@ DEPENDS_prepend = "pkgconfig-native "
> do_install_prepend () {
>
> for i in `find ${S}/ -name "*.pc" -type f` ; do
>- sed -i -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' $i
>+ sed -i -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' -e 's:-rpath-link,${STAGING_LIBDIR}::g' $i
I'd go for plain
sed -i -e 's:${STAGING_LIBDIR}::g' -e 's:${STAGING_INCDIR}::g' $i
to avoid massaging -rpath / -Y / --library-path et al later on.
> done
> }
>
>
>Should I prepare a proper patch for pkgconfig.bbclass and send it to the list or is this approach the wrong way?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: = ? UTF-8 ? B ? Ww== ? =oe= ? UTF-8 ? B ? XQ== ? = How to sane replace a path in a pkgconfig file ?
2010-02-14 20:38 ` bernhard.guillon
2010-02-14 21:22 ` Bernhard Reutner-Fischer
@ 2010-02-14 21:25 ` Phil Blundell
2010-02-15 9:44 ` Richard Purdie
1 sibling, 1 reply; 12+ messages in thread
From: Phil Blundell @ 2010-02-14 21:25 UTC (permalink / raw)
To: openembedded-devel
On Sun, 2010-02-14 at 21:38 +0100, bernhard.guillon@opensimpad.org
wrote:
> for i in `find ${S}/ -name "*.pc" -type f` ; do
> - sed -i -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' $i
> + sed -i -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' -e 's:-rpath-link,${STAGING_LIBDIR}::g' $i
> done
That probably is a reasonable thing to do, but you might want to filter
out the preceding "-Wl," as well.
p.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: = ? UTF-8 ? B ? Ww== ? =oe= ? UTF-8 ? B ? XQ== ? = How to sane replace a path in a pkgconfig file ?
2010-02-14 21:22 ` Bernhard Reutner-Fischer
@ 2010-02-14 21:31 ` Phil Blundell
2010-02-14 21:47 ` Bernhard Reutner-Fischer
0 siblings, 1 reply; 12+ messages in thread
From: Phil Blundell @ 2010-02-14 21:31 UTC (permalink / raw)
To: openembedded-devel
On Sun, 2010-02-14 at 22:22 +0100, Bernhard Reutner-Fischer wrote:
> I'd go for plain
> sed -i -e 's:${STAGING_LIBDIR}::g' -e 's:${STAGING_INCDIR}::g' $i
>
> to avoid massaging -rpath / -Y / --library-path et al later on.
Does that actually work? I would have thought it would leave you with a
load of surplus "-L" and "-I" options with missing arguments.
p.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: = ? UTF-8 ? B ? Ww== ? =oe= ? UTF-8 ? B ? XQ== ? = How to sane replace a path in a pkgconfig file ?
2010-02-14 21:31 ` Phil Blundell
@ 2010-02-14 21:47 ` Bernhard Reutner-Fischer
2010-02-14 21:49 ` Bernhard Reutner-Fischer
0 siblings, 1 reply; 12+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-02-14 21:47 UTC (permalink / raw)
To: openembedded-devel
On Sun, Feb 14, 2010 at 09:31:50PM +0000, Phil Blundell wrote:
>On Sun, 2010-02-14 at 22:22 +0100, Bernhard Reutner-Fischer wrote:
>> I'd go for plain
>> sed -i -e 's:${STAGING_LIBDIR}::g' -e 's:${STAGING_INCDIR}::g' $i
>>
>> to avoid massaging -rpath / -Y / --library-path et al later on.
>
>Does that actually work? I would have thought it would leave you with a
>load of surplus "-L" and "-I" options with missing arguments.
It wouldn't, you're right.
So either come up with a stanza that lists all path-touching tokens
explicitly or write a sed/awk script that does that -- i'd be surprised
if nobody wrote something like that yet since that's a pretty common
thing to do.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: = ? UTF-8 ? B ? Ww== ? =oe= ? UTF-8 ? B ? XQ== ? = How to sane replace a path in a pkgconfig file ?
2010-02-14 21:47 ` Bernhard Reutner-Fischer
@ 2010-02-14 21:49 ` Bernhard Reutner-Fischer
0 siblings, 0 replies; 12+ messages in thread
From: Bernhard Reutner-Fischer @ 2010-02-14 21:49 UTC (permalink / raw)
To: openembedded-devel
On Sun, Feb 14, 2010 at 10:47:09PM +0100, Bernhard Reutner-Fischer wrote:
>So either come up with a stanza that lists all path-touching tokens
>explicitly or write a sed/awk script that does that -- i'd be surprised
wait.. we're in python-land, so this should be fairly easy and straight
forward.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: = ? UTF-8 ? B ? Ww== ? =oe= ? UTF-8 ? B ? XQ== ? = How to sane replace a path in a pkgconfig file ?
2010-02-14 21:25 ` Phil Blundell
@ 2010-02-15 9:44 ` Richard Purdie
0 siblings, 0 replies; 12+ messages in thread
From: Richard Purdie @ 2010-02-15 9:44 UTC (permalink / raw)
To: openembedded-devel
On Sun, 2010-02-14 at 21:25 +0000, Phil Blundell wrote:
> On Sun, 2010-02-14 at 21:38 +0100, bernhard.guillon@opensimpad.org
> wrote:
> > for i in `find ${S}/ -name "*.pc" -type f` ; do
> > - sed -i -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' $i
> > + sed -i -e 's:-L${STAGING_LIBDIR}::g' -e 's:-I${STAGING_INCDIR}::g' -e 's:-rpath-link,${STAGING_LIBDIR}::g' $i
> > done
>
> That probably is a reasonable thing to do, but you might want to filter
> out the preceding "-Wl," as well.
Note its pkgconfig we're talking about here which should never be
putting this stuff in its .pc files in the first place as it has some
understanding of sysroots. Usually if these things are creeping in, its
due to dependencies being added as via its expanded cflags/libs lines
rather than as a true dependency.
I'm not sure how it copes with --rpath-link though. If that is breaking,
we should consider fixing pkgconfig itself.
Cheers,
Richard
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2010-02-15 9:47 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-14 14:23 How to sane replace a path in a pkgconfig file ? bernhard.guillon
2010-02-14 17:04 ` Bernhard Reutner-Fischer
2010-02-14 17:33 ` = ? UTF-8 ? B ? Ww== ? =oe= ? UTF-8 ? B ? XQ== ? = " bernhard.guillon
2010-02-14 18:37 ` Bernhard Reutner-Fischer
2010-02-14 20:20 ` Koen Kooi
2010-02-14 20:38 ` bernhard.guillon
2010-02-14 21:22 ` Bernhard Reutner-Fischer
2010-02-14 21:31 ` Phil Blundell
2010-02-14 21:47 ` Bernhard Reutner-Fischer
2010-02-14 21:49 ` Bernhard Reutner-Fischer
2010-02-14 21:25 ` Phil Blundell
2010-02-15 9:44 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.