From 89686a22529cdb4ecee0569713f1798e645e120f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 13 Jul 2005 11:22:38 +0000 Subject: [PATCH] * Darwin compatibility fix, and modernise the ancient builder. svn path=/nixpkgs/trunk/; revision=3332 --- pkgs/development/libraries/openssl/builder.sh | 20 ++++++------- .../development/libraries/openssl/default.nix | 6 +++- .../development/libraries/openssl/dylib.patch | 30 +++++++++++++++++++ 3 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 pkgs/development/libraries/openssl/dylib.patch diff --git a/pkgs/development/libraries/openssl/builder.sh b/pkgs/development/libraries/openssl/builder.sh index 596a80cd3713..0ad465c87715 100644 --- a/pkgs/development/libraries/openssl/builder.sh +++ b/pkgs/development/libraries/openssl/builder.sh @@ -1,14 +1,12 @@ -. $stdenv/setup || exit 1 -export PATH=$perl/bin:$PATH +. $stdenv/setup -tar xvfz $src || exit 1 -cd openssl-* || exit 1 -./config --prefix=$out shared || exit 1 -make || exit 1 -mkdir $out || exit 1 -make install || exit 1 +configureScript=./config +configureFlags=shared -# Bug fix: openssl does a `chmod 644' on the pkgconfig directory. -chmod 755 $out/lib/pkgconfig || exit 1 +postInstall=postInstall +postInstall() { + # Bug fix: openssl does a `chmod 644' on the pkgconfig directory. + chmod 755 $out/lib/pkgconfig || exit 1 +} -echo $envpkgs > $out/envpkgs || exit 1 +genericBuild diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index c3bfbbb27f5a..44778a98128d 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -5,5 +5,9 @@ url = http://www.openssl.org/source/openssl-0.9.8.tar.gz; md5 = "9da21071596a124acde6080552deac16"; }; - inherit perl; + buildInputs = [perl]; + + # Quick fix for a Makefile bug in openssl-0.9.8 (`make install' + # tries to copy .so files, instead of .dylib files). + patches = if stdenv.system == "powerpc-darwin" then [./dylib.patch] else []; } diff --git a/pkgs/development/libraries/openssl/dylib.patch b/pkgs/development/libraries/openssl/dylib.patch new file mode 100644 index 000000000000..ee3e31d4571b --- /dev/null +++ b/pkgs/development/libraries/openssl/dylib.patch @@ -0,0 +1,30 @@ +diff -rc openssl-0.9.8-orig/engines/Makefile openssl-0.9.8/engines/Makefile +*** openssl-0.9.8-orig/engines/Makefile 2005-06-28 11:10:18.000000000 +0200 +--- openssl-0.9.8/engines/Makefile 2005-07-13 13:19:09.000000000 +0200 +*************** +*** 91,102 **** + for l in $(LIBNAMES); do \ + ( echo installing $$l; \ + if [ "$(PLATFORM)" != "Cygwin" ]; then \ +! cp lib$$l.so $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \ + else \ +! cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \ + fi; \ +! chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new; \ +! mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.so ); \ + done; \ + fi + +--- 91,102 ---- + for l in $(LIBNAMES); do \ + ( echo installing $$l; \ + if [ "$(PLATFORM)" != "Cygwin" ]; then \ +! cp lib$$l.dylib $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.dylib.new; \ + else \ +! cp cyg$$l.dll $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.dylib.new; \ + fi; \ +! chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.dylib.new; \ +! mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.dylib.new $(INSTALL_PREFIX)$(INSTALLTOP)/lib/engines/lib$$l.dylib ); \ + done; \ + fi +