jhead: 3.03 -> 3.04

This commit is contained in:
Robert Helgesson 2020-06-19 21:32:59 +02:00
parent 619f370777
commit 7395b11cd4
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89

View File

@ -2,34 +2,27 @@
stdenv.mkDerivation rec {
pname = "jhead";
version = "3.03";
version = "3.04";
src = fetchurl {
url = "http://www.sentex.net/~mwandel/jhead/${pname}-${version}.tar.gz";
sha256 = "1hn0yqcicq3qa20h1g313l1a671r8mccpb9gz0w1056r500lw6c2";
sha256 = "1j831bqw1qpkbchdriwcy3sgzvbagaj45wlc124fs9bc9z7vp2gg";
};
patches = [
(fetchpatch {
name = "CVE-2019-1010301.patch";
url = "https://sources.debian.org/data/main/j/jhead/1:3.03-3/debian/patches/36_CVE-2019-1010301";
sha256 = "1vvrg50z5y7sjhfi973wh1q1v79sqp7hk5d4z0dlnx3fqgkjrx7q";
})
(fetchpatch {
name = "CVE-2019-1010302.patch";
url = "https://sources.debian.org/data/main/j/jhead/1:3.03-3/debian/patches/37_CVE-2019-1010302";
sha256 = "1h11mpsi7hpwbi8kpnkjwn6zpqf88f132h0rsg8sggcs3vva2x8y";
url = "https://sources.debian.org/data/main/j/jhead/1:3.04-2/debian/patches/01_gpsinfo.c";
sha256 = "0r8hdbfrdxip4dwz5wqsv47a29j33cx7w5zx4jdhp5l1ihg003lz";
})
];
buildInputs = [ libjpeg ];
patchPhase = ''
substituteInPlace makefile \
--replace /usr/local/bin $out/bin
makeFlags = [ "CPPFLAGS=" "CFLAGS=-O3" "LDFLAGS=" ];
patchPhase = ''
sed -i '/dpkg-buildflags/d' makefile
substituteInPlace jhead.c \
--replace "\" Compiled: \"__DATE__" "" \
--replace "jpegtran -trim" "${libjpeg.bin}/bin/jpegtran -trim"
'';