From b4084d4913a8700e439c8c9d512770c569027720 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Fri, 5 Dec 2014 10:51:40 +0300 Subject: [PATCH] Just use old glm for LO, the rest of LO is not keen on using C++ git add -A 1 --- .../office/libreoffice/default.nix | 2 -- pkgs/development/libraries/glm/0954.nix | 35 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/libraries/glm/0954.nix diff --git a/pkgs/applications/office/libreoffice/default.nix b/pkgs/applications/office/libreoffice/default.nix index 1286c863dfd5..ceb1a9eab865 100644 --- a/pkgs/applications/office/libreoffice/default.nix +++ b/pkgs/applications/office/libreoffice/default.nix @@ -104,8 +104,6 @@ stdenv.mkDerivation rec { # to make its dlopen work. NIX_LDFLAGS = "-lcups"; - NIX_CFLAGS_COMPILE="-std=c++11"; # glm 0.9.6.0 insists on this - # If we call 'configure', 'make' will then call configure again without parameters. # It's their system. configureScript = "./autogen.sh"; diff --git a/pkgs/development/libraries/glm/0954.nix b/pkgs/development/libraries/glm/0954.nix new file mode 100644 index 000000000000..a5b62c6b04ef --- /dev/null +++ b/pkgs/development/libraries/glm/0954.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchurl, unzip }: + +stdenv.mkDerivation rec { + name = "glm-0.9.5.4"; + + src = fetchurl { + url = "mirror://sourceforge/project/ogl-math/${name}/${name}.zip"; + sha256 = "0v14xssysy3q1h2mga6rqlz722mwbis4rrx76zmvhjqh17qh4l62"; + }; + + buildInputs = [ unzip ]; + + outputs = [ "out" "doc" ]; + + installPhase = '' + mkdir -p "$out/include" + cp -r glm "$out/include" + + mkdir -p "$doc/share/doc/glm" + cp -r doc/* "$doc/share/doc/glm" + ''; + + meta = with stdenv.lib; { + description = "OpenGL Mathematics library for C++"; + longDescription = '' + OpenGL Mathematics (GLM) is a header only C++ mathematics library for + graphics software based on the OpenGL Shading Language (GLSL) + specification and released under the MIT license. + ''; + homepage = http://glm.g-truc.net/; + license = licenses.mit; + platforms = platforms.unix; + maintainers = with stdenv.lib.maintainers; [ fuuzetsu ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 00972f908379..a24063ac0ed1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5285,6 +5285,7 @@ let }; glm = callPackage ../development/libraries/glm { }; + glm_0954 = callPackage ../development/libraries/glm/0954.nix { }; glog = callPackage ../development/libraries/glog { }; @@ -10063,6 +10064,7 @@ let zip = zip.override { enableNLS = false; }; jdk = openjdk; boost = boost155; + glm = glm_0954; fontsConf = makeFontsConf { fontDirectories = [ freefont_ttf xorg.fontmiscmisc xorg.fontbhttf