nixpkgs/pkgs/development/libraries/freetype/default.nix
Eelco Dolstra 99b88cfb53 Merge remote-tracking branch 'origin/master' into multiple-outputs
Conflicts:
	pkgs/development/libraries/acl/default.nix
	pkgs/development/libraries/atk/2.6.x.nix
	pkgs/development/libraries/attr/default.nix
	pkgs/development/libraries/cairo/default.nix
	pkgs/development/libraries/freetype/default.nix
	pkgs/development/libraries/glib/2.34.x.nix
	pkgs/development/libraries/gtk+/2.24.x.nix
	pkgs/development/libraries/libtiff/default.nix
	pkgs/development/libraries/openssl/default.nix
	pkgs/development/libraries/pango/1.30.x.nix
	pkgs/misc/cups/default.nix
	pkgs/os-specific/linux/util-linux/default.nix
	pkgs/servers/x11/xorg/builder.sh
	pkgs/servers/x11/xorg/default.nix
	pkgs/top-level/all-packages.nix
2013-06-09 00:41:27 +02:00

51 lines
1.5 KiB
Nix

{ stdenv, fetchurl, gnumake
, # FreeType supports sub-pixel rendering. This is patented by
# Microsoft, so it is disabled by default. This option allows it to
# be enabled. See http://www.freetype.org/patents.html.
useEncumberedCode ? false
}:
stdenv.mkDerivation rec {
name = "freetype-2.4.10";
src = fetchurl {
url = "mirror://sourceforge/freetype/${name}.tar.bz2";
sha256 = "0bwrkqpygayfc1rf6rr1nb8l3svgn1fmjz8davg2hnf46cn293hc";
};
outputs = [ "dev" "out" ];
configureFlags = "--disable-static --bindir=$(dev)/bin";
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString useEncumberedCode
"-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING=1";
# The asm for armel is written with the 'asm' keyword.
CFLAGS = stdenv.lib.optionalString stdenv.isArm "-std=gnu99";
# FreeType requires GNU Make, which is not part of stdenv on FreeBSD.
buildInputs = stdenv.lib.optional (!stdenv.isLinux) gnumake;
enableParallelBuilding = true;
postInstall =
''
mkdir $dev/lib
mv $out/lib/pkgconfig $dev/lib/
ln -s freetype2/freetype $dev/include/freetype
'';
crossAttrs = {
# Somehow it calls the unwrapped gcc, "i686-pc-linux-gnu-gcc", instead
# of gcc. I think it's due to the unwrapped gcc being in the PATH. I don't
# know why it's on the PATH.
configureFlags = "--disable-static CC_BUILD=gcc";
};
meta = {
description = "A font rendering engine";
homepage = http://www.freetype.org/;
license = "GPLv2+"; # or the FreeType License (BSD + advertising clause)
};
}