From: Marcin Godzina Date: Mon, 13 May 2024 14:41:05 +0000 (+0000) Subject: [#3393] add fedora 40 to hammer X-Git-Tag: Kea-2.6.0~81 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=4f35701630fdd8db4950570b754dc5284a6f2157;p=thirdparty%2Fkea.git [#3393] add fedora 40 to hammer --- diff --git a/hammer.py b/hammer.py index 0aacf7d16e..7f47e54b56 100755 --- a/hammer.py +++ b/hammer.py @@ -63,6 +63,7 @@ SYSTEMS = { '37': False, '38': True, '39': True, + '40': True, }, 'centos': { '7': False, @@ -1199,6 +1200,10 @@ def _install_libyang_cpp_from_sources(ignore_errors = False): try: execute('git clone https://github.com/CESNET/libyang-cpp.git ~/.hammer-tmp/libyang-cpp') execute(f'git checkout {version}', cwd='~/.hammer-tmp/libyang-cpp') + # New cpp compiler is more picky about missing headers. (ex. Fedora 40) + return_code = execute('sudo grep "#include " ~/.hammer-tmp/libyang-cpp/src/Context.cpp', raise_error=False) + if return_code == 1: + execute('sed -i "/#include /a #include " ~/.hammer-tmp/libyang-cpp/src/Context.cpp') execute('mkdir ~/.hammer-tmp/libyang-cpp/build') execute('cmake -DBUILD_TESTING=OFF .. ', cwd='~/.hammer-tmp/libyang-cpp/build') execute('make -j $(nproc || gnproc || echo 1)', cwd='~/.hammer-tmp/libyang-cpp/build')