summary refs log tree commit diff
path: root/pkgs/applications/science/misc/tulip
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2010-06-14 18:30:35 +0000
committerLudovic Courtès <ludo@gnu.org>2010-06-14 18:30:35 +0000
commit5be3acda2d56db72f795c3e6b3dfcd150046eff9 (patch)
tree86764d70957e97f6356ce81f813b75e3f1e5e1fe /pkgs/applications/science/misc/tulip
parentef674da49e6c9ce954e68a5a1fde69c774c8db59 (diff)
downloadnixlib-5be3acda2d56db72f795c3e6b3dfcd150046eff9.tar
nixlib-5be3acda2d56db72f795c3e6b3dfcd150046eff9.tar.gz
nixlib-5be3acda2d56db72f795c3e6b3dfcd150046eff9.tar.bz2
nixlib-5be3acda2d56db72f795c3e6b3dfcd150046eff9.tar.lz
nixlib-5be3acda2d56db72f795c3e6b3dfcd150046eff9.tar.xz
nixlib-5be3acda2d56db72f795c3e6b3dfcd150046eff9.tar.zst
nixlib-5be3acda2d56db72f795c3e6b3dfcd150046eff9.zip
Add Tulip, a graph visualization framework.
svn path=/nixpkgs/trunk/; revision=22264
Diffstat (limited to 'pkgs/applications/science/misc/tulip')
-rw-r--r--pkgs/applications/science/misc/tulip/configure-opengl.patch75
-rw-r--r--pkgs/applications/science/misc/tulip/default.nix50
2 files changed, 125 insertions, 0 deletions
diff --git a/pkgs/applications/science/misc/tulip/configure-opengl.patch b/pkgs/applications/science/misc/tulip/configure-opengl.patch
new file mode 100644
index 000000000000..e5346ef07283
--- /dev/null
+++ b/pkgs/applications/science/misc/tulip/configure-opengl.patch
@@ -0,0 +1,75 @@
+Remove broken detection of OpenGL and GLEW.  See
+<http://sourceforge.net/tracker/?func=detail&aid=3015936&group_id=61223&atid=496518>.
+
+--- tulip-3.3.1/acinclude.m4	2010-01-18 20:34:02.000000000 +0100
++++ tulip-3.3.1/acinclude.m4	2010-06-14 16:25:25.000000000 +0200
+@@ -353,68 +353,8 @@ AC_ARG_WITH(gl-libraries,
+     [  ac_gl_libraries="$withval"
+     ])
+ 
+-AC_CACHE_VAL(ac_cv_have_gl,
+-[
+-if test ${VAR_WIN32} = 1
+-then
+-gl_incdirs=" /mingw/include $ac_gl_includes $GLDIR/include /usr/include /usr/X11R6/include/X11 /usr/X11R6/include $x_includes "
+-else
+-gl_incdirs=" $ac_gl_includes $GLDIR/include /usr/include /usr/X11R6/include/X11 /usr/X11R6/include $x_includes "
+-fi
+-AC_FIND_FILE(GL/gl.h, $gl_incdirs, gl_incdir)
+-ac_gl_includes="$gl_incdir"
+-
+-if test ${VAR_WIN32} = 1
+-then
+-gl_libdirs="$GLDIR $ac_gl_libraries $GLLIB /usr/X11R6/lib /usr/lib /usr/local/lib $x_libraries "
+-else
+-gl_libdirs="$ac_gl_libraries $GLLIB /usr/X11R6/lib64 /usr/lib64 /usr/local/lib64/usr/X11R6/lib /usr/lib /usr/local/lib $x_libraries "
+-fi
+-
+-test -n "$GLDIR" && gl_libdirs="$GLDIR/lib64 $GLDIR/lib $GLDIR $gl_libdirs"
+-test=NONE
+-gl_libdir=NONE
+-for dir in $gl_libdirs; do
+-if test ${VAR_WIN32} = 1
+-then
+-  try="ls -1 $dir/*opengl*"
+-else
+-  try="ls -1 $dir/libGL*"
+-fi
+-  if test=`eval $try 2> /dev/null`; then 
+-    gl_libdir=$dir
+-    if test ${VAR_WIN32} = 0 ; then 	 
+-      try="ls -1 $gl_libdir/libGLEW.*" 	 
+-      if test=`eval $try 2> /dev/null`; then break; else AC_MSG_ERROR([ libGLEW not found , please install it in $gl_libdir ]); fi 	 
+-    else 	 
+-      break 	 
+-    fi
+-  else 
+-    echo "tried $dir" >&AC_FD_CC
+-  fi
+-done
+-ac_gl_libraries="$gl_libdir"
+ ])
+ 
+-eval "$ac_cv_have_gl"
+-if test "$ac_gl_libraries" = NONE; then
+-  AC_MSG_ERROR([ Not found , put your GLDIR environnement variable to the OpenGL directory ]);
+-else
+-  ac_cv_have_gl="have_gl=yes \
+-  ac_gl_includes=$ac_gl_includes ac_gl_libraries=$ac_gl_libraries"
+-  AC_MSG_RESULT([ libraries $ac_gl_libraries, headers $ac_gl_includes ])  
+-  gl_libraries="$ac_gl_libraries"
+-  gl_includes="$ac_gl_includes"
+-if test ${VAR_MACOSX} = 1
+-then
+-  GL_INCLUDES="-I$ac_gl_includes"
+-  GL_LDFLAGS=""
+-else
+-  GL_INCLUDES="-I$ac_gl_includes"	
+-  GL_LDFLAGS="-L$ac_gl_libraries"
+-fi
+-fi
+-
+ dnl MAC PORT
+ if test ${VAR_MACOSX} = 1
+ then
+
diff --git a/pkgs/applications/science/misc/tulip/default.nix b/pkgs/applications/science/misc/tulip/default.nix
new file mode 100644
index 000000000000..1feb3acd1df9
--- /dev/null
+++ b/pkgs/applications/science/misc/tulip/default.nix
@@ -0,0 +1,50 @@
+{ fetchurl, stdenv, libxml2, freetype, mesa, glew, qt
+, autoconf, automake, libtool }:
+
+let version = "3.3.1"; in
+stdenv.mkDerivation rec {
+  name = "tulip-${version}";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/auber/tulip/tulip-${version}/${name}.tar.bz2";
+    sha256 = "1c9c2brs1n2kvpih1jrq69vkqqnglacs5x5zlzj9cxbn70crw874";
+  };
+
+  patches = [ ./configure-opengl.patch ];
+
+  preConfigure =
+    '' export CPATH="${mesa}/include:${glew}/include"
+       export LIBRARY_PATH="${mesa}/lib:${glew}/lib"
+       export QTDIR="${qt}"
+       export LDFLAGS="-lGLEW"
+
+       rm -vf aclocal.m4 ltmain.sh
+       autoreconf -fi
+    '';
+
+  buildInputs = [ libxml2 freetype glew ]
+    ++ [ autoconf automake libtool ];
+  propagagedBuildInputs = [ mesa qt ];
+
+  # FIXME: "make check" needs Docbook's DTD 4.4, among other things.
+  doCheck = false;
+
+  meta = {
+    description = "Tulip, a visualization framework for the analysis and visualization of relational data";
+
+    longDescription =
+      '' Tulip is an information visualization framework dedicated to the
+         analysis and visualization of relational data.  Tulip aims to
+         provide the developer with a complete library, supporting the design
+         of interactive information visualization applications for relational
+         data that can be tailored to the problems he or she is addressing.
+      '';
+
+    homepage = http://tulip.labri.fr/;
+
+    license = "GPLv3+";
+
+    maintainers = [ stdenv.lib.maintainers.ludo ];
+    platforms = stdenv.lib.platforms.gnu;  # arbitrary choice
+  };
+}