mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-24 00:45:52 +00:00
Build with Python 3 as well.
Instead of forcefully removing the pyuic/uic/port_v3/ directory, which in effect prevents the port from building with Python 3, check for the major Python version being used and selectively remove either port_v2/ or port_v3/. Additionally, set PYTHON_PY3K_PLIST_HACK, since PyQt does not use either distutils or setuptools, and Python >= 3.2 store .pyc/.pyo files in a different directory. PR: 180467 Submitted by: nwhitehorn@ (original version) MFH: 2014Q2
This commit is contained in:
parent
ab9586bfe3
commit
a585547e3f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=358702
@ -3,6 +3,7 @@
|
||||
|
||||
PORTNAME= core
|
||||
PORTVERSION= ${PYQT4_VERSION}
|
||||
PORTREVISION= 1
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= devel python
|
||||
MASTER_SITES= ${MASTER_SITES_PYQT4}
|
||||
@ -17,6 +18,7 @@ RUN_DEPENDS:= ${BUILD_DEPENDS}
|
||||
|
||||
DISTINFO_FILE= ${PYQT4_DISTINFO_FILE}
|
||||
HAS_CONFIGURE= yes
|
||||
PYTHON_PY3K_PLIST_HACK= yes
|
||||
USE_PYTHON= yes
|
||||
USE_QT4= corelib qmake_build moc_build
|
||||
|
||||
@ -38,7 +40,7 @@ ARGS= -b ${PREFIX}/bin \
|
||||
CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
|
||||
|
||||
.include "${.CURDIR}/../py-qt4/bsd.pyqt.mk"
|
||||
.include <bsd.port.options.mk>
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if empty(PORT_OPTIONS:MAPI)
|
||||
ARGS+= --no-qsci-api
|
||||
@ -53,8 +55,16 @@ PLIST_SUB+= API=""
|
||||
ARGS+= --debug --trace
|
||||
.endif
|
||||
|
||||
# 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
|
||||
|
||||
do-configure:
|
||||
cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV}\
|
||||
@ -75,4 +85,4 @@ post-install:
|
||||
${PYTHON_CMD} -O ${PYTHON_LIBDIR}/py_compile.py\
|
||||
`ls *.py */*.py */*/*.py`
|
||||
|
||||
.include <bsd.port.mk>
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -54,27 +54,27 @@ bin/pyuic4
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/objcreator.py
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/objcreator.pyc
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/objcreator.pyo
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/__init__.py
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/__init__.pyc
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/__init__.pyo
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/as_string.py
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/as_string.pyc
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/as_string.pyo
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/ascii_upper.py
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/ascii_upper.pyc
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/ascii_upper.pyo
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/invoke.py
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/invoke.pyc
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/invoke.pyo
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/load_plugin.py
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/load_plugin.pyc
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/load_plugin.pyo
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/proxy_base.py
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/proxy_base.pyc
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/proxy_base.pyo
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/string_io.py
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/string_io.pyc
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2/string_io.pyo
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/__init__.py
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/__init__.pyc
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/__init__.pyo
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/as_string.py
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/as_string.pyc
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/as_string.pyo
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/ascii_upper.py
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/ascii_upper.pyc
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/ascii_upper.pyo
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/invoke.py
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/invoke.pyc
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/invoke.pyo
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/load_plugin.py
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/load_plugin.pyc
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/load_plugin.pyo
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/proxy_base.py
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/proxy_base.pyc
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/proxy_base.pyo
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/string_io.py
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/string_io.pyc
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%/string_io.pyo
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/properties.py
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/properties.pyc
|
||||
%%PYTHON_SITELIBDIR%%/PyQt4/uic/properties.pyo
|
||||
@ -200,7 +200,7 @@ share/py-sip/QtCore/qxmlstream.sip
|
||||
%%API%%share/qt4/qsci/api/python/QtCore.api
|
||||
@dirrm share/py-sip/QtCore
|
||||
@dirrmtry %%PYTHON_SITELIBDIR%%/PyQt4/uic/widget-plugins
|
||||
@dirrm %%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2
|
||||
@dirrm %%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v%%PYTHON_MAJOR_VER%%
|
||||
@dirrm %%PYTHON_SITELIBDIR%%/PyQt4/uic/Loader
|
||||
@dirrm %%PYTHON_SITELIBDIR%%/PyQt4/uic/Compiler
|
||||
@dirrmtry %%PYTHON_SITELIBDIR%%/PyQt4/uic
|
||||
|
Loading…
Reference in New Issue
Block a user