nixpkgs/pkgs/development/libraries/fontconfig/default.nix
Lluís Batlle i Rossell ca5d91aa60 Made more libraries cross compile. fontconfig, libxcb, bzip2, libdrm, zlib...
I was trying to cross compile SDL. Many dependencies work, but I ended seeing
libX11 not ready for cross compilation. Other xorg libraries cross-compile
well. libX11 may need a small patch. The problem is the usual "configure test
cannot be run in cross compilation", so the configure script halts.

I made the pkgconfig expression always return buildDrv, as I think it rarely
will be needed as buildInput. So to avoid rewriting all its mentions to use
it as buildNativeInput, I prefered this small change.


svn path=/nixpkgs/branches/stdenv-updates/; revision=18500
2009-11-21 10:44:22 +00:00

33 lines
992 B
Nix

{stdenv, fetchurl, freetype, expat}:
stdenv.mkDerivation rec {
name = "fontconfig-2.7.3";
src = fetchurl {
url = "http://fontconfig.org/release/${name}.tar.gz";
sha256 = "0l5hjifapv4v88a204ixg6w6xly81cji2cr65znra0vbbkqvz3xs";
};
buildInputs = [freetype];
propagatedBuildInputs = [expat]; # !!! shouldn't be necessary, but otherwise pango breaks
configureFlags = "--with-confdir=/etc/fonts --with-cache-dir=/var/cache/fontconfig --disable-docs --with-default-fonts=";
crossArch = stdenv.cross.arch;
preConfigure = ''
if test -n "$crossConfig"; then
configureFlags="$configureFlags --with-arch=$crossArch";
fi
'';
# Don't try to write to /etc/fonts or /var/cache/fontconfig at install time.
installFlags = "CONFDIR=$(out)/etc/fonts RUN_FC_CACHE_TEST=false fc_cachedir=$(TMPDIR)/dummy";
meta = {
description = "A library for font customization and configuration";
homepage = http://fontconfig.org/;
license = "bsd";
};
}