ports/185884: [patch] Miscellaneous ports fixes for python 3
Nathan Whitehorn
nwhitehorn at icecube.wisc.edu
Fri Feb 14 15:20:01 UTC 2014
The following reply was made to PR ports/185884; it has been noted by GNATS.
From: Nathan Whitehorn <nwhitehorn at icecube.wisc.edu>
To: bug-followup at FreeBSD.org, nwhitehorn at FreeBSD.org
Cc:
Subject: Re: ports/185884: [patch] Miscellaneous ports fixes for python 3
Date: Fri, 14 Feb 2014 09:19:14 -0600
This is a multi-part message in MIME format.
--Boundary_(ID_TdmcBq0RhttPbYR30LRvjA)
Content-type: text/plain; CHARSET=US-ASCII; format=flowed
Content-transfer-encoding: 7BIT
Here's an updated version of the patch with respect to r344210.
-Nathan
--Boundary_(ID_TdmcBq0RhttPbYR30LRvjA)
Content-type: text/plain; CHARSET=US-ASCII; name=py3.diff
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=py3.diff
Index: devel/ipython/Makefile
===================================================================
--- devel/ipython/Makefile (revision 344210)
+++ devel/ipython/Makefile (working copy)
@@ -16,6 +16,7 @@
USE_PYTHON= yes
USE_PYDISTUTILS=yes
+PYTHON_PY3K_PLIST_HACK=yes
OPTIONS_DEFINE= X11 HTML_NOTEBOOK ZMQ
OPTIONS_DEFAULT=X11 ZMQ
@@ -45,4 +46,13 @@
cd ${WRKSRC}/examples && ${COPYTREE_SHARE} \* ${STAGEDIR}${EXAMPLESDIR}
.endif
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${PYTHON_MAJOR_VER} == "3"
+PLIST_SUB+= IPYTHON_SUFFIX="3"
+.else
+PLIST_SUB+= IPYTHON_SUFFIX=""
+.endif
+
+.include <bsd.port.post.mk>
+
Index: devel/ipython/pkg-plist
===================================================================
--- devel/ipython/pkg-plist (revision 344210)
+++ devel/ipython/pkg-plist (working copy)
@@ -1,11 +1,11 @@
-bin/ipcluster
-bin/ipcontroller
-bin/ipengine
-bin/iplogger
-bin/iptest
-bin/ipython
-bin/irunner
-bin/pycolor
+bin/ipcluster%%IPYTHON_SUFFIX%%
+bin/ipcontroller%%IPYTHON_SUFFIX%%
+bin/ipengine%%IPYTHON_SUFFIX%%
+bin/iplogger%%IPYTHON_SUFFIX%%
+bin/iptest%%IPYTHON_SUFFIX%%
+bin/ipython%%IPYTHON_SUFFIX%%
+bin/irunner%%IPYTHON_SUFFIX%%
+bin/pycolor%%IPYTHON_SUFFIX%%
man/man1/ipcluster.1.gz
man/man1/ipcontroller.1.gz
man/man1/ipengine.1.gz
Index: devel/llvm33/Makefile
===================================================================
--- devel/llvm33/Makefile (revision 344210)
+++ devel/llvm33/Makefile (working copy)
@@ -149,6 +149,8 @@
CONFIGURE_ARGS+= --with-optimize-option=-O2
.endif
+CONFIGURE_ARGS+= --with-python=/usr/local/bin/python2
+
post-patch:
${REINPLACE_CMD} -e 's|${PORTVERSION}svn|${PORTVERSION}|g' \
${WRKSRC}/configure
Index: devel/py-qt4/bsd.pyqt.mk
===================================================================
--- devel/py-qt4/bsd.pyqt.mk (revision 344210)
+++ devel/py-qt4/bsd.pyqt.mk (working copy)
@@ -23,6 +23,7 @@
PYQT4_DISTINFO_FILE= ${.CURDIR}/../../devel/py-qt4/distinfo
QSCI2_DISTNAME= QScintilla-gpl-${QSCI2_VERSION}
QSCI2_DISTINFO_FILE= ${.CURDIR}/../../devel/qscintilla2/distinfo
+PYTHON_PY3K_PLIST_HACK= yes
PYQT4_COMPONENTS= assistant core dbus dbussupport declarative \
demo designer designerplugin doc gui help \
Index: devel/py-qt4-core/Makefile
===================================================================
--- devel/py-qt4-core/Makefile (revision 344210)
+++ devel/py-qt4-core/Makefile (working copy)
@@ -53,8 +53,17 @@
ARGS+= --debug --trace
.endif
+.include <bsd.port.pre.mk>
+
+PLIST_SUB+= PYTHON_MAJOR_VER="${PYTHON_MAJOR_VER}"
+.if ${PYTHON_MAJOR_VER} != "3"
+BAD_UIC_PORT_DIR= port_v3
+.else
+BAD_UIC_PORT_DIR= port_v2
+.endif
+
post-patch:
- ${RM} -rf ${WRKSRC}/pyuic/uic/port_v3
+ ${RM} -rf ${WRKSRC}/pyuic/uic/${BAD_UIC_PORT_DIR}
do-configure:
cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV}\
@@ -75,4 +84,4 @@
${PYTHON_CMD} -O ${PYTHON_LIBDIR}/py_compile.py\
`ls *.py */*.py */*/*.py`
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
Index: devel/py-qt4-core/pkg-plist
===================================================================
--- devel/py-qt4-core/pkg-plist (revision 344210)
+++ devel/py-qt4-core/pkg-plist (working copy)
@@ -54,27 +54,27 @@
%%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 @@
%%API%%share/qt4/qsci/api/python/QtCore.api
@dirrm share/py-sip/QtCore
@dirrmtry %%PYTHON_SITELIBDIR%%/PyQt4/uic/widget-plugins
- at dirrm %%PYTHON_SITELIBDIR%%/PyQt4/uic/port_v2
+ at 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
Index: math/py-numexpr/Makefile
===================================================================
--- math/py-numexpr/Makefile (revision 344210)
+++ math/py-numexpr/Makefile (working copy)
@@ -16,6 +16,7 @@
USE_PYTHON= yes
USE_PYDISTUTILS=yes
+PYTHON_PY3K_PLIST_HACK=yes
post-patch:
@${REINPLACE_CMD} -e 's|\(import\) \(setuptools\)|\1 do_not_use_\2|' ${WRKSRC}/${PYSETUP}
Index: misc/py-pexpect/files/patch-pexpect-__init__.py
===================================================================
--- misc/py-pexpect/files/patch-pexpect-__init__.py (revision 344210)
+++ misc/py-pexpect/files/patch-pexpect-__init__.py (working copy)
@@ -8,7 +8,7 @@
- if TIOCSWINSZ == 2148037735:
- # Same bits, but with sign.
- TIOCSWINSZ = -2146929561
-+ TIOCSWINSZ = getattr(termios, 'TIOCSWINSZ', 2148037735L)
++ TIOCSWINSZ = getattr(termios, 'TIOCSWINSZ', 2148037735)
# Note, assume ws_xpixel and ws_ypixel are zero.
s = struct.pack('HHHH', rows, cols, 0, 0)
fcntl.ioctl(self.fileno(), TIOCSWINSZ, s)
Index: x11/libxcb/Makefile
===================================================================
--- x11/libxcb/Makefile (revision 344210)
+++ x11/libxcb/Makefile (working copy)
@@ -24,7 +24,7 @@
USE_GNOME= libxslt:build
USE_LDCONFIG= yes
USE_XORG= xau xdmcp
-USE_PYTHON_BUILD= yes
+USE_PYTHON_BUILD= 2
GNU_CONFIGURE= yes
.for f in XPROTO_CFLAGS XPROTO_LIBS XDMCP_CFLAGS XDMCP_LIBS NEEDED_CFLAGS NEEDED_LIBS
Index: x11/xcb-proto/Makefile
===================================================================
--- x11/xcb-proto/Makefile (revision 344210)
+++ x11/xcb-proto/Makefile (working copy)
@@ -13,7 +13,7 @@
USE_BZIP2= yes
USES= pathfix
-USE_PYTHON= yes
+USE_PYTHON= 2
GNU_CONFIGURE= yes
DATADIR= ${PREFIX}/share/xcb
--Boundary_(ID_TdmcBq0RhttPbYR30LRvjA)--
More information about the freebsd-python
mailing list