python-3.4: fixup with glibc-2.25 (/cc #22874)

Upstream won't support it, but let me trick the code into behaving
as if glibc was older.  It seems 3.3 branch should be unaffected.
This commit is contained in:
Vladimír Čunát 2017-02-21 17:55:26 +01:00
parent 4b7215368a
commit cab0b445be
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA

View file

@ -57,7 +57,14 @@ in stdenv.mkDerivation {
postPatch = optionalString (x11Support && (tix != null)) ''
substituteInPlace "Lib/tkinter/tix.py" --replace "os.environ.get('TIX_LIBRARY')" "os.environ.get('TIX_LIBRARY') or '${tix}/lib'"
'';
''
# Avoid picking up getentropy() from glibc >= 2.25, as that would break
# on older kernels. http://bugs.python.org/issue29157
+ optionalString stdenv.isLinux
''
substituteInPlace Python/random.c --replace 'defined(HAVE_GETENTROPY)' '0'
cat Python/random.c
'';
preConfigure = ''
for i in /usr /sw /opt /pkg; do # improve purity