Merge pull request #14220 from joachifm/build-fixes-for-staging

Build fixes for staging
This commit is contained in:
joachifm 2016-03-26 17:17:47 +00:00
commit a3d5686652
5 changed files with 30 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{ stdenv, cmake, fetchurl, gnumake, pkgconfig, makeWrapper { stdenv, cmake, fetchurl, gnumake, pkgconfig, makeWrapper
, boost, gettext, tclap, wxGTK , boost, gettext, tclap, wxGTK
, freeglut, glew, libXi, libXmu, mesa , freeglut, glew, libX11, libXi, libXmu, mesa, cairo
, autopanosiftc, enblend-enfuse, exiv2, fftw, ilmbase, lensfun, libpng, libtiff , autopanosiftc, enblend-enfuse, exiv2, fftw, ilmbase, lensfun, libpng, libtiff
, openexr, panotools, perlPackages, sqlite, vigra , openexr, panotools, perlPackages, sqlite, vigra
}: }:
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-I${ilmbase}/include/OpenEXR"; NIX_CFLAGS_COMPILE = "-I${ilmbase}/include/OpenEXR";
buildInputs = [ boost gettext tclap wxGTK buildInputs = [ boost gettext tclap wxGTK
freeglut glew libXi libXmu mesa freeglut glew libX11 libXi libXmu mesa cairo
exiv2 fftw ilmbase lensfun libtiff libpng openexr panotools exiv2 fftw ilmbase lensfun libtiff libpng openexr panotools
sqlite vigra sqlite vigra
perlPackages.ImageExifTool makeWrapper perlPackages.ImageExifTool makeWrapper

View File

@ -16,8 +16,11 @@ stdenv.mkDerivation rec {
buildInputs = [ qt4 zlib ]; buildInputs = [ qt4 zlib ];
prefixKey="INSTALL_PREFIX="; prefixKey = "INSTALL_PREFIX=";
configureScript = "qmake leocad.pro"; configureScript = "qmake leocad.pro";
postPatch = ''
substituteInPlace common/camera.cpp --replace "isnan(" "std::isnan("
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "CAD program for creating virtual LEGO models"; description = "CAD program for creating virtual LEGO models";

View File

@ -2,21 +2,26 @@
# !!! assert freetype == xorg.freetype # !!! assert freetype == xorg.freetype
stdenv.mkDerivation { stdenv.mkDerivation rec {
name = "zoom-1.1.5"; name = "zoom-1.1.5";
src = fetchurl { src = fetchurl {
url = http://www.logicalshift.co.uk/unix/zoom/zoom-1.1.5.tar.gz; url = "http://www.logicalshift.co.uk/unix/zoom/${name}.tar.gz";
sha256 = "1g6van7f7sg3zfcz80mncnnbccyg2hnm0hq4x558vpsm0lf7z5pj"; sha256 = "1g6van7f7sg3zfcz80mncnnbccyg2hnm0hq4x558vpsm0lf7z5pj";
}; };
buildInputs = [ perl expat xlibsWrapper freetype ]; buildInputs = [ perl expat xlibsWrapper freetype ];
# Zoom doesn't add the right directory in the include path. NIX_CFLAGS_COMPILE = [
CFLAGS = [ "-I" (freetype + "/include/freetype2") ]; # Zoom doesn't add the right directory in the include path.
"-I" (freetype + "/include/freetype2")
# for gcc5; c11 inline semantics breaks the build
"-fgnu89-inline"
];
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Player for Z-Code, TADS and HUGO stories or games, usually text adventures ('interactive fiction')"; description = "Player for Z-Code, TADS and HUGO stories or games";
longDescription = '' longDescription = ''
Zoom is a player for Z-Code, TADS and HUGO stories or games. These are Zoom is a player for Z-Code, TADS and HUGO stories or games. These are
usually text adventures ('interactive fiction'), and were first created usually text adventures ('interactive fiction'), and were first created

View File

@ -10,9 +10,15 @@ stdenv.mkDerivation rec {
buildInputs = [ ncurses readline ]; buildInputs = [ ncurses readline ];
NIX_CFLAGS_COMPILE = "-std=gnu90";
preConfigure = '' preConfigure = ''
sed -e '1i#include <limits.h>' -i cdrwtool/cdrwtool.c -i pktsetup/pktsetup.c sed -e '1i#include <limits.h>' -i cdrwtool/cdrwtool.c -i pktsetup/pktsetup.c
sed -e 's@[(]char[*][)]spm [+]=@spm = ((char*) spm) + @' -i wrudf/wrudf.c sed -e 's@[(]char[*][)]spm [+]=@spm = ((char*) spm) + @' -i wrudf/wrudf.c
sed -e '27i#include <string.h>' -i include/udf_endian.h
sed -e '38i#include <string.h>' -i wrudf/wrudf-cdrw.c
sed -e '12i#include <string.h>' -i wrudf/wrudf-cdr.c
sed -e '37i#include <stdlib.h>' -i wrudf/ide-pc.c
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -13,10 +13,18 @@ stdenv.mkDerivation rec {
"--enable-icon-browser" "--enable-icon-browser"
]; ];
# for gcc5: c11 inline semantics breaks the build
NIX_CFLAGS_COMPILE = "-fgnu89-inline";
buildInputs = [ gtk2 ]; buildInputs = [ gtk2 ];
nativeBuildInputs = [ pkgconfig intltool ]; nativeBuildInputs = [ pkgconfig intltool ];
postPatch = ''
sed -i src/file.c -e '21i#include <glib/gprintf.h>'
sed -i src/form.c -e '21i#include <stdlib.h>'
'';
preFixup = "rm $out/share/icons/hicolor/icon-theme.cache"; preFixup = "rm $out/share/icons/hicolor/icon-theme.cache";
meta = { meta = {