[oe] Setting environment variables in recipes and fixing upstream the right way to cross compile? (was: package VDR for OE)

Paul Menzel paulepanter at users.sourceforge.net
Tue Jan 19 00:22:36 UTC 2010


Am Sonntag, den 13.12.2009, 16:45 +0100 schrieb Paul Menzel:
> Am Sonntag, den 13.12.2009, 15:18 +0100 schrieb Petr Štetiar:
> > Paul Menzel <paulepanter at users.sourceforge.net> [2009-12-13 14:46:20]:
> 
> […]
> 
> > Maybe, it's because you don't have STAGING_INCDIR variable available in
> > do_compile() step. If I were you, I would grep for STAGING_INCDIR variable in
> > other recipes: grep -R STAGING_INCDIR recipes/* and you should get idea how to
> > use it. Hint, change :
> > 
> > INCLUDES = -I${STAGING_INCDIR}freetype2
> > 
> > to 
> > 
> > INCLUDES = ${CFLAGS}
> > 
> > and in your recipe do:
> > 
> > CFLAGS_append  += " -I${STAGING_INCDIR}/freetype2"
> 
> Great. That worked.
> 
> > > Furthermore is there a better way for upstream to set things up so that
> > > no patching is needed? Or is autotools needed for this?
> 
> I am still asking if upstream could change something to make the
> Makefile cross compilable by default.

How should the upstream Makefile be changed to be easily cross
compilable. Is my following suggestion correct?

The problem is to find the FreeType headers we have to tell the compiler
where there are, because they are in the subdirectory `freetype` under 
`${STAGING_INCDIR}/freetype2`.

Therefore change upstream Makefile to

        -INCLUDES = /usr/include/freetype2`
        +INCLUDES ?= /usr/include/freetype2`

and export `INCLUDES` [1] in the recipe.

        export INCLUDES = ${STAGING_INCDIR}/freetype2

Would that be preferable to patching `Makefile` in OE and using
`CFLAGS_append`? Maybe other distributions would profit too if upstream
made this change? If yes, I could prepare a patch.

[…]


Thanks,

Paul


[1] http://docs.openembedded.org/usermanual/html/recipes_syntax.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20100119/520c4829/attachment-0002.sig>


More information about the Openembedded-devel mailing list