Skip to content

Commit

Permalink
freepv: 0.3.0_beta1 -> 0.3.0, fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
globin committed Jan 19, 2017
1 parent a927abb commit f4bff9d
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions pkgs/applications/graphics/freepv/default.nix
@@ -1,25 +1,35 @@
{ stdenv, fetchurl, libjpeg, mesa, freeglut, zlib, cmake, libX11, libxml2, libpng,
libXxf86vm }:
libXxf86vm, gcc6 }:

stdenv.mkDerivation {
name = "freepv-0.3.0_beta1";
name = "freepv-0.3.0";

src = fetchurl {
url = mirror://sourceforge/freepv/freepv-0.3.0_beta1.tar.gz;
sha256 = "084qqa361np73anvqrv78ngw8hjxglmdm3akkpszbwnzniw89qla";
url = mirror://sourceforge/freepv/freepv-0.3.0.tar.gz;
sha256 = "1w19abqjn64w47m35alg7bcdl1p97nf11zn64cp4p0dydihmhv56";
};

buildInputs = [ libjpeg mesa freeglut zlib cmake libX11 libxml2 libpng
libXxf86vm ];
libXxf86vm gcc6 ];

patchPhase = ''
postPatch = ''
sed -i -e '/GECKO/d' CMakeLists.txt
sed -i -e '/mozilla/d' src/CMakeLists.txt
sed -i -e '1i \
#include <cstdio>' src/libfreepv/OpenGLRenderer.cpp
sed -i -e '1i \
#include <cstring>' src/libfreepv/Image.cpp
substituteInPlace src/libfreepv/Action.h \
--replace NULL nullptr
substituteInPlace src/libfreepv/pngReader.cpp \
--replace png_set_gray_1_2_4_to_8 png_set_expand_gray_1_2_4_to_8
'';

NIX_CFLAGS_COMPILE = "-fpermissive -Wno-narrowing";

meta = {
description = "Open source panorama viewer using GL";
homepage = http://freepv.sourceforge.net/;
license = "LGPL";
license = [ stdenv.lib.licenses.lgpl21 ];
};
}

0 comments on commit f4bff9d

Please sign in to comment.