2022-08-12 12:06:08 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, fetchpatch
|
|
|
|
, giflib
|
|
|
|
, libX11
|
|
|
|
, libXext
|
|
|
|
, libjpeg
|
|
|
|
, libpng
|
|
|
|
, libtiff
|
|
|
|
, xorgproto
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "imlib";
|
|
|
|
version = "1.9.15";
|
2022-08-12 12:06:08 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2022-08-12 12:06:08 +00:00
|
|
|
url = "https://ftp.acc.umu.se/pub/GNOME/sources/imlib/1.9/${pname}-${version}.tar.gz";
|
|
|
|
hash = "sha256-o4mQb38hgK7w4czb5lEoIH3VkuyAbIQWYP2S+7bv8j0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "CVE-2007-3568.patch";
|
|
|
|
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/imlib/files/imlib-1.9.15-bpp16-CVE-2007-3568.patch";
|
|
|
|
sha256 = "0lxfibi094gki39sq1w4p0hcx25xlk0875agbhjkjngzx862wvbg";
|
|
|
|
})
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
# The following two patches fix the build with recent giflib.
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/imlib/files/imlib-1.9.15-giflib51-1.patch?id=c6d0ed89ad5653421f21cbf3b3d40fd9a1361828";
|
|
|
|
sha256 = "0jynlhxcyjiwnz1m8j48xwz4z5csgyg03jfjc8xgpvvcyid4m65l";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/imlib/files/imlib-1.9.15-giflib51-2.patch?id=c6d0ed89ad5653421f21cbf3b3d40fd9a1361828";
|
|
|
|
sha256 = "164x7rd992930rqllmr89p5ahfmbz37ipi8x0igd8gkvc8a4fd5x";
|
|
|
|
})
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--disable-shm"
|
|
|
|
"--x-includes=${libX11.dev}/include"
|
|
|
|
"--x-libraries=${libX11.out}/lib"
|
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
buildInputs = [
|
|
|
|
libjpeg
|
|
|
|
libXext
|
|
|
|
libX11
|
|
|
|
xorgproto
|
|
|
|
libtiff
|
|
|
|
giflib
|
|
|
|
libpng
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "An image loading and rendering library for X11";
|
|
|
|
platforms = platforms.unix;
|
2021-05-20 23:08:51 +00:00
|
|
|
license = with licenses; [ gpl2Only lgpl2Only ];
|
2022-12-17 10:02:37 +00:00
|
|
|
# never built on aarch64-darwin since first introduction in nixpkgs
|
|
|
|
broken = stdenv.isDarwin && stdenv.isAarch64;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|