diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-10-25 15:07:57 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-10-25 19:52:04 +0200 |
| commit | 591d3e1f92a5eb6fb52049e987c8273eb468e527 (patch) | |
| tree | a4ed3661bf8d9fd4b8956501390eb4c2cf8c32a3 | |
| parent | a8d449a0a35f205833b446aeae66564aa2464736 (diff) | |
Fix build on Arch with boost 1.89.v1.10.35
| -rw-r--r-- | cscript | 2 | ||||
| -rw-r--r-- | wscript | 14 |
2 files changed, 12 insertions, 4 deletions
@@ -43,7 +43,7 @@ def build_with_cpp17(target): def dependencies(target, options): deps = [ - ('libcxml', 'v0.17.14', { 'c++17': build_with_cpp17(target) }), + ('libcxml', 'v0.17.15', { 'c++17': build_with_cpp17(target) }), ('openjpeg', 'ad8edaacd54a862940d0a77c41ecda5858b54d6e'), ('asdcplib', 'v1.0.8') ] @@ -220,13 +220,19 @@ def configure(conf): okmsg='yes', errmsg='too old\nPlease install boost version %s or higher.' % boost_version[0]) + conf.env.HAVE_BOOST_SYSTEM = conf.check_cxx(lib='boost_system%s' % boost_lib_suffix, mandatory=False) + def boost_libs(name): + libs = ['boost_system%s' % boost_lib_suffix] if conf.env.HAVE_BOOST_SYSTEM else [] + libs.append('boost_%s%s' % (name, boost_lib_suffix)) + return libs + conf.check_cxx(fragment=""" #include <boost/filesystem.hpp>\n int main() { boost::filesystem::copy_file ("a", "b"); }\n """, msg='Checking for boost filesystem library', libpath='/usr/local/lib', - lib=['boost_filesystem%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix], + lib=boost_libs('filesystem'), uselib_store='BOOST_FILESYSTEM') conf.check_cxx(fragment=""" @@ -262,7 +268,7 @@ def configure(conf): """, msg='Checking for boost datetime library', libpath='/usr/local/lib', - lib=['boost_date_time%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix], + lib=boost_libs('date_time'), uselib_store='BOOST_DATETIME') conf.check_cfg(package='libavcodec', args='--cflags --libs', uselib_store='AVCODEC', mandatory=True) @@ -305,7 +311,9 @@ def build(bld): else: boost_lib_suffix = '' - libs="-L${libdir} -ldcp%s -lcxml -lboost_system%s" % (bld.env.API_VERSION, boost_lib_suffix) + libs="-L${libdir} -ldcp%s -lcxml " % bld.env.API_VERSION + if bld.env.HAVE_BOOST_SYSTEM: + libs += " -lboost_system%s" % boost_lib_suffix if bld.env.HAVE_HARU: libs += " -lhpdf" if bld.env.TARGET_LINUX: |
