From e36c2373af2e56f10860177ad9b2d5a1e138c774 Mon Sep 17 00:00:00 2001 From: Philippe Houdoin Date: Wed, 13 Apr 2011 18:57:08 +0000 Subject: [PATCH] After fixing a bug in gvcext.h (which is not Haiku specific), GraphViz builds fine now in shared library mode. Perl bindings is still disable, as I didn't have time and the will to test this. The default font is hardcoded to Haiku's default one. These changes could probably be backported to 2.24 too, but why maintining olded 2.24? --- media-gfx/graphviz/graphviz-2.26.3.bep | 8 ++- .../graphviz/patches/graphviz-2.26.3.patch | 53 +++++++++++++++++-- 2 files changed, 51 insertions(+), 10 deletions(-) diff --git a/media-gfx/graphviz/graphviz-2.26.3.bep b/media-gfx/graphviz/graphviz-2.26.3.bep index 17830cce1..633cb5473 100644 --- a/media-gfx/graphviz/graphviz-2.26.3.bep +++ b/media-gfx/graphviz/graphviz-2.26.3.bep @@ -1,5 +1,5 @@ -DESCRIPTION="graphviz - Open Source Graph Visualization Software." -HOMEPAGE="http://www.graphviz.org/" +DESCRIPTION="graphviz - Open Source Graph Visualization Software." +HOMEPAGE="http://www.graphviz.org/" SRC_URI="http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-2.26.3.tar.gz" CHECKSUM_MD5="6f45946fa622770c45609778c0a982ee" REVISION="1" @@ -9,15 +9,13 @@ BUILD { cd graphviz-2.26.3 libtoolize --force --copy --install autoconf - ./configure --prefix=/boot/common --disable-shared --enable-static --disable-perl CFLAGS="-O0" LDFLAGS="-L/boot/common/lib -liconv" + ./configure --prefix=/boot/common --enable-shared --disable-perl make } INSTALL { cd graphviz-2.26.3 make install - cd ${DESTDIR}/boot/common/bin - ln -s dot_static dot } LICENSE="CPL v1.0" COPYRIGHT="1994-2010 AT&T Corp." diff --git a/media-gfx/graphviz/patches/graphviz-2.26.3.patch b/media-gfx/graphviz/patches/graphviz-2.26.3.patch index e0a582001..3fcfede3b 100644 --- a/media-gfx/graphviz/patches/graphviz-2.26.3.patch +++ b/media-gfx/graphviz/patches/graphviz-2.26.3.patch @@ -4,7 +4,7 @@ diff -up graphviz-2.26.3/config.h.in.orig graphviz-2.26.3/config.h.in @@ -427,6 +427,9 @@ /* Define to 1 if you have struct dioattr */ #undef HAVE_STRUCT_DIOATTR - + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYSEXITS_H + @@ -14,13 +14,13 @@ diff -up graphviz-2.26.3/config.h.in.orig graphviz-2.26.3/config.h.in @@ -578,6 +581,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME - + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION - + diff -up graphviz-2.26.3/configure.ac.orig graphviz-2.26.3/configure.ac --- graphviz-2.26.3/configure.ac.orig 2010-01-26 09:00:29.029622272 -0700 +++ graphviz-2.26.3/configure.ac 2010-03-18 18:03:33.265289728 -0600 @@ -82,9 +82,52 @@ diff -up graphviz-2.26.3/lib/gd/gd_png.c.orig graphviz-2.26.3/lib/gd/gd_png.c @@ -150,7 +150,7 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFro return NULL; } - + - if (!png_check_sig (sig, 8)) { /* bad signature */ + if (png_sig_cmp(sig, 0, 8)) { /* bad signature */ return NULL; /* bad signature */ } - + +diff -up graphviz-2.26.3/lib/gvc/gvcext.h.orig graphviz-2.26.3/lib/gvc/gvcext.h +--- graphviz-2.26.3/lib/gvc/gvcext.h.orig 2009-07-08 17:14:20.054525952 +0200 ++++ graphviz-2.26.3/lib/gvc/gvcext.h 2011-04-13 19:38:04.150470656 +0200 +@@ -65,6 +65,9 @@ extern "C" { + + typedef struct gvplugin_available_s gvplugin_available_t; + ++#undef lt_preloaded_symbols ++#define lt_preloaded_symbols lt_GRAPHVIZ_LTX_preloaded_symbols ++ + /*visual studio*/ + #ifdef WIN32_DLL + #ifndef GVC_EXPORTS +diff -up graphviz-2.26.3/lib/vmalloc/vmhdr.h.orig graphviz-2.26.3/lib/vmalloc/vmhdr.h +--- graphviz-2.26.3/lib/vmalloc/vmhdr.h.orig 2009-06-03 03:10:55.040894464 +0200 ++++ graphviz-2.26.3/lib/vmalloc/vmhdr.h 2011-04-04 18:51:05.289931264 +0200 +@@ -54,6 +54,10 @@ extern "C" { + #include + #include "FEATURE/vmalloc" + ++#ifdef __HAIKU__ ++ #undef _hdr_malloc ++#endif ++ + #endif /*_PACKAGE_ast*/ + + #undef free +diff -up graphviz-2.26.3/lib/common/const.h.orig graphviz-2.26.3/lib/common/const.h +--- graphviz-2.26.3/lib/common/const.h.orig 2009-08-28 21:46:42.059506688 +0200 ++++ graphviz-2.26.3/lib/common/const.h 2011-02-18 18:48:44.856162304 +0100 +@@ -67,7 +67,11 @@ + #define DEFAULT_FONTSIZE 14.0 + #define DEFAULT_LABEL_FONTSIZE 11.0 /* for head/taillabel */ + #define MIN_FONTSIZE 1.0 +-#define DEFAULT_FONTNAME "Times-Roman" ++#ifdef __HAIKU__ ++ #define DEFAULT_FONTNAME "DejaVuSans" ++#else ++ #define DEFAULT_FONTNAME "Times-Roman" ++#endif + #define DEFAULT_FILL "lightgrey" + #define LINESPACING 1.20 +