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

View File

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

View File

@ -1,6 +1,5 @@
{ fetchurl, stdenv, pkgconfig, intltool, gettext, glib, libxml2, zlib, bzip2 { fetchurl, stdenv, pkgconfig, intltool, gettext, glib, libxml2, zlib, bzip2
, python, gdk_pixbuf, libiconvOrEmpty , python, gdk_pixbuf, libiconvOrEmpty, libintlOrEmpty }:
}:
with { inherit (stdenv.lib) optionals; }; with { inherit (stdenv.lib) optionals; };
@ -13,23 +12,27 @@ stdenv.mkDerivation rec {
}; };
nativeBuildInputs = [ pkgconfig intltool ]; nativeBuildInputs = [ pkgconfig intltool ];
buildInputs = [ gettext bzip2 zlib python ]; buildInputs = [ gettext bzip2 zlib python ];
propagatedBuildInputs = [ libxml2 glib gdk_pixbuf ] ++ libiconvOrEmpty; propagatedBuildInputs = [ libxml2 glib gdk_pixbuf ]
++ libiconvOrEmpty
++ libintlOrEmpty;
doCheck = true; doCheck = true;
meta = { NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-lintl";
homepage = http://www.gnome.org/projects/libgsf;
license = "LGPLv2"; meta = with stdenv.lib; {
description = "GNOME's Structured File Library"; 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 = '' longDescription = ''
Libgsf aims to provide an efficient extensible I/O abstraction for Libgsf aims to provide an efficient extensible I/O abstraction for
dealing with different structured file formats. 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 { stdenv, fetchurl, pkgconfig, glib, gdk_pixbuf, pango, cairo, libxml2, libgsf
, libxml2, libgsf, bzip2, libcroco , bzip2, libcroco
, gtk2 ? null, gtk3 ? null , gtk2 ? null, gtk3 ? null
, gobjectIntrospection ? null, enableIntrospection ? false }: , gobjectIntrospection ? null, enableIntrospection ? false }:
@ -12,12 +12,19 @@ stdenv.mkDerivation rec {
url = "mirror://gnome/sources/librsvg/2.36/${name}.tar.xz"; url = "mirror://gnome/sources/librsvg/2.36/${name}.tar.xz";
sha256 = "1hp6325gdkzx8yqn2d2r915ak3k6hfshjjh0sc54z3vr0i99688h"; sha256 = "1hp6325gdkzx8yqn2d2r915ak3k6hfshjjh0sc54z3vr0i99688h";
}; };
buildInputs = [ libxml2 libgsf bzip2 libcroco pango cairo ] buildInputs = [ libxml2 libgsf bzip2 libcroco pango cairo ]
++ stdenv.lib.optional enableIntrospection [ gobjectIntrospection ]; ++ stdenv.lib.optional enableIntrospection [ gobjectIntrospection ];
propagatedBuildInputs = [ glib gdk_pixbuf gtk2 gtk3 ]; propagatedBuildInputs = [ glib gdk_pixbuf gtk2 gtk3 ];
nativeBuildInputs = [ pkgconfig ]; 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 # It wants to add loaders and update the loaders.cache in gdk-pixbuf
# Patching the Makefiles to it creates rsvg specific loaders and the # Patching the Makefiles to it creates rsvg specific loaders and the