| Submitter | Bernhard Guillon |
|---|---|
| Date | 2010-02-14 20:38:51 |
| Message ID | <20100214203851.3C855185B3BD2@dd20204.kasserver.com> |
| Download | mbox | patch |
| Permalink | /patch/1589/ |
| State | Deferred, archived |
| Headers | show |
Comments
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?
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.
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.
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.
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.
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
Patch
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 }