From 1488f51f4b3a6fbf59429fd8bdbb69831aaccf12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Sun, 11 Nov 2018 20:01:54 -0200 Subject: [PATCH 1/2] libjpeg-turbo: 1.5.3 -> 2.0.1 --- .../libraries/libjpeg-turbo/default.nix | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/pkgs/development/libraries/libjpeg-turbo/default.nix b/pkgs/development/libraries/libjpeg-turbo/default.nix index 84c6c96ea5de..826fd81a38a6 100644 --- a/pkgs/development/libraries/libjpeg-turbo/default.nix +++ b/pkgs/development/libraries/libjpeg-turbo/default.nix @@ -1,14 +1,13 @@ -{ stdenv, fetchurl, nasm -}: +{ stdenv, fetchurl, cmake, nasm }: stdenv.mkDerivation rec { name = "libjpeg-turbo-${version}"; - version = "1.5.3"; + version = "2.0.1"; src = fetchurl { url = "mirror://sourceforge/libjpeg-turbo/${name}.tar.gz"; - sha256 = "08r5b5mywwrxv4axvq80dm31cklz81grczlzlxr2xqa6pgi90j5j"; - }; # github releases still need autotools, surprisingly + sha256 = "1zv6z093l3x3jzygvni7b819j7xhn6d63jhcdrckj7fz67n6ry75"; + }; patches = stdenv.lib.optional (stdenv.hostPlatform.libc or null == "msvcrt") @@ -16,12 +15,21 @@ stdenv.mkDerivation rec { outputs = [ "bin" "dev" "out" "man" "doc" ]; - nativeBuildInputs = [ nasm ]; + nativeBuildInputs = [ cmake nasm ]; - enableParallelBuilding = true; + preConfigure = '' + cmakeFlagsArray+=( + "-DCMAKE_INSTALL_BINDIR=$bin/bin" + "-DWITH_JPEG8=1" + "-DWITH_JPEG9=1" + ) + ''; doCheck = true; # not cross; checkTarget = "test"; + preCheck = '' + export LD_LIBRARY_PATH="$NIX_BUILD_TOP/${name}:$LD_LIBRARY_PATH" + ''; meta = with stdenv.lib; { homepage = http://libjpeg-turbo.virtualgl.org/; From dd69374a63a9ea57b1fbe1d464bb3757e00bc139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Fri, 23 Nov 2018 15:47:06 +0100 Subject: [PATCH 2/2] libjpeg-turbo: don't change ABI, don't add *.a (refers to the parent commit) --- pkgs/development/libraries/libjpeg-turbo/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libjpeg-turbo/default.nix b/pkgs/development/libraries/libjpeg-turbo/default.nix index 826fd81a38a6..4e654168d4b4 100644 --- a/pkgs/development/libraries/libjpeg-turbo/default.nix +++ b/pkgs/development/libraries/libjpeg-turbo/default.nix @@ -20,8 +20,7 @@ stdenv.mkDerivation rec { preConfigure = '' cmakeFlagsArray+=( "-DCMAKE_INSTALL_BINDIR=$bin/bin" - "-DWITH_JPEG8=1" - "-DWITH_JPEG9=1" + "-DENABLE_STATIC=0" ) '';