3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #11392 from ktosiek/closure-size

pythonPackages.pillow: fix for multiple outputs
This commit is contained in:
Domen Kožar 2015-12-02 09:22:52 +01:00
commit 0d2ac2b08c

View file

@ -13189,13 +13189,15 @@ in modules // {
++ optionals (isPyPy) [ pkgs.tk pkgs.xorg.libX11 ];
# NOTE: we use LCMS_ROOT as WEBP root since there is not other setting for webp.
preConfigure = ''
preConfigure = let
libinclude = pkg: ''"${pkg.out}/lib", "${pkg.dev}/include"'';
in ''
sed -i "setup.py" \
-e 's|^FREETYPE_ROOT =.*$|FREETYPE_ROOT = _lib_include("${pkgs.freetype}")|g ;
s|^JPEG_ROOT =.*$|JPEG_ROOT = _lib_include("${pkgs.libjpeg}")|g ;
s|^ZLIB_ROOT =.*$|ZLIB_ROOT = _lib_include("${pkgs.zlib}")|g ;
-e 's|^FREETYPE_ROOT =.*$|FREETYPE_ROOT = ${libinclude pkgs.freetype}|g ;
s|^JPEG_ROOT =.*$|JPEG_ROOT = ${libinclude pkgs.libjpeg}|g ;
s|^ZLIB_ROOT =.*$|ZLIB_ROOT = ${libinclude pkgs.zlib}|g ;
s|^LCMS_ROOT =.*$|LCMS_ROOT = _lib_include("${pkgs.libwebp}")|g ;
s|^TIFF_ROOT =.*$|TIFF_ROOT = _lib_include("${pkgs.libtiff}")|g ;
s|^TIFF_ROOT =.*$|TIFF_ROOT = ${libinclude pkgs.libtiff}|g ;
s|^TCL_ROOT=.*$|TCL_ROOT = _lib_include("${pkgs.tcl}")|g ;'
''
# Remove impurities