31469ae565
In preparation for landing PyQt5 ports, generalize devel/py-qt4's bsd.pyqt.mk and make it a proper file in Uses/. Ports wishing to depend on PyQt4 ports can now do the following: USES= pyqt:4 USE_PYQT= foo bar_build baz_run Other changes include the renaming of the PYQT4_DIST variable to PYQT_DIST and the introduction of the PYQT_SIPDIR plist substitution variable. The rest of the contents of Uses/pyqt.mk are pretty much identical to what we had in bsd.pyqt.mk with additional processing of USE_PYQT. Even though this patch touches files in many different ports, the goal is for it to be a no-op from an end-user perspective (so that the basic infrastructure is landed before the other, riskier changes): no dependencies have been changed, PyQt/SIP/QScintilla have not been upgraded and the plists should remain exactly the same, since PYQT_SIPDIR currently contains the same value that used to be hardcoded in the plists. Huge thanks to Guido Falsi (madpilot@) for spearheading most of the work: he took the initiative to work on PyQt5 and sent D2910 to Phabricator with the original version of this patch. Tobias Berner (tcberner@gmail.com) later applied it to kde@'s experimental area51 repositories and did some more work on it.
51 lines
1.4 KiB
Makefile
51 lines
1.4 KiB
Makefile
# Created by: Danny Pansters <danny@ricin.com>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= core
|
|
PORTEPOCH= 1
|
|
CATEGORIES= devel python
|
|
|
|
MAINTAINER= kde@FreeBSD.org
|
|
COMMENT= Python bindings for the Qt4 toolkit, QtCore module
|
|
|
|
CONFIGURE_ARGS= --enable QtCore
|
|
PYQT_DIST= yes
|
|
|
|
USES= python pyqt:4
|
|
USE_PYTHON= py3kplist
|
|
USE_PYQT= sip
|
|
USE_QT4= corelib qmake_build moc_build
|
|
|
|
OPTIONS_DEFINE= API DEBUG
|
|
OPTIONS_DEFAULT=API
|
|
OPTIONS_SUB= yes
|
|
|
|
API_DESC= Install QtCore API for QScintilla2
|
|
API_CONFIGURE_ON= --qsci-api --qsci-api-destdir=${QSCIDIR}
|
|
API_CONFIGURE_OFF= --no-qsci-api
|
|
API_LIB_DEPENDS= libqscintilla2.so:${PORTSDIR}/devel/qscintilla2
|
|
DEBUG_CONFIGURE_ON= --debug --trace
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
# Bug 180467: We need to remove the port_v${VERSION} directory that does not
|
|
# correspond to the Python version being used to avoid failures in the
|
|
# bytecompilation calls in post-install.
|
|
PLIST_SUB+= PYTHON_MAJOR_VER="${PYTHON_MAJOR_VER}"
|
|
post-patch:
|
|
.if ${PYTHON_MAJOR_VER} == "2"
|
|
${RM} -rf ${WRKSRC}/pyuic/uic/port_v3
|
|
.elif ${PYTHON_MAJOR_VER} == "3"
|
|
${RM} -rf ${WRKSRC}/pyuic/uic/port_v2
|
|
.endif
|
|
|
|
post-install:
|
|
${INSTALL_DATA} ${FILESDIR}/Qt.py ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/PyQt4
|
|
${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
|
|
-f -d ${PYTHONPREFIX_SITELIBDIR} \
|
|
${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/PyQt4
|
|
${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
|
|
-f -d ${PYTHONPREFIX_SITELIBDIR} \
|
|
${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/PyQt4
|
|
|
|
.include <bsd.port.post.mk>
|