From fb626923f916a9743d803101b3c6fe88f8ee6356 Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Fri, 22 May 2009 20:29:07 +0000 Subject: add code to conditionnally install the xcbgen python module. --- proto/xcb-proto/Makefile | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'proto/xcb-proto/Makefile') diff --git a/proto/xcb-proto/Makefile b/proto/xcb-proto/Makefile index 9c50c450f..6e91df322 100644 --- a/proto/xcb-proto/Makefile +++ b/proto/xcb-proto/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.1 2009/05/22 16:06:29 matthieu Exp $ +# $OpenBSD: Makefile,v 1.2 2009/05/22 20:29:06 matthieu Exp $ PKGCONFIG= xcb-proto.pc @@ -31,6 +31,7 @@ FILES= \ xvmc.xml XCBDATADIR= ${X11BASE}/share/xcb +PYTHONDIR= ${X11BASE}/lib/python${PYTHON_VERSION}/site-packages EXTRA_PKGCONFIG_SUBST= '-e s,@xcbincludedir@,$${datadir}/xcb,g' \ '-e s,@pythondir@,$${prefix}/lib/python${PYTHON_VERSION}/site-packages,g' @@ -44,4 +45,27 @@ realinstall: eval "$$j"; \ done +.if defined(XENOCARA_REBUILD_XCB) && ${XENOCARA_REBUILD_XCB:L} == "yes" + +XCBGEN_SRCS= \ + __init__.py \ + error.py \ + expr.py \ + matcher.py \ + state.py \ + xtypes.py + +install-py: + mkdir -p ${DESTDIR}${PYTHONDIR}/xcbgen + cd ${.CURDIR}/xcbgen ; for i in ${XCBGEN_SRCS}; do \ + ${INSTALL_DATA} $$i ${DESTDIR}${PYTHONDIR}/xcbgen; \ + done + cd ${DESTDIR}${PYTHONDIR}/xcbgen; \ + env PYTHON=python${PYTHON_VERSION} ${SHELL} ${.CURDIR}/py-compile \ + --basedir ${PYTHONDIR}/xcbgen ${XCBGEN_SRCS} + +realinstall: install-py + +.endif + .include -- cgit v1.2.3