Merge pull request #123638 from veprbl/pr/libAfterImage_fixes

libAfterImage: unvendor dependencies

authored by

Dmitry Kalinkin and committed by
GitHub
145658a4 c03bb4d8

+53 -2
+53 -2
pkgs/development/libraries/libAfterImage/default.nix
··· 1 - { lib, stdenv, fetchurl, zlib }: 1 + { lib, stdenv, fetchurl, fetchpatch, autoreconfHook, giflib, libjpeg, libpng, libX11, zlib 2 + , static ? stdenv.hostPlatform.isStatic 3 + , withX ? !stdenv.isDarwin }: 2 4 3 5 stdenv.mkDerivation { 4 6 pname = "libAfterImage"; ··· 13 15 sha256 = "0n74rxidwig3yhr6fzxsk7y19n1nq1f296lzrvgj5pfiyi9k48vf"; 14 16 }; 15 17 16 - buildInputs = [ zlib ]; 18 + patches = [ 19 + # add back --with-gif option 20 + (fetchpatch { 21 + name = "libafterimage-gif.patch"; 22 + url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-gif.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4"; 23 + sha256 = "16pa94wlqpd7h6mzs4f0qm794yk1xczrwsgf93kdd3g0zbjq3rnr"; 24 + }) 25 + 26 + # fix build with newer giflib 27 + (fetchpatch { 28 + name = "libafterimage-giflib5-v2.patch"; 29 + url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-giflib5-v2.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4"; 30 + sha256 = "0qwydqy9bm73cg5n3vm97aj4jfi70p7fxqmfbi54vi78z593brln"; 31 + stripLen = 1; 32 + }) 33 + 34 + # fix build with newer libpng 35 + (fetchpatch { 36 + name = "libafterimage-libpng15.patch"; 37 + url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-libpng15.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4"; 38 + sha256 = "1qyvf7786hayasfnnilfbri3p99cfz5wjpbli3gdqj2cvk6mpydv"; 39 + }) 40 + 41 + # fix an ldconfig problem 42 + (fetchpatch { 43 + name = "libafterimage-makefile.patch"; 44 + url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-makefile.in.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4"; 45 + sha256 = "1n6fniz6dldms615046yhc4mlg9gb53y4yfia8wfz6szgq5zicj4"; 46 + }) 47 + ]; 48 + patchFlags = [ "-p0" ]; 49 + 50 + nativeBuildInputs = [ autoreconfHook ]; 51 + buildInputs = [ giflib libjpeg libpng zlib ] ++ lib.optional withX libX11; 52 + 53 + preConfigure = '' 54 + rm -rf {libjpeg,libpng,libungif,zlib}/ 55 + substituteInPlace Makefile.in \ 56 + --replace "include .depend" "" 57 + '' + lib.optionalString stdenv.isDarwin '' 58 + substituteInPlace Makefile.in \ 59 + --replace "-soname," "-install_name,$out/lib/" 60 + ''; 61 + 62 + configureFlags = [ 63 + "--with-gif" 64 + "--disable-mmx-optimization" 65 + "--${if static then "enable" else "disable"}-staticlibs" 66 + "--${if !static then "enable" else "disable"}-sharedlibs" 67 + ] ++ lib.optional withX "--with-x"; 17 68 18 69 meta = with lib; { 19 70 homepage = "http://www.afterstep.org/afterimage/";