Hi!
I have not great OE experience (and many free time just now...).
I'm trying to write a bitbake recipe for an app with the following src
structure:

/app
/app/src
/app/lib
/app/tools

the normal build process is the following:

* cd lib; ./configure; make dep; make

that  builds a static lib (and has to be done before launching the
app/configure)

* cd ..; ./autogen.sh; make; make install

that builds some dbus introspection generation tool in appsrc/tools,
then use that tools to generate some .c files in app/src, and finally
builds the application that links the static library, but that fails
as such tools have to be native.

So I created a bitbake recipe for app-dbustool-native, that install
them in STAGING_BINDIR_NATIVE, and patched the app autoconf files to
exclude the the tools generation during the real app build.

(p.s. as the dbus tools inherits the general app autoconf files, there
are a *lot* of dependencies that is not really needed so to avoid the
building a lot of xxx-native stuff (and write the relative recipes, as
they are not present in the tree), i just added my own set of autoconf
file in the tools dir).

Finally I added a do_configure_prepend() section that copy the dbus
generation tools from STAGING_BINDIR_NATIVE and launch the library
build:

cd lib
cfgcmd="./configure \
  --build=${BUILD_SYS} \
  --host=${HOST_SYS} \
  --target=${TARGET_SYS} \
  --prefix=${prefix} \
  --exec_prefix=${exec_prefix} \
  --bindir=${bindir} \
  --sbindir=${sbindir} \
  --libexecdir=${libexecdir} \
  --datadir=${datadir} \
  --sysconfdir=${sysconfdir} \
  --sharedstatedir=${sharedstatedir} \
  --localstatedir=${localstatedir} \
  --libdir=${libdir} \
  --includedir=${includedir} \
  --oldincludedir=${oldincludedir} \
  --infodir=${infodir} \
  --mandir=${mandir} \
  ${EXTRA_OECONF} \
  $@"
oenote "Running $cfgcmd..."
$cfgcmd || oefatal "oe_runconf failed"
oe_runmake

cd ${S}
cp ${STAGING_BINDIR_NATIVE}/dbus_tools app/tools/dbus-tools

(why OE renames dbus-tools to dbus_tools during staging native phase?)

The build works and I got my ipk, but I guess that such solutions is
not correct/elegant, some hints to fix it?

Regards

     Niko
_______________________________________________
Shr-devel mailing list
[email protected]
http://lists.shr-project.org/mailman/listinfo/shr-devel

Reply via email to