From 730fe26fa002e34451d1c4a99a2e38e860f81033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 26 Jan 2009 18:51:52 +0000 Subject: [PATCH] Inkscape: Work around libpng's unhappiness. svn path=/nixpkgs/trunk/; revision=13873 --- .../inkscape/configure-python-libs.patch | 4 ++ .../graphics/inkscape/default.nix | 5 +- .../graphics/inkscape/libpng-setjmp.patch | 62 +++++++++++++++++++ 3 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 pkgs/applications/graphics/inkscape/libpng-setjmp.patch diff --git a/pkgs/applications/graphics/inkscape/configure-python-libs.patch b/pkgs/applications/graphics/inkscape/configure-python-libs.patch index 840f15a4032..c79006d3320 100644 --- a/pkgs/applications/graphics/inkscape/configure-python-libs.patch +++ b/pkgs/applications/graphics/inkscape/configure-python-libs.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 diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix index 1f8bff4db9b..33defc0bea4 100644 --- a/pkgs/applications/graphics/inkscape/default.nix +++ b/pkgs/applications/graphics/inkscape/default.nix @@ -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 diff --git a/pkgs/applications/graphics/inkscape/libpng-setjmp.patch b/pkgs/applications/graphics/inkscape/libpng-setjmp.patch new file mode 100644 index 00000000000..623e891b24b --- /dev/null +++ b/pkgs/applications/graphics/inkscape/libpng-setjmp.patch @@ -0,0 +1,62 @@ +Include as early as possible to make sure 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 ++ + #include + #include + #include +@@ -41,7 +43,6 @@ + #include "libnr/nr-matrix-fns.h" + + #include "io/sys.h" +-#include + #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 + #include + #include + #include +@@ -60,7 +61,6 @@ + #include "io/sys.h" + + #include "helper/png-write.h" +-#include + + + #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 + #include "path-prefix.h" + + #include +@@ -111,7 +112,6 @@ using Inkscape::Extension::Internal::Pri + + #include "main-cmdlineact.h" + +-#include + #include + + enum {