git.iko.soy/typeable/nixpkgs
on master help sign in
libAfterImage: unvendor dependencies
commit68cfba1ac6985faa78c362adf78dec240ae692ee authorDmitry Kalinkin <dmitry.kalinkin@gmail.com> dateWed 19 May 2021, 02:25 (6 years ago) parent5b4915f
1 file changed+45−2
pkgs/development/libraries/libAfterImage/default.nix+45−2
pkgs/development/libraries/libAfterImage/default.nix+45−2
@@ -1,4 +1,4 @@
1−{ lib, stdenv, fetchurl, zlib }:
1+{ lib, stdenv, fetchurl, fetchpatch, autoreconfHook, giflib, libjpeg, libpng, zlib }:
22
33stdenv.mkDerivation {
44 pname = "libAfterImage";
@@ -13,7 +13,50 @@ stdenv.mkDerivation {
1313 sha256 = "0n74rxidwig3yhr6fzxsk7y19n1nq1f296lzrvgj5pfiyi9k48vf";
1414 };
1515
16− buildInputs = [ zlib ];
16+ patches = [
17+ # add back --with-gif option
18+ (fetchpatch {
19+ name = "libafterimage-gif.patch";
20+ url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-gif.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4";
21+ sha256 = "16pa94wlqpd7h6mzs4f0qm794yk1xczrwsgf93kdd3g0zbjq3rnr";
22+ })
23+
24+ # fix build with newer giflib
25+ (fetchpatch {
26+ name = "libafterimage-giflib5-v2.patch";
27+ url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-giflib5-v2.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4";
28+ sha256 = "0qwydqy9bm73cg5n3vm97aj4jfi70p7fxqmfbi54vi78z593brln";
29+ stripLen = 1;
30+ })
31+
32+ # fix build with newer libpng
33+ (fetchpatch {
34+ name = "libafterimage-libpng15.patch";
35+ url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-libpng15.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4";
36+ sha256 = "1qyvf7786hayasfnnilfbri3p99cfz5wjpbli3gdqj2cvk6mpydv";
37+ })
38+
39+ # fix an ldconfig problem
40+ (fetchpatch {
41+ name = "libafterimage-makefile.patch";
42+ url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/libafterimage/files/libafterimage-makefile.in.patch?id=4aa4fca00611b0b3a4007870da43cc5fd63f76c4";
43+ sha256 = "1n6fniz6dldms615046yhc4mlg9gb53y4yfia8wfz6szgq5zicj4";
44+ })
45+ ];
46+ patchFlags = [ "-p0" ];
47+
48+ nativeBuildInputs = [ autoreconfHook ];
49+ buildInputs = [ giflib libjpeg libpng zlib ];
50+
51+ preConfigure = ''
52+ rm -rf {libjpeg,libpng,libungif,zlib}/
53+ substituteInPlace Makefile.in \
54+ --replace "include .depend" ""
55+ '';
56+
57+ configureFlags = [
58+ "--with-gif"
59+ ];
1760
1861 meta = with lib; {
1962 homepage = "http://www.afterstep.org/afterimage/";