freetype: re-add infinality patches

archfan has updated those patches for the new version.

+20 -5
+1 -1
nixos/modules/config/fonts/fontconfig-ultimate.nix
··· 104 ultimate = { 105 enable = mkOption { 106 type = types.bool; 107 - default = false; 108 description = '' 109 Enable fontconfig-ultimate settings (formerly known as 110 Infinality). Besides the customizable settings in this NixOS
··· 104 ultimate = { 105 enable = mkOption { 106 type = types.bool; 107 + default = true; 108 description = '' 109 Enable fontconfig-ultimate settings (formerly known as 110 Infinality). Besides the customizable settings in this NixOS
+1 -1
pkgs/development/compilers/openjdk/8.nix
··· 2 , alsaLib, bootjdk, cacert, perl, liberation_ttf, fontconfig, zlib 3 , setJavaClassPath 4 , minimal ? false 5 - , enableInfinality ? false # font rendering patch 6 }: 7 8 let
··· 2 , alsaLib, bootjdk, cacert, perl, liberation_ttf, fontconfig, zlib 3 , setJavaClassPath 4 , minimal ? false 5 + , enableInfinality ? true # font rendering patch 6 }: 7 8 let
+18 -3
pkgs/development/libraries/freetype/default.nix
··· 1 - { stdenv, fetchurl, fetchpatch, pkgconfig, which, zlib, bzip2, libpng, gnumake 2 , glib /* passthru only */ 3 4 # FreeType supports sub-pixel rendering. This is patented by 5 # Microsoft, so it is disabled by default. This option allows it to 6 # be enabled. See http://www.freetype.org/patents.html. 7 , useEncumberedCode ? true 8 }: 9 10 let 11 version = "2.6.5"; 12 in 13 with { inherit (stdenv.lib) optional optionals optionalString; }; 14 stdenv.mkDerivation rec { ··· 26 url = "http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/plain/freetype-2.2.1-enable-valid.patch?id=9a81147af83b1166a5f301e379f85927cc610990"; 27 sha256 = "0zkgqhws2s0j8ywksclf391iijhidb1a406zszd7xbdjn28kmj2l"; 28 }) 29 - ] ++ optionals (useEncumberedCode) [ 30 # Patch to enable subpixel rendering. 31 # See https://www.freetype.org/freetype2/docs/reference/ft2-lcd_filtering.html. 32 (fetchurl { ··· 36 }) 37 ]; 38 39 outputs = [ "dev" "out" ]; 40 41 propagatedBuildInputs = [ zlib bzip2 libpng ]; # needed when linking against freetype ··· 44 # FreeType requires GNU Make, which is not part of stdenv on FreeBSD. 45 ++ optional (!stdenv.isLinux) gnumake; 46 47 - configureFlags = "--disable-static --bindir=$(dev)/bin"; 48 49 # The asm for armel is written with the 'asm' keyword. 50 CFLAGS = optionalString stdenv.isArm "-std=gnu99";
··· 1 + { stdenv, fetchurl, fetchFromGitHub, pkgconfig, which, zlib, bzip2, libpng, gnumake 2 , glib /* passthru only */ 3 4 # FreeType supports sub-pixel rendering. This is patented by 5 # Microsoft, so it is disabled by default. This option allows it to 6 # be enabled. See http://www.freetype.org/patents.html. 7 , useEncumberedCode ? true 8 + , useInfinality ? true 9 }: 10 11 + assert useInfinality -> useEncumberedCode; 12 + 13 let 14 version = "2.6.5"; 15 + 16 + infinality = fetchFromGitHub { 17 + owner = "archfan"; 18 + repo = "infinality_bundle"; 19 + rev = "5c0949a477bf43d2ac4e57b4fc39bcc3331002ee"; 20 + sha256 = "17389aqm6rlxl4b5mv1fx4b22x2v2n60hfhixfxqxpd8ialsdi6l"; 21 + }; 22 + 23 in 24 with { inherit (stdenv.lib) optional optionals optionalString; }; 25 stdenv.mkDerivation rec { ··· 37 url = "http://pkgs.fedoraproject.org/cgit/rpms/freetype.git/plain/freetype-2.2.1-enable-valid.patch?id=9a81147af83b1166a5f301e379f85927cc610990"; 38 sha256 = "0zkgqhws2s0j8ywksclf391iijhidb1a406zszd7xbdjn28kmj2l"; 39 }) 40 + ] ++ optionals (!useInfinality && useEncumberedCode) [ 41 # Patch to enable subpixel rendering. 42 # See https://www.freetype.org/freetype2/docs/reference/ft2-lcd_filtering.html. 43 (fetchurl { ··· 47 }) 48 ]; 49 50 + prePatch = optionalString useInfinality '' 51 + patches="$patches $(ls ${infinality}/*_freetype2-iu/*-infinality-*.patch)" 52 + ''; 53 + 54 outputs = [ "dev" "out" ]; 55 56 propagatedBuildInputs = [ zlib bzip2 libpng ]; # needed when linking against freetype ··· 59 # FreeType requires GNU Make, which is not part of stdenv on FreeBSD. 60 ++ optional (!stdenv.isLinux) gnumake; 61 62 + configureFlags = [ "--disable-static" "--bindir=$(dev)/bin" ]; 63 64 # The asm for armel is written with the 'asm' keyword. 65 CFLAGS = optionalString stdenv.isArm "-std=gnu99";