Merge branch 'staging'

This commit is contained in:
Shea Levy
2015-03-20 09:53:34 -04:00
35 changed files with 585 additions and 154 deletions

View File

@@ -13,7 +13,7 @@ cross:
let
version = "2.20";
version = "2.21";
in
@@ -127,7 +127,8 @@ stdenv.mkDerivation ({
# I.e. when gcc is compiled with --with-arch=i686, then the
# preprocessor symbol `__i686' will be defined to `1'. This causes
# the symbol __i686.get_pc_thunk.dx to be mangled.
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.system == "i686-linux") "-U__i686";
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.system == "i686-linux") "-U__i686"
+ " -Wno-error=strict-prototypes";
}
# Remove the `gccCross' attribute so that the *native* glibc store path
@@ -150,7 +151,7 @@ stdenv.mkDerivation ({
}
else fetchurl {
url = "mirror://gnu/glibc/glibc-${version}.tar.gz";
sha256 = "1g6ysvk15arpi7c1f1fpx5slgfr2k3dqd5xr0yvijajp1m0xxq9p";
sha256 = "0f4prv4c0fcpi85wv4028wqxn075197gwxhgf0vp571fiw2pi3wd";
};
# Remove absolute paths from `configure' & co.; build out-of-tree.

View File

@@ -15,13 +15,14 @@ diff -ru glibc-2.16.0-orig/elf/Makefile glibc-2.16.0/elf/Makefile
+++ glibc-2.16.0/elf/Makefile 2012-09-18 12:03:30.031955196 -0400
@@ -415,12 +415,12 @@
$(objpfx)pldd: $(pldd-modules:%=$(objpfx)%.o)
$(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
-SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
-CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
+PREFIX-FLAGS := -D'PREFIX="$(prefix)"'
+CFLAGS-ldconfig.c = $(PREFIX-FLAGS) -D'LIBDIR="$(libdir)"' \
-D'SLIBDIR="$(slibdir)"' -DIS_IN_ldconfig=1
-D'SLIBDIR="$(slibdir)"'
libof-ldconfig = ldconfig
-CFLAGS-dl-cache.c = $(SYSCONF-FLAGS)
-CFLAGS-cache.c = $(SYSCONF-FLAGS)
-CFLAGS-rtld.c = $(SYSCONF-FLAGS)
@@ -29,8 +30,8 @@ diff -ru glibc-2.16.0-orig/elf/Makefile glibc-2.16.0/elf/Makefile
+CFLAGS-cache.c = $(PREFIX-FLAGS)
+CFLAGS-rtld.c = $(PREFIX-FLAGS)
CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
-DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld)
cpp-srcs-left := $(all-rtld-routines:=.os)
lib := rtld
diff -ru glibc-2.16.0-orig/sysdeps/generic/dl-cache.h glibc-2.16.0/sysdeps/generic/dl-cache.h
--- glibc-2.16.0-orig/sysdeps/generic/dl-cache.h 2012-06-30 15:12:34.000000000 -0400
+++ glibc-2.16.0/sysdeps/generic/dl-cache.h 2012-09-18 11:59:27.465284809 -0400

View File

@@ -8,11 +8,11 @@ assert xineramaSupport -> xlibs.libXinerama != null;
assert cupsSupport -> cups != null;
stdenv.mkDerivation rec {
name = "gtk+-2.24.26";
name = "gtk+-2.24.27";
src = fetchurl {
url = "mirror://gnome/sources/gtk+/2.24/${name}.tar.xz";
sha256 = "d84fc0f1e3cd99e8b9ec756e754f42653940638579a8f28d0eabffc37018d133";
sha256 = "1x14rnjvqslpa1q19fp1qalz5sxds72amsgjk8m7769rwk511jr0";
};
enableParallelBuilding = true;

View File

@@ -9,7 +9,7 @@ stdenv.mkDerivation {
};
# For the x86_64 GNU/Linux arch to be recognized by 'configure'
preConfigure = "cp ${libtool}/share/libtool/config/config.sub .";
preConfigure = "cp ${libtool}/share/libtool/build-aux/config.sub .";
meta = {
description = "Library for rasterizing 2-D vector graphics";

View File

@@ -2,10 +2,10 @@
ftgl, freetype}:
stdenv.mkDerivation rec {
name = "opencascade-6.5.4";
name = "opencascade-6.5.5";
src = fetchurl {
url = http://files.opencascade.com/OCCT/OCC_6.5.4_release/OpenCASCADE654.tar.gz;
sha256 = "1di08mc0wly4cdi3rh9kj52bk0bfpyk6dy03c9yfnv04i7z03kmy";
url = http://files.opencascade.com/OCCT/OCC_6.5.5_release/OpenCASCADE655.tgz;
sha256 = "1dnik00adfh6dxvn9kgf35yjda8chbi05f71i9119idmmrcapipm";
};
buildInputs = [ mesa tcl tk file libXmu automake autoconf libtool qt4 ftgl freetype ];
@@ -20,7 +20,9 @@ stdenv.mkDerivation rec {
# -fpermissive helps building opencascade, although gcc detects a flaw in the code
# and reports an error otherwise. Further versions may fix that.
NIX_CFLAGS_COMPILE = "-fpermissive";
NIX_CFLAGS_COMPILE = "-fpermissive"
# https://bugs.freedesktop.org/show_bug.cgi?id=83631
+ " -DGLX_GLXEXT_LEGACY";
configureFlags = [ "--with-tcl=${tcl}/lib" "--with-tk=${tk}/lib" "--with-qt=${qt4}" "--with-ftgl=${ftgl}" "--with-freetype=${freetype}" ];

View File

@@ -14,6 +14,9 @@ stdenv.mkDerivation rec {
cmakeFlags="$cmakeFlags -DINSTALL_DIR=$out -D3RDPARTY_TCL_DIR=${tcl} -D3RDPARTY_FREETYPE_DIR=${freetype}"
'';
# https://bugs.freedesktop.org/show_bug.cgi?id=83631
NIX_CFLAGS_COMPILE = "-DGLX_GLXEXT_LEGACY";
postInstall = ''
mv $out/inc $out/include
mkdir -p $out/share/doc/${name}

View File

@@ -14,6 +14,9 @@ stdenv.mkDerivation rec {
cmakeFlags="$cmakeFlags -DOCE_INSTALL_PREFIX=$out"
'';
# https://bugs.freedesktop.org/show_bug.cgi?id=83631
NIX_CFLAGS_COMPILE = "-DGLX_GLXEXT_LEGACY";
enableParallelBuilding = true;
meta = {

View File

@@ -18,7 +18,7 @@ let
# hardcoding something like /etc/ssl/cert.pem is impure and
# cannot be overriden per-process. For security, the
# environment variable is ignored for setuid binaries.
./cert-file.patch
./cert-file-1.0.1j.patch
# Remove the compilation time from the library
./no-date-in-library.patch
]

View File

@@ -0,0 +1,41 @@
diff -ru -x '*~' openssl-1.0.0e-orig/crypto/x509/x509_def.c openssl-1.0.0e/crypto/x509/x509_def.c
--- openssl-1.0.0e-orig/crypto/x509/x509_def.c 1999-09-11 19:54:11.000000000 +0200
+++ openssl-1.0.0e/crypto/x509/x509_def.c 2011-09-12 18:30:59.386501609 +0200
@@ -57,6 +57,10 @@
*/
#include <stdio.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <unistd.h>
+#include <sys/types.h>
#include "cryptlib.h"
#include <openssl/crypto.h>
#include <openssl/x509.h>
@@ -71,7 +75,25 @@
{ return(X509_CERT_DIR); }
const char *X509_get_default_cert_file(void)
- { return(X509_CERT_FILE); }
+ {
+ static char buf[PATH_MAX] = X509_CERT_FILE;
+ static int init = 0;
+ if (!init) {
+ init = 1;
+ char * s = getenv("OPENSSL_X509_CERT_FILE");
+ if (s) {
+#ifndef OPENSSL_SYS_WINDOWS
+ if (getuid() == geteuid()) {
+#endif
+ strncpy(buf, s, sizeof(buf));
+ buf[sizeof(buf) - 1] = 0;
+#ifndef OPENSSL_SYS_WINDOWS
+ }
+#endif
+ }
+ }
+ return buf;
+ }
const char *X509_get_default_cert_dir_env(void)
{ return(X509_CERT_DIR_EVP); }

View File

@@ -1,6 +1,6 @@
diff -ru -x '*~' openssl-1.0.0e-orig/crypto/x509/x509_def.c openssl-1.0.0e/crypto/x509/x509_def.c
--- openssl-1.0.0e-orig/crypto/x509/x509_def.c 1999-09-11 19:54:11.000000000 +0200
+++ openssl-1.0.0e/crypto/x509/x509_def.c 2011-09-12 18:30:59.386501609 +0200
diff -ru openssl-1.0.1m-orig/crypto/x509/x509_def.c openssl-1.0.1m/crypto/x509/x509_def.c
--- openssl-1.0.1m-orig/crypto/x509/x509_def.c 2015-03-19 14:19:00.000000000 +0100
+++ openssl-1.0.1m/crypto/x509/x509_def.c 2015-03-19 15:50:44.676683616 +0100
@@ -57,6 +57,10 @@
*/
@@ -12,30 +12,28 @@ diff -ru -x '*~' openssl-1.0.0e-orig/crypto/x509/x509_def.c openssl-1.0.0e/crypt
#include "cryptlib.h"
#include <openssl/crypto.h>
#include <openssl/x509.h>
@@ -71,7 +75,25 @@
{ return(X509_CERT_DIR); }
@@ -78,7 +82,23 @@
const char *X509_get_default_cert_file(void)
- { return(X509_CERT_FILE); }
+ {
+ static char buf[PATH_MAX] = X509_CERT_FILE;
+ static int init = 0;
+ if (!init) {
+ init = 1;
+ char * s = getenv("OPENSSL_X509_CERT_FILE");
+ if (s) {
{
- return (X509_CERT_FILE);
+ static char buf[PATH_MAX] = X509_CERT_FILE;
+ static int init = 0;
+ if (!init) {
+ init = 1;
+ char * s = getenv("OPENSSL_X509_CERT_FILE");
+ if (s) {
+#ifndef OPENSSL_SYS_WINDOWS
+ if (getuid() == geteuid()) {
+ if (getuid() == geteuid()) {
+#endif
+ strncpy(buf, s, sizeof(buf));
+ buf[sizeof(buf) - 1] = 0;
+ strncpy(buf, s, sizeof(buf));
+ buf[sizeof(buf) - 1] = 0;
+#ifndef OPENSSL_SYS_WINDOWS
+ }
+ }
+#endif
+ }
+ }
+ return buf;
+ }
+ }
+ }
+ return buf;
}
const char *X509_get_default_cert_dir_env(void)
{ return(X509_CERT_DIR_EVP); }

View File

@@ -2,7 +2,7 @@
, withCryptodev ? false, cryptodevHeaders }:
let
name = "openssl-1.0.1l";
name = "openssl-1.0.1m";
opensslCrossSystem = stdenv.lib.attrByPath [ "openssl" "system" ]
(throw "openssl needs its platform name cross building" null)
@@ -18,6 +18,8 @@ let
# hardcoding something like /etc/ssl/cert.pem is impure and
# cannot be overriden per-process. For security, the
# environment variable is ignored for setuid binaries.
# FIXME: drop this patch; it really isn't necessary, because
# OpenSSL already supports a SSL_CERT_FILE variable.
./cert-file.patch
]
@@ -43,7 +45,7 @@ stdenv.mkDerivation {
"http://www.openssl.org/source/${name}.tar.gz"
"http://openssl.linux-mirror.org/source/${name}.tar.gz"
];
sha256 = "1m6i80y9c9g7h4303bqbxnsk5wm6jd0n57hwqr0g4jaxzr44vkxj";
sha256 = "0x7gvyybmqm4lv62mlhlm80f1rn7il2qh8224rahqv0i15xhnpq9";
};
patches = patchesCross false;

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, cmake, mesa, libX11, xproto, libXt
{ stdenv, fetchurl, fetchpatch, cmake, mesa, libX11, xproto, libXt
, qtLib ? null }:
with stdenv.lib;
@@ -17,6 +17,9 @@ stdenv.mkDerivation rec {
sha256 = "1fxxgsa7967gdphkl07lbfr6dcbq9a72z5kynlklxn7hyp0l18pi";
};
# https://bugzilla.redhat.com/show_bug.cgi?id=1138466
postPatch = "sed '/^#define GL_GLEXT_LEGACY/d' -i ./Rendering/vtkOpenGL.h";
buildInputs = [ cmake mesa libX11 xproto libXt ]
++ optional (qtLib != null) qtLib;