mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-21 20:38:45 +00:00
Remove lang/python31, it expired on 2014-06-01
This commit is contained in:
parent
8b7b090a2a
commit
6f35db0a8b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=356142
1
MOVED
1
MOVED
@ -6124,3 +6124,4 @@ german/bsdforen-firefox-searchplugin||2014-05-31|Has expired: No longer works af
|
||||
lang/ocaml-doc||2014-06-01|Has expired: Documentation is now included in lang/ocaml
|
||||
lang/ocaml-examples||2014-06-01|Has expired: Outdated and discontinued; new examples are in lang/ocaml
|
||||
lang/gnat-aux|lang/gcc-aux|2014-06-01|Has expired: Superceded by gcc4.9-based lang/gcc-aux, use it instead
|
||||
lang/python31|lang/python33|2014-06-01|Has expired: Python 3.1 will be end-of-life soon, please migrate to lang/python33
|
||||
|
@ -263,7 +263,6 @@
|
||||
SUBDIR += python2
|
||||
SUBDIR += python27
|
||||
SUBDIR += python3
|
||||
SUBDIR += python31
|
||||
SUBDIR += python32
|
||||
SUBDIR += python33
|
||||
SUBDIR += python34
|
||||
|
@ -1,236 +0,0 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= python31
|
||||
PORTVERSION= 3.1.5
|
||||
PORTREVISION= 12
|
||||
CATEGORIES= lang python ipv6
|
||||
MASTER_SITES= PYTHON
|
||||
MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR}
|
||||
DISTNAME= ${PYTHON_DISTNAME}
|
||||
DIST_SUBDIR= python
|
||||
|
||||
MAINTAINER= python@FreeBSD.org
|
||||
COMMENT= Interpreted object-oriented programming language
|
||||
|
||||
LICENSE= PSFL
|
||||
|
||||
LIB_DEPENDS= libffi.so:${PORTSDIR}/devel/libffi
|
||||
|
||||
DEPRECATED= Python 3.1 will be end-of-life soon, please migrate to lang/python33
|
||||
EXPIRATION_DATE= 2014-06-01
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
CONFIGURE_SCRIPT= ../configure # must be relative
|
||||
CONFIGURE_ARGS= --with-system-ffi
|
||||
CONFIGURE_ENV= OPT="" SVNVERSION="echo freebsd" ac_cv_opt_olimit_ok=no
|
||||
MAKE_ENV= VPATH="${PYTHON_WRKSRC}"
|
||||
|
||||
INSTALL_TARGET= altinstall
|
||||
|
||||
USES= readline tar:xz
|
||||
USE_LDCONFIG= yes
|
||||
USE_PYTHON= yes
|
||||
|
||||
PYTHON_VERSION= python3.1
|
||||
PYTHON_NO_DEPENDS= yes
|
||||
|
||||
WRKSRC= ${PYTHON_WRKSRC}/portbld.static
|
||||
SHARED_WRKSRC= ${PYTHON_WRKSRC}/portbld.shared
|
||||
PATCH_WRKSRC= ${PYTHON_WRKSRC}
|
||||
|
||||
PLIST= ${WRKDIR}/PLIST
|
||||
PLIST_TEMPLATE?=${PKGDIR}/pkg-plist
|
||||
PLIST_SUB= PYVER=${PYTHON_VERSION:S/python//} \
|
||||
PYMAJOR=${PYTHON_MAJOR_VER} \
|
||||
PYVER_WITHPAT=${PORTVERSION:S/.rc/rc/}
|
||||
EXAMPLESDIR= ${PREFIX}/share/examples/${PYTHON_VERSION}
|
||||
DATADIR= ${PREFIX}/share/${PYTHON_VERSION}
|
||||
|
||||
PLATFORMS= plat-freebsd4 plat-freebsd5 plat-freebsd6 \
|
||||
plat-freebsd7 plat-freebsd8 plat-freebsd9 \
|
||||
plat-freebsd10 plat-freebsd11
|
||||
|
||||
BIN_SCRIPTS= 2to3 idle3 pydoc3
|
||||
BIN_FILES= python python-shared python-config python-shared-config \
|
||||
${BIN_SCRIPTS}
|
||||
BINLINKS_SUB= -e 's,(2to3|idle3|pydoc3),\1-${PYTHON_VER},' \
|
||||
-e 's,(python-shared|python),\1${PYTHON_VER},'
|
||||
|
||||
OPTIONS_DEFINE= THREADS UCS4 PYMALLOC IPV6 FPECTL EXAMPLES NLS
|
||||
OPTIONS_DEFAULT= THREADS UCS4 PYMALLOC IPV6
|
||||
|
||||
NLS_DESC= Enable Gettext support for the locale module
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MNLS}
|
||||
USES+= gettext
|
||||
LDFLAGS+= -L${LOCALBASE}/lib
|
||||
# We use CPPFLAGS over CFLAGS here due to -I ordering causing things like
|
||||
# elementtree and pyexpat to break with python27, or to silence preprocessor
|
||||
# complaints with python33
|
||||
CPPFLAGS+= -I${LOCALBASE}/include
|
||||
.else
|
||||
CONFIGURE_ENV+= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no
|
||||
.endif
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${PORT_OPTIONS:MTHREADS}
|
||||
PLIST_SUB+= THREADS=""
|
||||
CONFIGURE_ARGS+= --with-threads
|
||||
CFLAGS+= ${PTHREAD_CFLAGS}
|
||||
LDFLAGS+= ${PTHREAD_LIBS}
|
||||
.else
|
||||
PLIST_SUB+= THREADS="@comment "
|
||||
CONFIGURE_ARGS+= --without-threads
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MUCS4}
|
||||
CONFIGURE_ARGS+= --with-wide-unicode
|
||||
.endif
|
||||
|
||||
.if empty(PORT_OPTIONS:MPYMALLOC)
|
||||
CONFIGURE_ARGS+= --without-pymalloc
|
||||
.endif
|
||||
|
||||
.if ${ARCH} == sparc64
|
||||
CFLAGS+= -DPYTHON_DEFAULT_RECURSION_LIMIT=900
|
||||
.endif
|
||||
|
||||
# See http://bugs.freebsd.org/115940
|
||||
.if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS) # the world with NO_NIS
|
||||
PLIST_SUB+= NO_NIS="@comment "
|
||||
WITHOUT_NIS?= detected
|
||||
.else
|
||||
PLIST_SUB+= NO_NIS=""
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MIPV6}
|
||||
CONFIGURE_ARGS+= --enable-ipv6
|
||||
.else
|
||||
CONFIGURE_ARGS+= --disable-ipv6
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MFPECTL}
|
||||
CONFIGURE_ARGS+= --with-fpectl
|
||||
.endif
|
||||
|
||||
pre-patch:
|
||||
${CP} -r ${PATCH_WRKSRC}/Lib/plat-freebsd8 \
|
||||
${PATCH_WRKSRC}/Lib/plat-freebsd9
|
||||
${CP} -r ${PATCH_WRKSRC}/Lib/plat-freebsd8 \
|
||||
${PATCH_WRKSRC}/Lib/plat-freebsd10
|
||||
${CP} -r ${PATCH_WRKSRC}/Lib/plat-freebsd8 \
|
||||
${PATCH_WRKSRC}/Lib/plat-freebsd11
|
||||
${MKDIR} ${WRKSRC} ${SHARED_WRKSRC}/Modules
|
||||
.for script in ${BIN_SCRIPTS}
|
||||
${SED} -e '1s,^.*$$,#!${PREFIX}/bin/${PYTHON_VERSION},' \
|
||||
${PATCH_WRKSRC}/Tools/scripts/${script} \
|
||||
> ${WRKDIR}/`${ECHO_CMD} ${script} | ${SED} -E ${BINLINKS_SUB}`
|
||||
.endfor
|
||||
${REINPLACE_CMD} -e \
|
||||
's,/usr/doc/python-docs-,${PREFIX}/share/doc/python,g' \
|
||||
${PATCH_WRKSRC}/Lib/pydoc.py
|
||||
${REINPLACE_CMD} -e \
|
||||
's|^\( *prefixes = .*\)\]$$|\1, "${LOCALBASE}"]|g' \
|
||||
${PATCH_WRKSRC}/Lib/site.py
|
||||
${REINPLACE_CMD} -e \
|
||||
's|^ \(..ASDLGEN.*\)$$| ${TRUE}|g; \
|
||||
s|[(]LIBDIR[)]/pkgconfig|(prefix)/libdata/pkgconfig|g; \
|
||||
s|*\(..INSTALL_SCRIPT.*\)python-config$$|#port \1|' \
|
||||
${PATCH_WRKSRC}/Makefile.pre.in
|
||||
|
||||
${SED} -e 's|^#!.*|#!${PREFIX}/bin/${PYTHON_VERSION}|' \
|
||||
${PATCH_WRKSRC}/Misc/python-config.in > ${WRKDIR}/${PYTHON_VERSION}-config
|
||||
${SED} -e 's|^#!.*|#!${PREFIX}/bin/${PYTHON_VERSION:S/thon/thon-shared/}|' \
|
||||
${PATCH_WRKSRC}/Misc/python-config.in > ${WRKDIR}/${PYTHON_VERSION:S/thon/thon-shared/}-config
|
||||
|
||||
.if defined(WITH_FPECTL) && ${ARCH} == i386
|
||||
${MKDIR} ${WRKSRC}/Modules
|
||||
${ECHO} "fpectl fpectlmodule.c" >> ${WRKSRC}/Modules/Setup.dist
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
.if defined(WITHOUT_NIS)
|
||||
${REINPLACE_CMD} -e \
|
||||
's/disabled_module_list =[^]]*/&, "nis"/' \
|
||||
${PATCH_WRKSRC}/setup.py
|
||||
.endif
|
||||
|
||||
post-configure:
|
||||
${TAR} -C ${WRKSRC} -cf - . | ${TAR} -C ${SHARED_WRKSRC} -xf -
|
||||
${LN} -sf ${PYTHON_WRKSRC}/Lib ${WRKSRC}/Lib
|
||||
${SED} -e 's,^\(LDLIBRARY=\).*$$,\1libpython$$(VERSION).so,' \
|
||||
-e 's,^\(BLDLIBRARY=\).*$$,\1-L. -lpython$$(VERSION),' \
|
||||
-e 's,^\(CFLAGSFORSHARED=\).*$$,\1$$(CCSHARED),' \
|
||||
-e 's,^\(Makefile Modules/config.c:.*\)Makefile.pre,\1,' \
|
||||
-e 's,^\(.(BUILDPYTHON)\: .*\).(LIBRARY),\1,' \
|
||||
-e 's,^\(.(BUILDPYTHON):.*\).(LIBRARY),\1,' \
|
||||
${WRKSRC}/Makefile > ${SHARED_WRKSRC}/Makefile
|
||||
|
||||
pre-build:
|
||||
cd ${SHARED_WRKSRC}; \
|
||||
${SETENV} ${MAKE_ENV} ${MAKE} lib${PYTHON_VERSION}.so python; \
|
||||
${LN} -f lib${PYTHON_VERSION}.so lib${PYTHON_VERSION}.so.1; \
|
||||
${LN} -f python ${PYTHON_VERSION:S/thon/thon-shared/}
|
||||
|
||||
pre-su-install:
|
||||
.for platform in ${PLATFORMS}
|
||||
${MKDIR} ${STAGEDIR}${PYTHONPREFIX_LIBDIR}/${platform}
|
||||
.for file in IN.py regen
|
||||
${INSTALL_DATA} ${WRKSRC}/Lib/${platform}/${file} \
|
||||
${STAGEDIR}${PYTHONPREFIX_LIBDIR}/${platform}/
|
||||
.endfor
|
||||
.endfor
|
||||
|
||||
pre-install:
|
||||
${CAT} ${PLIST_TEMPLATE} | ${AWK} '{ print $$0; } \
|
||||
/LIBDIR.*\.py$$/ && \
|
||||
!/bad_coding|badsyntax|site-packages|py2_test_grammar|crlf|different_encoding|tests\/data/ \
|
||||
{ print $$0 "o"; print $$0 "c"; }' > ${PLIST}
|
||||
|
||||
@# if openssl 0.9.8 is detected, _sha{256,512} module won't be installed
|
||||
([ -f ${WRKSRC}/.without_own_sha ] && \
|
||||
${GREP} -v 'lib-dynload/_sha' ${PLIST} > ${PLIST}.tmp && \
|
||||
${CAT} ${PLIST}.tmp > ${PLIST}) || ${TRUE}
|
||||
|
||||
post-install:
|
||||
@# install config providers
|
||||
${INSTALL_SCRIPT} ${WRKDIR}/${PYTHON_VERSION}-config \
|
||||
${STAGEDIR}${PREFIX}/bin
|
||||
${INSTALL_SCRIPT} ${WRKDIR}/${PYTHON_VERSION:S/thon/thon-shared/}-config \
|
||||
${STAGEDIR}${PREFIX}/bin
|
||||
|
||||
@# shared version of executable and library
|
||||
${INSTALL_PROGRAM} ${SHARED_WRKSRC}/lib${PYTHON_VERSION}.so.1 \
|
||||
${STAGEDIR}${PREFIX}/lib
|
||||
(cd ${STAGEDIR}${PREFIX}/lib; ${LN} -sf lib${PYTHON_VERSION}.so.1 \
|
||||
lib${PYTHON_VERSION}.so)
|
||||
(cd ${STAGEDIR}${PREFIX}/lib/${PYTHON_VERSION}/config; \
|
||||
${LN} -sf ../../lib${PYTHON_VERSION}.so)
|
||||
${INSTALL_PROGRAM} \
|
||||
${SHARED_WRKSRC}/${PYTHON_VERSION:S/thon/thon-shared/} \
|
||||
${STAGEDIR}${PREFIX}/bin
|
||||
|
||||
@# additional files installing by ports
|
||||
.for script in ${BIN_SCRIPTS}
|
||||
${INSTALL_SCRIPT} \
|
||||
${WRKDIR}/`${ECHO_CMD} ${script} | ${SED} -E ${BINLINKS_SUB}` \
|
||||
${STAGEDIR}${PREFIX}/bin
|
||||
.endfor
|
||||
${INSTALL_MAN} ${PYTHON_WRKSRC}/Misc/python.man \
|
||||
${STAGEDIR}${MAN1PREFIX}/man/man1/${PYTHON_VERSION}.1
|
||||
|
||||
.if !defined(NOPORTDATA)
|
||||
@${MKDIR} ${STAGEDIR}${DATADIR}
|
||||
@cd ${PYTHON_WRKSRC}; ${TAR} -cf - Tools | \
|
||||
(cd ${STAGEDIR}${DATADIR}; ${TAR} -xf -)
|
||||
.endif
|
||||
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
||||
@cd ${PYTHON_WRKSRC}/Demo; ${TAR} -cf - * | \
|
||||
(cd ${STAGEDIR}${EXAMPLESDIR}; ${TAR} -xf -)
|
||||
|
||||
@${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.post.mk>
|
@ -1,2 +0,0 @@
|
||||
SHA256 (python/Python-3.1.5.tar.xz) = 035c4370354d901924ce0fd8df65c5452839f590ec1b9c17fae2ada3e5f3b4d7
|
||||
SIZE (python/Python-3.1.5.tar.xz) = 8189536
|
@ -1,50 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Benjamin Peterson <benjamin@python.org>
|
||||
# Date 1389672374 18000
|
||||
# Node ID 715fd3d8ac93878e49a072474a4706a449720d9b
|
||||
# Parent b1ddcb220a7f375146c090a854438cf31fa3a388# Parent 87673659d8f7ba1623cd4914f09ad3d2ade034e9
|
||||
complain when nbytes > buflen to fix possible buffer overflow (closes #20246)
|
||||
|
||||
# HG changeset patch
|
||||
# User Stefan Krah <skrah@bytereef.org>
|
||||
# Date 1390341520 -3600
|
||||
# Node ID c25e1442529f16ba5fb9df8786a019866b0686e9
|
||||
# Parent fbb4d48046e564dd89511598dbbf04422ac6da35
|
||||
Issue #20246: Fix test failures on FreeBSD. Patch by Ryan Smith-Roberts.
|
||||
|
||||
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
|
||||
--- Lib/test/test_socket.py
|
||||
+++ Lib/test/test_socket.py
|
||||
@@ -1424,6 +1424,14 @@ class BufferIOTest(SocketConnectedTest):
|
||||
buf = bytes(MSG)
|
||||
self.serv_conn.send(buf)
|
||||
|
||||
+ def testRecvFromIntoSmallBuffer(self):
|
||||
+ # See issue #20246.
|
||||
+ buf = bytearray(8)
|
||||
+ self.assertRaises(ValueError, self.cli_conn.recvfrom_into, buf, 1024)
|
||||
+
|
||||
+ def _testRecvFromIntoSmallBuffer(self):
|
||||
+ self.serv_conn.send(MSG)
|
||||
+
|
||||
|
||||
TIPC_STYPE = 2000
|
||||
TIPC_LOWER = 200
|
||||
|
||||
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
|
||||
--- Modules/socketmodule.c
|
||||
+++ Modules/socketmodule.c
|
||||
@@ -2494,6 +2494,12 @@ sock_recvfrom_into(PySocketSockObject *s
|
||||
if (recvlen == 0) {
|
||||
/* If nbytes was not specified, use the buffer's length */
|
||||
recvlen = buflen;
|
||||
+ } else if (recvlen > buflen) {
|
||||
+ PyBuffer_Release(&pbuf);
|
||||
+ Py_XDECREF(addr);
|
||||
+ PyErr_SetString(PyExc_ValueError,
|
||||
+ "nbytes is greater than the length of the buffer");
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
readlen = sock_recvfrom_guts(s, buf, recvlen, flags, &addr);
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- Doc/library/fcntl.rst.orig 2009-06-08 09:41:29.000000000 -0400
|
||||
+++ Doc/library/fcntl.rst 2010-06-24 22:31:02.000000000 -0400
|
||||
@@ -48,8 +48,6 @@
|
||||
This function is identical to the :func:`fcntl` function, except that the
|
||||
argument handling is even more complicated.
|
||||
|
||||
- The op parameter is limited to values that can fit in 32-bits.
|
||||
-
|
||||
The parameter *arg* can be one of an integer, absent (treated identically to the
|
||||
integer ``0``), an object supporting the read-only buffer interface (most likely
|
||||
a plain Python string) or an object supporting the read-write buffer interface.
|
@ -1,11 +0,0 @@
|
||||
--- Lib/test/test_fcntl.py.orig 2009-05-24 11:46:13.000000000 -0400
|
||||
+++ Lib/test/test_fcntl.py 2010-06-24 13:56:52.000000000 -0400
|
||||
@@ -29,7 +29,7 @@
|
||||
if sys.platform in ('netbsd1', 'netbsd2', 'netbsd3',
|
||||
'Darwin1.2', 'darwin',
|
||||
'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5',
|
||||
- 'freebsd6', 'freebsd7', 'freebsd8',
|
||||
+ 'freebsd6', 'freebsd7', 'freebsd8', 'freebsd9', 'freebsd10',
|
||||
'bsdos2', 'bsdos3', 'bsdos4',
|
||||
'openbsd', 'openbsd2', 'openbsd3', 'openbsd4'):
|
||||
if struct.calcsize('l') == 8:
|
@ -1,23 +0,0 @@
|
||||
--- Lib/test/test_ioctl.py.orig 2009-08-13 04:51:18.000000000 -0400
|
||||
+++ Lib/test/test_ioctl.py 2010-06-24 13:35:29.000000000 -0400
|
||||
@@ -41,18 +41,9 @@ class IoctlTests(unittest.TestCase):
|
||||
raise unittest.SkipTest('pty module required')
|
||||
mfd, sfd = pty.openpty()
|
||||
try:
|
||||
- if termios.TIOCSWINSZ < 0:
|
||||
- set_winsz_opcode_maybe_neg = termios.TIOCSWINSZ
|
||||
- set_winsz_opcode_pos = termios.TIOCSWINSZ & 0xffffffff
|
||||
- else:
|
||||
- set_winsz_opcode_pos = termios.TIOCSWINSZ
|
||||
- set_winsz_opcode_maybe_neg, = struct.unpack("i",
|
||||
- struct.pack("I", termios.TIOCSWINSZ))
|
||||
-
|
||||
+ set_winsz_opcode = termios.TIOCSWINSZ
|
||||
our_winsz = struct.pack("HHHH",80,25,0,0)
|
||||
- # test both with a positive and potentially negative ioctl code
|
||||
- new_winsz = fcntl.ioctl(mfd, set_winsz_opcode_pos, our_winsz)
|
||||
- new_winsz = fcntl.ioctl(mfd, set_winsz_opcode_maybe_neg, our_winsz)
|
||||
+ new_winsz = fcntl.ioctl(mfd, set_winsz_opcode, our_winsz)
|
||||
finally:
|
||||
os.close(mfd)
|
||||
os.close(sfd)
|
@ -1,11 +0,0 @@
|
||||
--- Lib/test/regrtest.py.orig 2011-06-11 17:48:50.000000000 +0200
|
||||
+++ Lib/test/regrtest.py 2011-10-28 11:17:37.000000000 +0200
|
||||
@@ -1203,6 +1203,8 @@
|
||||
_expectations['freebsd6'] = _expectations['freebsd4']
|
||||
_expectations['freebsd7'] = _expectations['freebsd4']
|
||||
_expectations['freebsd8'] = _expectations['freebsd4']
|
||||
+_expectations['freebsd9'] = _expectations['freebsd4']
|
||||
+_expectations['freebsd10'] = _expectations['freebsd4']
|
||||
|
||||
class _ExpectedSkips:
|
||||
def __init__(self):
|
@ -1,15 +0,0 @@
|
||||
# Description: Some python extensions can't be compiled with clang 3.4
|
||||
# Issue ID: http://bugs.python.org/issue20767
|
||||
# Submitted by: antoine
|
||||
|
||||
--- ./Lib/distutils/unixccompiler.py.orig 2014-03-09 14:58:11.840899942 +1100
|
||||
+++ ./Lib/distutils/unixccompiler.py 2014-03-09 15:07:24.038743110 +1100
|
||||
@@ -285,6 +285,8 @@
|
||||
if sys.platform[:6] == "darwin":
|
||||
# MacOSX's linker doesn't understand the -R flag at all
|
||||
return "-L" + dir
|
||||
+ elif sys.platform[:7] == "freebsd":
|
||||
+ return "-Wl,-rpath=" + dir
|
||||
elif sys.platform[:5] == "hp-ux":
|
||||
if self._is_gcc(compiler):
|
||||
return ["-Wl,+s", "-L" + dir]
|
@ -1,49 +0,0 @@
|
||||
# Description: python3 py_compile does not ignore UTF-8 BOM characters
|
||||
# Issue: http://bugs.python.org/issue8168
|
||||
# Commit: http://hg.python.org/cpython/rev/e15a8a476494/
|
||||
# PR: ports/186034
|
||||
|
||||
--- ./Lib/py_compile.py.orig 2014-02-21 23:28:42.491208180 +1100
|
||||
+++ ./Lib/py_compile.py 2014-02-21 23:29:22.052513709 +1100
|
||||
@@ -7,8 +7,8 @@
|
||||
import imp
|
||||
import marshal
|
||||
import os
|
||||
-import re
|
||||
import sys
|
||||
+import tokenize
|
||||
import traceback
|
||||
|
||||
MAGIC = imp.get_magic()
|
||||
@@ -78,21 +78,6 @@
|
||||
(x >> 16) & 0xff,
|
||||
(x >> 24) & 0xff]))
|
||||
|
||||
-def read_encoding(file, default):
|
||||
- """Read the first two lines of the file looking for coding: xyzzy."""
|
||||
- f = open(file, "rb")
|
||||
- try:
|
||||
- for i in range(2):
|
||||
- line = f.readline()
|
||||
- if not line:
|
||||
- break
|
||||
- m = re.match(br".*\bcoding:\s*(\S+)\b", line)
|
||||
- if m:
|
||||
- return m.group(1).decode("ascii")
|
||||
- return default
|
||||
- finally:
|
||||
- f.close()
|
||||
-
|
||||
def compile(file, cfile=None, dfile=None, doraise=False):
|
||||
"""Byte-compile one Python source file to Python bytecode.
|
||||
|
||||
@@ -128,7 +113,8 @@
|
||||
directories).
|
||||
|
||||
"""
|
||||
- encoding = read_encoding(file, "utf-8")
|
||||
+ with open(file, "rb") as f:
|
||||
+ encoding = tokenize.detect_encoding(f.readline)[0]
|
||||
f = open(file, 'U', encoding=encoding)
|
||||
try:
|
||||
timestamp = int(os.fstat(f.fileno()).st_mtime)
|
@ -1,16 +0,0 @@
|
||||
# Description: Run ranlib before installing the library read-only
|
||||
# Submitted by: antoine@ (r350207)
|
||||
# TODO: Upstream
|
||||
|
||||
--- ./Makefile.pre.in.orig 2014-04-20 23:22:37.435954278 +1000
|
||||
+++ ./Makefile.pre.in 2014-04-20 23:23:10.767071278 +1000
|
||||
@@ -985,8 +985,8 @@
|
||||
if test "$(SO)" = .dll; then \
|
||||
$(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
|
||||
else \
|
||||
+ $(RANLIB) $(LIBRARY) ; \
|
||||
$(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
|
||||
- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
|
||||
fi; \
|
||||
else \
|
||||
echo Skip install of $(LIBRARY) - use make frameworkinstall; \
|
@ -1,11 +0,0 @@
|
||||
--- Modules/_ctypes/libffi/configure.orig 2008-05-24 00:06:50.000000000 +0900
|
||||
+++ Modules/_ctypes/libffi/configure 2008-10-09 20:24:02.000000000 +0900
|
||||
@@ -4725,7 +4725,7 @@
|
||||
rm -rf conftest*
|
||||
;;
|
||||
|
||||
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
|
||||
+amd64-*-freebsd*|x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
|
||||
s390*-*linux*|sparc*-*linux*)
|
||||
# Find out which ABI we are using.
|
||||
echo 'int i;' > conftest.$ac_ext
|
@ -1,11 +0,0 @@
|
||||
--- Modules/_ctypes/libffi/src/powerpc/ffitarget.h.orig 2011-11-16 20:32:42.000000000 -0800
|
||||
+++ Modules/_ctypes/libffi/src/powerpc/ffitarget.h 2011-11-16 20:33:23.000000000 -0800
|
||||
@@ -78,6 +78,8 @@
|
||||
FFI_SYSV,
|
||||
FFI_GCC_SYSV,
|
||||
FFI_LINUX64,
|
||||
+ FFI_LINUX,
|
||||
+ FFI_LINUX_SOFT_FLOAT,
|
||||
FFI_DEFAULT_ABI = FFI_SYSV,
|
||||
#endif
|
||||
|
@ -1,53 +0,0 @@
|
||||
--- Modules/fcntlmodule.c.orig 2010-12-14 09:44:03.000000000 +0800
|
||||
+++ Modules/fcntlmodule.c 2010-12-14 09:47:17.000000000 +0800
|
||||
@@ -97,20 +97,15 @@
|
||||
{
|
||||
#define IOCTL_BUFSZ 1024
|
||||
int fd;
|
||||
- /* In PyArg_ParseTuple below, we use the unsigned non-checked 'I'
|
||||
+ /* In PyArg_ParseTuple below, we use the unsigned non-checked 'k'
|
||||
format for the 'code' parameter because Python turns 0x8000000
|
||||
into either a large positive number (PyLong or PyInt on 64-bit
|
||||
platforms) or a negative number on others (32-bit PyInt)
|
||||
whereas the system expects it to be a 32bit bit field value
|
||||
regardless of it being passed as an int or unsigned long on
|
||||
- various platforms. See the termios.TIOCSWINSZ constant across
|
||||
- platforms for an example of thise.
|
||||
-
|
||||
- If any of the 64bit platforms ever decide to use more than 32bits
|
||||
- in their unsigned long ioctl codes this will break and need
|
||||
- special casing based on the platform being built on.
|
||||
+ various platforms.
|
||||
*/
|
||||
- unsigned int code;
|
||||
+ unsigned long code;
|
||||
int arg;
|
||||
int ret;
|
||||
Py_buffer pstr;
|
||||
@@ -119,7 +114,7 @@
|
||||
int mutate_arg = 1;
|
||||
char buf[IOCTL_BUFSZ+1]; /* argument plus NUL byte */
|
||||
|
||||
- if (PyArg_ParseTuple(args, "O&Iw*|i:ioctl",
|
||||
+ if (PyArg_ParseTuple(args, "O&kw*|i:ioctl",
|
||||
conv_descriptor, &fd, &code,
|
||||
&pstr, &mutate_arg)) {
|
||||
char *arg;
|
||||
@@ -174,7 +169,7 @@
|
||||
}
|
||||
|
||||
PyErr_Clear();
|
||||
- if (PyArg_ParseTuple(args, "O&Is*:ioctl",
|
||||
+ if (PyArg_ParseTuple(args, "O&ks*:ioctl",
|
||||
conv_descriptor, &fd, &code, &pstr)) {
|
||||
str = pstr.buf;
|
||||
len = pstr.len;
|
||||
@@ -201,7 +196,7 @@
|
||||
PyErr_Clear();
|
||||
arg = 0;
|
||||
if (!PyArg_ParseTuple(args,
|
||||
- "O&I|i;ioctl requires a file or file descriptor,"
|
||||
+ "O&k|i;ioctl requires a file or file descriptor,"
|
||||
" an integer and optionally an integer or buffer argument",
|
||||
conv_descriptor, &fd, &code, &arg)) {
|
||||
return NULL;
|
@ -1,36 +0,0 @@
|
||||
# Description: Fix _ctypes abort on import for FreeBSD/ARM. This is an issue
|
||||
# for anything !apple that is using the libcompiler_rt provided by clang on arm
|
||||
# PR: ports/149167 ports/184517
|
||||
# Patch by: cognet@ (to be upstreamed @ LLVM)
|
||||
|
||||
--- ./Modules/_ctypes/libffi/src/arm/ffi.c.orig 2013-12-08 15:55:58.351993767 +1100
|
||||
+++ ./Modules/_ctypes/libffi/src/arm/ffi.c 2013-12-08 15:57:40.531068291 +1100
|
||||
@@ -29,6 +29,11 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
+#if defined(__FreeBSD__) && defined(__arm__)
|
||||
+#include <sys/types.h>
|
||||
+#include <machine/sysarch.h>
|
||||
+#endif
|
||||
+
|
||||
/* ffi_prep_args is called by the assembly routine once stack space
|
||||
has been allocated for the function's arguments */
|
||||
|
||||
@@ -273,6 +278,16 @@
|
||||
|
||||
/* How to make a trampoline. */
|
||||
|
||||
+#if defined(__FreeBSD__) && defined(__arm__)
|
||||
+#define __clear_cache(start, end) do { \
|
||||
+ struct arm_sync_icache_args ua; \
|
||||
+ \
|
||||
+ ua.addr = (uintptr_t)(start); \
|
||||
+ ua.len = (char *)(end) - (char *)start; \
|
||||
+ sysarch(ARM_SYNC_ICACHE, &ua); \
|
||||
+ } while (0);
|
||||
+#endif
|
||||
+
|
||||
#define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX) \
|
||||
({ unsigned char *__tramp = (unsigned char*)(TRAMP); \
|
||||
unsigned int __fun = (unsigned int)(FUN); \
|
@ -1,11 +0,0 @@
|
||||
--- ./Modules/selectmodule.c.orig 2013-11-30 23:09:48.211062086 +1100
|
||||
+++ ./Modules/selectmodule.c 2013-11-30 23:53:51.740895007 +1100
|
||||
@@ -1229,7 +1229,7 @@
|
||||
|
||||
EV_SET(&(self->e), 0, EVFILT_READ, EV_ADD, 0, 0, 0); /* defaults */
|
||||
|
||||
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|hhiii:kevent", kwlist,
|
||||
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|hHIii:kevent", kwlist,
|
||||
&pfd, &(self->e.filter), &(self->e.flags),
|
||||
&(self->e.fflags), &(self->e.data), &(self->e.udata))) {
|
||||
return -1;
|
@ -1,54 +0,0 @@
|
||||
# Description: fix readline.so build with readline 6.3
|
||||
# Patch obtained from upstream, issue #20374
|
||||
# http://bugs.python.org/issue20374
|
||||
|
||||
--- ./Modules/readline.c.orig 2012-04-09 23:25:36.000000000 +0000
|
||||
+++ ./Modules/readline.c 2014-03-01 15:37:28.000000000 +0000
|
||||
@@ -693,14 +693,22 @@
|
||||
}
|
||||
|
||||
static int
|
||||
+#if defined(_RL_FUNCTION_TYPEDEF)
|
||||
on_startup_hook(void)
|
||||
+#else
|
||||
+on_startup_hook()
|
||||
+#endif
|
||||
{
|
||||
return on_hook(startup_hook);
|
||||
}
|
||||
|
||||
#ifdef HAVE_RL_PRE_INPUT_HOOK
|
||||
static int
|
||||
+#if defined(_RL_FUNCTION_TYPEDEF)
|
||||
on_pre_input_hook(void)
|
||||
+#else
|
||||
+on_pre_input_hook()
|
||||
+#endif
|
||||
{
|
||||
return on_hook(pre_input_hook);
|
||||
}
|
||||
@@ -794,7 +802,7 @@
|
||||
* before calling the normal completer */
|
||||
|
||||
static char **
|
||||
-flex_complete(char *text, int start, int end)
|
||||
+flex_complete(const char *text, int start, int end)
|
||||
{
|
||||
#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
|
||||
rl_completion_append_character ='\0';
|
||||
@@ -834,12 +842,12 @@
|
||||
rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
|
||||
rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
|
||||
/* Set our hook functions */
|
||||
- rl_startup_hook = (Function *)on_startup_hook;
|
||||
+ rl_startup_hook = on_startup_hook;
|
||||
#ifdef HAVE_RL_PRE_INPUT_HOOK
|
||||
- rl_pre_input_hook = (Function *)on_pre_input_hook;
|
||||
+ rl_pre_input_hook = on_pre_input_hook;
|
||||
#endif
|
||||
/* Set our completion function */
|
||||
- rl_attempted_completion_function = (CPPFunction *)flex_complete;
|
||||
+ rl_attempted_completion_function = flex_complete;
|
||||
/* Set Python word break characters */
|
||||
rl_completer_word_break_characters =
|
||||
strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?");
|
@ -1,95 +0,0 @@
|
||||
--- ./setup.py.orig 2012-04-10 09:25:37.000000000 +1000
|
||||
+++ ./setup.py 2013-12-01 21:05:04.742891449 +1100
|
||||
@@ -17,7 +17,7 @@
|
||||
from distutils.spawn import find_executable
|
||||
|
||||
# This global variable is used to hold the list of modules to be disabled.
|
||||
-disabled_module_list = []
|
||||
+disabled_module_list = ["_sqlite3", "_tkinter", "_gdbm"]
|
||||
|
||||
def add_dir_to_list(dirlist, dir):
|
||||
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
|
||||
@@ -601,7 +601,7 @@
|
||||
# curses_library = readline_termcap_library
|
||||
# elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
|
||||
# (...)
|
||||
- if self.compiler.find_library_file(lib_dirs, 'ncursesw'):
|
||||
+ if self.compiler.find_library_file(lib_dirs, 'XXXncursesw'):
|
||||
curses_library = 'ncursesw'
|
||||
elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
|
||||
curses_library = 'ncurses'
|
||||
@@ -637,7 +637,7 @@
|
||||
'termcap'):
|
||||
readline_libs.append('termcap')
|
||||
exts.append( Extension('readline', ['readline.c'],
|
||||
- library_dirs=['/usr/lib/termcap'],
|
||||
+ library_dirs=['/usr/lib', '/usr/lib/termcap'],
|
||||
extra_link_args=readline_extra_link_args,
|
||||
libraries=readline_libs) )
|
||||
else:
|
||||
@@ -731,6 +731,8 @@
|
||||
# OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash
|
||||
exts.append( Extension('_sha256', ['sha256module.c']) )
|
||||
exts.append( Extension('_sha512', ['sha512module.c']) )
|
||||
+ else:
|
||||
+ open('.without_own_sha', 'w')
|
||||
|
||||
if openssl_ver < 0x00907000:
|
||||
# no openssl at all, use our own md5 and sha1
|
||||
@@ -1139,12 +1141,13 @@
|
||||
# provided by the ncurses library.
|
||||
panel_library = 'panel'
|
||||
if curses_library.startswith('ncurses'):
|
||||
- if curses_library == 'ncursesw':
|
||||
+ if curses_library == 'XXXncursesw':
|
||||
# Bug 1464056: If _curses.so links with ncursesw,
|
||||
# _curses_panel.so must link with panelw.
|
||||
panel_library = 'panelw'
|
||||
curses_libs = [curses_library]
|
||||
exts.append( Extension('_curses', ['_cursesmodule.c'],
|
||||
+ library_dirs = ['/usr/lib'],
|
||||
libraries = curses_libs) )
|
||||
elif curses_library == 'curses' and platform != 'darwin':
|
||||
# OSX has an old Berkeley curses, not good enough for
|
||||
@@ -1165,6 +1168,7 @@
|
||||
if (module_enabled(exts, '_curses') and
|
||||
self.compiler.find_library_file(lib_dirs, panel_library)):
|
||||
exts.append( Extension('_curses_panel', ['_curses_panel.c'],
|
||||
+ library_dirs = ['/usr/lib'],
|
||||
libraries = [panel_library] + curses_libs) )
|
||||
else:
|
||||
missing.append('_curses_panel')
|
||||
@@ -1301,7 +1305,7 @@
|
||||
macros = dict()
|
||||
libraries = []
|
||||
|
||||
- elif platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'):
|
||||
+ elif platform in ('freebsd6', 'freebsd7', 'freebsd8', 'freebsd9', 'freebsd10'):
|
||||
# FreeBSD's P1003.1b semaphore support is very experimental
|
||||
# and has many known problems. (as of June 2008)
|
||||
macros = dict()
|
||||
@@ -1344,8 +1348,12 @@
|
||||
# End multiprocessing
|
||||
|
||||
# Platform-specific libraries
|
||||
- if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
|
||||
- 'freebsd7', 'freebsd8'):
|
||||
+ #############################
|
||||
+ # Backport Commit: http://hg.python.org/cpython/rev/50f1922bc1d5
|
||||
+ # Backport Issue: http://bugs.python.org/issue12326
|
||||
+ #############################
|
||||
+ if any(platform.startswith(prefix)
|
||||
+ for prefix in ("linux", "freebsd", "gnukfreebsd")):
|
||||
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
|
||||
else:
|
||||
missing.append('ossaudiodev')
|
||||
@@ -1831,8 +1839,7 @@
|
||||
# called unless there's at least one extension module defined.
|
||||
ext_modules=[Extension('_struct', ['_struct.c'])],
|
||||
|
||||
- scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3",
|
||||
- "Tools/scripts/2to3"]
|
||||
+ scripts = []
|
||||
)
|
||||
|
||||
# --install-platlib
|
@ -1,4 +0,0 @@
|
||||
Python is an interpreted object-oriented programming language, and is
|
||||
often compared to Tcl, Perl or Scheme.
|
||||
|
||||
WWW: http://www.python.org/
|
@ -1,10 +0,0 @@
|
||||
====
|
||||
Note that some of the standard modules are provided as separate
|
||||
ports since they require extra dependencies:
|
||||
|
||||
gdbm databases/py-gdbm
|
||||
sqlite3 databases/py-sqlite3
|
||||
tkinter x11-toolkits/py-tkinter
|
||||
|
||||
Install them as needed.
|
||||
====
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user