2009-10-29 13:48:47 +01:00
|
|
|
{ stdenv, fetchurl
|
|
|
|
, # FreeType supports hinting using a TrueType bytecode interpreter,
|
|
|
|
# as well as sub-pixel rendering. These are patented by Apple and
|
|
|
|
# Microsoft, respectively, so they are disabled by default. This
|
|
|
|
# option allows them to be enabled. See
|
|
|
|
# http://www.freetype.org/patents.html.
|
|
|
|
useEncumberedCode ? false
|
|
|
|
}:
|
2007-02-26 17:32:27 +01:00
|
|
|
|
2009-11-08 01:32:12 +01:00
|
|
|
stdenv.mkDerivation (rec {
|
2009-10-29 13:48:47 +01:00
|
|
|
name = "freetype-2.3.11";
|
2008-03-07 16:43:43 +01:00
|
|
|
|
2003-11-06 16:24:19 +01:00
|
|
|
src = fetchurl {
|
2009-04-20 18:02:50 +02:00
|
|
|
url = "mirror://sourceforge/freetype/${name}.tar.bz2";
|
2009-10-29 13:48:47 +01:00
|
|
|
sha256 = "1j9f3q7vkdhlcxmfhkkyvxmniih2gcsb428v73mfk88qc0g3n0wa";
|
2008-03-07 16:43:43 +01:00
|
|
|
};
|
|
|
|
|
2009-04-22 09:05:50 +02:00
|
|
|
configureFlags = "--disable-static";
|
|
|
|
|
2009-10-29 13:48:47 +01:00
|
|
|
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString useEncumberedCode
|
|
|
|
"-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING=1 -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER=1";
|
|
|
|
|
2008-03-07 16:43:43 +01:00
|
|
|
meta = {
|
2008-10-08 18:56:23 +02:00
|
|
|
description = "A font rendering engine";
|
2008-03-07 16:43:43 +01:00
|
|
|
homepage = http://www.freetype.org/;
|
2009-10-29 13:48:47 +01:00
|
|
|
license = "GPLv2+"; # or the FreeType License (BSD + advertising clause)
|
2003-11-06 16:24:19 +01:00
|
|
|
};
|
2009-11-08 01:32:12 +01:00
|
|
|
} //
|
|
|
|
# The asm for armel is written with the 'asm' keyword.
|
|
|
|
(if (stdenv.system == "armv5tel-linux") then
|
|
|
|
{CFLAGS = "-std=gnu99";} else {}))
|