libxcb uses python only during build-time, so proper eclass for this case is python-any-r1. Please consider my updated ebuild. Reproducible: Always
Created attachment 350012 [details] Proposed updated ebuild Please note, that this ebuild has incomplete deps on xcb-proto. As mgorny pointed out, there should be thing like: > || ( ( python:2.7 libfoo[python_targets_python2_7] ) ... ) I hope a function will be created in python-any-r1.eclass to generate deps of this kind, then I will update the ebuild and it can be commited.
This has been fixed in libxcb-9999::x11.
this should block #496800
I see that mgorny has applied this to libxcb-1.9.3-r1.ebuild but it's not quite right. It's missing ${PYTHON_DEPS} from DEPEND.
(In reply to James Le Cuirot from comment #4) > I see that mgorny has applied this to libxcb-1.9.3-r1.ebuild but it's not > quite right. It's missing ${PYTHON_DEPS} from DEPEND. $(python_gen_any_dep) provides those.
Ah yes, my mistake.
Created attachment 368114 [details, diff] libxcb-cross-compile.patch I'll attempt a more helpful contribution this time. I'm trying to make libxcb cross-buildable because it gets pulled into @system if you have the pam and consolekit flags enabled. I believe --host-root should be added to the has_version call. Here's why... I've been working on some EAPI 5-hdepend ebuilds recently. Ebuilds that depend on x11-proto packages are prime candidates for this. This particular one is slightly less straightforward because of the Python aspect. As is usually the case with 5-hdepend ebuilds, atoms in RDEPEND that are also in DEPEND stay where they are. libxslt is only used at build time for xsltproc so that's clearly a HDEPEND. That leaves xcb-proto. I believe it should be split with the MULTILIB_USEDEP flags applying to DEPEND and the PYTHON_USEDEP flags applying to HDEPEND. This is because the headers need to be in ROOT but Python is executed at build time from /. Hence the has_version call should look at / and not ROOT. If it weren't for the fact that Python is an RDEPEND of xcb-proto, it would not be necessary to have any Python stuff in ROOT at all. Unfortunately 5-hdepend ebuilds can't go into the tree yet, not least because a whole string of ebuilds don't support it. I'm attaching a patch anyway for anyone who's interested. In the meantime, I work around the x11-proto issue in my own scripts by creating a pkg-config wrapper like this. # If a package is missing then it's probably because it's a build-only # dependency so check /. This is not ideal but works in most cases. "/usr/bin/${0##*/}" "${@}" || PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 /usr/bin/pkg-config "${@}" This still requires --host-root to be added to libxcb though. It makes sense in either EAPI, especially since the _python_EPYTHON_supported function checks for Python itself in / so could it please could this flag be added?
This is fixed in 1.9.3-r1 and 1.10 About the cross compilation issue, please open a new bug report.