diff options
author | Peter Simons <simons@cryp.to> | 2012-11-11 20:16:21 +0100 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2012-11-11 20:16:21 +0100 |
commit | 3d4068b11a6f1031109b827dd4a47648536a52dd (patch) | |
tree | 9cdbb06349dfb446223ad41a35fe73fd2378a0cb | |
parent | fbd58e20b55b6de0398099c8131b7fc44d5cdff8 (diff) | |
download | nixlib-3d4068b11a6f1031109b827dd4a47648536a52dd.tar nixlib-3d4068b11a6f1031109b827dd4a47648536a52dd.tar.gz nixlib-3d4068b11a6f1031109b827dd4a47648536a52dd.tar.bz2 nixlib-3d4068b11a6f1031109b827dd4a47648536a52dd.tar.lz nixlib-3d4068b11a6f1031109b827dd4a47648536a52dd.tar.xz nixlib-3d4068b11a6f1031109b827dd4a47648536a52dd.tar.zst nixlib-3d4068b11a6f1031109b827dd4a47648536a52dd.zip |
graphviz: patch broken cdt.h header file
The cdt.h header duplicates the signatures of standard library functions memcmp() and strcpy(), but those signatures don't match the real thing when building with a C++ compiler, because they lack the no-throw declaration glibc has. Simply dropping those redundant prototypes remedies the issue.
-rw-r--r-- | pkgs/tools/graphics/graphviz/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/graphics/graphviz/fix-broken-memcp-signature.patch | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/pkgs/tools/graphics/graphviz/default.nix b/pkgs/tools/graphics/graphviz/default.nix index 4edec43e243c..db4d766b7605 100644 --- a/pkgs/tools/graphics/graphviz/default.nix +++ b/pkgs/tools/graphics/graphviz/default.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { pango gd gts ] ++ stdenv.lib.optionals (xlibs != null) [ xlibs.xlibs xlibs.libXrender ]; + patches = [ ./fix-broken-memcp-signature.patch ]; + configureFlags = [ "--with-pngincludedir=${libpng}/include" "--with-pnglibdir=${libpng}/lib" diff --git a/pkgs/tools/graphics/graphviz/fix-broken-memcp-signature.patch b/pkgs/tools/graphics/graphviz/fix-broken-memcp-signature.patch new file mode 100644 index 000000000000..e93728d4850e --- /dev/null +++ b/pkgs/tools/graphics/graphviz/fix-broken-memcp-signature.patch @@ -0,0 +1,15 @@ +diff -ubr graphviz-2.28.0-orig/lib/cdt/cdt.h graphviz-2.28.0-new/lib/cdt/cdt.h +--- graphviz-2.28.0-orig/lib/cdt/cdt.h 2012-11-11 20:05:55.674397100 +0100 ++++ graphviz-2.28.0-new/lib/cdt/cdt.h 2012-11-11 20:06:28.069511092 +0100 +@@ -238,11 +238,6 @@ + extern int dtstat _ARG_((Dt_t*, Dtstat_t*, int)); + extern unsigned int dtstrhash _ARG_((unsigned int, Void_t*, int)); + +-#if !_PACKAGE_ast +-extern int memcmp _ARG_((const Void_t*, const Void_t*, size_t)); +-extern int strcmp _ARG_((const char*, const char*)); +-#endif +- + #undef extern + _END_EXTERNS_ + |