boost: fix building old versions with non-system glib and bzip2 (#19389)
This commit is contained in:
parent
9beadc3c14
commit
f68287afe9
2 changed files with 35 additions and 0 deletions
31
var/spack/repos/builtin/packages/boost/boost_154.patch
Normal file
31
var/spack/repos/builtin/packages/boost/boost_154.patch
Normal file
|
@ -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-])
|
|
@ -248,6 +248,10 @@ def libs(self):
|
||||||
sha256='246508e052c44b6f4e8c2542a71c06cacaa72cd1447ab8d2a542b987bc35ace9',
|
sha256='246508e052c44b6f4e8c2542a71c06cacaa72cd1447ab8d2a542b987bc35ace9',
|
||||||
when='@1.73.0')
|
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):
|
def url_for_version(self, version):
|
||||||
if version >= Version('1.63.0'):
|
if version >= Version('1.63.0'):
|
||||||
url = "https://dl.bintray.com/boostorg/release/{0}/source/boost_{1}.tar.bz2"
|
url = "https://dl.bintray.com/boostorg/release/{0}/source/boost_{1}.tar.bz2"
|
||||||
|
|
Loading…
Reference in a new issue