virtualgl: 2.3.2 -> 2.4.1, fix multilib

This commit is contained in:
Nikolay Amiantov 2015-12-05 00:33:02 +03:00
parent 56ffc2ecd2
commit 3b1ab88428
5 changed files with 54 additions and 58 deletions

View File

@ -1,33 +1,22 @@
{ stdenv, fetchurl, mesa, libX11, openssl, libXext
, libjpeg_turbo, cmake }:
{ lib, buildEnv
, virtualglLib
, virtualglLib_i686 ? null
}:
let
version = "2.3.2";
in
stdenv.mkDerivation {
name = "virtualgl-${version}";
src = fetchurl {
url = "mirror://sourceforge/virtualgl/VirtualGL-${version}.tar.gz";
sha256 = "062lrhd8yr13ch4wpgzxdabqs92j4q7fcl3a0c3sdlav4arspqmy";
};
buildEnv {
name = "virtualgl-${lib.getVersion virtualglLib}";
patches = [ ./xshm.patch ./fixturbopath.patch ];
paths = [ virtualglLib ];
prePatch = ''
sed -i s,LD_PRELOAD=lib,LD_PRELOAD=$out/lib/lib, server/vglrun
postBuild = lib.optionalString (virtualglLib_i686 != null) ''
rm $out/fakelib
# workaround for #4621
rm $out/bin
mkdir $out/bin
for i in ${virtualglLib}/bin/*; do
ln -s $i $out/bin
done
ln -s ${virtualglLib}/bin/.vglrun.vars64 $out/bin
ln -s ${virtualglLib_i686}/bin/.vglrun.vars32 $out/bin
'';
cmakeFlags = [ "-DTJPEG_LIBRARY=${libjpeg_turbo}/lib/libturbojpeg.so" ];
preInstall = ''
export makeFlags="prefix=$out"
'';
buildInputs = [ cmake mesa libX11 openssl libXext libjpeg_turbo ];
meta = {
homepage = http://www.virtualgl.org/;
description = "X11 GL rendering in a remote computer with full 3D hw acceleration";
license = stdenv.lib.licenses.free; # many parts under different free licenses
};
}

View File

@ -1,16 +0,0 @@
--- VirtualGL-2.3/cmakescripts/FindTurboJPEG.cmake.orig 2012-02-02 17:33:49.496283001 +0100
+++ VirtualGL-2.3/cmakescripts/FindTurboJPEG.cmake 2012-02-02 17:44:18.772483239 +0100
@@ -40,8 +40,11 @@
endif()
endif()
-set(TJPEG_LIBRARY ${DEFAULT_TJPEG_LIBRARY} CACHE PATH
- "TurboJPEG library path (default: ${DEFAULT_TJPEG_LIBRARY})")
+if(NOT TJPEG_LIBRARY)
+ message(STATUS "TJPEG_LIBRARY environment variable not set")
+ set(TJPEG_LIBRARY ${DEFAULT_TJPEG_LIBRARY} CACHE PATH
+ "TurboJPEG library path (default: ${DEFAULT_TJPEG_LIBRARY})")
+endif()
if(WIN32)
set(CMAKE_REQUIRED_DEFINITIONS -MT)

View File

@ -0,0 +1,29 @@
{ stdenv, fetchurl, cmake, mesa, libX11, libXv, libjpeg_turbo, fltk }:
let
version = "2.4.1";
in
stdenv.mkDerivation {
name = "virtualgl-lib-${version}";
src = fetchurl {
url = "mirror://sourceforge/virtualgl/VirtualGL-${version}.tar.gz";
sha256 = "0bngb4hrl0kn19qb3sa6mg6dbaahfk09gx2ng18l00xm6pmwd298";
};
cmakeFlags = [ "-DVGL_SYSTEMFLTK=1" "-DTJPEG_LIBRARY=${libjpeg_turbo}/lib/libturbojpeg.so" ];
makeFlags = [ "PREFIX=$(out)" ];
nativeBuildInputs = [ cmake ];
buildInputs = [ libjpeg_turbo mesa fltk libX11 libXv ];
meta = with stdenv.lib; {
homepage = http://www.virtualgl.org/;
description = "X11 GL rendering in a remote computer with full 3D hw acceleration";
license = licenses.free; # many parts under different free licenses
platforms = platforms.linux;
maintainers = with maintainers; [ abbradar ];
};
}

View File

@ -1,13 +0,0 @@
diff --git a/util/fbx.c b/util/fbx.c
index 06ea835..0d89842 100644
--- a/util/fbx.c
+++ b/util/fbx.c
@@ -15,6 +15,8 @@
// This library abstracts fast frame buffer access
#include <string.h>
#include <stdlib.h>
+#include <X11/Xmd.h>
+#include <X11/extensions/shmproto.h>
#include "fbx.h"
#define MINWIDTH 160

View File

@ -13385,8 +13385,15 @@ let
virtinst = callPackage ../applications/virtualization/virtinst {};
virtualgl = callPackage ../tools/X11/virtualgl { };
virtualglLib = callPackage ../tools/X11/virtualgl/lib.nix {
fltk = fltk13;
};
virtualgl = callPackage ../tools/X11/virtualgl {
virtualglLib_i686 = if system == "x86_64-linux"
then pkgsi686Linux.virtualglLib
else null;
};
primusLib = callPackage ../tools/X11/primus/lib.nix {
nvidia_x11 = linuxPackages.nvidia_x11.override { libsOnly = true; };