summaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2009-05-22 20:29:07 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2009-05-22 20:29:07 +0000
commitfb626923f916a9743d803101b3c6fe88f8ee6356 (patch)
treeef5795269176f7363a245888a5bb127db87e0aeb /proto
parent800a551306f8f5a498cfec16a6ca3afd918d1120 (diff)
add code to conditionnally install the xcbgen python module.
Diffstat (limited to 'proto')
-rw-r--r--proto/xcb-proto/Makefile26
1 files changed, 25 insertions, 1 deletions
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 <bsd.xorg.mk>