aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornovel <novel@FreeBSD.org>2015-11-28 18:34:31 +0800
committernovel <novel@FreeBSD.org>2015-11-28 18:34:31 +0800
commit5758a7fb3ddb9c8e021504f9a962bf108064f282 (patch)
tree5dc2ab4fb5277e8119223a298e2ba7dc6a2b9710
parent07a30588e99b6064b12a6d687814cb3ad965e293 (diff)
downloadfreebsd-ports-gnome-5758a7fb3ddb9c8e021504f9a962bf108064f282.tar.gz
freebsd-ports-gnome-5758a7fb3ddb9c8e021504f9a962bf108064f282.tar.zst
freebsd-ports-gnome-5758a7fb3ddb9c8e021504f9a962bf108064f282.zip
devel/spice-protocol: fix codegen scripts
Fix two issues with the bundled Python codegen scripts: - Add runtime dependency on py-six - Generate *.pyc files for them so users of these scripts do not poison filesystem
-rw-r--r--devel/spice-protocol/Makefile8
-rw-r--r--devel/spice-protocol/pkg-plist7
2 files changed, 14 insertions, 1 deletions
diff --git a/devel/spice-protocol/Makefile b/devel/spice-protocol/Makefile
index 0942fc77f81a..e950aeab884d 100644
--- a/devel/spice-protocol/Makefile
+++ b/devel/spice-protocol/Makefile
@@ -3,6 +3,7 @@
PORTNAME= spice-protocol
PORTVERSION= 0.12.10
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= http://www.spice-space.org/download/releases/
@@ -11,11 +12,16 @@ COMMENT= Simple Protocol for Independent Computing Environments
LICENSE= BSD3CLAUSE
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>0:${PORTSDIR}/devel/py-six
+
GNU_CONFIGURE= yes
-USES= gmake pathfix pkgconfig tar:bzip2
+USES= gmake pathfix pkgconfig python tar:bzip2
post-patch:
@${REINPLACE_CMD} -e 's|(libdir)/spice-protocol|(datadir)/spice-protocol/|' \
${WRKSRC}/Makefile.in ${WRKSRC}/python_modules/Makefile.in
+post-install:
+ @${PYTHON_CMD} -m compileall -d ${DATADIR} ${STAGEDIR}${DATADIR}
+
.include <bsd.port.mk>
diff --git a/devel/spice-protocol/pkg-plist b/devel/spice-protocol/pkg-plist
index 4720d4440539..948d9946f40c 100644
--- a/devel/spice-protocol/pkg-plist
+++ b/devel/spice-protocol/pkg-plist
@@ -15,12 +15,19 @@ include/spice-1/spice/types.h
include/spice-1/spice/vd_agent.h
include/spice-1/spice/vdi_dev.h
%%DATADIR%%/python_modules/__init__.py
+%%DATADIR%%/python_modules/__init__.pyc
%%DATADIR%%/python_modules/codegen.py
+%%DATADIR%%/python_modules/codegen.pyc
%%DATADIR%%/python_modules/demarshal.py
+%%DATADIR%%/python_modules/demarshal.pyc
%%DATADIR%%/python_modules/marshal.py
+%%DATADIR%%/python_modules/marshal.pyc
%%DATADIR%%/python_modules/ptypes.py
+%%DATADIR%%/python_modules/ptypes.pyc
%%DATADIR%%/python_modules/spice_parser.py
+%%DATADIR%%/python_modules/spice_parser.pyc
%%DATADIR%%/spice.proto
%%DATADIR%%/spice1.proto
%%DATADIR%%/spice_codegen.py
+%%DATADIR%%/spice_codegen.pyc
libdata/pkgconfig/spice-protocol.pc