misc/py-qt4-demo:

- Use plist instead of PORTEXAMPLES, otherwise the package is bogus when
  NOPORTEXAMPLES is set
- Use compileall.py to byte-compile installed examples
- Use options helpers
This commit is contained in:
Max Brazhnikov 2014-02-13 14:25:26 +00:00
parent c0ea5967c4
commit bf3f41f8fc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=344123
2 changed files with 1277 additions and 30 deletions

View File

@ -15,42 +15,19 @@ COMMENT= Python bindings for the Qt4 toolkit, Qt demo and examples
DISTINFO_FILE= ${PYQT4_DISTINFO_FILE}
USE_PYTHON= yes
OPTIONS_DEFINE= PYQT4
PYQT4_DESC= Install any missing PyQt4 components
OPTIONSFILE?= ${PORT_DBDIR}/py-qt4-${PORTNAME}/options
EXAMPLESDIR= ${PREFIX}/share/examples/py-qt4
PORTEXAMPLES= *
OPTIONS_DEFINE= PYQT4
PYQT4_DESC= Install all PyQt4 components
.include "${.CURDIR}/../../devel/py-qt4/bsd.pyqt.mk"
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MPYQT4}
RUN_DEPENDS+= ${PKGNAMEPREFIX}core>=${PYQT4_VERSION}:${PORTSDIR}/devel/py-qt4-core \
${PKGNAMEPREFIX}gui>=${PYQT4_VERSION}:${PORTSDIR}/x11-toolkits/py-qt4-gui \
${PKGNAMEPREFIX}network>=${PYQT4_VERSION}:${PORTSDIR}/net/py-qt4-network \
${PKGNAMEPREFIX}xml>=${PYQT4_VERSION}:${PORTSDIR}/textproc/py-qt4-xml \
${PKGNAMEPREFIX}assistant>=${PYQT4_VERSION}:${PORTSDIR}/devel/py-qt4-assistant \
${PKGNAMEPREFIX}opengl>=${PYQT4_VERSION}:${PORTSDIR}/x11/py-qt4-opengl \
${PKGNAMEPREFIX}script>=${PYQT4_VERSION}:${PORTSDIR}/devel/py-qt4-script \
${PKGNAMEPREFIX}sql>=${PYQT4_VERSION}:${PORTSDIR}/databases/py-qt4-sql \
${PKGNAMEPREFIX}svg>=${PYQT4_VERSION}:${PORTSDIR}/graphics/py-qt4-svg \
${PKGNAMEPREFIX}test>=${PYQT4_VERSION}:${PORTSDIR}/devel/py-qt4-test \
${PKGNAMEPREFIX}declarative>=${PYQT4_VERSION}:${PORTSDIR}/devel/py-qt4-declarative \
${PKGNAMEPREFIX}designer>=${PYQT4_VERSION}:${PORTSDIR}/devel/py-qt4-designer \
${PKGNAMEPREFIX}designerplugin>=${PYQT4_VERSION}:${PORTSDIR}/devel/py-qt4-designerplugin \
${PKGNAMEPREFIX}dbus>=${PYQT4_VERSION}:${PORTSDIR}/devel/py-qt4-dbus \
${PKGNAMEPREFIX}dbussupport>=${PYQT4_VERSION}:${PORTSDIR}/devel/py-qt4-dbussupport \
${PKGNAMEPREFIX}xmlpatterns>=${PYQT4_VERSION}:${PORTSDIR}/textproc/py-qt4-xmlpatterns \
${PKGNAMEPREFIX}help>=${PYQT4_VERSION}:${PORTSDIR}/devel/py-qt4-help \
${PKGNAMEPREFIX}webkit>=${PYQT4_VERSION}:${PORTSDIR}/www/py-qt4-webkit \
${PKGNAMEPREFIX}phonon>=${PYQT4_VERSION}:${PORTSDIR}/multimedia/py-qt4-phonon
.endif
.for component in ${PYQT4_COMPONENTS:Ndemo}
PYQT4_RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}qt4-${component}>=0:${PORTSDIR}/${${component}_PORT}
.endfor
do-build:
cd ${WRKSRC}/examples &&\
${PYTHON_CMD} ${PYTHON_LIBDIR}/py_compile.py\
`ls */*.py */*/*.py */*/*/*.py`
${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKSRC}/examples
do-install:
${RM} -f ${WRKSRC}/examples/designer/plugins/plugins.py.orig

1270
misc/py-qt4-demo/pkg-plist Normal file

File diff suppressed because it is too large Load Diff