From 5e8747300eea9bca1b8bae945fe61e2918a7f560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 23 Feb 2013 20:09:11 +0100 Subject: [PATCH] openscenegraph: update and fix --- .../libraries/openscenegraph/default.nix | 16 +++++++++------- .../libraries/openscenegraph/xine.patch | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 pkgs/development/libraries/openscenegraph/xine.patch diff --git a/pkgs/development/libraries/openscenegraph/default.nix b/pkgs/development/libraries/openscenegraph/default.nix index 08e08b876b6..01993fa1cd8 100644 --- a/pkgs/development/libraries/openscenegraph/default.nix +++ b/pkgs/development/libraries/openscenegraph/default.nix @@ -2,22 +2,22 @@ x@{builderDefsPackage , cmake, giflib, libjpeg, libtiff, lib3ds, freetype, libpng , coin3d, jasper, gdal, xproto, libX11, libXmu, freeglut, mesa , doxygen, ffmpeg, xineLib, unzip, zlib, openal, libxml2 - , curl + , curl, a52dec, faad2, gdk_pixbuf , ...}: builderDefsPackage (a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ +let + helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ []; buildInputs = map (n: builtins.getAttr n x) (builtins.attrNames (builtins.removeAttrs x helperArgNames)); sourceInfo = rec { baseName="OpenSceneGraph"; - version="2.8.3"; + version="3.0.1"; name="${baseName}-${version}"; url="http://www.openscenegraph.org/downloads/stable_releases/${name}/source/${name}.zip"; - hash="0phihxs7zgir9n1z54xsrsha8wa0xll7xl6lvqvrrczf0bm80yrs"; + hash="15l23mxv93mw6wkc90x52jhwxh7r3d7lahwdsv3jfnha9dbh648c"; }; in rec { @@ -30,7 +30,9 @@ rec { inherit buildInputs; /* doConfigure should be removed if not needed */ - phaseNames = ["setVars" "addInputs" "doUnpack" "doCmake" "doMakeInstall"]; + phaseNames = ["setVars" "addInputs" "doUnpack" "doPatch" "doCmake" "doMakeInstall"]; + + patches = [ ./xine.patch ]; # http://forum.openscenegraph.org/viewtopic.php?t=9659 cmakeFlags = [ "-D MATH_LIBRARY=" @@ -39,7 +41,7 @@ rec { setVars = a.noDepEntry '' export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -D__STDC_CONSTANT_MACROS=1" ''; - + meta = { description = "A 3D graphics toolkit"; maintainers = with a.lib.maintainers; diff --git a/pkgs/development/libraries/openscenegraph/xine.patch b/pkgs/development/libraries/openscenegraph/xine.patch new file mode 100644 index 00000000000..8fbc8ceec52 --- /dev/null +++ b/pkgs/development/libraries/openscenegraph/xine.patch @@ -0,0 +1,18 @@ +--- OpenSceneGraph-3.0.1.orig/src/osgPlugins/xine/video_out_rgb.c ++++ OpenSceneGraph-3.0.1/src/osgPlugins/xine/video_out_rgb.c +@@ -2769,8 +2769,14 @@ init_class(xine_t* xine, void* vo_visual + clear(rgb_class, sizeof(rgbout_class_t)); + + rgb_class->driver_class.open_plugin = open_plugin; ++#if XINE_MAJOR_VERSION < 1 || (XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION < 2) + rgb_class->driver_class.get_identifier = get_identifier; + rgb_class->driver_class.get_description = get_description; ++#else ++ rgb_class->driver_class.identifier = get_identifier(NULL); ++ rgb_class->driver_class.description = get_description(NULL); ++#endif ++ + rgb_class->driver_class.dispose = dispose_class; + + return(rgb_class); +