libhybris/libhybris — pull request #188 by lbt (2014-01-16 14:25:41+00:00)
Title: Provide pkgconfig, rework headers to avoid use of android/ in #include. Update extract-headers.sh to support changes

As discussed lightly on irc
The pkgconfig for hybris makes us think about the include path base.
Settling on a given location such as /usr/include/hybris-headers then adds that to a -I setting in pkgconfig
This contains android/ cutils/ system/ ...
Now code compiled using that headers path will pull in android-based headers that assume cutils/ system/ ... are in the header search path. This means we can't use an android/ namespace below it.
Some confusion may also have arisen from using android/ as a symbolic link to the extracted headers in the hybris local build environment.
So I've removed all references to android/ in libhybris but added -I$(top_srcdir)/include/android to the Makefile.in
(I have a feeling that we should be using android_headers_path from configure but that can be done when configure stops dropping the android symlink into the build root include/).

Also I've updated extract-headers.sh to make life easier for me when I want it to create a correct .pc file without having to specify the android version.

my spec file now contains

extract-headers.sh . $HDRS/ -p %{_libdir}/droid-devel/droid-headers > /dev/null
sed-magic '/CONFIG GOES HERE/,$d' $HDRS/android-config.h
mv $HDRS/android-headers.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/

I also removed CONFIG GOES HERE from the comment as that confused sed too much :)