From f8bdd7969d1af9b1f4ab5f968fae336190c1ae1c Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Mon, 9 May 2016 14:56:41 +0200 Subject: [PATCH] gd: 2.0.35 -> 2.1.1 Upstream claims 2.1 is fully API compatible with 2.0 https://libgd.github.io/release-2.1.0.html https://libgd.github.io/release-2.1.1.html Also includes meta updates, adds pkg-config to the build environment, for proper detection of dependencies, and adds optional support for tiff and xpm image formats. --- pkgs/development/libraries/gd/default.nix | 35 ++++++++++++++--------- pkgs/top-level/all-packages.nix | 5 +++- 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/pkgs/development/libraries/gd/default.nix b/pkgs/development/libraries/gd/default.nix index 7c3c53626b5d..c58bd11bc645 100644 --- a/pkgs/development/libraries/gd/default.nix +++ b/pkgs/development/libraries/gd/default.nix @@ -1,21 +1,30 @@ -{stdenv, fetchurl, zlib, libpng, freetype, libjpeg, fontconfig}: +{ stdenv, fetchurl +, pkgconfig +, zlib +, libjpeg +, libpng +, libtiff ? null +, libXpm ? null +, fontconfig +, freetype +}: -stdenv.mkDerivation { - name = "gd-2.0.35"; +stdenv.mkDerivation rec { + name = "gd-${version}"; + version = "2.1.1"; src = fetchurl { - url = http://www.libgd.org/releases/gd-2.0.35.tar.bz2; - sha256 = "1y80lcmb8qbzf0a28841zxhq9ndfapmh2fsrqfd9lalxfj8288mz"; + url = "https://github.com/libgd/libgd/releases/download/${name}/libgd-${version}.tar.xz"; + sha256 = "11djy9flzxczphigqgp7fbbblbq35gqwwhn9xfcckawlapa1xnls"; }; - - buildInputs = [zlib libpng freetype]; - propagatedBuildInputs = [libjpeg fontconfig]; # urgh + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ zlib fontconfig freetype libjpeg libpng libtiff libXpm ]; - configureFlags = "--without-x"; - - meta = { - homepage = http://www.libgd.org/; - description = "An open source code library for the dynamic creation of images by programmers"; + meta = with stdenv.lib; { + homepage = https://libgd.github.io/; + description = "A dynamic image creation library"; + license = licenses.free; # some custom license + platforms = platforms.unix; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 690dab41d413..7908a6381f91 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6963,7 +6963,10 @@ in gettext = callPackage ../development/libraries/gettext { }; - gd = callPackage ../development/libraries/gd { }; + gd = callPackage ../development/libraries/gd { + libtiff = null; + libXpm = null; + }; gdal = callPackage ../development/libraries/gdal { };