pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/python33 Fix build with LibreSSL. From:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2a93fa093b5a
branches:  trunk
changeset: 650514:2a93fa093b5a
user:      rodent <rodent%pkgsrc.org@localhost>
date:      Fri Apr 24 03:24:32 2015 +0000

description:
Fix build with LibreSSL. From:
https://hg.python.org/cpython/rev/6f23bc5d480e and defuzz patches.

diffstat:

 lang/python33/distinfo                                     |  29 ++++---
 lang/python33/patches/patch-Include_pyport.h               |   4 +-
 lang/python33/patches/patch-Lib_distutils_unixccompiler.py |   4 +-
 lang/python33/patches/patch-Lib_ssl.py                     |  20 +++++
 lang/python33/patches/patch-Lib_test_test__ssl.py          |  18 ++++
 lang/python33/patches/patch-Modules___ssl.c                |  33 ++++++++
 lang/python33/patches/patch-aa                             |   4 +-
 lang/python33/patches/patch-ab                             |   6 +-
 lang/python33/patches/patch-ah                             |  20 ++--
 lang/python33/patches/patch-am                             |  14 +-
 lang/python33/patches/patch-an                             |   4 +-
 lang/python33/patches/patch-av                             |   4 +-
 lang/python33/patches/patch-aw                             |   4 +-
 lang/python33/patches/patch-configure                      |  53 +++++++++++++-
 lang/python33/patches/patch-pyconfig.h.in                  |  18 +++-
 lang/python33/patches/patch-xa                             |   4 +-
 16 files changed, 186 insertions(+), 53 deletions(-)

diffs (truncated from 459 to 300 lines):

diff -r d64237a44281 -r 2a93fa093b5a lang/python33/distinfo
--- a/lang/python33/distinfo    Fri Apr 24 03:01:35 2015 +0000
+++ b/lang/python33/distinfo    Fri Apr 24 03:24:32 2015 +0000
@@ -1,18 +1,21 @@
-$NetBSD: distinfo,v 1.21 2015/03/16 13:53:05 tnn Exp $
+$NetBSD: distinfo,v 1.22 2015/04/24 03:24:32 rodent Exp $
 
 SHA1 (Python-3.3.6.tar.xz) = 0a86ae9e877467a62faed7ece208c0d6899b0991
 RMD160 (Python-3.3.6.tar.xz) = e45909eedf3648408ef8b34775ab24654181d9bd
 Size (Python-3.3.6.tar.xz) = 12116460 bytes
-SHA1 (patch-Include_pyport.h) = 73bdd4bd4a4bfb11b163c3ccb3bb70bde4decc04
-SHA1 (patch-Lib_distutils_unixccompiler.py) = 39cb8d1e1e3e76e2b6b5dbc1a6b5e0815300b2ce
-SHA1 (patch-aa) = 99ebcbbfc53b855a32b424dec27012e1e969c3d0
-SHA1 (patch-ab) = 1c0a25bf7ec6ee76e84c799619ec7cd8910f16e1
-SHA1 (patch-ah) = bb43aaab260935a5a0d5e7ce1ccc30f4832cab1d
-SHA1 (patch-am) = ae28f14398c08f114c6b11f528a9e5eda90f003b
-SHA1 (patch-an) = f497bc50789c957ee93b3e91f65cb8cd4f236d9b
+SHA1 (patch-Include_pyport.h) = 9692d7436443364bf7aca4a3eaa262ae81f4e381
+SHA1 (patch-Lib_distutils_unixccompiler.py) = cfbb7d3f5d631bc8c7cf41afcb86e31ad4b56e53
+SHA1 (patch-Lib_ssl.py) = 1996554ebf34201f7a3ab183c6a81e6b369af5ca
+SHA1 (patch-Lib_test_test__ssl.py) = 5033c604a405829ab1f268a8ba3a78c749c568e9
+SHA1 (patch-Modules___ssl.c) = 765ac20323612dd260807baa9273fdb597072fcc
+SHA1 (patch-aa) = dc5e70e7031891391708f3a91fad55e17b4afc85
+SHA1 (patch-ab) = 120bf92de99af099ff58fd911057deb3cb799b09
+SHA1 (patch-ah) = 527a45426fbeb6e508ea4e4f1da6329f8d05fb40
+SHA1 (patch-am) = af17e928c9e4b76cef037e69cdb476fa37ad218e
+SHA1 (patch-an) = d113774424a23ba6d2256c86c4fec910bb671d7a
 SHA1 (patch-au) = c466c257fcb7c282e93073122df1db4c5dc57f09
-SHA1 (patch-av) = 9b44f339f65f029b7f17dbc654739a7ae3c12780
-SHA1 (patch-aw) = c47387f377faad6b12d688ae5d56fec1298fcce7
-SHA1 (patch-configure) = 695e024b5dd590ca4987704e4b812489b9a8daab
-SHA1 (patch-pyconfig.h.in) = 7ebc0ed9ca9a37c5a6c8e04cc3f7fca4a5c90e8c
-SHA1 (patch-xa) = fb81eaa604b4ed7c1b64c3f4731d58a8aee257be
+SHA1 (patch-av) = 63aea414c6fba242a5dc8142c27a32760602e237
+SHA1 (patch-aw) = ea246ba5e9aa7df4740186def7e131a03b840466
+SHA1 (patch-configure) = 301064b762845342fea02ea5d1bf34cff7371a87
+SHA1 (patch-pyconfig.h.in) = ea6877715129c9e4d90a29e08d3061b888716f5e
+SHA1 (patch-xa) = 0d6326ac8b582fc879388d1ee2663f81221ca3b8
diff -r d64237a44281 -r 2a93fa093b5a lang/python33/patches/patch-Include_pyport.h
--- a/lang/python33/patches/patch-Include_pyport.h      Fri Apr 24 03:01:35 2015 +0000
+++ b/lang/python33/patches/patch-Include_pyport.h      Fri Apr 24 03:24:32 2015 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-Include_pyport.h,v 1.1 2014/06/11 06:03:10 richard Exp $
+$NetBSD: patch-Include_pyport.h,v 1.2 2015/04/24 03:24:32 rodent Exp $
 SunOS defines gethostname in <unistd.h>
 http://bugs.python.org/issue19561
 
---- Include/pyport.h.orig      2013-05-15 16:32:54.000000000 +0000
+--- Include/pyport.h.orig      2014-10-12 07:03:52.000000000 +0000
 +++ Include/pyport.h
 @@ -649,11 +649,6 @@ Please be conservative with adding new o
  in platform-specific #ifdefs.
diff -r d64237a44281 -r 2a93fa093b5a lang/python33/patches/patch-Lib_distutils_unixccompiler.py
--- a/lang/python33/patches/patch-Lib_distutils_unixccompiler.py        Fri Apr 24 03:01:35 2015 +0000
+++ b/lang/python33/patches/patch-Lib_distutils_unixccompiler.py        Fri Apr 24 03:24:32 2015 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-Lib_distutils_unixccompiler.py,v 1.1 2013/09/10 14:22:30 joerg Exp $
+$NetBSD: patch-Lib_distutils_unixccompiler.py,v 1.2 2015/04/24 03:24:32 rodent Exp $
 
---- Lib/distutils/unixccompiler.py.orig        2013-05-15 16:32:54.000000000 +0000
+--- Lib/distutils/unixccompiler.py.orig        2014-10-12 07:03:52.000000000 +0000
 +++ Lib/distutils/unixccompiler.py
 @@ -232,7 +232,7 @@ class UnixCCompiler(CCompiler):
          elif sys.platform[:7] == "irix646" or sys.platform[:6] == "osf1V5":
diff -r d64237a44281 -r 2a93fa093b5a lang/python33/patches/patch-Lib_ssl.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/python33/patches/patch-Lib_ssl.py    Fri Apr 24 03:24:32 2015 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-Lib_ssl.py,v 1.1 2015/04/24 03:24:32 rodent Exp $
+
+Fix build with LibreSSL.
+
+--- Lib/ssl.py.orig    2014-10-12 07:03:53.000000000 +0000
++++ Lib/ssl.py
+@@ -78,7 +78,12 @@ try:
+     from _ssl import OP_SINGLE_ECDH_USE
+ except ImportError:
+     pass
+-from _ssl import RAND_status, RAND_egd, RAND_add, RAND_bytes, RAND_pseudo_bytes
++from _ssl import RAND_status, RAND_add, RAND_bytes, RAND_pseudo_bytes
++try:
++    from _ssl import RAND_egd
++except ImportError:
++    # LibreSSL does not provide RAND_egd
++    pass
+ from _ssl import (
+     SSL_ERROR_ZERO_RETURN,
+     SSL_ERROR_WANT_READ,
diff -r d64237a44281 -r 2a93fa093b5a lang/python33/patches/patch-Lib_test_test__ssl.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/python33/patches/patch-Lib_test_test__ssl.py Fri Apr 24 03:24:32 2015 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-Lib_test_test__ssl.py,v 1.1 2015/04/24 03:24:32 rodent Exp $
+
+Fix build with LibreSSL.
+
+--- Lib/test/test_ssl.py.orig  2014-10-12 07:03:53.000000000 +0000
++++ Lib/test/test_ssl.py
+@@ -130,8 +130,9 @@ class BasicSocketTests(unittest.TestCase
+         self.assertRaises(ValueError, ssl.RAND_bytes, -5)
+         self.assertRaises(ValueError, ssl.RAND_pseudo_bytes, -5)
+ 
+-        self.assertRaises(TypeError, ssl.RAND_egd, 1)
+-        self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
++        if hasattr(ssl, 'RAND_egd'):
++            self.assertRaises(TypeError, ssl.RAND_egd, 1)
++            self.assertRaises(TypeError, ssl.RAND_egd, 'foo', 1)
+         ssl.RAND_add("this is a random string", 75.0)
+ 
+     @unittest.skipUnless(os.name == 'posix', 'requires posix')
diff -r d64237a44281 -r 2a93fa093b5a lang/python33/patches/patch-Modules___ssl.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/python33/patches/patch-Modules___ssl.c       Fri Apr 24 03:24:32 2015 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-Modules___ssl.c,v 1.1 2015/04/24 03:24:32 rodent Exp $
+
+Fix build with LibreSSL.
+
+--- Modules/_ssl.c.orig        2014-10-12 07:03:53.000000000 +0000
++++ Modules/_ssl.c
+@@ -2559,6 +2559,7 @@ Returns 1 if the OpenSSL PRNG has been s
+ It is necessary to seed the PRNG with RAND_add() on some platforms before\n\
+ using the ssl() function.");
+ 
++#ifdef HAVE_RAND_EGD
+ static PyObject *
+ PySSL_RAND_egd(PyObject *self, PyObject *args)
+ {
+@@ -2586,6 +2587,7 @@ PyDoc_STRVAR(PySSL_RAND_egd_doc,
+ Queries the entropy gather daemon (EGD) on the socket named by 'path'.\n\
+ Returns number of bytes read.  Raises SSLError if connection to EGD\n\
+ fails or if it does not provide enough data to seed PRNG.");
++#endif /* HAVE_RAND_EGD */
+ 
+ #endif /* HAVE_OPENSSL_RAND */
+ 
+@@ -2604,8 +2606,10 @@ static PyMethodDef PySSL_methods[] = {
+      PySSL_RAND_bytes_doc},
+     {"RAND_pseudo_bytes",   PySSL_RAND_pseudo_bytes, METH_VARARGS,
+      PySSL_RAND_pseudo_bytes_doc},
++#ifdef HAVE_RAND_EGD
+     {"RAND_egd",            PySSL_RAND_egd, METH_VARARGS,
+      PySSL_RAND_egd_doc},
++#endif
+     {"RAND_status",         (PyCFunction)PySSL_RAND_status, METH_NOARGS,
+      PySSL_RAND_status_doc},
+ #endif
diff -r d64237a44281 -r 2a93fa093b5a lang/python33/patches/patch-aa
--- a/lang/python33/patches/patch-aa    Fri Apr 24 03:01:35 2015 +0000
+++ b/lang/python33/patches/patch-aa    Fri Apr 24 03:24:32 2015 +0000
@@ -1,9 +1,9 @@
-$NetBSD: patch-aa,v 1.1 2012/12/10 03:15:49 tsarna Exp $
+$NetBSD: patch-aa,v 1.2 2015/04/24 03:24:32 rodent Exp $
 
 * On NetBSD, [n]curses.h and stdlib.h/wchar.h use different guards
   against multiple definition of wchar_t and wint_t.
 
---- Include/py_curses.h.orig   2009-09-06 21:26:46.000000000 +0000
+--- Include/py_curses.h.orig   2014-10-12 07:03:52.000000000 +0000
 +++ Include/py_curses.h
 @@ -44,6 +44,21 @@
  #endif
diff -r d64237a44281 -r 2a93fa093b5a lang/python33/patches/patch-ab
--- a/lang/python33/patches/patch-ab    Fri Apr 24 03:01:35 2015 +0000
+++ b/lang/python33/patches/patch-ab    Fri Apr 24 03:24:32 2015 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.1 2012/12/10 03:15:49 tsarna Exp $
+$NetBSD: patch-ab,v 1.2 2015/04/24 03:24:32 rodent Exp $
 
---- Lib/distutils/command/build_ext.py.orig    2012-02-23 20:22:44.000000000 +0000
+--- Lib/distutils/command/build_ext.py.orig    2014-10-12 07:03:52.000000000 +0000
 +++ Lib/distutils/command/build_ext.py
-@@ -523,8 +523,19 @@ class build_ext(Command):
+@@ -532,8 +532,19 @@ class build_ext(Command):
          # that go into the mix.
          if ext.extra_objects:
              objects.extend(ext.extra_objects)
diff -r d64237a44281 -r 2a93fa093b5a lang/python33/patches/patch-ah
--- a/lang/python33/patches/patch-ah    Fri Apr 24 03:01:35 2015 +0000
+++ b/lang/python33/patches/patch-ah    Fri Apr 24 03:24:32 2015 +0000
@@ -1,10 +1,10 @@
-$NetBSD: patch-ah,v 1.1 2012/12/10 03:15:49 tsarna Exp $
+$NetBSD: patch-ah,v 1.2 2015/04/24 03:24:32 rodent Exp $
 
 * Ncurses will be used by devel/py-curses and devel/py-cursespanel.
 
---- Modules/_cursesmodule.c.orig       2012-02-23 20:22:47.000000000 +0000
+--- Modules/_cursesmodule.c.orig       2014-10-12 07:03:53.000000000 +0000
 +++ Modules/_cursesmodule.c
-@@ -332,17 +332,9 @@ Window_NoArg2TupleReturnFunction(getpary
+@@ -482,17 +482,9 @@ Window_NoArg2TupleReturnFunction(getpary
  
  Window_OneArgNoReturnFunction(clearok, int, "i;True(1) or False(0)")
  Window_OneArgNoReturnFunction(idlok, int, "i;True(1) or False(0)")
@@ -22,7 +22,7 @@
  Window_OneArgNoReturnFunction(notimeout, int, "i;True(1) or False(0)")
  Window_OneArgNoReturnFunction(scrollok, int, "i;True(1) or False(0)")
  Window_OneArgNoReturnFunction(winsdelln, int, "i;nlines")
-@@ -901,11 +893,7 @@ PyCursesWindow_GetKey(PyCursesWindowObje
+@@ -1146,11 +1138,7 @@ PyCursesWindow_GetKey(PyCursesWindowObje
          return Py_BuildValue("C", rtn);
      } else {
          const char *knp;
@@ -34,7 +34,7 @@
          return PyUnicode_FromString((knp == NULL) ? "" : knp);
      }
  }
-@@ -2187,7 +2175,6 @@ PyCurses_Is_Term_Resized(PyObject *self,
+@@ -2580,7 +2568,6 @@ PyCurses_Is_Term_Resized(PyObject *self,
  }
  #endif /* HAVE_CURSES_IS_TERM_RESIZED */
  
@@ -42,7 +42,7 @@
  static PyObject *
  PyCurses_KeyName(PyObject *self, PyObject *args)
  {
-@@ -2206,7 +2193,6 @@ PyCurses_KeyName(PyObject *self, PyObjec
+@@ -2599,7 +2586,6 @@ PyCurses_KeyName(PyObject *self, PyObjec
  
      return PyBytes_FromString((knp == NULL) ? "" : (char *)knp);
  }
@@ -50,7 +50,7 @@
  
  static PyObject *
  PyCurses_KillChar(PyObject *self)
-@@ -2744,9 +2730,7 @@ static PyMethodDef PyCurses_methods[] = 
+@@ -3206,9 +3192,7 @@ static PyMethodDef PyCurses_methods[] = 
  #ifdef HAVE_CURSES_IS_TERM_RESIZED
      {"is_term_resized",     (PyCFunction)PyCurses_Is_Term_Resized, METH_VARARGS},
  #endif
@@ -60,7 +60,7 @@
      {"killchar",            (PyCFunction)PyCurses_KillChar, METH_NOARGS},
      {"longname",            (PyCFunction)PyCurses_longname, METH_NOARGS},
      {"meta",                (PyCFunction)PyCurses_Meta, METH_VARARGS},
-@@ -2869,9 +2853,7 @@ PyInit__curses(void)
+@@ -3334,9 +3318,7 @@ PyInit__curses(void)
      SetDictInt("A_DIM",                 A_DIM);
      SetDictInt("A_BOLD",                A_BOLD);
      SetDictInt("A_ALTCHARSET",          A_ALTCHARSET);
@@ -70,7 +70,7 @@
      SetDictInt("A_PROTECT",         A_PROTECT);
      SetDictInt("A_CHARTEXT",        A_CHARTEXT);
      SetDictInt("A_COLOR",           A_COLOR);
-@@ -2943,7 +2925,6 @@ PyInit__curses(void)
+@@ -3408,7 +3390,6 @@ PyInit__curses(void)
          int key;
          char *key_n;
          char *key_n2;
@@ -78,7 +78,7 @@
          for (key=KEY_MIN;key < KEY_MAX; key++) {
              key_n = (char *)keyname(key);
              if (key_n == NULL || strcmp(key_n,"UNKNOWN KEY")==0)
-@@ -2971,7 +2952,6 @@ PyInit__curses(void)
+@@ -3436,7 +3417,6 @@ PyInit__curses(void)
              if (key_n2 != key_n)
                  free(key_n2);
          }
diff -r d64237a44281 -r 2a93fa093b5a lang/python33/patches/patch-am
--- a/lang/python33/patches/patch-am    Fri Apr 24 03:01:35 2015 +0000
+++ b/lang/python33/patches/patch-am    Fri Apr 24 03:24:32 2015 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-am,v 1.9 2014/05/31 12:46:28 ryoon Exp $
+$NetBSD: patch-am,v 1.10 2015/04/24 03:24:32 rodent Exp $
 
---- setup.py.orig      2014-03-09 08:40:35.000000000 +0000
+--- setup.py.orig      2014-10-12 07:03:54.000000000 +0000
 +++ setup.py
 @@ -31,7 +31,8 @@ host_platform = get_platform()
  COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
@@ -67,7 +67,7 @@
          if opensslv_h:
              name = os.path.join(opensslv_h[0], 'openssl/opensslv.h')
              if host_platform == 'darwin' and is_macosx_sdk_path(name):
-@@ -1138,6 +1136,30 @@ class PyBuildExt(build_ext):
+@@ -1137,6 +1135,30 @@ class PyBuildExt(build_ext):
          dbm_order = ['gdbm']
          # The standard Unix dbm module:
          if host_platform not in ['cygwin']:
@@ -98,7 +98,7 @@
              config_args = [arg.strip("'")
                             for arg in sysconfig.get_config_var("CONFIG_ARGS").split()]
              dbm_args = [arg for arg in config_args
-@@ -1149,7 +1171,7 @@ class PyBuildExt(build_ext):
+@@ -1148,7 +1170,7 @@ class PyBuildExt(build_ext):
              dbmext = None
              for cand in dbm_order:
                  if cand == "ndbm":
@@ -107,7 +107,7 @@
                          # Some systems have -lndbm, others have -lgdbm_compat,
                          # others don't have either
                          if self.compiler.find_library_file(lib_dirs,
-@@ -1477,6 +1499,10 @@ class PyBuildExt(build_ext):
+@@ -1476,6 +1498,10 @@ class PyBuildExt(build_ext):
              macros = dict()
              libraries = []
  
@@ -118,7 +118,7 @@
          else:                                   # Linux and other unices
              macros = dict()
              libraries = ['rt']



Home | Main Index | Thread Index | Old Index