From 3c0a8a7dfd283f28645d8aefa693dc68d68c8dd0 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Mon, 12 Jun 2023 14:41:05 +0300 Subject: [PATCH] boost: cleanup --- pkgs/development/libraries/boost/1.68.nix | 11 ---------- pkgs/development/libraries/boost/1.69.nix | 13 ------------ pkgs/development/libraries/boost/1.70.nix | 13 ------------ pkgs/development/libraries/boost/1.72.nix | 17 --------------- pkgs/development/libraries/boost/1.73.nix | 15 ------------- pkgs/development/libraries/boost/1.74.nix | 15 ------------- .../libraries/boost/cmake-paths.patch | 21 ------------------- pkgs/development/libraries/boost/default.nix | 6 ------ pkgs/development/libraries/boost/generic.nix | 21 +------------------ .../boost/pthread-stack-min-fix.patch | 15 ------------- 10 files changed, 1 insertion(+), 146 deletions(-) delete mode 100644 pkgs/development/libraries/boost/1.68.nix delete mode 100644 pkgs/development/libraries/boost/1.69.nix delete mode 100644 pkgs/development/libraries/boost/1.70.nix delete mode 100644 pkgs/development/libraries/boost/1.72.nix delete mode 100644 pkgs/development/libraries/boost/1.73.nix delete mode 100644 pkgs/development/libraries/boost/1.74.nix delete mode 100644 pkgs/development/libraries/boost/cmake-paths.patch delete mode 100644 pkgs/development/libraries/boost/pthread-stack-min-fix.patch diff --git a/pkgs/development/libraries/boost/1.68.nix b/pkgs/development/libraries/boost/1.68.nix deleted file mode 100644 index 7fb85d7239f2..000000000000 --- a/pkgs/development/libraries/boost/1.68.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ callPackage, fetchurl, fetchpatch, ... } @ args: - -callPackage ./generic.nix (args // rec { - version = "1.68.0"; - - src = fetchurl { - url = "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"; - # SHA256 from http://www.boost.org/users/history/version_1_68_0.html - sha256 = "7f6130bc3cf65f56a618888ce9d5ea704fa10b462be126ad053e80e553d6d8b7"; - }; -}) diff --git a/pkgs/development/libraries/boost/1.69.nix b/pkgs/development/libraries/boost/1.69.nix deleted file mode 100644 index c8846daa64f3..000000000000 --- a/pkgs/development/libraries/boost/1.69.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ callPackage, fetchurl, fetchpatch, ... } @ args: - -callPackage ./generic.nix (args // rec { - version = "1.69.0"; - - src = fetchurl { - url = "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"; - # SHA256 from http://www.boost.org/users/history/version_1_69_0.html - sha256 = "8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406"; - }; - - patches = [ ./pthread-stack-min-fix.patch ]; -}) diff --git a/pkgs/development/libraries/boost/1.70.nix b/pkgs/development/libraries/boost/1.70.nix deleted file mode 100644 index 4d50f41e49ce..000000000000 --- a/pkgs/development/libraries/boost/1.70.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ callPackage, fetchurl, fetchpatch, ... } @ args: - -callPackage ./generic.nix (args // rec { - version = "1.70.0"; - - src = fetchurl { - url = "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"; - # SHA256 from http://www.boost.org/users/history/version_1_70_0.html - sha256 = "430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778"; - }; - - patches = [ ./pthread-stack-min-fix.patch ]; -}) diff --git a/pkgs/development/libraries/boost/1.72.nix b/pkgs/development/libraries/boost/1.72.nix deleted file mode 100644 index 4f2cc4848b19..000000000000 --- a/pkgs/development/libraries/boost/1.72.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ callPackage, fetchurl, fetchpatch, ... } @ args: - -callPackage ./generic.nix (args // rec { - version = "1.72.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_72_0.html - sha256 = "59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722"; - }; - - patches = [ ./pthread-stack-min-fix.patch ]; -}) - diff --git a/pkgs/development/libraries/boost/1.73.nix b/pkgs/development/libraries/boost/1.73.nix deleted file mode 100644 index 97506873980f..000000000000 --- a/pkgs/development/libraries/boost/1.73.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ callPackage, fetchurl, fetchpatch, ... } @ args: - -callPackage ./generic.nix (args // rec { - version = "1.73.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_73_0.html - sha256 = "4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402"; - }; -}) - diff --git a/pkgs/development/libraries/boost/1.74.nix b/pkgs/development/libraries/boost/1.74.nix deleted file mode 100644 index f28f40048632..000000000000 --- a/pkgs/development/libraries/boost/1.74.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ callPackage, fetchurl, fetchpatch, ... } @ args: - -callPackage ./generic.nix (args // rec { - version = "1.74.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_74_0.html - sha256 = "83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff025e116b1"; - }; -}) - diff --git a/pkgs/development/libraries/boost/cmake-paths.patch b/pkgs/development/libraries/boost/cmake-paths.patch deleted file mode 100644 index b7f90148f9dc..000000000000 --- a/pkgs/development/libraries/boost/cmake-paths.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/tools/boost_install/boost-install.jam b/tools/boost_install/boost-install.jam -index ad19f7b55..ec6bf57ff 100644 ---- a/tools/boost_install/boost-install.jam -+++ b/tools/boost_install/boost-install.jam -@@ -587,6 +587,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}/../\" ABSOLUTE)" -+ "get_filename_component(_BOOST_REAL_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" ABSOLUTE)" - : true ; - - if [ path.is-rooted $(cmakedir) ] -@@ -607,6 +608,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/pkgs/development/libraries/boost/default.nix b/pkgs/development/libraries/boost/default.nix index 27069b1ac03a..7a8902bc395d 100644 --- a/pkgs/development/libraries/boost/default.nix +++ b/pkgs/development/libraries/boost/default.nix @@ -16,12 +16,6 @@ let } ); in { - boost168 = makeBoost ./1.68.nix; - boost169 = makeBoost ./1.69.nix; - boost170 = makeBoost ./1.70.nix; - boost172 = makeBoost ./1.72.nix; - boost173 = makeBoost ./1.73.nix; - boost174 = makeBoost ./1.74.nix; boost175 = makeBoost ./1.75.nix; boost177 = makeBoost ./1.77.nix; boost178 = makeBoost ./1.78.nix; diff --git a/pkgs/development/libraries/boost/generic.nix b/pkgs/development/libraries/boost/generic.nix index 7d8aee067c86..3b7aa4e464b2 100644 --- a/pkgs/development/libraries/boost/generic.nix +++ b/pkgs/development/libraries/boost/generic.nix @@ -31,9 +31,6 @@ assert enableShared || enableStatic; 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" && versionAtLeast stdenv.cc.version "8.0.0") -> versionAtLeast version "1.69"; - let variant = lib.concatStringsSep "," @@ -107,22 +104,7 @@ stdenv.mkDerivation { patches = patches ++ lib.optional stdenv.isDarwin ./darwin-no-system-python.patch - # Fix boost-context segmentation faults on ppc64 due to ABI violation - ++ lib.optional (lib.versionOlder version "1.71") (fetchpatch { - url = "https://github.com/boostorg/context/commit/2354eca9b776a6739112833f64754108cc0d1dc5.patch"; - sha256 = "067m4bjpmcanqvg28djax9a10avmdwhlpfx6gn73kbqqq70dnz29"; - stripLen = 1; - extraPrefix = "libs/context/"; - }) - ++ lib.optional (lib.versionOlder version "1.70") (fetchpatch { - # support for Mips64n64 appeared in boost-context 1.70 - url = "https://github.com/boostorg/context/commit/e3f744a1862164062d579d1972272d67bdaa9c39.patch"; - sha256 = "sha256-qjQy1b4jDsIRrI+UYtcguhvChrMbGWO0UlEzEJHYzRI="; - stripLen = 1; - extraPrefix = "libs/context/"; - }) - ++ lib.optional (lib.versionAtLeast version "1.70" && lib.versionOlder version "1.73") ./cmake-paths.patch - ++ lib.optional (lib.versionAtLeast version "1.73") ./cmake-paths-173.patch + ++ [ ./cmake-paths-173.patch ] ++ lib.optional (version == "1.77.0") (fetchpatch { url = "https://github.com/boostorg/math/commit/7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b.patch"; relative = "include"; @@ -134,7 +116,6 @@ stdenv.mkDerivation { description = "Collection of C++ libraries"; license = licenses.boost; platforms = platforms.unix ++ platforms.windows; - badPlatforms = optionals (versionOlder version "1.73") platforms.riscv; maintainers = with maintainers; [ hjones2199 ]; broken = diff --git a/pkgs/development/libraries/boost/pthread-stack-min-fix.patch b/pkgs/development/libraries/boost/pthread-stack-min-fix.patch deleted file mode 100644 index b6c85f840529..000000000000 --- a/pkgs/development/libraries/boost/pthread-stack-min-fix.patch +++ /dev/null @@ -1,15 +0,0 @@ -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