Work around broken cross-build of x11/libxcb. The right fix requires more knowledge of pkg-config than I have at the moment. Index: x11/libxcb/Makefile =================================================================== RCS file: /cvsroot/pkgsrc/x11/libxcb/Makefile,v retrieving revision 1.20 diff -p -u -r1.20 Makefile --- x11/libxcb/Makefile 1 Feb 2013 14:40:29 -0000 1.20 +++ x11/libxcb/Makefile 23 Apr 2013 13:29:24 -0000 @@ -11,8 +11,8 @@ HOMEPAGE= http://xcb.freedesktop.org/ COMMENT= X protocol C-language Binding LICENSE= mit # with no-advertising clause -BUILD_DEPENDS+= libxslt>=1.1.0:../../textproc/libxslt -BUILD_DEPENDS+= ${PYPKGPREFIX}-xcbgen>=1.7:../../x11/py-xcbgen +TOOL_DEPENDS+= libxslt>=1.1.0:../../textproc/libxslt +TOOL_DEPENDS+= ${PYPKGPREFIX}-xcbgen>=1.7:../../x11/py-xcbgen GNU_CONFIGURE= yes USE_LIBTOOL= yes @@ -21,6 +21,19 @@ USE_TOOLS+= gmake pkg-config CONFIGURE_ARGS+= --disable-build-docs # or needs doxygen CONFIGURE_ARGS+= --disable-doxygen +.include "../../mk/bsd.prefs.mk" + +.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) +# [TRC 20130328: XXX This is kludgerific! We need to use the full +# pathname in the host to the target's xcbincludedir, but libxcb gets +# that from pkg-config, which reports the pathname in the target.] +SUBST_CLASSES+= xcbincludedir +SUBST_FILES.xcbincludedir+= src/Makefile.in +SUBST_MESSAGE.xcbincludedir= Use the xcbincludedir in the cross destdir. +SUBST_STAGE.xcbincludedir= pre-configure +SUBST_SED.xcbincludedir= -e s,'$$(XCBPROTO_XCBINCLUDEDIR)',${CROSS_DESTDIR:Q}'&',g +.endif + # Adds -Wl,-R to pkgconfig files automatically PKGCONFIG_OVERRIDE+= xcb-composite.pc.in PKGCONFIG_OVERRIDE+= xcb-damage.pc.in