Merge pull request #2532 from jwiegley/gtk

Get glib, gtk+, harfbuzz and pango working on Darwin
This commit is contained in:
Peter Simons 2014-05-23 16:37:00 +02:00
commit 07151095a7
5 changed files with 18 additions and 8 deletions

View File

@ -55,7 +55,9 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig gettext perl python ]; nativeBuildInputs = [ pkgconfig gettext perl python ];
propagatedBuildInputs = [ pcre zlib libffi ] ++ libiconvOrEmpty ++ libintlOrEmpty; propagatedBuildInputs = [ pcre zlib libffi ]
++ optional (!stdenv.isDarwin) libiconvOrEmpty
++ libintlOrEmpty;
configureFlags = configureFlags =
optional stdenv.isDarwin "--disable-compile-warnings" optional stdenv.isDarwin "--disable-compile-warnings"

View File

@ -23,14 +23,17 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = with xlibs; with stdenv.lib; propagatedBuildInputs = with xlibs; with stdenv.lib;
[ glib cairo pango gdk_pixbuf atk ] [ glib cairo pango gdk_pixbuf atk ]
++ optionals stdenv.isLinux ++ optionals (stdenv.isLinux || stdenv.isDarwin) [
[ libXrandr libXrender libXcomposite libXi libXcursor ] libXrandr libXrender libXcomposite libXi libXcursor
++ optional stdenv.isDarwin x11 ]
++ optionals stdenv.isDarwin [ x11 libXdamage ]
++ libintlOrEmpty ++ libintlOrEmpty
++ optional xineramaSupport libXinerama ++ optional xineramaSupport libXinerama
++ optionals cupsSupport [ cups ]; ++ optionals cupsSupport [ cups ];
configureFlags = "--with-xinput=yes"; configureFlags = if stdenv.isDarwin
then "--disable-glibtest --disable-introspection --disable-visibility"
else "--with-xinput=yes";
postInstall = "rm -rf $out/share/gtk-doc"; postInstall = "rm -rf $out/share/gtk-doc";

View File

@ -1,7 +1,7 @@
{ stdenv, fetchurl, pkgconfig, glib, freetype, cairo, libintlOrEmpty { stdenv, fetchurl, pkgconfig, glib, freetype, cairo, libintlOrEmpty
, icu, graphite2 , icu, graphite2
, withIcu ? false # recommended by upstream as default, but most don't needed and it's big , withIcu ? false # recommended by upstream as default, but most don't needed and it's big
, withGraphite2 ? true # it is small and major distros do include it , withGraphite2 ? !stdenv.isDarwin # it is small and major distros do include it
}: }:
# TODO: split non-icu and icu lib into different outputs? # TODO: split non-icu and icu lib into different outputs?

View File

@ -19,7 +19,12 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
doCheck = true; # jww (2014-05-05): The tests currently fail on Darwin:
#
# ERROR:testiter.c:139:iter_char_test: assertion failed: (extents.width == x1 - x0)
# .../bin/sh: line 5: 14823 Abort trap: 6 srcdir=. PANGO_RC_FILE=./pangorc ${dir}$tst
# FAIL: testiter
doCheck = !stdenv.isDarwin;
postInstall = "rm -rf $out/share/gtk-doc"; postInstall = "rm -rf $out/share/gtk-doc";
meta = { meta = {

View File

@ -10882,7 +10882,7 @@ let
libXmu libXext xextproto libSM libICE; libXmu libXext xextproto libSM libICE;
ghostscript = ghostscriptX; ghostscript = ghostscriptX;
harfbuzz = harfbuzz.override { harfbuzz = harfbuzz.override {
withIcu = true; withGraphite2 = true; withIcu = true; withGraphite2 = !stdenv.isDarwin;
}; };
}; };