tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
0
fork
atom
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
boost: cleanup
Weijia Wang
2 years ago
3c0a8a7d
748209b9
+1
-146
10 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
boost
1.68.nix
1.69.nix
1.70.nix
1.72.nix
1.73.nix
1.74.nix
cmake-paths.patch
default.nix
generic.nix
pthread-stack-min-fix.patch
-11
pkgs/development/libraries/boost/1.68.nix
···
1
1
-
{ callPackage, fetchurl, fetchpatch, ... } @ args:
2
2
-
3
3
-
callPackage ./generic.nix (args // rec {
4
4
-
version = "1.68.0";
5
5
-
6
6
-
src = fetchurl {
7
7
-
url = "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2";
8
8
-
# SHA256 from http://www.boost.org/users/history/version_1_68_0.html
9
9
-
sha256 = "7f6130bc3cf65f56a618888ce9d5ea704fa10b462be126ad053e80e553d6d8b7";
10
10
-
};
11
11
-
})
-13
pkgs/development/libraries/boost/1.69.nix
···
1
1
-
{ callPackage, fetchurl, fetchpatch, ... } @ args:
2
2
-
3
3
-
callPackage ./generic.nix (args // rec {
4
4
-
version = "1.69.0";
5
5
-
6
6
-
src = fetchurl {
7
7
-
url = "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2";
8
8
-
# SHA256 from http://www.boost.org/users/history/version_1_69_0.html
9
9
-
sha256 = "8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406";
10
10
-
};
11
11
-
12
12
-
patches = [ ./pthread-stack-min-fix.patch ];
13
13
-
})
-13
pkgs/development/libraries/boost/1.70.nix
···
1
1
-
{ callPackage, fetchurl, fetchpatch, ... } @ args:
2
2
-
3
3
-
callPackage ./generic.nix (args // rec {
4
4
-
version = "1.70.0";
5
5
-
6
6
-
src = fetchurl {
7
7
-
url = "mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2";
8
8
-
# SHA256 from http://www.boost.org/users/history/version_1_70_0.html
9
9
-
sha256 = "430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778";
10
10
-
};
11
11
-
12
12
-
patches = [ ./pthread-stack-min-fix.patch ];
13
13
-
})
-17
pkgs/development/libraries/boost/1.72.nix
···
1
1
-
{ callPackage, fetchurl, fetchpatch, ... } @ args:
2
2
-
3
3
-
callPackage ./generic.nix (args // rec {
4
4
-
version = "1.72.0";
5
5
-
6
6
-
src = fetchurl {
7
7
-
urls = [
8
8
-
"mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
9
9
-
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
10
10
-
];
11
11
-
# SHA256 from http://www.boost.org/users/history/version_1_72_0.html
12
12
-
sha256 = "59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722";
13
13
-
};
14
14
-
15
15
-
patches = [ ./pthread-stack-min-fix.patch ];
16
16
-
})
17
17
-
-15
pkgs/development/libraries/boost/1.73.nix
···
1
1
-
{ callPackage, fetchurl, fetchpatch, ... } @ args:
2
2
-
3
3
-
callPackage ./generic.nix (args // rec {
4
4
-
version = "1.73.0";
5
5
-
6
6
-
src = fetchurl {
7
7
-
urls = [
8
8
-
"mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
9
9
-
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
10
10
-
];
11
11
-
# SHA256 from http://www.boost.org/users/history/version_1_73_0.html
12
12
-
sha256 = "4eb3b8d442b426dc35346235c8733b5ae35ba431690e38c6a8263dce9fcbb402";
13
13
-
};
14
14
-
})
15
15
-
-15
pkgs/development/libraries/boost/1.74.nix
···
1
1
-
{ callPackage, fetchurl, fetchpatch, ... } @ args:
2
2
-
3
3
-
callPackage ./generic.nix (args // rec {
4
4
-
version = "1.74.0";
5
5
-
6
6
-
src = fetchurl {
7
7
-
urls = [
8
8
-
"mirror://sourceforge/boost/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
9
9
-
"https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${builtins.replaceStrings ["."] ["_"] version}.tar.bz2"
10
10
-
];
11
11
-
# SHA256 from http://www.boost.org/users/history/version_1_74_0.html
12
12
-
sha256 = "83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff025e116b1";
13
13
-
};
14
14
-
})
15
15
-
-21
pkgs/development/libraries/boost/cmake-paths.patch
···
1
1
-
diff --git a/tools/boost_install/boost-install.jam b/tools/boost_install/boost-install.jam
2
2
-
index ad19f7b55..ec6bf57ff 100644
3
3
-
--- a/tools/boost_install/boost-install.jam
4
4
-
+++ b/tools/boost_install/boost-install.jam
5
5
-
@@ -587,6 +587,7 @@ rule generate-cmake-config- ( target : sources * : properties * )
6
6
-
"# Compute the include and library directories relative to this file."
7
7
-
""
8
8
-
"get_filename_component(_BOOST_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" ABSOLUTE)"
9
9
-
+ "get_filename_component(_BOOST_REAL_CMAKEDIR \"${CMAKE_CURRENT_LIST_DIR}/../\" ABSOLUTE)"
10
10
-
: true ;
11
11
-
12
12
-
if [ path.is-rooted $(cmakedir) ]
13
13
-
@@ -607,6 +608,8 @@ rule generate-cmake-config- ( target : sources * : properties * )
14
14
-
" unset(_BOOST_CMAKEDIR_ORIGINAL)"
15
15
-
"endif()"
16
16
-
""
17
17
-
+ "# Assume that the installer actually did know where the libs were to be installed"
18
18
-
+ "get_filename_component(_BOOST_CMAKEDIR \"$(cmakedir-native)\" REALPATH)"
19
19
-
: true ;
20
20
-
}
21
21
-
-6
pkgs/development/libraries/boost/default.nix
···
16
16
}
17
17
);
18
18
in {
19
19
-
boost168 = makeBoost ./1.68.nix;
20
20
-
boost169 = makeBoost ./1.69.nix;
21
21
-
boost170 = makeBoost ./1.70.nix;
22
22
-
boost172 = makeBoost ./1.72.nix;
23
23
-
boost173 = makeBoost ./1.73.nix;
24
24
-
boost174 = makeBoost ./1.74.nix;
25
19
boost175 = makeBoost ./1.75.nix;
26
20
boost177 = makeBoost ./1.77.nix;
27
21
boost178 = makeBoost ./1.78.nix;
+1
-20
pkgs/development/libraries/boost/generic.nix
···
31
31
32
32
assert enableNumpy -> enablePython;
33
33
34
34
-
# Boost <1.69 can't be built on linux with clang >8, because pth was removed
35
35
-
assert with lib; (stdenv.isLinux && toolset == "clang" && versionAtLeast stdenv.cc.version "8.0.0") -> versionAtLeast version "1.69";
36
36
-
37
34
let
38
35
39
36
variant = lib.concatStringsSep ","
···
107
104
108
105
patches = patches
109
106
++ lib.optional stdenv.isDarwin ./darwin-no-system-python.patch
110
110
-
# Fix boost-context segmentation faults on ppc64 due to ABI violation
111
111
-
++ lib.optional (lib.versionOlder version "1.71") (fetchpatch {
112
112
-
url = "https://github.com/boostorg/context/commit/2354eca9b776a6739112833f64754108cc0d1dc5.patch";
113
113
-
sha256 = "067m4bjpmcanqvg28djax9a10avmdwhlpfx6gn73kbqqq70dnz29";
114
114
-
stripLen = 1;
115
115
-
extraPrefix = "libs/context/";
116
116
-
})
117
117
-
++ lib.optional (lib.versionOlder version "1.70") (fetchpatch {
118
118
-
# support for Mips64n64 appeared in boost-context 1.70
119
119
-
url = "https://github.com/boostorg/context/commit/e3f744a1862164062d579d1972272d67bdaa9c39.patch";
120
120
-
sha256 = "sha256-qjQy1b4jDsIRrI+UYtcguhvChrMbGWO0UlEzEJHYzRI=";
121
121
-
stripLen = 1;
122
122
-
extraPrefix = "libs/context/";
123
123
-
})
124
124
-
++ lib.optional (lib.versionAtLeast version "1.70" && lib.versionOlder version "1.73") ./cmake-paths.patch
125
125
-
++ lib.optional (lib.versionAtLeast version "1.73") ./cmake-paths-173.patch
107
107
+
++ [ ./cmake-paths-173.patch ]
126
108
++ lib.optional (version == "1.77.0") (fetchpatch {
127
109
url = "https://github.com/boostorg/math/commit/7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b.patch";
128
110
relative = "include";
···
134
116
description = "Collection of C++ libraries";
135
117
license = licenses.boost;
136
118
platforms = platforms.unix ++ platforms.windows;
137
137
-
badPlatforms = optionals (versionOlder version "1.73") platforms.riscv;
138
119
maintainers = with maintainers; [ hjones2199 ];
139
120
140
121
broken =
-15
pkgs/development/libraries/boost/pthread-stack-min-fix.patch
···
1
1
-
Taken from https://github.com/conan-io/conan-center-index/pull/361/files
2
2
-
3
3
-
diff --git a/include/boost/thread/pthread/thread_data.hpp b/include/boost/thread/pthread/thread_data.hpp
4
4
-
index aefbeb4..bc9b136 100644
5
5
-
--- a/boost/thread/pthread/thread_data.hpp
6
6
-
+++ b/boost/thread/pthread/thread_data.hpp
7
7
-
@@ -57,7 +57,7 @@ namespace boost
8
8
-
#else
9
9
-
std::size_t page_size = ::sysconf( _SC_PAGESIZE);
10
10
-
#endif
11
11
-
-#if PTHREAD_STACK_MIN > 0
12
12
-
+#ifdef PTHREAD_STACK_MIN
13
13
-
if (size<PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN;
14
14
-
#endif
15
15
-
size = ((size+page_size-1)/page_size)*page_size;