pygame: preConfigure fix

Upstream moved build scripts to buildconfig folder and added some checks
for SDL locations. This breaks `sed` expression that was replacing library
paths. Fixes #60893
This commit is contained in:
Dmitry Olyenyov 2019-05-03 23:30:04 +03:00 committed by Frederik Rietdijk
parent ebf4a5a600
commit 4e6676f27d

View File

@ -25,18 +25,19 @@ buildPythonPackage rec {
preConfigure = '' preConfigure = ''
sed \ sed \
-e "s/^origincdirs = .*/origincdirs = []/" \ -e "s/origincdirs = .*/origincdirs = []/" \
-e "s/^origlibdirs = .*/origlibdirs = []/" \ -e "s/origlibdirs = .*/origlibdirs = []/" \
-e "/'\/lib\/i386-linux-gnu', '\/lib\/x86_64-linux-gnu']/d" \
-e "/\/include\/smpeg/d" \ -e "/\/include\/smpeg/d" \
-i config_unix.py -i buildconfig/config_unix.py
${lib.concatMapStrings (dep: '' ${lib.concatMapStrings (dep: ''
sed \ sed \
-e "/^origincdirs =/aorigincdirs += ['${lib.getDev dep}/include']" \ -e "/origincdirs =/a\ origincdirs += ['${lib.getDev dep}/include']" \
-e "/^origlibdirs =/aoriglibdirs += ['${lib.getLib dep}/lib']" \ -e "/origlibdirs =/a\ origlibdirs += ['${lib.getLib dep}/lib']" \
-i config_unix.py -i buildconfig/config_unix.py
'') buildInputs '') buildInputs
} }
LOCALBASE=/ ${python.interpreter} config.py LOCALBASE=/ ${python.interpreter} buildconfig/config.py
''; '';
meta = with lib; { meta = with lib; {