Skip to content

Commit

Permalink
jhead: 3.03 -> 3.04
Browse files Browse the repository at this point in the history
(cherry picked from commit 7395b11)
  • Loading branch information
rycee committed Jun 19, 2020
1 parent 48a6a8b commit 8b38149
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions pkgs/tools/graphics/jhead/default.nix
Expand Up @@ -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"
'';

Expand Down

0 comments on commit 8b38149

Please sign in to comment.