From 2e7e556d7e1b2e5d1a748aef3012a23caea5c21a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 13 Oct 2006 12:58:13 +0000 Subject: * Berkeley DB 4.5.20. svn path=/nixpkgs/trunk/; revision=6729 --- pkgs/development/libraries/db4/cygwin-4.4.patch | 21 +++++++++++++++++++++ pkgs/development/libraries/db4/cygwin-4.5.patch | 22 ++++++++++++++++++++++ pkgs/development/libraries/db4/cygwin.patch | 21 --------------------- pkgs/development/libraries/db4/db4-4.4.nix | 14 ++++++++++++++ pkgs/development/libraries/db4/db4-4.5.20.nix | 14 -------------- pkgs/development/libraries/db4/db4-4.5.nix | 15 +++++++++++++++ pkgs/development/libraries/db4/default.nix | 14 -------------- 7 files changed, 72 insertions(+), 49 deletions(-) create mode 100644 pkgs/development/libraries/db4/cygwin-4.4.patch create mode 100644 pkgs/development/libraries/db4/cygwin-4.5.patch delete mode 100644 pkgs/development/libraries/db4/cygwin.patch create mode 100644 pkgs/development/libraries/db4/db4-4.4.nix delete mode 100644 pkgs/development/libraries/db4/db4-4.5.20.nix create mode 100644 pkgs/development/libraries/db4/db4-4.5.nix delete mode 100644 pkgs/development/libraries/db4/default.nix (limited to 'pkgs/development/libraries/db4') diff --git a/pkgs/development/libraries/db4/cygwin-4.4.patch b/pkgs/development/libraries/db4/cygwin-4.4.patch new file mode 100644 index 00000000000..3f9d658b5da --- /dev/null +++ b/pkgs/development/libraries/db4/cygwin-4.4.patch @@ -0,0 +1,21 @@ +diff -rc db-4.4.20.NC-old/os/os_flock.c db-4.4.20.NC/os/os_flock.c +*** db-4.4.20.NC-old/os/os_flock.c Mon Jun 20 16:59:01 2005 +--- db-4.4.20.NC/os/os_flock.c Wed Jun 7 17:01:49 2006 +*************** +*** 36,41 **** +--- 36,50 ---- + + DB_ASSERT(F_ISSET(fhp, DB_FH_OPENED) && fhp->fd != -1); + ++ #ifdef __CYGWIN__ ++ /* ++ * Windows file locking interferes with read/write operations, so we ++ * map the ranges to an area past the end of the file. ++ */ ++ DB_ASSERT(offset < (off_t) 1 << 62); ++ offset += (off_t) 1 << 62; ++ #endif ++ + #ifdef HAVE_FCNTL + fl.l_start = offset; + fl.l_len = 1; diff --git a/pkgs/development/libraries/db4/cygwin-4.5.patch b/pkgs/development/libraries/db4/cygwin-4.5.patch new file mode 100644 index 00000000000..410106722a6 --- /dev/null +++ b/pkgs/development/libraries/db4/cygwin-4.5.patch @@ -0,0 +1,22 @@ +diff -rc db-4.5.20-orig/os/os_flock.c db-4.5.20/os/os_flock.c +*** db-4.5.20-orig/os/os_flock.c 2006-10-13 12:36:12.000000000 +0200 +--- db-4.5.20/os/os_flock.c 2006-10-13 12:40:11.000000000 +0200 +*************** +*** 30,35 **** +--- 30,44 ---- + + DB_ASSERT(dbenv, F_ISSET(fhp, DB_FH_OPENED) && fhp->fd != -1); + ++ #ifdef __CYGWIN__ ++ /* ++ * Windows file locking interferes with read/write operations, so we ++ * map the ranges to an area past the end of the file. ++ */ ++ DB_ASSERT(offset < (off_t) 1 << 62); ++ offset += (off_t) 1 << 62; ++ #endif ++ + fl.l_start = offset; + fl.l_len = 1; + fl.l_type = acquire ? F_WRLCK : F_UNLCK; +Only in db-4.5.20/os: os_flock.c~ diff --git a/pkgs/development/libraries/db4/cygwin.patch b/pkgs/development/libraries/db4/cygwin.patch deleted file mode 100644 index 3f9d658b5da..00000000000 --- a/pkgs/development/libraries/db4/cygwin.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -rc db-4.4.20.NC-old/os/os_flock.c db-4.4.20.NC/os/os_flock.c -*** db-4.4.20.NC-old/os/os_flock.c Mon Jun 20 16:59:01 2005 ---- db-4.4.20.NC/os/os_flock.c Wed Jun 7 17:01:49 2006 -*************** -*** 36,41 **** ---- 36,50 ---- - - DB_ASSERT(F_ISSET(fhp, DB_FH_OPENED) && fhp->fd != -1); - -+ #ifdef __CYGWIN__ -+ /* -+ * Windows file locking interferes with read/write operations, so we -+ * map the ranges to an area past the end of the file. -+ */ -+ DB_ASSERT(offset < (off_t) 1 << 62); -+ offset += (off_t) 1 << 62; -+ #endif -+ - #ifdef HAVE_FCNTL - fl.l_start = offset; - fl.l_len = 1; diff --git a/pkgs/development/libraries/db4/db4-4.4.nix b/pkgs/development/libraries/db4/db4-4.4.nix new file mode 100644 index 00000000000..f17cc0ae24f --- /dev/null +++ b/pkgs/development/libraries/db4/db4-4.4.nix @@ -0,0 +1,14 @@ +{stdenv, fetchurl, cxxSupport ? true, compat185 ? true}: + +stdenv.mkDerivation ({ + name = "db4-4.4.20"; + builder = ./builder.sh; + src = fetchurl { + url = http://nix.cs.uu.nl/dist/tarballs/db-4.4.20.NC.tar.gz; + md5 = "afd9243ea353bbaa04421488d3b37900"; + }; + configureFlags = [ + (if cxxSupport then "--enable-cxx" else "--disable-cxx") + (if cxxSupport then "--enable-compat185" else "--disable-compat185") + ]; +} // (if stdenv.system == "i686-cygwin" then {patches = [./cygwin-4.4.patch];} else {})) diff --git a/pkgs/development/libraries/db4/db4-4.5.20.nix b/pkgs/development/libraries/db4/db4-4.5.20.nix deleted file mode 100644 index 5c20b2f451f..00000000000 --- a/pkgs/development/libraries/db4/db4-4.5.20.nix +++ /dev/null @@ -1,14 +0,0 @@ -{stdenv, fetchurl, cxxSupport ? true, compat185 ? true}: - -stdenv.mkDerivation ({ - name = "db4-4.5.20"; - builder = ./builder.sh; - src = fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/db-4.5.20.NC.tar.gz; - md5 = "1bfa6256f8d546b97bef1f448ab09875"; - }; - configureFlags = [ - (if cxxSupport then "--enable-cxx" else "--disable-cxx") - (if cxxSupport then "--enable-compat185" else "--disable-compat185") - ]; -} // (if stdenv.system == "i686-cygwin" then {patches = [./cygwin.patch];} else {})) diff --git a/pkgs/development/libraries/db4/db4-4.5.nix b/pkgs/development/libraries/db4/db4-4.5.nix new file mode 100644 index 00000000000..9134c7f483b --- /dev/null +++ b/pkgs/development/libraries/db4/db4-4.5.nix @@ -0,0 +1,15 @@ +{stdenv, fetchurl, cxxSupport ? true, compat185 ? true}: + +stdenv.mkDerivation { + name = "db4-4.5.20"; + builder = ./builder.sh; + src = fetchurl { + url = http://nix.cs.uu.nl/dist/tarballs/db-4.5.20.NC.tar.gz; + md5 = "1bfa6256f8d546b97bef1f448ab09875"; + }; + configureFlags = [ + (if cxxSupport then "--enable-cxx" else "--disable-cxx") + (if cxxSupport then "--enable-compat185" else "--disable-compat185") + ]; + patches = [./cygwin-4.5.patch]; +} diff --git a/pkgs/development/libraries/db4/default.nix b/pkgs/development/libraries/db4/default.nix deleted file mode 100644 index 2b4246ff461..00000000000 --- a/pkgs/development/libraries/db4/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{stdenv, fetchurl, cxxSupport ? true, compat185 ? true}: - -stdenv.mkDerivation ({ - name = "db4-4.4.20"; - builder = ./builder.sh; - src = fetchurl { - url = http://nix.cs.uu.nl/dist/tarballs/db-4.4.20.NC.tar.gz; - md5 = "afd9243ea353bbaa04421488d3b37900"; - }; - configureFlags = [ - (if cxxSupport then "--enable-cxx" else "--disable-cxx") - (if cxxSupport then "--enable-compat185" else "--disable-compat185") - ]; -} // (if stdenv.system == "i686-cygwin" then {patches = [./cygwin.patch];} else {})) -- cgit 1.4.1