Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Jan 2019 19:35:21 +0000 (UTC)
From:      Antoine Brodin <antoine@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r489371 - head/science/scidavis
Message-ID:  <201901051935.x05JZLe2065828@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: antoine
Date: Sat Jan  5 19:35:21 2019
New Revision: 489371
URL: https://svnweb.freebsd.org/changeset/ports/489371

Log:
  Fix installation/packaging with DEFAULT_VERSIONS=python=3.x
  
  PR:		234633

Modified:
  head/science/scidavis/Makefile

Modified: head/science/scidavis/Makefile
==============================================================================
--- head/science/scidavis/Makefile	Sat Jan  5 19:35:19 2019	(r489370)
+++ head/science/scidavis/Makefile	Sat Jan  5 19:35:21 2019	(r489371)
@@ -39,7 +39,7 @@ OPTIONS_SUB=	yes
 
 PYTHON_DESC=	Python scripting support
 PYTHON_USES=	pyqt:5 python
-PYTHON_USE=	pyqt=core,gui,printsupport,sip,widgets
+PYTHON_USE=	pyqt=core,gui,printsupport,sip,widgets python=py3kplist
 PYTHON_QMAKE_ON=	PYTHON=${PYTHON_CMD} CONFIG+=python \
 			PYQT_SIPDIR=${LOCALBASE}/${_SIPDIR_REL}
 
@@ -55,10 +55,23 @@ post-install-NLS-on:
 	${INSTALL_DATA} ${WRKSRC}/scidavis/translations/*.qm \
 		${STAGEDIR}${DATADIR}/translations
 
+.include <bsd.port.pre.mk>
+
+.if ${PORT_OPTIONS:MPYTHON}
+.if ${PYTHON_REL} < 3200
+PYCACHE_DIR=	# none
+PYCACHE_FILE=	scidavisUtil.pyc
+.else
+PYCACHE_DIR=	__pycache__/
+PYCACHE_FILE=	scidavisUtil.cpython-${PYTHON_SUFFIX}.pyc
+.endif
+.endif
+
 post-install-PYTHON-on:
 	${MV} ${STAGEDIR}${PREFIX}/etc/scidavisrc.py \
 		${STAGEDIR}${PREFIX}/etc/scidavisrc.py.sample
-	${INSTALL_DATA} ${WRKSRC}/scidavis/scidavisUtil.pyc \
-		${STAGEDIR}${DATADIR}
+	${MKDIR} ${STAGEDIR}${DATADIR}/${PYCACHE_DIR}
+	${INSTALL_DATA} ${WRKSRC}/scidavis/${PYCACHE_DIR}${PYCACHE_FILE} \
+		${STAGEDIR}${DATADIR}/${PYCACHE_DIR}
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901051935.x05JZLe2065828>