diff options
author | Alyssa Ross <hi@alyssa.is> | 2022-12-06 19:57:55 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-02-08 13:48:30 +0000 |
commit | bf3aadfdd39aa197e18bade671fab6726349ffa4 (patch) | |
tree | 698567af766ed441d757b57a7b21e68d4a342a2b /nixpkgs/pkgs/development/libraries/boost | |
parent | f4afc5a01d9539ce09e47494e679c51f80723d07 (diff) | |
parent | 99665eb45f58d959d2cb9e49ddb960c79d596f33 (diff) | |
download | nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.gz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.bz2 nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.lz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.xz nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.tar.zst nixlib-bf3aadfdd39aa197e18bade671fab6726349ffa4.zip |
Merge commit '99665eb45f58d959d2cb9e49ddb960c79d596f33'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/boost')
13 files changed, 99 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/development/libraries/boost/1.59.nix b/nixpkgs/pkgs/development/libraries/boost/1.59.nix index 88e584f5e415..a417f3e26392 100644 --- a/nixpkgs/pkgs/development/libraries/boost/1.59.nix +++ b/nixpkgs/pkgs/development/libraries/boost/1.59.nix @@ -1,8 +1,21 @@ -{ callPackage, fetchurl, ... } @ args: +{ callPackage, fetchurl, fetchpatch, ... } @ args: callPackage ./generic.nix (args // rec { version = "1.59.0"; + boostBuildPatches = [ + # Fixes a segfault on aarch64-darwin from an implicitly defined varargs function. + # https://github.com/boostorg/build/pull/238 + (fetchpatch { + url = "https://github.com/boostorg/build/commit/48e9017139dd94446633480661e5447c7e0d8b1b.diff"; + excludes = [ + # Doesn't apply, isn't critical. + "src/engine/filesys.h" + ]; + sha256 = "sha256-/HLOJKBcGqcK9yBYKSRCSMmTNhCH3sSpK1s3OzkIqx8"; + }) + ]; + src = fetchurl { url = "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"; sha256 = "1jj1aai5rdmd72g90a3pd8sw9vi32zad46xv5av8fhnr48ir6ykj"; diff --git a/nixpkgs/pkgs/development/libraries/boost/1.69.nix b/nixpkgs/pkgs/development/libraries/boost/1.69.nix index d934e3267fcb..c8846daa64f3 100644 --- a/nixpkgs/pkgs/development/libraries/boost/1.69.nix +++ b/nixpkgs/pkgs/development/libraries/boost/1.69.nix @@ -8,4 +8,6 @@ callPackage ./generic.nix (args // rec { # SHA256 from http://www.boost.org/users/history/version_1_69_0.html sha256 = "8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406"; }; + + patches = [ ./pthread-stack-min-fix.patch ]; }) diff --git a/nixpkgs/pkgs/development/libraries/boost/1.70.nix b/nixpkgs/pkgs/development/libraries/boost/1.70.nix index bc70797acda8..4d50f41e49ce 100644 --- a/nixpkgs/pkgs/development/libraries/boost/1.70.nix +++ b/nixpkgs/pkgs/development/libraries/boost/1.70.nix @@ -8,4 +8,6 @@ callPackage ./generic.nix (args // rec { # SHA256 from http://www.boost.org/users/history/version_1_70_0.html sha256 = "430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778"; }; + + patches = [ ./pthread-stack-min-fix.patch ]; }) diff --git a/nixpkgs/pkgs/development/libraries/boost/1.72.nix b/nixpkgs/pkgs/development/libraries/boost/1.72.nix index bb2fccdfaf78..4f2cc4848b19 100644 --- a/nixpkgs/pkgs/development/libraries/boost/1.72.nix +++ b/nixpkgs/pkgs/development/libraries/boost/1.72.nix @@ -6,10 +6,12 @@ callPackage ./generic.nix (args // rec { src = fetchurl { urls = [ "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2" - "https://dl.bintray.com/boostorg/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2" + "https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2" ]; # SHA256 from http://www.boost.org/users/history/version_1_72_0.html sha256 = "59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722"; }; + + patches = [ ./pthread-stack-min-fix.patch ]; }) diff --git a/nixpkgs/pkgs/development/libraries/boost/1.73.nix b/nixpkgs/pkgs/development/libraries/boost/1.73.nix index 1d53ebcccd75..97506873980f 100644 --- a/nixpkgs/pkgs/development/libraries/boost/1.73.nix +++ b/nixpkgs/pkgs/development/libraries/boost/1.73.nix @@ -6,7 +6,7 @@ callPackage ./generic.nix (args // rec { src = fetchurl { urls = [ "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2" - "https://dl.bintray.com/boostorg/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2" + "https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.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 index f3a29dafbcd9..f28f40048632 100644 --- a/nixpkgs/pkgs/development/libraries/boost/1.74.nix +++ b/nixpkgs/pkgs/development/libraries/boost/1.74.nix @@ -6,7 +6,7 @@ callPackage ./generic.nix (args // rec { src = fetchurl { urls = [ "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2" - "https://dl.bintray.com/boostorg/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2" + "https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.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 index 1432899f9967..ec77070c932c 100644 --- a/nixpkgs/pkgs/development/libraries/boost/1.75.nix +++ b/nixpkgs/pkgs/development/libraries/boost/1.75.nix @@ -6,7 +6,7 @@ callPackage ./generic.nix (args // rec { src = fetchurl { urls = [ "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2" - "https://dl.bintray.com/boostorg/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2" + "https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.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/1.77.nix b/nixpkgs/pkgs/development/libraries/boost/1.77.nix index 634523b244ce..3da1a455ead4 100644 --- a/nixpkgs/pkgs/development/libraries/boost/1.77.nix +++ b/nixpkgs/pkgs/development/libraries/boost/1.77.nix @@ -6,7 +6,7 @@ callPackage ./generic.nix (args // rec { src = fetchurl { urls = [ "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2" - "https://dl.bintray.com/boostorg/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2" + "https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2" ]; # SHA256 from http://www.boost.org/users/history/version_1_77_0.html sha256 = "sha256-/J+F/AMOIzFCkIJBr3qEbmBjCqc4jeml+vsfOiaECFQ="; diff --git a/nixpkgs/pkgs/development/libraries/boost/1.78.nix b/nixpkgs/pkgs/development/libraries/boost/1.78.nix new file mode 100644 index 000000000000..2cc818e63ce0 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/boost/1.78.nix @@ -0,0 +1,15 @@ +{ callPackage, fetchurl, fetchpatch, ... } @ args: + +callPackage ./generic.nix (args // rec { + version = "1.78.0"; + + src = fetchurl { + urls = [ + "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2" + "https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2" + ]; + # SHA256 from http://www.boost.org/users/history/version_1_78_0.html + sha256 = "8681f175d4bdb26c52222665793eef08490d7758529330f98d3b29dd0735bccc"; + }; +}) + diff --git a/nixpkgs/pkgs/development/libraries/boost/1.79.nix b/nixpkgs/pkgs/development/libraries/boost/1.79.nix new file mode 100644 index 000000000000..87975e2846d3 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/boost/1.79.nix @@ -0,0 +1,14 @@ +{ callPackage, fetchurl, fetchpatch, ... } @ args: + +callPackage ./generic.nix (args // rec { + version = "1.79.0"; + + src = fetchurl { + urls = [ + "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2" + "https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2" + ]; + # SHA256 from http://www.boost.org/users/history/version_1_79_0.html + sha256 = "475d589d51a7f8b3ba2ba4eda022b170e562ca3b760ee922c146b6c65856ef39"; + }; +}) diff --git a/nixpkgs/pkgs/development/libraries/boost/default.nix b/nixpkgs/pkgs/development/libraries/boost/default.nix index aeb0878a0d11..e9f7308e3464 100644 --- a/nixpkgs/pkgs/development/libraries/boost/default.nix +++ b/nixpkgs/pkgs/development/libraries/boost/default.nix @@ -45,4 +45,6 @@ in { boost174 = makeBoost ./1.74.nix; boost175 = makeBoost ./1.75.nix; boost177 = makeBoost ./1.77.nix; + boost178 = makeBoost ./1.78.nix; + boost179 = makeBoost ./1.79.nix; } diff --git a/nixpkgs/pkgs/development/libraries/boost/generic.nix b/nixpkgs/pkgs/development/libraries/boost/generic.nix index c0fce3ae5760..b9bdec0cd077 100644 --- a/nixpkgs/pkgs/development/libraries/boost/generic.nix +++ b/nixpkgs/pkgs/development/libraries/boost/generic.nix @@ -15,6 +15,7 @@ , enableNumpy ? false , taggedLayout ? ((enableRelease && enableDebug) || (enableSingleThreaded && enableMultiThreaded) || (enableShared && enableStatic)) , patches ? [] +, boostBuildPatches ? [] , useMpi ? false , mpi , extraB2Args ? [] @@ -32,7 +33,7 @@ assert enablePython -> stdenv.hostPlatform == stdenv.buildPlatform; assert enableNumpy -> enablePython; # Boost <1.69 can't be built on linux with clang >8, because pth was removed -assert with lib; ((stdenv.isLinux && toolset == "clang" && !(versionOlder stdenv.cc.version "8.0.0")) -> !(versionOlder version "1.69")); +assert with lib; (stdenv.isLinux && toolset == "clang" && versionAtLeast stdenv.cc.version "8.0.0") -> versionAtLeast version "1.69"; with lib; let @@ -68,7 +69,7 @@ let else "$NIX_BUILD_CORES"; - needUserConfig = stdenv.hostPlatform != stdenv.buildPlatform || useMpi || stdenv.isDarwin; + needUserConfig = stdenv.hostPlatform != stdenv.buildPlatform || useMpi || (stdenv.isDarwin && enableShared); b2Args = concatStringsSep " " ([ "--includedir=$dev/include" @@ -84,7 +85,9 @@ let # TODO: make this unconditional ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "address-model=${toString stdenv.hostPlatform.parsed.cpu.bits}" - "architecture=${toString stdenv.hostPlatform.parsed.cpu.family}" + "architecture=${if stdenv.hostPlatform.isMips64 + then if versionOlder version "1.78" then "mips1" else "mips" + else toString stdenv.hostPlatform.parsed.cpu.family}" "binary-format=${toString stdenv.hostPlatform.parsed.kernel.execFormat.name}" "target-os=${toString stdenv.hostPlatform.parsed.kernel.name}" @@ -92,7 +95,8 @@ let # https://www.boost.org/doc/libs/1_66_0/libs/context/doc/html/context/architectures.html "abi=${if stdenv.hostPlatform.parsed.cpu.family == "arm" then "aapcs" else if stdenv.hostPlatform.isWindows then "ms" - else if stdenv.hostPlatform.isMips then "o32" + else if stdenv.hostPlatform.isMips32 then "o32" + else if stdenv.hostPlatform.isMips64n64 then "n64" else "sysv"}" ] ++ optional (link != "static") "runtime-link=${runtime-link}" ++ optional (variant == "release") "debug-symbols=off" @@ -133,7 +137,14 @@ stdenv.mkDerivation { sha256 = "15d2a636hhsb1xdyp44x25dyqfcaws997vnp9kl1mhzvxjzz7hb0"; stripLen = 1; }) - ++ optional (and (versionAtLeast version "1.70") (!versionAtLeast version "1.73")) ./cmake-paths.patch + ++ optional (versionAtLeast version "1.65" && versionOlder version "1.70") (fetchpatch { + # support for Mips64n64 appeared in boost-context 1.70; this patch won't apply to pre-1.65 cleanly + url = "https://github.com/boostorg/context/commit/e3f744a1862164062d579d1972272d67bdaa9c39.patch"; + sha256 = "sha256-qjQy1b4jDsIRrI+UYtcguhvChrMbGWO0UlEzEJHYzRI="; + stripLen = 1; + extraPrefix = "libs/context/"; + }) + ++ optional (versionAtLeast version "1.70" && versionOlder version "1.73") ./cmake-paths.patch ++ optional (versionAtLeast version "1.73") ./cmake-paths-173.patch ++ optional (version == "1.77.0") (fetchpatch { url = "https://github.com/boostorg/math/commit/7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b.patch"; @@ -150,6 +161,18 @@ stdenv.mkDerivation { ++ optional ((versionOlder version "1.57") || version == "1.58") "x86_64-darwin" ++ optionals (versionOlder version "1.73") lib.platforms.riscv; maintainers = with maintainers; [ hjones2199 ]; + + broken = + # boost-context lacks support for the N32 ABI on mips64. The build + # will succeed, but packages depending on boost-context will fail with + # a very cryptic error message. + stdenv.hostPlatform.isMips64n32 || + # the patch above does not apply cleanly to pre-1.65 boost + (stdenv.hostPlatform.isMips64n64 && (versionOlder version "1.65")); + }; + + passthru = { + inherit boostBuildPatches; }; preConfigure = optionalString useMpi '' diff --git a/nixpkgs/pkgs/development/libraries/boost/pthread-stack-min-fix.patch b/nixpkgs/pkgs/development/libraries/boost/pthread-stack-min-fix.patch new file mode 100644 index 000000000000..b6c85f840529 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/boost/pthread-stack-min-fix.patch @@ -0,0 +1,15 @@ +Taken from https://github.com/conan-io/conan-center-index/pull/361/files + +diff --git a/include/boost/thread/pthread/thread_data.hpp b/include/boost/thread/pthread/thread_data.hpp +index aefbeb4..bc9b136 100644 +--- a/boost/thread/pthread/thread_data.hpp ++++ b/boost/thread/pthread/thread_data.hpp +@@ -57,7 +57,7 @@ namespace boost + #else + std::size_t page_size = ::sysconf( _SC_PAGESIZE); + #endif +-#if PTHREAD_STACK_MIN > 0 ++#ifdef PTHREAD_STACK_MIN + if (size<PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN; + #endif + size = ((size+page_size-1)/page_size)*page_size; |