mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 06:58:57 +02:00
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?
134 lines
5.1 KiB
Diff
134 lines
5.1 KiB
Diff
diff -up graphviz-2.26.3/config.h.in.orig graphviz-2.26.3/config.h.in
|
|
--- graphviz-2.26.3/config.h.in.orig 2010-01-26 09:01:14.030408704 -0700
|
|
+++ graphviz-2.26.3/config.h.in 2010-03-18 18:06:58.060555264 -0600
|
|
@@ -427,6 +427,9 @@
|
|
/* Define to 1 if you have struct dioattr */
|
|
#undef HAVE_STRUCT_DIOATTR
|
|
|
|
+/* Define to 1 if you have the <sysexits.h> header file. */
|
|
+#undef HAVE_SYSEXITS_H
|
|
+
|
|
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
|
*/
|
|
#undef HAVE_SYS_DIR_H
|
|
@@ -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
|
|
@@ -111,6 +111,7 @@ UWIN=no
|
|
CYGWIN=no
|
|
MINGW32=no
|
|
DARWIN9=no
|
|
+HAIKU=no
|
|
case "${host_os}" in
|
|
*uwin* )
|
|
UWIN=yes
|
|
@@ -160,6 +161,16 @@ case "${host_os}" in
|
|
BROWSER="open"
|
|
AC_DEFINE_UNQUOTED(DARWIN_DYLIB,"$DARWIN_DYLIB",[Define for Darwin-style shared library names.])
|
|
;;
|
|
+ *haiku* )
|
|
+ HAIKU=yes
|
|
+ HAIKU_SYSTEM_FONTPATH=`finddir B_SYSTEM_FONTS_DIRECTORY`
|
|
+ HAIKU_COMMON_FONTPATH=`finddir B_COMMON_FONTS_DIRECTORY`
|
|
+ HAIKU_USER_FONTPATH=`finddir B_USER_FONTS_DIRECTORY`
|
|
+ DEFAULT_FONTPATH="$HAIKU_SYSTEM_FONTPATH:$HAIKU_SYSTEM_FONTPATH/ttfonts:$HAIKU_SYSTEM_FONTPATH/psfonts:$HAIKU_COMMON_FONTPATH:$HAIKU_COMMON_FONTPATH/ttfonts:$HAIKU_COMMON_FONTPATH/psfonts:$HAIKU_USER_FONTPATH:$HAIKU_USER_FONTPATH/ttfonts:$HAIKU_USER_FONTPATH/psfonts"
|
|
+ PATHSEPARATOR=":"
|
|
+ NO_POSTSCRIPT_ALIAS=1
|
|
+ BROWSER="open"
|
|
+ ;;
|
|
* ) # This sucks! Whatever happened to standards for file system layout?
|
|
DEFAULT_FONTPATH="/usr/share/fonts/default/Type1:/usr/X11R6/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/truetype:/usr/X11R6/lib/X11/fonts/TTF:/usr/share/fonts/TrueType:/usr/share/fonts/truetype:/usr/openwin/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/Type1:/usr/common/share/fonts/ttf";
|
|
PATHSEPARATOR=":"
|
|
@@ -370,7 +381,7 @@ AC_CHECK_HEADERS(stdarg.h stddef.h stdde
|
|
errno.h time.h unistd.h fenv.h string.h strings.h inttypes.h setjmp.h \
|
|
sys/time.h sys/times.h sys/types.h sys/select.h fpu_control.h \
|
|
sys/fpu.h sys/socket.h sys/stat.h sys/mman.h \
|
|
- sys/ioctl.h sys/inotify.h langinfo.h libintl.h crt_externs.h)
|
|
+ sys/ioctl.h sys/inotify.h langinfo.h libintl.h crt_externs.h sysexits.h)
|
|
AC_HEADER_TIME
|
|
AC_HEADER_DIRENT
|
|
AC_HEADER_STDBOOL
|
|
diff -up graphviz-2.26.3/contrib/diffimg/diffimg.c.orig graphviz-2.26.3/contrib/diffimg/diffimg.c
|
|
--- graphviz-2.26.3/contrib/diffimg/diffimg.c.orig 2009-06-02 19:10:49.038797312 -0600
|
|
+++ graphviz-2.26.3/contrib/diffimg/diffimg.c 2010-03-18 18:03:33.270270464 -0600
|
|
@@ -47,7 +47,14 @@
|
|
#define bool int
|
|
#define false 0
|
|
#else
|
|
+#if defined HAVE_SYSEXITS_H
|
|
#include <sysexits.h>
|
|
+#else
|
|
+#define EX_USAGE 64
|
|
+#define EX_DATAERR 65
|
|
+#define EX_NOINPUT 66
|
|
+#define EX_UNAVAILABLE 69
|
|
+#endif
|
|
#endif
|
|
#include <gd.h>
|
|
#if defined HAVE_STDBOOL_H && ! defined __cplusplus
|
|
diff -up graphviz-2.26.3/lib/gd/gd_png.c.orig graphviz-2.26.3/lib/gd/gd_png.c
|
|
--- graphviz-2.26.3/lib/gd/gd_png.c.orig 2010-03-18 18:15:35.528482304 -0600
|
|
+++ graphviz-2.26.3/lib/gd/gd_png.c 2010-03-18 18:16:36.045350912 -0600
|
|
@@ -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 <ast_common.h>
|
|
#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
|
|
|