Merge 'mingw-w64' and 'darwin' into cross-win-osx.

Both branches have quite a lot in common, so it's time for a merge and
do the cleanups with respect to both implementations and also generalize
both implementations as much as possible.

This also closes #1876.

Conflicts:
	pkgs/development/interpreters/lua-5/5.2.nix
	pkgs/development/libraries/SDL/default.nix
	pkgs/development/libraries/glew/default.nix
	pkgs/top-level/all-packages.nix
This commit is contained in:
aszlig
2014-03-12 10:16:51 +01:00
33 changed files with 487 additions and 119 deletions

View File

@@ -12,7 +12,7 @@ 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,19 @@
@@ -71,7 +75,25 @@
{ return(X509_CERT_DIR); }
const char *X509_get_default_cert_file(void)
@@ -23,9 +23,15 @@ diff -ru -x '*~' openssl-1.0.0e-orig/crypto/x509/x509_def.c openssl-1.0.0e/crypt
+ if (!init) {
+ init = 1;
+ char * s = getenv("OPENSSL_X509_CERT_FILE");
+ if (s && getuid() == geteuid()) {
+ strncpy(buf, s, sizeof(buf));
+ buf[sizeof(buf) - 1] = 0;
+ 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;

View File

@@ -8,7 +8,9 @@ let
(throw "openssl needs its platform name cross building" null)
stdenv.cross;
patchesCross = isCross:
patchesCross = isCross: let
isDarwin = stdenv.isDarwin || (isCross && stdenv.cross.libc == "libSystem");
in
[ # Allow the location of the X509 certificate file (the CA
# bundle) to be set through the environment variable
# OPENSSL_X509_CERT_FILE. This is necessary because the
@@ -29,7 +31,7 @@ let
./kfreebsd-gnu.patch
]
++ stdenv.lib.optional stdenv.isDarwin ./darwin-arch.patch;
++ stdenv.lib.optional isDarwin ./darwin-arch.patch;
in
@@ -91,6 +93,8 @@ stdenv.mkDerivation {
rm $out/bin/c_rehash $out/ssl/misc/CA.pl $out/ssl/misc/tsget
'';
configureScript = "./Configure";
} // stdenv.lib.optionalAttrs (opensslCrossSystem == "darwin64-x86_64-cc") {
CC = "gcc";
};
meta = {