From 69e566d98333458c96dd97649d37e714b95fdca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Thu, 16 Apr 2009 19:28:30 +0000 Subject: [PATCH] Fixing and updating openal, about rpaths and cmake. svn path=/nixpkgs/trunk/; revision=15097 --- pkgs/development/libraries/openal/default.nix | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/openal/default.nix b/pkgs/development/libraries/openal/default.nix index 170cb5210479..40d9584742cc 100644 --- a/pkgs/development/libraries/openal/default.nix +++ b/pkgs/development/libraries/openal/default.nix @@ -1,19 +1,35 @@ { stdenv, fetchurl, alsaLib, cmake }: -let version = "1.5.304"; in +let version = "1.7.411"; in stdenv.mkDerivation rec { name = "openal-${version}"; src = fetchurl { - url = "http://connect.creativelabs.com/openal/Downloads/openal-soft-${version}.tar.bz2"; - sha256 = "0k26ycprmpynvfkqkqsbaahl6avn033z2c03sp21vhpqbyms50ks"; + url = "http://connect.creativelabs.com/openal/Downloads/openal-soft-${version}.bz2"; + sha256 = "1nbqvg08hy5p2cxy2i2mmh2szmbpsg2dcvhr61iplyisw04rwc8i"; + name = "openal-soft-${version}.tar.bz2"; }; - # FIXME: The `$out/bin/openal-info' executable doesn't have the - # right RPATH, so it can't find `libopenal.so'. This must be fixed - # by tweaking the CMake crap. buildInputs = [ cmake alsaLib ]; + cmakeFlags = "-DCMAKE_SHARED_LINKER_FLAGS=\"-Wl,-rpath,$out/lib/\"" + + " -DCMAKE_EXE_LINKER_FLAGS=\"-Wl,-rpath,$out/lib\"" + + " -DCMAKE_SKIP_BUILD_RPATH=ON" + + " -DCMAKE_BUILD_TYPE=Release" + + " -DCMAKE_INSTALL_PREFIX=$out"; + + dontUseCmakeConfigure = true; + + # I rewrote the configure phase to get the $out references evaluated in + # cmakeFlags + configurePhase = '' + set -x + mkdir -p build; + cd build + eval -- "cmake .. $cmakeFlags" + set +x + ''; + meta = { description = "OpenAL, a cross-platform 3D audio API";