View | Details | Raw Unified | Return to bug 192511 | Differences between
and this patch

Collapse All | Expand All

(-)lang/python27/Makefile (+4 lines)
Lines 105-110 Link Here
105
PLIST_SUB+=	NO_NIS=""
105
PLIST_SUB+=	NO_NIS=""
106
.endif
106
.endif
107
107
108
.if defined(WITH_OPENSSL_PORT)
109
CONFIGURE_ARGS+=	CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
110
.endif
111
108
post-patch:
112
post-patch:
109
	@${REINPLACE_CMD} -e \
113
	@${REINPLACE_CMD} -e \
110
		's,/usr/doc/python-docs-,${PREFIX}/share/doc/python,g' \
114
		's,/usr/doc/python-docs-,${PREFIX}/share/doc/python,g' \
(-)lang/python27/files/patch-Doc__library__fcntl.rst (-10 lines)
Lines 1-10 Link Here
1
--- ./Doc/library/fcntl.rst.orig	2014-07-03 21:53:41.473098625 +1000
2
+++ ./Doc/library/fcntl.rst	2014-07-03 21:54:04.342833056 +1000
3
@@ -50,7 +50,6 @@
4
    operations are typically defined in the library module :mod:`termios` and the
5
    argument handling is even more complicated.
6
 
7
-   The op parameter is limited to values that can fit in 32-bits.
8
    Additional constants of interest for use as the *op* argument can be
9
    found in the :mod:`termios` module, under the same names as used in
10
    the relevant C header files.
(-)lang/python27/files/patch-Doc_library_fcntl.rst (+10 lines)
Line 0 Link Here
1
--- Doc/library/fcntl.rst.orig	2014-12-10 15:59:27 UTC
2
+++ Doc/library/fcntl.rst
3
@@ -50,7 +50,6 @@ The module defines the following functio
4
    operations are typically defined in the library module :mod:`termios` and the
5
    argument handling is even more complicated.
6
 
7
-   The op parameter is limited to values that can fit in 32-bits.
8
    Additional constants of interest for use as the *op* argument can be
9
    found in the :mod:`termios` module, under the same names as used in
10
    the relevant C header files.
(-)lang/python27/files/patch-Lib__distutils__unixccompiler.py (-15 lines)
Lines 1-15 Link Here
1
# Description: Some python extensions can't be compiled with clang 3.4
2
# Issue ID: http://bugs.python.org/issue20767
3
# Submitted by: antoine
4
5
--- ./Lib/distutils/unixccompiler.py.orig      2013-11-10 07:36:40.000000000 +0000
6
+++ ./Lib/distutils/unixccompiler.py   2014-02-19 15:41:48.000000000 +0000
7
@@ -228,6 +228,8 @@
8
         if sys.platform[:6] == "darwin":
9
             # MacOSX's linker doesn't understand the -R flag at all
10
             return "-L" + dir
11
+        elif sys.platform[:7] == "freebsd":
12
+            return "-Wl,-rpath=" + dir
13
         elif sys.platform[:5] == "hp-ux":
14
             if self._is_gcc(compiler):
15
                 return ["-Wl,+s", "-L" + dir]
(-)lang/python27/files/patch-Lib_distutils_command_build__scripts.py (+12 lines)
Line 0 Link Here
1
--- Lib/distutils/command/build_scripts.py.orig	2014-12-10 15:59:34 UTC
2
+++ Lib/distutils/command/build_scripts.py
3
@@ -126,6 +126,9 @@ class build_scripts (Command):
4
                                  file, oldmode, newmode)
5
                         os.chmod(file, newmode)
6
 
7
+        # XXX should we modify self.outfiles?
8
+        return outfiles
9
+
10
     # copy_scripts ()
11
 
12
 # class build_scripts
(-)lang/python27/files/patch-Lib_distutils_command_build_scripts.py (-17 lines)
Lines 1-17 Link Here
1
# Description: A non-invasive partial backport of the Python3 distutils behaviour.
2
# This allows Python's scripts to be properly suffixed (similar to Python 3.x) on
3
# installation.
4
# Submitted by: mva
5
6
--- Lib/distutils/command/build_scripts.py.orig	2014-07-26 11:52:20.000000000 +0200
7
+++ Lib/distutils/command/build_scripts.py	2014-07-26 11:52:56.000000000 +0200
8
@@ -126,6 +126,9 @@
9
                                  file, oldmode, newmode)
10
                         os.chmod(file, newmode)
11
 
12
+        # XXX should we modify self.outfiles?
13
+        return outfiles
14
+
15
     # copy_scripts ()
16
 
17
 # class build_scripts
(-)lang/python27/files/patch-Lib_distutils_unixccompiler.py (+11 lines)
Line 0 Link Here
1
--- Lib/distutils/unixccompiler.py.orig	2014-12-10 15:59:34 UTC
2
+++ Lib/distutils/unixccompiler.py
3
@@ -228,6 +228,8 @@ class UnixCCompiler(CCompiler):
4
         if sys.platform[:6] == "darwin":
5
             # MacOSX's linker doesn't understand the -R flag at all
6
             return "-L" + dir
7
+        elif sys.platform[:7] == "freebsd":
8
+            return "-Wl,-rpath=" + dir
9
         elif sys.platform[:5] == "hp-ux":
10
             if self._is_gcc(compiler):
11
                 return ["-Wl,+s", "-L" + dir]
(-)lang/python27/files/patch-Lib_socket.py (+22 lines)
Line 0 Link Here
1
--- Lib/socket.py.orig	2014-12-10 15:59:40 UTC
2
+++ Lib/socket.py
3
@@ -67,7 +67,6 @@ else:
4
     from _ssl import SSLError as sslerror
5
     from _ssl import \
6
          RAND_add, \
7
-         RAND_egd, \
8
          RAND_status, \
9
          SSL_ERROR_ZERO_RETURN, \
10
          SSL_ERROR_WANT_READ, \
11
@@ -78,6 +77,11 @@ else:
12
          SSL_ERROR_WANT_CONNECT, \
13
          SSL_ERROR_EOF, \
14
          SSL_ERROR_INVALID_ERROR_CODE
15
+    try:
16
+         from _ssl import RAND_egd
17
+         # LibreSSL does not provide RAND_egd
18
+    except ImportError:
19
+         pass
20
 
21
 import os, sys, warnings
22
 
(-)lang/python27/files/patch-Lib_ssl.py (+15 lines)
Line 0 Link Here
1
--- Lib/ssl.py.orig	2014-12-10 15:59:40 UTC
2
+++ Lib/ssl.py
3
@@ -106,7 +106,11 @@ from _ssl import CERT_NONE, CERT_OPTIONA
4
 from _ssl import (VERIFY_DEFAULT, VERIFY_CRL_CHECK_LEAF, VERIFY_CRL_CHECK_CHAIN,
5
     VERIFY_X509_STRICT)
6
 from _ssl import txt2obj as _txt2obj, nid2obj as _nid2obj
7
-from _ssl import RAND_status, RAND_egd, RAND_add
8
+from _ssl import RAND_status, RAND_add
9
+try:
10
+    from _ssl import RAND_egd
11
+except ImportError:
12
+    pass
13
 
14
 def _import_symbols(prefix):
15
     for n in dir(_ssl):
(-)lang/python27/files/patch-Lib_test_test__ssl.py (+14 lines)
Line 0 Link Here
1
--- Lib/test/test_ssl.py.orig	2014-12-10 15:59:47 UTC
2
+++ Lib/test/test_ssl.py
3
@@ -169,8 +169,9 @@ class BasicSocketTests(unittest.TestCase
4
             sys.stdout.write("\n RAND_status is %d (%s)\n"
5
                              % (v, (v and "sufficient randomness") or
6
                                 "insufficient randomness"))
7
-        self.assertRaises(TypeError, ssl.RAND_egd, 1)
8
-        self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
9
+        if hasattr(ssl, 'RAND_egd'):
10
+            self.assertRaises(TypeError, ssl.RAND_egd, 1)
11
+            self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
12
         ssl.RAND_add("this is a random string", 75.0)
13
 
14
     def test_parse_cert(self):
(-)lang/python27/files/patch-Makefile.pre.in (-9 / +6 lines)
Lines 1-12 Link Here
1
# Description: Link scripts in the same way Python3 does
1
--- Makefile.pre.in.orig	2014-12-10 15:59:50 UTC
2
# Submitted by: mva
2
+++ Makefile.pre.in
3
3
@@ -900,6 +900,12 @@ bininstall:	altbininstall
4
--- Makefile.pre.in.orig	2014-06-30 04:05:39.000000000 +0200
4
 	(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python2.pc)
5
+++ Makefile.pre.in	2014-07-26 11:09:46.000000000 +0200
5
 	-rm -f $(DESTDIR)$(LIBPC)/python.pc
6
@@ -868,6 +868,12 @@
6
 	(cd $(DESTDIR)$(LIBPC); $(LN) -s python2.pc python.pc)
7
	(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python2.pc)
8
	-rm -f $(DESTDIR)$(LIBPC)/python.pc
9
	(cd $(DESTDIR)$(LIBPC); $(LN) -s python2.pc python.pc)
10
+	-rm -f $(DESTDIR)$(BINDIR)/idle
7
+	-rm -f $(DESTDIR)$(BINDIR)/idle
11
+	(cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle2)
8
+	(cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle2)
12
+	-rm -f $(DESTDIR)$(BINDIR)/pydoc
9
+	-rm -f $(DESTDIR)$(BINDIR)/pydoc
(-)lang/python27/files/patch-Modules-_ctypes-libffi-configure (-11 lines)
Lines 1-11 Link Here
1
--- Modules/_ctypes/libffi/configure.orig	2014-12-16 08:10:12.000000000 +0100
2
+++ Modules/_ctypes/libffi/configure	2014-12-16 08:10:40.000000000 +0100
3
@@ -7526,7 +7526,7 @@
4
   rm -rf conftest*
5
   ;;
6
 
7
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
8
+amd64-*-freebsd*|x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
10
   # Find out what ABI is being produced by ac_compile, and set linker
11
   # options accordingly.  Note that the listed cases only cover the
(-)lang/python27/files/patch-Modules___ctypes__libffi__src__arm__ffi.c (-36 lines)
Lines 1-36 Link Here
1
# Description: Fix _ctypes abort on import for FreeBSD/ARM. This is an issue
2
# for anything !apple that is using the libcompiler_rt provided by clang on arm
3
# PR: ports/149167 ports/184517
4
# Patch by: cognet@ (to be upstreamed @ LLVM)
5
6
--- ./Modules/_ctypes/libffi/src/arm/ffi.c.orig	2013-11-10 18:36:41.000000000 +1100
7
+++ ./Modules/_ctypes/libffi/src/arm/ffi.c	2013-12-03 18:05:51.461078888 +1100
8
@@ -33,6 +33,11 @@
9
 
10
 #include <stdlib.h>
11
 
12
+#if defined(__FreeBSD__) && defined(__arm__)
13
+#include <sys/types.h>
14
+#include <machine/sysarch.h>
15
+#endif
16
+
17
 /* Forward declares. */
18
 static int vfp_type_p (ffi_type *);
19
 static void layout_vfp_args (ffi_cif *);
20
@@ -582,6 +587,16 @@
21
 
22
 #else
23
 
24
+#if defined(__FreeBSD__) && defined(__arm__)
25
+#define __clear_cache(start, end) do { \
26
+		struct arm_sync_icache_args ua; 		\
27
+								\
28
+		ua.addr = (uintptr_t)(start);			\
29
+		ua.len = (char *)(end) - (char *)start;		\
30
+		sysarch(ARM_SYNC_ICACHE, &ua);			\
31
+	} while (0);
32
+#endif
33
+
34
 #define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX)				\
35
 ({ unsigned char *__tramp = (unsigned char*)(TRAMP);			\
36
    unsigned int  __fun = (unsigned int)(FUN);				\
(-)lang/python27/files/patch-Modules___ctypes_libffi_configure (+11 lines)
Line 0 Link Here
1
--- Modules/_ctypes/libffi/configure.orig	2014-12-10 15:59:51 UTC
2
+++ Modules/_ctypes/libffi/configure
3
@@ -7526,7 +7526,7 @@ mips64*-*linux*)
4
   rm -rf conftest*
5
   ;;
6
 
7
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
8
+amd64-*-freebsd*|x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
9
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
10
   # Find out what ABI is being produced by ac_compile, and set linker
11
   # options accordingly.  Note that the listed cases only cover the
(-)lang/python27/files/patch-Modules___ctypes_libffi_src_arm_ffi.c (+31 lines)
Line 0 Link Here
1
--- Modules/_ctypes/libffi/src/arm/ffi.c.orig	2014-12-10 15:59:52 UTC
2
+++ Modules/_ctypes/libffi/src/arm/ffi.c
3
@@ -33,6 +33,11 @@
4
 
5
 #include <stdlib.h>
6
 
7
+#if defined(__FreeBSD__) && defined(__arm__)
8
+#include <sys/types.h>
9
+#include <machine/sysarch.h>
10
+#endif
11
+
12
 /* Forward declares. */
13
 static int vfp_type_p (ffi_type *);
14
 static void layout_vfp_args (ffi_cif *);
15
@@ -751,6 +756,16 @@ ffi_closure_free (void *ptr)
16
 
17
 #else
18
 
19
+#if defined(__FreeBSD__) && defined(__arm__)
20
+#define __clear_cache(start, end) do { \
21
+		struct arm_sync_icache_args ua; 		\
22
+								\
23
+		ua.addr = (uintptr_t)(start);			\
24
+		ua.len = (char *)(end) - (char *)start;		\
25
+		sysarch(ARM_SYNC_ICACHE, &ua);			\
26
+	} while (0);
27
+#endif
28
+
29
 #define FFI_INIT_TRAMPOLINE(TRAMP,FUN,CTX)				\
30
 ({ unsigned char *__tramp = (unsigned char*)(TRAMP);			\
31
    unsigned int  __fun = (unsigned int)(FUN);				\
(-)lang/python27/files/patch-Modules___ssl.c (+29 lines)
Line 0 Link Here
1
--- Modules/_ssl.c.orig	2014-12-10 15:59:53 UTC
2
+++ Modules/_ssl.c
3
@@ -3301,6 +3301,7 @@ Returns 1 if the OpenSSL PRNG has been s
4
 It is necessary to seed the PRNG with RAND_add() on some platforms before\n\
5
 using the ssl() function.");
6
 
7
+#ifdef HAVE_RAND_EGD
8
 static PyObject *
9
 PySSL_RAND_egd(PyObject *self, PyObject *arg)
10
 {
11
@@ -3326,6 +3327,7 @@ PyDoc_STRVAR(PySSL_RAND_egd_doc,
12
 Queries the entropy gather daemon (EGD) on the socket named by 'path'.\n\
13
 Returns number of bytes read.  Raises SSLError if connection to EGD\n\
14
 fails or if it does not provide enough data to seed PRNG.");
15
+#endif /* HAVE_RAND_EGD */
16
 
17
 #endif /* HAVE_OPENSSL_RAND */
18
 
19
@@ -3720,8 +3722,10 @@ static PyMethodDef PySSL_methods[] = {
20
 #ifdef HAVE_OPENSSL_RAND
21
     {"RAND_add",            PySSL_RAND_add, METH_VARARGS,
22
      PySSL_RAND_add_doc},
23
+#ifdef HAVE_RAND_EGD
24
     {"RAND_egd",            PySSL_RAND_egd, METH_VARARGS,
25
      PySSL_RAND_egd_doc},
26
+#endif /* HAVE_RAND_EGD */
27
     {"RAND_status",         (PyCFunction)PySSL_RAND_status, METH_NOARGS,
28
      PySSL_RAND_status_doc},
29
 #endif
(-)lang/python27/files/patch-Modules__fcntlmodule.c (-53 lines)
Lines 1-53 Link Here
1
--- ./Modules/fcntlmodule.c.orig	2014-07-03 21:57:10.429953240 +1000
2
+++ ./Modules/fcntlmodule.c	2014-07-03 21:59:36.517210444 +1000
3
@@ -98,20 +98,15 @@
4
 {
5
 #define IOCTL_BUFSZ 1024
6
     int fd;
7
-    /* In PyArg_ParseTuple below, we use the unsigned non-checked 'I'
8
+    /* In PyArg_ParseTuple below, we use the unsigned non-checked 'k'
9
        format for the 'code' parameter because Python turns 0x8000000
10
        into either a large positive number (PyLong or PyInt on 64-bit
11
        platforms) or a negative number on others (32-bit PyInt)
12
        whereas the system expects it to be a 32bit bit field value
13
        regardless of it being passed as an int or unsigned long on
14
-       various platforms.  See the termios.TIOCSWINSZ constant across
15
-       platforms for an example of this.
16
-
17
-       If any of the 64bit platforms ever decide to use more than 32bits
18
-       in their unsigned long ioctl codes this will break and need
19
-       special casing based on the platform being built on.
20
+       various platforms.
21
      */
22
-    unsigned int code;
23
+    unsigned long code;
24
     int arg;
25
     int ret;
26
     char *str;
27
@@ -119,7 +114,7 @@
28
     int mutate_arg = 1;
29
     char buf[IOCTL_BUFSZ+1];  /* argument plus NUL byte */
30
 
31
-    if (PyArg_ParseTuple(args, "O&Iw#|i:ioctl",
32
+    if (PyArg_ParseTuple(args, "O&kw#|i:ioctl",
33
                          conv_descriptor, &fd, &code,
34
                          &str, &len, &mutate_arg)) {
35
         char *arg;
36
@@ -170,7 +165,7 @@
37
     }
38
 
39
     PyErr_Clear();
40
-    if (PyArg_ParseTuple(args, "O&Is#:ioctl",
41
+    if (PyArg_ParseTuple(args, "O&ks#:ioctl",
42
                          conv_descriptor, &fd, &code, &str, &len)) {
43
         if (len > IOCTL_BUFSZ) {
44
             PyErr_SetString(PyExc_ValueError,
45
@@ -192,7 +187,7 @@
46
     PyErr_Clear();
47
     arg = 0;
48
     if (!PyArg_ParseTuple(args,
49
-         "O&I|i;ioctl requires a file or file descriptor,"
50
+         "O&k|i;ioctl requires a file or file descriptor,"
51
          " an integer and optionally an integer or buffer argument",
52
                           conv_descriptor, &fd, &code, &arg)) {
53
       return NULL;
(-)lang/python27/files/patch-Modules_fcntlmodule.c (+53 lines)
Line 0 Link Here
1
--- Modules/fcntlmodule.c.orig	2014-12-10 15:59:54 UTC
2
+++ Modules/fcntlmodule.c
3
@@ -98,20 +98,15 @@ fcntl_ioctl(PyObject *self, PyObject *ar
4
 {
5
 #define IOCTL_BUFSZ 1024
6
     int fd;
7
-    /* In PyArg_ParseTuple below, we use the unsigned non-checked 'I'
8
+    /* In PyArg_ParseTuple below, we use the unsigned non-checked 'k'
9
        format for the 'code' parameter because Python turns 0x8000000
10
        into either a large positive number (PyLong or PyInt on 64-bit
11
        platforms) or a negative number on others (32-bit PyInt)
12
        whereas the system expects it to be a 32bit bit field value
13
        regardless of it being passed as an int or unsigned long on
14
-       various platforms.  See the termios.TIOCSWINSZ constant across
15
-       platforms for an example of this.
16
-
17
-       If any of the 64bit platforms ever decide to use more than 32bits
18
-       in their unsigned long ioctl codes this will break and need
19
-       special casing based on the platform being built on.
20
+       various platforms.
21
      */
22
-    unsigned int code;
23
+    unsigned long code;
24
     int arg;
25
     int ret;
26
     char *str;
27
@@ -119,7 +114,7 @@ fcntl_ioctl(PyObject *self, PyObject *ar
28
     int mutate_arg = 1;
29
     char buf[IOCTL_BUFSZ+1];  /* argument plus NUL byte */
30
 
31
-    if (PyArg_ParseTuple(args, "O&Iw#|i:ioctl",
32
+    if (PyArg_ParseTuple(args, "O&kw#|i:ioctl",
33
                          conv_descriptor, &fd, &code,
34
                          &str, &len, &mutate_arg)) {
35
         char *arg;
36
@@ -170,7 +165,7 @@ fcntl_ioctl(PyObject *self, PyObject *ar
37
     }
38
 
39
     PyErr_Clear();
40
-    if (PyArg_ParseTuple(args, "O&Is#:ioctl",
41
+    if (PyArg_ParseTuple(args, "O&ks#:ioctl",
42
                          conv_descriptor, &fd, &code, &str, &len)) {
43
         if (len > IOCTL_BUFSZ) {
44
             PyErr_SetString(PyExc_ValueError,
45
@@ -192,7 +187,7 @@ fcntl_ioctl(PyObject *self, PyObject *ar
46
     PyErr_Clear();
47
     arg = 0;
48
     if (!PyArg_ParseTuple(args,
49
-         "O&I|i;ioctl requires a file or file descriptor,"
50
+         "O&k|i;ioctl requires a file or file descriptor,"
51
          " an integer and optionally an integer or buffer argument",
52
                           conv_descriptor, &fd, &code, &arg)) {
53
       return NULL;
(-)lang/python27/files/patch-configure (+51 lines)
Line 0 Link Here
1
--- configure.orig	2015-03-13 12:32:09 UTC
2
+++ configure
3
@@ -8534,6 +8534,48 @@ _ACEOF
4
 fi
5
 	# Dynamic linking for HP-UX
6
 
7
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
8
+$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9
+if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
10
+  $as_echo_n "(cached) " >&6
11
+else
12
+  ac_check_lib_save_LIBS=$LIBS
13
+LIBS="-lcrypto  $LIBS"
14
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15
+/* end confdefs.h.  */
16
+
17
+/* Override any GCC internal prototype to avoid an error.
18
+   Use char because int might match the return type of a GCC
19
+   builtin and then its argument prototype would still apply.  */
20
+#ifdef __cplusplus
21
+extern "C"
22
+#endif
23
+char RAND_egd ();
24
+int
25
+main ()
26
+{
27
+return RAND_egd ();
28
+  ;
29
+  return 0;
30
+}
31
+_ACEOF
32
+if ac_fn_c_try_link "$LINENO"; then :
33
+  ac_cv_lib_crypto_RAND_egd=yes
34
+else
35
+  ac_cv_lib_crypto_RAND_egd=no
36
+fi
37
+rm -f core conftest.err conftest.$ac_objext \
38
+    conftest$ac_exeext conftest.$ac_ext
39
+LIBS=$ac_check_lib_save_LIBS
40
+fi
41
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
42
+$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
43
+if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
44
+
45
+$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
46
+
47
+fi
48
+
49
 # only check for sem_init if thread support is requested
50
 if test "$with_threads" = "yes" -o -z "$with_threads"; then
51
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
(-)lang/python27/files/patch-configure.ac (+13 lines)
Line 0 Link Here
1
--- configure.ac.orig	2015-03-13 12:32:09 UTC
2
+++ configure.ac
3
@@ -2216,6 +2216,10 @@ AC_MSG_RESULT($SHLIBS)
4
 AC_CHECK_LIB(dl, dlopen)	# Dynamic linking for SunOS/Solaris and SYSV
5
 AC_CHECK_LIB(dld, shl_load)	# Dynamic linking for HP-UX
6
 
7
+AC_CHECK_LIB(crypto, RAND_egd,
8
+             AC_DEFINE(HAVE_RAND_EGD, 1,
9
+             [Define if the libcrypto has RAND_egd]))
10
+
11
 # only check for sem_init if thread support is requested
12
 if test "$with_threads" = "yes" -o -z "$with_threads"; then
13
     AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris
(-)lang/python27/files/patch-pr192365 (-58 lines)
Lines 1-58 Link Here
1
# Description: do not define __BSD_VISIBLE/_XOPEN_SOURCE/_POSIX_C_SOURCE
2
# in include/python2.7/pyconfig.h
3
# Submitted by: antoine
4
5
--- configure.orig	2014-09-06 14:42:50 UTC
6
+++ configure
7
@@ -2919,13 +2919,6 @@
8
 
9
 
10
 # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
11
-# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
12
-# them.
13
-
14
-$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
15
-
16
-
17
-# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
18
 # u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
19
 
20
 $as_echo "#define _BSD_TYPES 1" >>confdefs.h
21
@@ -3293,9 +3286,8 @@
22
   # but used in struct sockaddr.sa_family. Reported by Tim Rice.
23
   SCO_SV/3.2)
24
     define_xopen_source=no;;
25
-  # On FreeBSD 4, the math functions C89 does not cover are never defined
26
-  # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
27
-  FreeBSD/4.*)
28
+  # On FreeBSD,  defining _XOPEN_SOURCE to 600 requests a strict environment.
29
+  FreeBSD/*)
30
     define_xopen_source=no;;
31
   # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
32
   # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
33
--- configure.ac.orig	2014-09-06 14:42:50 UTC
34
+++ configure.ac
35
@@ -88,11 +88,6 @@
36
 AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features])
37
 
38
 # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
39
-# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
40
-# them.
41
-AC_DEFINE(__BSD_VISIBLE, 1, [Define on FreeBSD to activate all library features])
42
-
43
-# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
44
 # u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
45
 AC_DEFINE(_BSD_TYPES, 1, [Define on Irix to enable u_int])
46
 
47
@@ -426,9 +421,8 @@
48
   # but used in struct sockaddr.sa_family. Reported by Tim Rice.
49
   SCO_SV/3.2)
50
     define_xopen_source=no;;
51
-  # On FreeBSD 4, the math functions C89 does not cover are never defined
52
-  # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
53
-  FreeBSD/4.*)
54
+  # On FreeBSD,  defining _XOPEN_SOURCE to 600 requests a strict environment.
55
+  FreeBSD/*)
56
     define_xopen_source=no;;
57
   # On MacOS X 10.2, a bug in ncurses.h means that it craps out if 
58
   # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
(-)lang/python27/files/patch-setup.py (-17 / +10 lines)
Lines 1-13 Link Here
1
# Description: Partial script installation backport from Python3
1
--- setup.py.orig	2014-12-10 16:00:01 UTC
2
# Submitted by: mva
2
+++ setup.py
3
3
@@ -15,6 +15,7 @@ from distutils.core import Extension, se
4
# Description: Some modules are installed via other ports
5
6
# Description: ossaudiodev detection fix backport
7
8
--- setup.py.orig	2014-06-30 04:05:48.000000000 +0200
9
+++ setup.py	2014-07-26 14:51:29.000000000 +0200
10
@@ -15,6 +15,7 @@
11
 from distutils.command.build_ext import build_ext
4
 from distutils.command.build_ext import build_ext
12
 from distutils.command.install import install
5
 from distutils.command.install import install
13
 from distutils.command.install_lib import install_lib
6
 from distutils.command.install_lib import install_lib
Lines 15-21 Link Here
15
 from distutils.spawn import find_executable
8
 from distutils.spawn import find_executable
16
 
9
 
17
 cross_compiling = "_PYTHON_HOST_PLATFORM" in os.environ
10
 cross_compiling = "_PYTHON_HOST_PLATFORM" in os.environ
18
@@ -33,7 +34,7 @@
11
@@ -33,7 +34,7 @@ host_platform = get_platform()
19
 COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
12
 COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
20
 
13
 
21
 # This global variable is used to hold the list of modules to be disabled.
14
 # This global variable is used to hold the list of modules to be disabled.
Lines 24-30 Link Here
24
 
17
 
25
 def add_dir_to_list(dirlist, dir):
18
 def add_dir_to_list(dirlist, dir):
26
     """Add the directory 'dir' to the list 'dirlist' (at the front) if
19
     """Add the directory 'dir' to the list 'dirlist' (at the front) if
27
@@ -1212,7 +1213,7 @@
20
@@ -1214,7 +1215,7 @@ class PyBuildExt(build_ext):
28
                 sysroot = macosx_sdk_root()
21
                 sysroot = macosx_sdk_root()
29
                 f = os.path.join(sysroot, f[1:])
22
                 f = os.path.join(sysroot, f[1:])
30
 
23
 
Lines 33-39 Link Here
33
             data = open(f).read()
26
             data = open(f).read()
34
             m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
27
             m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
35
             if m is not None:
28
             if m is not None:
36
@@ -1551,7 +1552,7 @@
29
@@ -1553,7 +1554,7 @@ class PyBuildExt(build_ext):
37
             macros = dict()
30
             macros = dict()
38
             libraries = []
31
             libraries = []
39
 
32
 
Lines 42-48 Link Here
42
             # FreeBSD's P1003.1b semaphore support is very experimental
35
             # FreeBSD's P1003.1b semaphore support is very experimental
43
             # and has many known problems. (as of June 2008)
36
             # and has many known problems. (as of June 2008)
44
             macros = dict()
37
             macros = dict()
45
@@ -1602,9 +1603,10 @@
38
@@ -1604,9 +1605,10 @@ class PyBuildExt(build_ext):
46
         else:
39
         else:
47
             missing.append('linuxaudiodev')
40
             missing.append('linuxaudiodev')
48
 
41
 
Lines 56-62 Link Here
56
             exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
49
             exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
57
         else:
50
         else:
58
             missing.append('ossaudiodev')
51
             missing.append('ossaudiodev')
59
@@ -2176,6 +2178,22 @@
52
@@ -2178,6 +2180,22 @@ class PyBuildInstallLib(install_lib):
60
     def is_chmod_supported(self):
53
     def is_chmod_supported(self):
61
         return hasattr(os, 'chmod')
54
         return hasattr(os, 'chmod')
62
 
55
 
Lines 79-85 Link Here
79
 SUMMARY = """
72
 SUMMARY = """
80
 Python is an interpreted, interactive, object-oriented programming
73
 Python is an interpreted, interactive, object-oriented programming
81
 language. It is often compared to Tcl, Perl, Scheme or Java.
74
 language. It is often compared to Tcl, Perl, Scheme or Java.
82
@@ -2221,7 +2239,9 @@
75
@@ -2223,7 +2241,9 @@ def main():
83
           platforms = ["Many"],
76
           platforms = ["Many"],
84
 
77
 
85
           # Build info
78
           # Build info
Lines 90-96 Link Here
90
                       'install_lib':PyBuildInstallLib},
83
                       'install_lib':PyBuildInstallLib},
91
           # The struct module is defined here, because build_ext won't be
84
           # The struct module is defined here, because build_ext won't be
92
           # called unless there's at least one extension module defined.
85
           # called unless there's at least one extension module defined.
93
@@ -2229,8 +2249,7 @@
86
@@ -2231,8 +2251,7 @@ def main():
94
 
87
 
95
           # Scripts to install
88
           # Scripts to install
96
           scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
89
           scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',

Return to bug 192511