[PATCH wayland-protocols] sysroot prefix

Tomek Bury tomek.bury at gmail.com
Thu Jul 6 09:02:16 UTC 2017


Hi,

I've attached a trivial patch we discussed yesterday on #wayland channel.
The patch adds a sysroot prefix to the "pkgdatadir" variable. The
pkg-config automatically adds sysroot to paths returned by --cflags and
--libs but *NOT* to --variable.

The "pkgdatadir" in wayland-protocols.pc is actually a path pointing to the
protocol installation directory on the target system but in a
cross-compilation scenario we need pkg-config to return a temporary
location in the staging area on the build system just as it does for
--cflags and --libs.

The change only influences builds with PKG_CONFIG_SYSROOT_DIR environment
variable set.

There's another pkg-confing variable containing a path to the
wayland-scanner tool but I'm not sure how to handle that one correctly in
cross-compilation scenario.  The cross-compiled wayland-scanner is likely
to be useless on the build system. The pre-existing wayland-scanner on the
build system, if any, is also likely to be useless. The only scanner that
would actually work is the scanner compiled from wayland sources for the
build system architecture and installed somewhere with its own .pc file.
This implies that libs using scanner would need 2 independent pkg-config
setups.

My call would be to get rid of that variable and add
--with-wayland-scanner=/path/to/the/right/wayland-scanner config variable
to xkbcommon, wayland, weston and whatever uses wayland-scanner.

Cheers,
Tomek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170706/8a48ce49/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-sysroot-prefix-for-pkgdatadir-variable.patch
Type: text/x-patch
Size: 757 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170706/8a48ce49/attachment.bin>


More information about the wayland-devel mailing list