freepv: 0.3.0_beta1 -> 0.3.0, fix build

This commit is contained in:
Robin Gloster 2017-01-19 23:35:40 +01:00
parent a927abbee0
commit f4bff9d633
No known key found for this signature in database
GPG Key ID: 5E4C836C632C2882

View File

@ -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 ];
};
}