libzip: 1.3.0 -> 1.5.2

+ fix pkgconfig paths
(#68044)
This commit is contained in:
Ben Wolsieffer 2019-11-13 15:58:39 -05:00 committed by Renaud
parent f0f1e12a1c
commit a72ba67852

View File

@ -1,37 +1,31 @@
{ stdenv, fetchurl, perl, zlib }: { stdenv, fetchurl, cmake, perl, zlib }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libzip"; pname = "libzip";
version = "1.3.0"; version = "1.5.2";
src = fetchurl { src = fetchurl {
url = "https://www.nih.at/libzip/${pname}-${version}.tar.gz"; url = "https://www.nih.at/libzip/${pname}-${version}.tar.gz";
sha256 = "1633dvjc08zwwhzqhnv62rjf1abx8y5njmm8y16ik9iwd07ka6d9"; sha256 = "05ay8cbm882br0ir2cmzrvdq8q5mr1bnf53l4305xzigpd54lsdy";
}; };
# Fix pkgconfig file paths
postPatch = '' postPatch = ''
patchShebangs test-driver sed -i CMakeLists.txt \
patchShebangs man/handle_links -e 's#\\''${exec_prefix}/''${CMAKE_INSTALL_LIBDIR}#''${CMAKE_INSTALL_FULL_LIBDIR}#' \
-e 's#\\''${prefix}/''${CMAKE_INSTALL_INCLUDEDIR}#''${CMAKE_INSTALL_FULL_INCLUDEDIR}#'
''; '';
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
nativeBuildInputs = [ perl ]; nativeBuildInputs = [ cmake perl ];
propagatedBuildInputs = [ zlib ]; propagatedBuildInputs = [ zlib ];
preCheck = '' preCheck = ''
# regress/runtests is a generated file # regress/runtest is a generated file
patchShebangs regress patchShebangs regress
''; '';
# At least mysqlWorkbench cannot find zipconf.h; I think also openoffice
# had this same problem. This links it somewhere that mysqlworkbench looks.
postInstall = ''
mkdir -p $dev/lib
mv $out/lib/libzip $dev/lib/libzip
( cd $dev/include ; ln -s ../lib/libzip/include/zipconf.h zipconf.h )
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://www.nih.at/libzip; homepage = https://www.nih.at/libzip;
description = "A C library for reading, creating and modifying zip archives"; description = "A C library for reading, creating and modifying zip archives";