Inkscape: Work around libpng's unhappiness.

svn path=/nixpkgs/trunk/; revision=13873
wip/yesman
Ludovic Courtès 16 years ago
parent c333a6ab6b
commit 730fe26fa0
  1. 4
      pkgs/applications/graphics/inkscape/configure-python-libs.patch
  2. 5
      pkgs/applications/graphics/inkscape/default.nix
  3. 62
      pkgs/applications/graphics/inkscape/libpng-setjmp.patch

@ -1,3 +1,7 @@
Work around Python misdetection and set `PYTHON_LIBS' to
"-L/nix/store/... -lpython2.4" instead of "/nix/store/.../libpython2.4.so".
Changed to 2.5.
--- inkscape-0.45.1/configure 2007-03-20 14:56:43.000000000 +0100
+++ inkscape-0.45.1/configure 2008-02-22 16:19:10.000000000 +0100
@@ -10202,7 +10202,7 @@ if test "x$with_python" = "xyes"; then

@ -8,10 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "0flrjqa68vnnn8lrhj86xpa6h2cyzrvjy6873v9id092f86ix1li";
};
# Work around Python misdetection and set `PYTHON_LIBS' to
# "-L/nix/store/... -lpython2.4" instead of "/nix/store/.../libpython2.4.so".
# Changed to 2.5
patches = [ ./configure-python-libs.patch ];
patches = [ ./configure-python-libs.patch ./libpng-setjmp.patch ];
propagatedBuildInputs = [
# Python is used at run-time to execute scripts, e.g., those from

@ -0,0 +1,62 @@
Include <png.h> as early as possible to make sure <setjmp.h> is not
included before it.
See http://thread.gmane.org/gmane.linux.distributions.nixos/1501 .
--- inkscape-0.46/src/sp-image.cpp 2008-03-11 05:19:56.000000000 +0100
+++ inkscape-0.46/src/sp-image.cpp 2009-01-26 15:34:33.000000000 +0100
@@ -17,6 +17,8 @@
# include "config.h"
#endif
+#include <png.h>
+
#include <cstring>
#include <string>
#include <libnr/nr-matrix-fns.h>
@@ -41,7 +43,6 @@
#include "libnr/nr-matrix-fns.h"
#include "io/sys.h"
-#include <png.h>
#if ENABLE_LCMS
#include "color-profile-fns.h"
#include "color-profile.h"
--- inkscape-0.46/src/dialogs/export.cpp 2008-03-11 05:19:54.000000000 +0100
+++ inkscape-0.46/src/dialogs/export.cpp 2009-01-26 17:01:13.000000000 +0100
@@ -20,6 +20,7 @@
# include "config.h"
#endif
+#include <png.h>
#include <gtk/gtk.h>
#include <gtkmm/box.h>
#include <gtkmm/buttonbox.h>
@@ -60,7 +61,6 @@
#include "io/sys.h"
#include "helper/png-write.h"
-#include <png.h>
#define SP_EXPORT_MIN_SIZE 1.0
--- inkscape-0.46/src/main.cpp 2008-03-11 05:20:50.000000000 +0100
+++ inkscape-0.46/src/main.cpp 2009-01-26 17:57:12.000000000 +0100
@@ -26,6 +26,7 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
+#include <png.h>
#include "path-prefix.h"
#include <gtk/gtkmessagedialog.h>
@@ -111,7 +112,6 @@ using Inkscape::Extension::Internal::Pri
#include "main-cmdlineact.h"
-#include <png.h>
#include <errno.h>
enum {
Loading…
Cancel
Save