about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/boost
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-01-15 10:30:44 +0000
committerAlyssa Ross <hi@alyssa.is>2021-01-15 10:30:44 +0000
commite0794be8a0d11e90461e5a9c85012a36b93ec976 (patch)
treeefd9cbc55ea3322867bf601c4d536758a3dd5fcc /nixpkgs/pkgs/development/libraries/boost
parent3538874082ded7647b1ccec0343c7c1e882cfef3 (diff)
parent1a57d96edd156958b12782e8c8b6a374142a7248 (diff)
downloadnixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.gz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.bz2
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.lz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.xz
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.tar.zst
nixlib-e0794be8a0d11e90461e5a9c85012a36b93ec976.zip
Merge commit '1a57d96edd156958b12782e8c8b6a374142a7248'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/boost')
-rw-r--r--nixpkgs/pkgs/development/libraries/boost/1.73.nix16
-rw-r--r--nixpkgs/pkgs/development/libraries/boost/1.74.nix15
-rw-r--r--nixpkgs/pkgs/development/libraries/boost/1.75.nix15
-rw-r--r--nixpkgs/pkgs/development/libraries/boost/cmake-paths-173.patch22
-rw-r--r--nixpkgs/pkgs/development/libraries/boost/generic.nix18
5 files changed, 82 insertions, 4 deletions
diff --git a/nixpkgs/pkgs/development/libraries/boost/1.73.nix b/nixpkgs/pkgs/development/libraries/boost/1.73.nix
new file mode 100644
index 000000000000..99a5486f197e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boost/1.73.nix
@@ -0,0 +1,16 @@
+{ stdenv, callPackage, fetchurl, fetchpatch, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "1.73.0";
+
+  src = fetchurl {
+    #url = "mirror://sourceforge/boost/boost_1_73_0.tar.bz2";
+    urls = [
+      "mirror://sourceforge/boost/boost_1_73_0.tar.bz2"
+      "https://dl.bintray.com/boostorg/release/1.73.0/source/boost_1_73_0.tar.bz2"
+    ];
+    # SHA256 from http://www.boost.org/users/history/version_1_73_0.html
+    sha256 = "4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402";
+  };
+})
+
diff --git a/nixpkgs/pkgs/development/libraries/boost/1.74.nix b/nixpkgs/pkgs/development/libraries/boost/1.74.nix
new file mode 100644
index 000000000000..35b4013dcb36
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boost/1.74.nix
@@ -0,0 +1,15 @@
+{ stdenv, callPackage, fetchurl, fetchpatch, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "1.74.0";
+
+  src = fetchurl {
+    urls = [
+      "mirror://sourceforge/boost/boost_1_74_0.tar.bz2"
+      "https://dl.bintray.com/boostorg/release/1.74.0/source/boost_1_74_0.tar.bz2"
+    ];
+    # SHA256 from http://www.boost.org/users/history/version_1_74_0.html
+    sha256 = "83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff025e116b1";
+  };
+})
+
diff --git a/nixpkgs/pkgs/development/libraries/boost/1.75.nix b/nixpkgs/pkgs/development/libraries/boost/1.75.nix
new file mode 100644
index 000000000000..9912032c7774
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boost/1.75.nix
@@ -0,0 +1,15 @@
+{ stdenv, callPackage, fetchurl, fetchpatch, ... } @ args:
+
+callPackage ./generic.nix (args // rec {
+  version = "1.75.0";
+
+  src = fetchurl {
+    urls = [
+      "mirror://sourceforge/boost/boost_1_75_0.tar.bz2"
+      "https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.tar.bz2"
+    ];
+    # SHA256 from http://www.boost.org/users/history/version_1_75_0.html
+    sha256 = "953db31e016db7bb207f11432bef7df100516eeb746843fa0486a222e3fd49cb";
+  };
+})
+
diff --git a/nixpkgs/pkgs/development/libraries/boost/cmake-paths-173.patch b/nixpkgs/pkgs/development/libraries/boost/cmake-paths-173.patch
new file mode 100644
index 000000000000..7b88da0e42a9
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/boost/cmake-paths-173.patch
@@ -0,0 +1,22 @@
+diff --git a/tools/boost_install/boost-install.jam b/tools/boost_install/boost-install.jam
+index 4238f921e..8fc1ea269 100644
+--- a/tools/boost_install/boost-install.jam
++++ b/tools/boost_install/boost-install.jam
+@@ -649,7 +649,7 @@ rule generate-cmake-config- ( target : sources * : properties * )
+         ""
+         "# Compute the include and library directories relative to this file."
+         ""
+-        "get_filename_component(_BOOST_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" REALPATH)"
++        "get_filename_component(_BOOST_REAL_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" REALPATH)"
+         : true ;
+ 
+     if [ path.is-rooted $(cmakedir) ]
+@@ -668,6 +668,8 @@ rule generate-cmake-config- ( target : sources * : properties * )
+             "  unset(_BOOST_CMAKEDIR_ORIGINAL)"
+             "endif()"
+             ""
++	    "# Assume that the installer actually did know where the libs were to be installed"
++            "get_filename_component(_BOOST_CMAKEDIR \"$(cmakedir-native)\" REALPATH)"
+             : true ;
+     }
+ 
diff --git a/nixpkgs/pkgs/development/libraries/boost/generic.nix b/nixpkgs/pkgs/development/libraries/boost/generic.nix
index 6d1c20f323d3..ec3a28e2b1a3 100644
--- a/nixpkgs/pkgs/development/libraries/boost/generic.nix
+++ b/nixpkgs/pkgs/development/libraries/boost/generic.nix
@@ -1,4 +1,5 @@
 { stdenv, icu, expat, zlib, bzip2, python, fixDarwinDylibNames, libiconv
+, fetchpatch
 , which
 , buildPackages
 , toolset ? /**/ if stdenv.cc.isClang  then "clang"
@@ -7,7 +8,7 @@
 , enableDebug ? false
 , enableSingleThreaded ? false
 , enableMultiThreaded ? true
-, enableShared ? !(stdenv.hostPlatform.libc == "msvcrt") # problems for now
+, enableShared ? !(with stdenv.hostPlatform; isStatic || libc == "msvcrt") # problems for now
 , enableStatic ? !enableShared
 , enablePython ? false
 , enableNumpy ? false
@@ -113,7 +114,16 @@ stdenv.mkDerivation {
     if version == "1.55.0"
     then ./darwin-1.55-no-system-python.patch
     else ./darwin-no-system-python.patch)
-  ++ optional (versionAtLeast version "1.70") ./cmake-paths.patch;
+  # Fix boost-context segmentation faults on ppc64 due to ABI violation
+  ++ optional (versionAtLeast version "1.61" &&
+               versionOlder version "1.71") (fetchpatch {
+    url = "https://github.com/boostorg/context/commit/2354eca9b776a6739112833f64754108cc0d1dc5.patch";
+    sha256 = "067m4bjpmcanqvg28djax9a10avmdwhlpfx6gn73kbqqq70dnz29";
+    stripLen = 1;
+    extraPrefix = "libs/context/";
+  })
+  ++ optional (and (versionAtLeast version "1.70") (!versionAtLeast version "1.73")) ./cmake-paths.patch
+  ++ optional (versionAtLeast version "1.73") ./cmake-paths-173.patch;
 
   meta = {
     homepage = "http://boost.org/";
@@ -145,11 +155,11 @@ stdenv.mkDerivation {
 
   enableParallelBuilding = true;
 
-  nativeBuildInputs = [ which ];
+  nativeBuildInputs = [ which ]
+    ++ optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
   depsBuildBuild = [ buildPackages.stdenv.cc ];
   buildInputs = [ expat zlib bzip2 libiconv ]
     ++ optional (stdenv.hostPlatform == stdenv.buildPlatform) icu
-    ++ optional stdenv.isDarwin fixDarwinDylibNames
     ++ optional enablePython python
     ++ optional enableNumpy python.pkgs.numpy;