Ross Burton <[email protected]>
writes:

> pkg-config-native is useful when building a package for the target that needs 
> to
> compile a build-time tool, to avoid having to hard-code many paths.

how will you call this wrapper when e.g. makefile contains:

| foo_CFLAGS = $(shell pkg-config --cflags foo)

? 

A more powerful approach might be to install it as 'pkg-config' under
${STAGING_BINDIR_NATIVE}/pkg-config-native/ and prepend this dir to
$PATH when executing the makefile above.


> --- /dev/null
> +++ b/meta/recipes-devtools/pkgconfig/pkgconfig/pkg-config-native.in
> @@ -0,0 +1,7 @@
> +#! /bin/sh
> +
> +PKG_CONFIG_PATH="@PATH_NATIVE@"
> +PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@"
> +unset PKG_CONFIG_SYSROOT_DIR
> +
> +pkg-config "$@"

1. last 'pkg-config' should be called with 'exec'

2. it depends on too much assumptions (e.g. that PKG_CONFIG_PATH and
   _LIBDIR are already exported.

I would write it:

| #! /bin/sh
| exec env -u PKG_CONFIG_SYSROOT_DIR \
|    PKG_CONFIG_PATH="@PATH_NATIVE@" \
|    PKG_CONFIG_LIBDIR="@LIBDIR_NATIVE@" \
|    pkg-config "$@"


Enrico

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to