djvulibre: fix build on darwin (close #931)

This commit is contained in:
Jason \"Don\" O'Conal 2013-09-07 10:09:11 +10:00 committed by Vladimír Čunát
parent ad454f3511
commit 9767a725cc
4 changed files with 32 additions and 17 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, libjpeg, libtiff, librsvg }:
{ stdenv, fetchurl, libjpeg, libtiff, librsvg, libintlOrEmpty }:
stdenv.mkDerivation rec {
name = "djvulibre-3.5.25.3";
@ -8,7 +8,9 @@ stdenv.mkDerivation rec {
sha256 = "1q5i5ha4zmj2ahjfhi8cv1rah80vm43m9ads46ji38rgvpb7x3c9";
};
buildInputs = [ libjpeg libtiff librsvg ];
buildInputs = [ libjpeg libtiff librsvg ] ++ libintlOrEmpty;
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
meta = {
description = "A library and viewer for the DJVU file format for scanned images";

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, pkgconfig, libxml2, glib}:
{ stdenv, fetchurl, pkgconfig, libxml2, glib }:
stdenv.mkDerivation rec {
name = "libcroco-0.6.6"; # 3.6.2 release
@ -7,5 +7,8 @@ stdenv.mkDerivation rec {
url = "mirror://gnome/sources/libcroco/0.6/${name}.tar.xz";
sha256 = "1nbb12420v1zacn6jwa1x4ixikkcqw66sg4j5dgs45nhygiarv3j";
};
configureFlags = stdenv.lib.optional stdenv.isDarwin "--disable-Bsymbolic";
buildInputs = [ pkgconfig libxml2 glib ];
}

View File

@ -1,6 +1,5 @@
{ fetchurl, stdenv, pkgconfig, intltool, gettext, glib, libxml2, zlib, bzip2
, python, gdk_pixbuf, libiconvOrEmpty
}:
, python, gdk_pixbuf, libiconvOrEmpty, libintlOrEmpty }:
with { inherit (stdenv.lib) optionals; };
@ -8,28 +7,32 @@ stdenv.mkDerivation rec {
name = "libgsf-1.14.26";
src = fetchurl {
url = "mirror://gnome/sources/libgsf/1.14/${name}.tar.xz";
url = "mirror://gnome/sources/libgsf/1.14/${name}.tar.xz";
sha256 = "1md67l60li7rkma9m6mwchqz6b6q4xsfr38c6n056y6xm8jyf6c9";
};
nativeBuildInputs = [ pkgconfig intltool ];
buildInputs = [ gettext bzip2 zlib python ];
propagatedBuildInputs = [ libxml2 glib gdk_pixbuf ] ++ libiconvOrEmpty;
propagatedBuildInputs = [ libxml2 glib gdk_pixbuf ]
++ libiconvOrEmpty
++ libintlOrEmpty;
doCheck = true;
meta = {
homepage = http://www.gnome.org/projects/libgsf;
license = "LGPLv2";
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
meta = with stdenv.lib; {
description = "GNOME's Structured File Library";
homepage = http://www.gnome.org/projects/libgsf;
license = licenses.lgpl2Plus;
maintainers = with maintainers; [ lovek323 ];
platforms = stdenv.lib.platforms.unix;
longDescription = ''
Libgsf aims to provide an efficient extensible I/O abstraction for
dealing with different structured file formats.
'';
maintainers = [ ];
platforms = stdenv.lib.platforms.linux;
};
}

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, glib, gdk_pixbuf, pango, cairo
, libxml2, libgsf, bzip2, libcroco
{ stdenv, fetchurl, pkgconfig, glib, gdk_pixbuf, pango, cairo, libxml2, libgsf
, bzip2, libcroco
, gtk2 ? null, gtk3 ? null
, gobjectIntrospection ? null, enableIntrospection ? false }:
@ -9,15 +9,22 @@ stdenv.mkDerivation rec {
name = "librsvg-2.36.4";
src = fetchurl {
url = "mirror://gnome/sources/librsvg/2.36/${name}.tar.xz";
url = "mirror://gnome/sources/librsvg/2.36/${name}.tar.xz";
sha256 = "1hp6325gdkzx8yqn2d2r915ak3k6hfshjjh0sc54z3vr0i99688h";
};
buildInputs = [ libxml2 libgsf bzip2 libcroco pango cairo ]
++ stdenv.lib.optional enableIntrospection [ gobjectIntrospection ];
propagatedBuildInputs = [ glib gdk_pixbuf gtk2 gtk3 ];
nativeBuildInputs = [ pkgconfig ];
configureFlags = ["--enable-introspection=auto"];
configureFlags = [ "--enable-introspection=auto" ]
++ stdenv.lib.optional stdenv.isDarwin "--disable-Bsymbolic";
NIX_CFLAGS_COMPILE
= stdenv.lib.optionalString stdenv.isDarwin "-I${cairo}/include/cairo";
# It wants to add loaders and update the loaders.cache in gdk-pixbuf
# Patching the Makefiles to it creates rsvg specific loaders and the