summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorketsubouchi <kenta.tsubouchi@hac-inc.co.jp>2020-10-20 22:39:57 +0900
committerGitHub <noreply@github.com>2020-10-20 15:39:57 +0200
commitf68287afe97623b0a0e09c8625fcb79148b64f33 (patch)
tree312761ca5ed85749e23bab8e4062e5bb5d905277
parent9beadc3c14349b4095f492a78e80e700c5f9b954 (diff)
downloadspack-f68287afe97623b0a0e09c8625fcb79148b64f33.tar.gz
spack-f68287afe97623b0a0e09c8625fcb79148b64f33.tar.bz2
spack-f68287afe97623b0a0e09c8625fcb79148b64f33.tar.xz
spack-f68287afe97623b0a0e09c8625fcb79148b64f33.zip
boost: fix building old versions with non-system glib and bzip2 (#19389)
-rw-r--r--var/spack/repos/builtin/packages/boost/boost_154.patch31
-rw-r--r--var/spack/repos/builtin/packages/boost/package.py4
2 files changed, 35 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/boost/boost_154.patch b/var/spack/repos/builtin/packages/boost/boost_154.patch
new file mode 100644
index 0000000000..76e7fb2d6a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/boost/boost_154.patch
@@ -0,0 +1,31 @@
+--- a/tools/build/src/build/ac.jam
++++ b/tools/build/src/build/ac.jam
+@@ -76,14 +76,6 @@ rule construct-library ( name : property-set : provided-path ? )
+ rule find-library ( properties : names + : provided-path ? )
+ {
+ local result ;
+- if ! $(.main.cpp)
+- {
+- local a = [ class.new action : ac.generate-main :
+- [ property-set.empty ] ] ;
+- .main.cpp = [ virtual-target.register
+- [ class.new file-target main.cpp exact
+- : CPP : $(.project) : $(a) ] ] ;
+- }
+ if [ $(properties).get <link> ] = shared
+ {
+ link-opts = <link>shared <link>static ;
+@@ -100,8 +92,12 @@ rule find-library ( properties : names + : provided-path ? )
+ {
+ local name = $(names-iter[1]) ;
+ local lib = [ construct-library $(name) : $(properties) : $(provided-path) ] ;
++ local a = [ class.new action : ac.generate-main :
++ [ property-set.empty ] ] ;
++ local main.cpp = [ virtual-target.register
++ [ class.new file-target main-$(name).cpp exact : CPP : $(.project) : $(a) ] ] ;
+ local test = [ generators.construct $(.project) $(name) : EXE
+- : [ $(properties).add $(lib[1]) ] : $(.main.cpp) $(lib[2-])
++ : [ $(properties).add $(lib[1]) ] : $(main.cpp) $(lib[2-])
+ : true ] ;
+ local jam-targets ;
+ for t in $(test[2-])
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py
index 0715c90803..a9fd437b51 100644
--- a/var/spack/repos/builtin/packages/boost/package.py
+++ b/var/spack/repos/builtin/packages/boost/package.py
@@ -248,6 +248,10 @@ class Boost(Package):
sha256='246508e052c44b6f4e8c2542a71c06cacaa72cd1447ab8d2a542b987bc35ace9',
when='@1.73.0')
+ # Support bzip2 and gzip in other directory
+ # See https://github.com/boostorg/build/pull/154
+ patch('boost_154.patch', when='@:1.63.99')
+
def url_for_version(self, version):
if version >= Version('1.63.0'):
url = "https://dl.bintray.com/boostorg/release/{0}/source/boost_{1}.tar.bz2"