Merge branch 'staging', discussion #8844

This commit is contained in:
Vladimír Čunát
2015-07-19 08:09:29 +02:00
272 changed files with 4785 additions and 1517 deletions
@@ -1,5 +1,5 @@
{ stdenv, fetchurl
, bzip2, curl, expat, jsoncpp, libarchive, xz, zlib
, bzip2, curl, expat, libarchive, xz, zlib
, useNcurses ? false, ncurses, useQt4 ? false, qt4
, wantPS ? false, ps ? null
}:
@@ -40,7 +40,6 @@ stdenv.mkDerivation rec {
buildInputs =
[ bzip2 curl expat libarchive xz zlib ]
++ optional (jsoncpp != null && !stdenv.isCygwin) jsoncpp
++ optional useNcurses ncurses
++ optional useQt4 qt4;
@@ -49,12 +48,11 @@ stdenv.mkDerivation rec {
CMAKE_PREFIX_PATH = stdenv.lib.concatStringsSep ":" buildInputs;
configureFlags =
[
"--docdir=/share/doc/${name}"
[ "--docdir=/share/doc/${name}"
"--mandir=/share/man"
"--no-system-jsoncpp"
]
++ optional (!stdenv.isCygwin) "--system-libs"
++ optional (jsoncpp == null || stdenv.isCygwin) "--no-system-jsoncpp"
++ optional useQt4 "--qt-gui"
++ ["--"]
++ optional (!useNcurses) "-DBUILD_CursesDialog=OFF";
@@ -17,6 +17,9 @@ stdenv.mkDerivation {
# and /usr/lib. It's a stupid feature anyway. Likewise, when searching for
# included Makefiles, don't look in /usr/include and friends.
./impure-dirs.patch
# Don't segfault if we can't get a tty name.
./no-tty-name.patch
];
meta = {
@@ -0,0 +1,53 @@
From 292da6f6867b75a5af7ddbb639a1feae022f438f Mon Sep 17 00:00:00 2001
From: Paul Smith <psmith@gnu.org>
Date: Mon, 20 Oct 2014 05:54:56 +0000
Subject: * main.c (main): [SV 43434] Handle NULL returns from ttyname().
---
diff --git main.c main.c
index b2d169c..0cdb8a8 100644
--- main.c
+++ main.c
@@ -1429,13 +1429,18 @@ main (int argc, char **argv, char **envp)
#ifdef HAVE_ISATTY
if (isatty (fileno (stdout)))
if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMOUT")))
- define_variable_cname ("MAKE_TERMOUT", TTYNAME (fileno (stdout)),
- o_default, 0)->export = v_export;
-
+ {
+ const char *tty = TTYNAME (fileno (stdout));
+ define_variable_cname ("MAKE_TERMOUT", tty ? tty : DEFAULT_TTYNAME,
+ o_default, 0)->export = v_export;
+ }
if (isatty (fileno (stderr)))
if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMERR")))
- define_variable_cname ("MAKE_TERMERR", TTYNAME (fileno (stderr)),
- o_default, 0)->export = v_export;
+ {
+ const char *tty = TTYNAME (fileno (stderr));
+ define_variable_cname ("MAKE_TERMERR", tty ? tty : DEFAULT_TTYNAME,
+ o_default, 0)->export = v_export;
+ }
#endif
/* Reset in case the switches changed our minds. */
diff --git makeint.h makeint.h
index 6223936..2009f41 100644
--- makeint.h
+++ makeint.h
@@ -436,10 +436,11 @@ extern struct rlimit stack_limit;
/* The number of bytes needed to represent the largest integer as a string. */
#define INTSTR_LENGTH CSTRLEN ("18446744073709551616")
+#define DEFAULT_TTYNAME "true"
#ifdef HAVE_TTYNAME
# define TTYNAME(_f) ttyname (_f)
#else
-# define TTYNAME(_f) "true"
+# define TTYNAME(_f) DEFAULT_TTYNAME
#endif
--
cgit v0.9.0.2
@@ -0,0 +1,31 @@
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "make-${version}";
version = "1.0";
src = fetchurl {
url = "http://ftpmain.gnustep.org/pub/gnustep/core/gnustep-make-2.6.6.tar.gz";
sha256 = "07cqr8x17bia9w6clbmiv7ay6r9nplrjz2cyzinv4w7zfpc19vxw";
};
patchPhase = ''
substituteInPlace GNUmakefile.in \
--replace which type \
--replace 'tooldir = $(DESTDIR)' 'tooldir = ' \
--replace 'makedir = $(DESTDIR)' 'makedir = ' \
--replace 'mandir = $(DESTDIR)' 'mandir = '
substituteInPlace FilesystemLayouts/apple \
--replace /usr/local ""
'';
installFlags = "DESTDIR=$(out)";
postInstall = ''
mkdir -p $out/nix-support
cat >$out/nix-support/setup-hook <<EOF
. $out/Library/GNUstep/Makefiles/GNUstep.sh
EOF
'';
}
@@ -0,0 +1,23 @@
{ stdenv, fetchgit, gnustep-make, Foundation, libobjc }:
stdenv.mkDerivation rec {
name = "xcode-${version}";
version = "1.0";
makeFlags = "messages=yes";
installFlags = "DESTDIR=$(out)";
__impureHostDeps = [
"/System/Library/PrivateFrameworks/UIFoundation.framework/Versions/A/UIFoundation"
"/usr/lib/libextension.dylib"
];
buildInputs = [ gnustep-make Foundation libobjc ];
src = fetchgit {
url = "https://github.com/gnustep/xcode";
rev = "cc5016794e44f9998674120a5e4625aa09ca455a";
sha256 = "85420f3f61091b2e4548cf5e99d886cb9c72cf07b8b9fae3eebc87e7b6b7e54a";
};
}