1{ stdenv, fetchurl, freetype, fontconfig, libunwind, libtool, flex, bison }:
2
3stdenv.mkDerivation {
4 name = "ttf-mkfontdir-3.0.9-6";
5
6 src = fetchurl {
7 url = http://mirror.fsf.org/trisquel/pool/main/t/ttmkfdir/ttmkfdir_3.0.9.orig.tar.gz;
8 sha256 = "0n6bmmndmp4c1myisvv7cby559gzgvwsw4rfw065a3f92m87jxiq";
9 };
10
11 # all the patches up from ttmkfdir-3.0.9/Makefile should be reviewed by someone
12 # who knows more about C/C++ ..
13 patches =
14 [ (fetchurl {
15 url = http://mirror.fsf.org/trisquel/pool/main/t/ttmkfdir/ttmkfdir_3.0.9-6.diff.gz;
16 sha256 = "141kxaf2by8nf87hqyszaxi0n7nnmswr1nh2i5r5bsvxxmaj9633";
17 })
18
19 ./cstring.patch # also fixes some other compilation issues (freetype includes)
20 ];
21
22 preInstall = ''
23 mkdir -p $out; makeFlags="DESTDIR=$out BINDIR=/bin"
24 '';
25
26 buildInputs = [freetype fontconfig libunwind libtool flex bison];
27
28 meta = {
29 description = "Create fonts.dir for TTF font directory";
30 };
31}