diff options
Diffstat (limited to 'pkgs/development/libraries/freetype/default.nix')
-rw-r--r-- | pkgs/development/libraries/freetype/default.nix | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index 8f16f85cabf7..3fccce02def4 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -1,6 +1,6 @@ { stdenv, lib, fetchurl, copyPathsToStore , hostPlatform -, pkgconfig, which +, pkgconfig, which, makeWrapper , zlib, bzip2, libpng, gnumake, glib , # FreeType supports LCD filtering (colloquially referred to as sub-pixel rendering). @@ -11,10 +11,10 @@ let inherit (stdenv.lib) optional optionals optionalString; - version = "2.7.1"; name = "freetype-" + version; -in stdenv.mkDerivation { - inherit name; +in stdenv.mkDerivation rec { + name = "freetype-${version}"; + version = "2.9"; meta = with stdenv.lib; { description = "A font rendering engine"; @@ -33,24 +33,17 @@ in stdenv.mkDerivation { src = fetchurl { url = "mirror://savannah/freetype/${name}.tar.bz2"; - sha256 = "121gm15ayfg3rglby8ifh8384mcjb9dhmx9j40zl7yszw72b4frs"; + sha256 = "12jcdz1in20yaa55izxalg3hm1pf7nydfrzps5bzb4zgihybmzz6"; }; propagatedBuildInputs = [ zlib bzip2 libpng ]; # needed when linking against freetype # dependence on harfbuzz is looser than the reverse dependence - nativeBuildInputs = [ pkgconfig which ] + nativeBuildInputs = [ pkgconfig which makeWrapper ] # FreeType requires GNU Make, which is not part of stdenv on FreeBSD. ++ optional (!stdenv.isLinux) gnumake; patches = - [ - ./pcf-introduce-driver.patch - ./pcf-config-long-family-names.patch - ./disable-pcf-long-family-names.patch - ./enable-table-validation.patch - # remove the two CVE patches after updating to >= 2.8 - ./cve-2017-8105.patch - ./cve-2017-8287.patch + [ ./enable-table-validation.patch ] ++ optional useEncumberedCode ./enable-subpixel-rendering.patch; @@ -65,7 +58,10 @@ in stdenv.mkDerivation { doCheck = true; - postInstall = glib.flattenInclude; + postInstall = glib.flattenInclude + '' + wrapProgram "$dev/bin/freetype-config" \ + --set PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$dev/lib/pkgconfig" + ''; crossAttrs = stdenv.lib.optionalAttrs (hostPlatform.libc or null != "msvcrt") { # Somehow it calls the unwrapped gcc, "i686-pc-linux-gnu-gcc", instead |