libwebp: 1.2.1 -> 1.2.2

also clean up and take up maintainership
This commit is contained in:
ajs124 2022-06-29 15:28:53 +02:00
parent 13d3fc8f69
commit 51619a501f

View file

@ -5,7 +5,6 @@
, jpegSupport ? true, libjpeg # JPEG image format , jpegSupport ? true, libjpeg # JPEG image format
, tiffSupport ? true, libtiff # TIFF image format , tiffSupport ? true, libtiff # TIFF image format
, gifSupport ? true, giflib # GIF image format , gifSupport ? true, giflib # GIF image format
#, wicSupport ? true # Windows Imaging Component
, alignedSupport ? false # Force aligned memory operations , alignedSupport ? false # Force aligned memory operations
, swap16bitcspSupport ? false # Byte swap for 16bit color spaces , swap16bitcspSupport ? false # Byte swap for 16bit color spaces
, experimentalSupport ? false # Experimental code , experimentalSupport ? false # Experimental code
@ -14,55 +13,49 @@
, libwebpdecoderSupport ? true # Build libwebpdecoder , libwebpdecoderSupport ? true # Build libwebpdecoder
}: }:
let
mkFlag = optSet: flag: if optSet then "--enable-${flag}" else "--disable-${flag}";
in
with lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libwebp"; pname = "libwebp";
version = "1.2.1"; version = "1.2.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "webmproject"; owner = "webmproject";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
hash = "sha256-KrvB5d3KNmujbfekWaevz2JZrWtK3PjEG9NEzRBYIDw="; hash = "sha256-WF2HZPS7mbotk+d1oLM/JC5l/FWfkrk+T3Z6EW9oYEI=";
}; };
prePatch = "patchShebangs ."; prePatch = "patchShebangs .";
configureFlags = [ configureFlags = [
(mkFlag threadingSupport "threading") (lib.enableFeature threadingSupport "threading")
(mkFlag openglSupport "gl") (lib.enableFeature openglSupport "gl")
(mkFlag pngSupport "png") (lib.enableFeature pngSupport "png")
(mkFlag jpegSupport "jpeg") (lib.enableFeature jpegSupport "jpeg")
(mkFlag tiffSupport "tiff") (lib.enableFeature tiffSupport "tiff")
(mkFlag gifSupport "gif") (lib.enableFeature gifSupport "gif")
#(mkFlag (wicSupport && stdenv.isCygwin) "wic") (lib.enableFeature alignedSupport "aligned")
(mkFlag alignedSupport "aligned") (lib.enableFeature swap16bitcspSupport "swap-16bit-csp")
(mkFlag swap16bitcspSupport "swap-16bit-csp") (lib.enableFeature experimentalSupport "experimental")
(mkFlag experimentalSupport "experimental") (lib.enableFeature libwebpmuxSupport "libwebpmux")
(mkFlag libwebpmuxSupport "libwebpmux") (lib.enableFeature libwebpdemuxSupport "libwebpdemux")
(mkFlag libwebpdemuxSupport "libwebpdemux") (lib.enableFeature libwebpdecoderSupport "libwebpdecoder")
(mkFlag libwebpdecoderSupport "libwebpdecoder")
]; ];
nativeBuildInputs = [ autoreconfHook libtool ]; nativeBuildInputs = [ autoreconfHook libtool ];
buildInputs = [ ] buildInputs = [ ]
++ optionals openglSupport [ freeglut libGL libGLU ] ++ lib.optionals openglSupport [ freeglut libGL libGLU ]
++ optional pngSupport libpng ++ lib.optionals pngSupport [ libpng ]
++ optional jpegSupport libjpeg ++ lib.optionals jpegSupport [ libjpeg ]
++ optional tiffSupport libtiff ++ lib.optionals tiffSupport [ libtiff ]
++ optional gifSupport giflib; ++ lib.optionals gifSupport [ giflib ];
enableParallelBuilding = true; enableParallelBuilding = true;
meta = { meta = with lib; {
description = "Tools and library for the WebP image format"; description = "Tools and library for the WebP image format";
homepage = "https://developers.google.com/speed/webp/"; homepage = "https://developers.google.com/speed/webp/";
license = licenses.bsd3; license = licenses.bsd3;
platforms = platforms.all; platforms = platforms.all;
maintainers = with maintainers; [ codyopel ]; maintainers = with maintainers; [ ajs124 ];
}; };
} }