summary refs log tree commit diff
path: root/pkgs/development/libraries/openssl
diff options
context:
space:
mode:
authorYury G. Kudryashov <urkud.urkud@gmail.com>2010-04-30 20:40:33 +0000
committerYury G. Kudryashov <urkud.urkud@gmail.com>2010-04-30 20:40:33 +0000
commitcc0b0b1c691b0fce68977a1296275e6bd7687a0b (patch)
treea814e9e978ee92eb0a55d8e1dde3d5734a2c3903 /pkgs/development/libraries/openssl
parent4ba1c06c894953562e4542a702f90568d8c6c8d7 (diff)
Add openssl1 back (but don't remove 0.9.8n)
svn path=/nixpkgs/trunk/; revision=21466
Diffstat (limited to 'pkgs/development/libraries/openssl')
-rw-r--r--pkgs/development/libraries/openssl/1.x.nix45
-rw-r--r--pkgs/development/libraries/openssl/darwin-arch-1.patch16
2 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/development/libraries/openssl/1.x.nix b/pkgs/development/libraries/openssl/1.x.nix
new file mode 100644
index 0000000000000..eae32de30e488
--- /dev/null
+++ b/pkgs/development/libraries/openssl/1.x.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchurl, perl }:
+
+let
+  opensslCrossSystem = stdenv.lib.attrByPath [ "openssl" "system" ]
+    (throw "openssl needs its platform name cross building" null)
+    stdenv.cross;
+in
+
+stdenv.mkDerivation (rec {
+  name = "openssl-1.0.0";
+
+  src = fetchurl {
+    url = "http://www.openssl.org/source/${name}.tar.gz";
+    sha1 = "3f800ea9fa3da1c0f576d689be7dca3d55a4cb62";
+  };
+
+  buildNativeInputs = [ perl ];
+
+  configureScript = "./config";
+
+  configureFlags="--libdir=lib shared";
+
+  crossAttrs = {
+    preConfigure=''
+      export cross=$crossSystem-
+    '';
+    configureFlags="--libdir=lib ${opensslCrossSystem} shared";
+    buildPhase = ''
+      make CC=$crossConfig-gcc \
+        AR="$crossConfig-ar r" \
+        RANLIB=$crossConfig-ranlib
+    '';
+  };
+
+  meta = {
+    homepage = http://www.openssl.org/;
+    description = "A cryptographic library that implements the SSL and TLS protocols";
+  };
+}
+//
+(if stdenv.isDarwin then {
+  patches = ./darwin-arch.patch;
+}
+else { })
+)
diff --git a/pkgs/development/libraries/openssl/darwin-arch-1.patch b/pkgs/development/libraries/openssl/darwin-arch-1.patch
new file mode 100644
index 0000000000000..ad8e86c6791ea
--- /dev/null
+++ b/pkgs/development/libraries/openssl/darwin-arch-1.patch
@@ -0,0 +1,16 @@
+The patch is specific to nix: MacOS gcc supports -arch.
+--- a/Configure
++++ b/Configure
+@@ -549,9 +549,9 @@ my %table=(
+ "rhapsody-ppc-cc","cc:-O3 -DB_ENDIAN::(unknown):MACOSX_RHAPSODY::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${no_asm}::",
+ "darwin-ppc-cc","cc:-arch ppc -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc32_asm}:osx32:dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
+ "darwin64-ppc-cc","cc:-arch ppc64 -O3 -DB_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc64_asm}:osx64:dlfcn:darwin-shared:-fPIC -fno-common:-arch ppc64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
+-"darwin-i386-cc","cc:-arch i386 -O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:${x86_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
+-"debug-darwin-i386-cc","cc:-arch i386 -g3 -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:${x86_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch i386 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
+-"darwin64-x86_64-cc","cc:-arch x86_64 -O3 -DL_ENDIAN -DMD32_REG_T=int -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-arch x86_64 -dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
++"darwin-i386-cc","cc:-O3 -fomit-frame-pointer -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:${x86_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
++"debug-darwin-i386-cc","cc:-g3 -DL_ENDIAN::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:BN_LLONG RC4_INT RC4_CHUNK DES_UNROLL BF_PTR:${x86_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
++"darwin64-x86_64-cc","cc:-O3 -DL_ENDIAN -DMD32_REG_T=int -Wall::-D_REENTRANT:MACOSX:-Wl,-search_paths_first%:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:macosx:dlfcn:darwin-shared:-fPIC -fno-common:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
+ "debug-darwin-ppc-cc","cc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DB_ENDIAN -g -Wall -O::-D_REENTRANT:MACOSX::BN_LLONG RC4_CHAR RC4_CHUNK DES_UNROLL BF_PTR:${ppc32_asm}:osx32:dlfcn:darwin-shared:-fPIC:-dynamiclib:.\$(SHLIB_MAJOR).\$(SHLIB_MINOR).dylib",
+
+ ##### A/UX