[gentoo-commits] dev/mgorny:master commit in: dev-binpkg/pypy3/

2016-10-12 Thread Michał Górny
commit: bde8bc9256fafcba98957ec39fdf1f9f97b74d11
Author: Michał Górny  gentoo  org>
AuthorDate: Wed Oct 12 15:31:30 2016 +
Commit: Michał Górny  gentoo  org>
CommitDate: Wed Oct 12 15:31:30 2016 +
URL:https://gitweb.gentoo.org/dev/mgorny.git/commit/?id=bde8bc92

dev-binpkg/pypy3: Bump to 5.5.0

 dev-binpkg/pypy3/Manifest |   1 +
 dev-binpkg/pypy3/pypy3-5.5.0_alpha.ebuild | 186 ++
 2 files changed, 187 insertions(+)

diff --git a/dev-binpkg/pypy3/Manifest b/dev-binpkg/pypy3/Manifest
index c76316b..19492c2 100644
--- a/dev-binpkg/pypy3/Manifest
+++ b/dev-binpkg/pypy3/Manifest
@@ -1,2 +1,3 @@
 DIST pypy3-2.4.0-src.tar.bz2 14693194 SHA256 
d9ba207d6eecf8a0dc4414e9f4e92db1abd143e8cc6ec4a6bdcac75b29f104f3 SHA512 
7e2b0c21f1833b8cd61251c2d58c6a9f99207e5d582618f0036886ff28dcb313541dce1c36bd1b57b332a36a94b13e416bb7b67110be7c8ece8283749ba712be
 WHIRLPOOL 
bd02009c828b7b491b46b260d687d268561e5372766adccbcb58e87a3f1c545f293c54e5cdd6e6b7fb95feb678677137211ee890f106140ce1bc256f8563d2cd
 DIST pypy3.3-v5.2.0-alpha1-src.tar.bz2 24390595 SHA256 
344c2f088c82ea1274964bb0505ab80d3f9e538cc03f91aa109325ddbaa61426 SHA512 
1b6bcab12a7f4dd0ac44158b8acafd64de4b9bcc277385ba4c05982381dcd577fa6ec7b2247f70d2671055f3669764b92b4447b32d51ded58c60e6ec23509595
 WHIRLPOOL 
9455686af04f31da52da812e4f48d773c1ce45180ba067a308a779fa8b468b5a10c446a28d7468e61278801837705e882240a2e17884bc94069e564a5706f177
+DIST pypy3.3-v5.5.0-alpha-src.tar.bz2 25122033 SHA256 
d5591c34d77253e9ed57d182b6f49585b95f7c09c3e121f0e8630e5a7e75ab5f SHA512 
b2cf9700e45c452293297edffe08e572dffc3c567026b4b5d9165c1ba1b4d858ffc8a6754f5f28781020016c36440e5c02d07562d075b12444c9c32ea5dd2168
 WHIRLPOOL 
6bde174969413c55d6d077cd14e737c4f034f19935536af1bffaf3a1caa456d2bf6850760a18c274ad99089bd5ab7331d7d185f914cd6c69f708abf857d35df3

diff --git a/dev-binpkg/pypy3/pypy3-5.5.0_alpha.ebuild 
b/dev-binpkg/pypy3/pypy3-5.5.0_alpha.ebuild
new file mode 100644
index 000..7800269
--- /dev/null
+++ b/dev-binpkg/pypy3/pypy3-5.5.0_alpha.ebuild
@@ -0,0 +1,186 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# pypy3 needs to be built using python 2
+PYTHON_COMPAT=( python2_7 pypy )
+inherit check-reqs eutils multilib multiprocessing pax-utils \
+   python-any-r1 toolchain-funcs versionator
+
+DESCRIPTION="A fast, compliant alternative implementation of Python 3"
+HOMEPAGE="http://pypy.org/";
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/pypy3.3-v${PV/_/-}-src.tar.bz2";
+
+LICENSE="MIT"
+SLOT="0/$(get_version_component_range 1-2 ${PV})"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="bzip2 +jit low-memory ncurses sandbox shadowstack cpu_flags_x86_sse2"
+
+DEPEND=">=sys-libs/zlib-1.1.3:0=
+   virtual/libffi:0=
+   virtual/libintl:0=
+   dev-libs/expat:0=
+   dev-libs/openssl:0=[-bindist]
+   bzip2? ( app-arch/bzip2:0= )
+   ncurses? ( sys-libs/ncurses:0= )
+   app-arch/lzip
+   low-memory? ( virtual/pypy:0 )
+   !low-memory? ( ${PYTHON_DEPS} )"
+
+# Who would care about predictable directory names?
+S="${WORKDIR}/pypy3-v${PV%_*}-src"
+
+pkg_pretend() {
+   if [[ ${MERGE_TYPE} != binary ]]; then
+   if use low-memory; then
+   CHECKREQS_MEMORY="1750M"
+   use amd64 && CHECKREQS_MEMORY="3500M"
+   else
+   CHECKREQS_MEMORY="3G"
+   use amd64 && CHECKREQS_MEMORY="6G"
+   fi
+   fi
+
+   check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+   local force_pypy
+
+   pkg_pretend
+
+   use low-memory && local EPYTHON
+   if has_version virtual/pypy && [[ ! ${EPYTHON} ]]; then
+   einfo "Using PyPy to perform the translation."
+   local EPYTHON=pypy
+   else
+   einfo "Using ${EPYTHON:-python2} to perform the translation. 
Please note that upstream"
+   einfo "recommends using PyPy for that. If you wish to do so, 
please install"
+   einfo "virtual/pypy and ensure that EPYTHON variable is unset."
+   fi
+
+   python-any-r1_pkg_setup
+
+   local cpu
+   if use amd64; then
+   # common denominator between Intel & AMD
+   cpu='x86-64'
+   elif use x86; then
+   if use cpu_flags_x86_sse2; then
+   # lowest with SSE2
+   cpu='pentium-m'
+   else
+   # lowest with SSE, compat. with athlon-xp
+   # TODO: do we want to support something older?
+   cpu='pentium3'
+   fi
+   else
+   die "Unsupported arch ${ARCH}"
+   fi
+
+   export CFLAGS="-march=${cpu} -mtune=generic -O2 -pipe"
+   export CXXFLAGS=${CFLAGS}
+
+   elog "CFLAGS: ${CFLAGS}"
+}
+
+src_prepare() {
+   epatch "${FILESDIR}"/2.5.0-shared-l

[gentoo-commits] dev/mgorny:master commit in: dev-binpkg/pypy3/files/, dev-binpkg/pypy3/

2016-06-09 Thread Michał Górny
commit: 5363800bf0547177a2cea10503be0a356238c72f
Author: Michał Górny  gentoo  org>
AuthorDate: Thu Jun  9 15:49:34 2016 +
Commit: Michał Górny  gentoo  org>
CommitDate: Thu Jun  9 15:49:34 2016 +
URL:https://gitweb.gentoo.org/dev/mgorny.git/commit/?id=5363800b

dev-binpkg/pypy3: Bump to 5.2.0-alpha1

 dev-binpkg/pypy3/Manifest |   1 +
 dev-binpkg/pypy3/files/2.5.0-shared-lib.patch |  12 ++
 dev-binpkg/pypy3/pypy3-5.2.0_alpha1.ebuild| 188 ++
 3 files changed, 201 insertions(+)

diff --git a/dev-binpkg/pypy3/Manifest b/dev-binpkg/pypy3/Manifest
index 1543f05..c76316b 100644
--- a/dev-binpkg/pypy3/Manifest
+++ b/dev-binpkg/pypy3/Manifest
@@ -1 +1,2 @@
 DIST pypy3-2.4.0-src.tar.bz2 14693194 SHA256 
d9ba207d6eecf8a0dc4414e9f4e92db1abd143e8cc6ec4a6bdcac75b29f104f3 SHA512 
7e2b0c21f1833b8cd61251c2d58c6a9f99207e5d582618f0036886ff28dcb313541dce1c36bd1b57b332a36a94b13e416bb7b67110be7c8ece8283749ba712be
 WHIRLPOOL 
bd02009c828b7b491b46b260d687d268561e5372766adccbcb58e87a3f1c545f293c54e5cdd6e6b7fb95feb678677137211ee890f106140ce1bc256f8563d2cd
+DIST pypy3.3-v5.2.0-alpha1-src.tar.bz2 24390595 SHA256 
344c2f088c82ea1274964bb0505ab80d3f9e538cc03f91aa109325ddbaa61426 SHA512 
1b6bcab12a7f4dd0ac44158b8acafd64de4b9bcc277385ba4c05982381dcd577fa6ec7b2247f70d2671055f3669764b92b4447b32d51ded58c60e6ec23509595
 WHIRLPOOL 
9455686af04f31da52da812e4f48d773c1ce45180ba067a308a779fa8b468b5a10c446a28d7468e61278801837705e882240a2e17884bc94069e564a5706f177

diff --git a/dev-binpkg/pypy3/files/2.5.0-shared-lib.patch 
b/dev-binpkg/pypy3/files/2.5.0-shared-lib.patch
new file mode 100644
index 000..ddd7473
--- /dev/null
+++ b/dev-binpkg/pypy3/files/2.5.0-shared-lib.patch
@@ -0,0 +1,12 @@
+diff -ur pypy-2.5.0-src.orig/rpython/translator/platform/posix.py 
pypy-2.5.0-src/rpython/translator/platform/posix.py
+--- rpython/translator/platform/posix.py   2015-02-03 05:12:49.0 
+0800
 rpython/translator/platform/posix.py   2015-03-22 07:36:01.420116684 
+0800
+@@ -183,7 +183,7 @@
+'int main(int argc, char* argv[]) '
+'{ return $(PYPY_MAIN_FUNCTION)(argc, argv); }" > $@')
+ m.rule('$(DEFAULT_TARGET)', ['$(TARGET)', 'main.o'],
+-   '$(CC_LINK) $(LDFLAGS_LINK) main.o -L. 
-l$(SHARED_IMPORT_LIB) -o $@ $(RPATH_FLAGS)')
++   '$(CC_LINK) $(LDFLAGS_LINK) main.o -L. 
-l$(SHARED_IMPORT_LIB) \'-Wl,-rpath,$$ORIGIN\' -o $@')
+ 
+ return m
+ 

diff --git a/dev-binpkg/pypy3/pypy3-5.2.0_alpha1.ebuild 
b/dev-binpkg/pypy3/pypy3-5.2.0_alpha1.ebuild
new file mode 100644
index 000..c8434bc
--- /dev/null
+++ b/dev-binpkg/pypy3/pypy3-5.2.0_alpha1.ebuild
@@ -0,0 +1,188 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+# pypy3 needs to be built using python 2
+PYTHON_COMPAT=( python2_7 pypy )
+inherit check-reqs eutils multilib multiprocessing pax-utils \
+   python-any-r1 toolchain-funcs versionator
+
+MY_P=pypy3.3-v${PV/_/-}
+
+DESCRIPTION="A fast, compliant alternative implementation of Python 3"
+HOMEPAGE="http://pypy.org/";
+SRC_URI="https://bitbucket.org/pypy/pypy/downloads/${MY_P}-src.tar.bz2";
+
+LICENSE="MIT"
+SLOT="0/$(get_version_component_range 1-2 ${PV})"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="bzip2 +jit low-memory ncurses sandbox shadowstack cpu_flags_x86_sse2"
+
+DEPEND=">=sys-libs/zlib-1.1.3
+   virtual/libffi
+   virtual/libintl
+   dev-libs/expat
+   dev-libs/openssl
+   bzip2? ( app-arch/bzip2 )
+   ncurses? ( sys-libs/ncurses[-tinfo] )
+   app-arch/xz-utils
+   low-memory? ( virtual/pypy:0 )
+   !low-memory? ( ${PYTHON_DEPS} )"
+
+S="${WORKDIR}/${MY_P}-src"
+
+pkg_pretend() {
+   if [[ ${MERGE_TYPE} != binary ]]; then
+   if use low-memory; then
+   CHECKREQS_MEMORY="1750M"
+   use amd64 && CHECKREQS_MEMORY="3500M"
+   else
+   CHECKREQS_MEMORY="3G"
+   use amd64 && CHECKREQS_MEMORY="6G"
+   fi
+   fi
+
+   check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+   local force_pypy
+
+   pkg_pretend
+
+   use low-memory && local EPYTHON
+   if has_version virtual/pypy && [[ ! ${EPYTHON} ]]; then
+   einfo "Using PyPy to perform the translation."
+   local EPYTHON=pypy
+   else
+   einfo "Using ${EPYTHON:-python2} to perform the translation. 
Please note that upstream"
+   einfo "recommends using PyPy for that. If you wish to do so, 
please install"
+   einfo "virtual/pypy and ensure that EPYTHON variable is unset."
+   fi
+
+   python-any-r1_pkg_setup
+
+   local cpu
+   if use amd64; then
+   # common denominator between Intel & AMD
+   cpu='x86-64'
+   elif use x86; then
+   i

[gentoo-commits] dev/mgorny:master commit in: dev-binpkg/pypy3/

2016-06-09 Thread Michał Górny
commit: ea07fe0c824245efc8ebf0a4c5594854a58ae357
Author: Michał Górny  gentoo  org>
AuthorDate: Thu Jun  9 15:50:52 2016 +
Commit: Michał Górny  gentoo  org>
CommitDate: Thu Jun  9 15:50:52 2016 +
URL:https://gitweb.gentoo.org/dev/mgorny.git/commit/?id=ea07fe0c

dev-binpkg/pypy3: Switch to lzip

 dev-binpkg/pypy3/pypy3-2.4.0.ebuild| 6 +++---
 dev-binpkg/pypy3/pypy3-5.2.0_alpha1.ebuild | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dev-binpkg/pypy3/pypy3-2.4.0.ebuild 
b/dev-binpkg/pypy3/pypy3-2.4.0.ebuild
index b378f4d..89a1389 100644
--- a/dev-binpkg/pypy3/pypy3-2.4.0.ebuild
+++ b/dev-binpkg/pypy3/pypy3-2.4.0.ebuild
@@ -25,7 +25,7 @@ DEPEND=">=sys-libs/zlib-1.1.3
dev-libs/openssl
bzip2? ( app-arch/bzip2 )
ncurses? ( sys-libs/ncurses[-tinfo] )
-   app-arch/xz-utils
+   app-arch/lzip
low-memory? ( virtual/pypy:0 )
!low-memory? ( ${PYTHON_DEPS} )"
 
@@ -176,7 +176,7 @@ src_install() {
chmod +x "${BIN_P}${suffix}"/pypy-c || die
 
tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die
-   xz -vz9e "${BIN_P}${suffix}.tar" || die
+   lzip -v9 "${BIN_P}${suffix}.tar" || die
 }
 
 # Yup, very hacky.
@@ -184,5 +184,5 @@ pkg_preinst() {
# integrity check.
[[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!'
mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die
-   mv "${S}"/*.tar.xz "${ROOT%/}${PYPY_BINPKG_STORE}" || die
+   mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die
 }

diff --git a/dev-binpkg/pypy3/pypy3-5.2.0_alpha1.ebuild 
b/dev-binpkg/pypy3/pypy3-5.2.0_alpha1.ebuild
index c8434bc..3c3df9d 100644
--- a/dev-binpkg/pypy3/pypy3-5.2.0_alpha1.ebuild
+++ b/dev-binpkg/pypy3/pypy3-5.2.0_alpha1.ebuild
@@ -27,7 +27,7 @@ DEPEND=">=sys-libs/zlib-1.1.3
dev-libs/openssl
bzip2? ( app-arch/bzip2 )
ncurses? ( sys-libs/ncurses[-tinfo] )
-   app-arch/xz-utils
+   app-arch/lzip
low-memory? ( virtual/pypy:0 )
!low-memory? ( ${PYTHON_DEPS} )"
 
@@ -176,7 +176,7 @@ src_install() {
chmod +x "${BIN_P}${suffix}"/pypy-c || die
 
tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die
-   xz -vz9e "${BIN_P}${suffix}.tar" || die
+   lzip -v9 "${BIN_P}${suffix}.tar" || die
 }
 
 # Yup, very hacky.
@@ -184,5 +184,5 @@ pkg_preinst() {
# integrity check.
[[ ${PYPY_BINPKG_STORE} ]] || die 'PYPY_BINPKG_STORE unset, wtf?!'
mkdir -p "${ROOT%/}${PYPY_BINPKG_STORE}" || die
-   mv "${S}"/*.tar.xz "${ROOT%/}${PYPY_BINPKG_STORE}" || die
+   mv "${S}"/*.tar.lz "${ROOT%/}${PYPY_BINPKG_STORE}" || die
 }



[gentoo-commits] dev/mgorny:master commit in: dev-binpkg/pypy3/

2016-03-02 Thread Michał Górny
commit: 71b88ba857a4101e1e1993ba62d2d0cc50aff6e5
Author: Michał Górny  gentoo  org>
AuthorDate: Wed Mar  2 16:14:18 2016 +
Commit: Michał Górny  gentoo  org>
CommitDate: Wed Mar  2 16:14:18 2016 +
URL:https://gitweb.gentoo.org/dev/mgorny.git/commit/?id=71b88ba8

dev-binpkg/pypy3: Fix sse2 flag

 dev-binpkg/pypy3/pypy3-2.4.0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev-binpkg/pypy3/pypy3-2.4.0.ebuild 
b/dev-binpkg/pypy3/pypy3-2.4.0.ebuild
index b44ac88..b378f4d 100644
--- a/dev-binpkg/pypy3/pypy3-2.4.0.ebuild
+++ b/dev-binpkg/pypy3/pypy3-2.4.0.ebuild
@@ -67,7 +67,7 @@ pkg_setup() {
# common denominator between Intel & AMD
cpu='x86-64'
elif use x86; then
-   if use sse2; then
+   if use cpu_flags_x86_sse2; then
# lowest with SSE2
cpu='pentium-m'
else



[gentoo-commits] dev/mgorny:master commit in: dev-binpkg/pypy3/, dev-binpkg/pypy3/files/, dev-python/pypy3-binpackage/, ...

2016-03-02 Thread Michał Górny
commit: 1ccca16c532cd3f8d17b2a3a29e5a9c9661749f7
Author: Michał Górny  gentoo  org>
AuthorDate: Wed Mar  2 16:01:36 2016 +
Commit: Michał Górny  gentoo  org>
CommitDate: Wed Mar  2 16:01:36 2016 +
URL:https://gitweb.gentoo.org/dev/mgorny.git/commit/?id=1ccca16c

dev-binpkg/pypy3: Update

 .../pypy3-binpackage => dev-binpkg/pypy3}/Manifest |   0
 .../pypy3}/files/2.3.1-shared-lib.patch|   0
 dev-binpkg/pypy3/files/pypy3-2.4.0-gcc-4.9.patch   |  26 +++
 dev-binpkg/pypy3/files/pypy3-2.4.0-libressl.patch  | 187 +
 .../pypy3}/metadata.xml|   0
 .../pypy3/pypy3-2.4.0.ebuild   |  38 +++--
 UnixCCompiler.runtime_library_dir_option.patch |  11 --
 .../files/1.9-scripts-location.patch   |  11 --
 8 files changed, 233 insertions(+), 40 deletions(-)

diff --git a/dev-python/pypy3-binpackage/Manifest b/dev-binpkg/pypy3/Manifest
similarity index 100%
rename from dev-python/pypy3-binpackage/Manifest
rename to dev-binpkg/pypy3/Manifest

diff --git a/dev-python/pypy3-binpackage/files/2.3.1-shared-lib.patch 
b/dev-binpkg/pypy3/files/2.3.1-shared-lib.patch
similarity index 100%
rename from dev-python/pypy3-binpackage/files/2.3.1-shared-lib.patch
rename to dev-binpkg/pypy3/files/2.3.1-shared-lib.patch

diff --git a/dev-binpkg/pypy3/files/pypy3-2.4.0-gcc-4.9.patch 
b/dev-binpkg/pypy3/files/pypy3-2.4.0-gcc-4.9.patch
new file mode 100644
index 000..dd3a688
--- /dev/null
+++ b/dev-binpkg/pypy3/files/pypy3-2.4.0-gcc-4.9.patch
@@ -0,0 +1,26 @@
+Description: Expect cmovnb and jnb
+ Fixes an FTBFS since gcc 4.9.2, which is emmiting new operations
+Author: Stefano Rivera 
+Forwarded: 
https://bitbucket.org/pypy/pypy/commits/c1abec418acf30bb04891c3249bc12cbe8f48d4a
+Bug-Debian: https://bugs.debian.org/771137
+Last-Update: 2014-11-26
+
+--- a/rpython/translator/c/gcc/trackgcroot.py
 b/rpython/translator/c/gcc/trackgcroot.py
+@@ -590,7 +590,7 @@
+ 
+ # The various cmov* operations
+ for name in '''
+-e ne g ge l le a ae b be p np s ns o no
++e ne g ge l le a ae b be nb p np s ns o no
+ '''.split():
+ locals()['visit_cmov' + name] = binary_insn
+ locals()['visit_cmov' + name + 'l'] = binary_insn
+@@ -837,6 +837,7 @@
+ visit_jb = conditional_jump
+ visit_jbe = conditional_jump
+ visit_jp = conditional_jump
++visit_jnb = conditional_jump
+ visit_jnp = conditional_jump
+ visit_js = conditional_jump
+ visit_jns = conditional_jump

diff --git a/dev-binpkg/pypy3/files/pypy3-2.4.0-libressl.patch 
b/dev-binpkg/pypy3/files/pypy3-2.4.0-libressl.patch
new file mode 100644
index 000..5852939
--- /dev/null
+++ b/dev-binpkg/pypy3/files/pypy3-2.4.0-libressl.patch
@@ -0,0 +1,187 @@
+From 66bef80988c9efe60b61c6bc05f3206b4c3df7e8 Mon Sep 17 00:00:00 2001
+From: hasufell 
+Date: Mon, 12 Oct 2015 20:43:50 +0200
+Subject: [PATCH] Add LibreSSL support, patches backported from upstream
+
+https://bitbucket.org/pypy/pypy/pull-requests/333/deal-with-platforms-without-rand_egd-take/diff
+---
+ pypy/module/_ssl/interp_ssl.py | 34 +++---
+ pypy/module/_ssl/test/test_ssl.py  |  8 +++---
+ rpython/rlib/ropenssl.py   |  6 -
+ rpython/rtyper/tool/rffi_platform.py   | 12 ++---
+ rpython/rtyper/tool/test/test_rffi_platform.py | 24 +-
+ 5 files changed, 61 insertions(+), 23 deletions(-)
+
+diff --git a/pypy/module/_ssl/interp_ssl.py b/pypy/module/_ssl/interp_ssl.py
+index 0cac165..f210167 100644
+--- a/pypy/module/_ssl/interp_ssl.py
 b/pypy/module/_ssl/interp_ssl.py
+@@ -310,20 +310,26 @@ if HAVE_OPENSSL_RAND:
+ res = libssl_RAND_status()
+ return space.wrap(res)
+ 
+-@unwrap_spec(path=str)
+-def RAND_egd(space, path):
+-"""RAND_egd(path) -> bytes
+-
+-Queries the entropy gather daemon (EGD) on socket path.  Returns 
number
+-of bytes read.  Raises socket.sslerror if connection to EGD fails or
+-if it does provide enough data to seed PRNG."""
+-with rffi.scoped_str2charp(path) as socket_path:
+-bytes = libssl_RAND_egd(socket_path)
+-if bytes == -1:
+-raise ssl_error(space,
+-"EGD connection failed or EGD did not return "
+-"enough data to seed the PRNG")
+-return space.wrap(bytes)
++if HAVE_OPENSSL_RAND_EGD:
++@unwrap_spec(path=str)
++def RAND_egd(space, path):
++"""RAND_egd(path) -> bytes
++
++Queries the entropy gather daemon (EGD) on socket path.  Returns 
number
++of bytes read.  Raises socket.sslerror if connection to EGD fails 
or
++if it does provide enough data to seed PRNG."""
++with rffi.scoped_str2charp(path) as socket_path:
++bytes = libssl_RAND_egd(socket_path)
++if bytes == -1:
++