SDL_ttf: adopt, add patch to fix onscripter-en

+21 -6
+21 -6
pkgs/development/libraries/SDL_ttf/default.nix
··· 1 - { stdenv, fetchurl, SDL, freetype }: 1 + { stdenv, fetchurl, fetchpatch, SDL, freetype }: 2 2 3 - stdenv.mkDerivation { 4 - name = "SDL_ttf-2.0.11"; 3 + stdenv.mkDerivation rec { 4 + name = "SDL_ttf-${version}"; 5 + version = "2.0.11"; 5 6 6 7 src = fetchurl { 7 - url = http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.11.tar.gz; 8 + url = "http://www.libsdl.org/projects/SDL_ttf/release/${name}.tar.gz"; 8 9 sha256 = "1dydxd4f5kb1288i5n5568kdk2q7f8mqjr7i7sd33nplxjaxhk3j"; 9 10 }; 10 11 11 - buildInputs = [SDL freetype]; 12 + patches = [ 13 + # Bug #830: TTF_RenderGlyph_Shaded is broken 14 + (fetchpatch { 15 + url = "https://bugzilla-attachments.libsdl.org/attachment.cgi?id=830"; 16 + sha256 = "0cfznfzg1hs10wl349z9n8chw80i5adl3iwhq4y102g0xrjyb72d"; 17 + }) 18 + ]; 19 + 20 + patchFlags = [ "-p0" ]; 21 + 22 + buildInputs = [ SDL freetype ]; 12 23 13 24 postInstall = "ln -s $out/include/SDL/SDL_ttf.h $out/include/"; 14 25 15 - meta = { 26 + meta = with stdenv.lib; { 16 27 description = "SDL TrueType library"; 28 + license = licenses.zlib; 29 + platforms = platforms.all; 30 + homepage = https://www.libsdl.org/projects/SDL_ttf/release-1.2.html; 31 + maintainers = with maintainers; [ abbradar ]; 17 32 }; 18 33 }