# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. # Allow for some fuzz %global _default_patch_fuzz 2 # Disable build id note requirement for now %undefine _missing_build_ids_terminate_build # Force special prefix for Vespa %define _prefix /opt/vespa-deps # Version %define ver_major 1 %define ver_minor 76 %define ver_patch 0 %define ver_release 4 %define dotted_version %{ver_major}.%{ver_minor}.%{ver_patch} %define underscore_version %{ver_major}_%{ver_minor}_%{ver_patch} Name: vespa-boost Version: %{ver_major}.%{ver_minor}.%{ver_patch} Release: %{ver_release}%{?dist} Summary: The free peer-reviewed portable C++ source libraries. Built for Vespa. URL: http://www.boost.org Group: System Environment/Libraries License: Boost and MIT and Python Source: https://boostorg.jfrog.io/artifactory/main/release/%{dotted_version}/source/boost_%{underscore_version}.tar.bz2 BuildRequires: m4 %if 0%{?el8} BuildRequires: gcc-toolset-13-gcc-c++ BuildRequires: gcc-toolset-13-binutils %define _devtoolset_enable /opt/rh/gcc-toolset-13/enable BuildRequires: make %endif %description Boost provides free peer-reviewed portable C++ source libraries. The emphasis is on libraries which work well with the C++ Standard Library, in the hopes of establishing "existing practice" for extensions and providing reference implementations so that the Boost libraries are suitable for eventual standardization. (Some of the libraries have already been included in the C++ 2011 standard and others have been proposed to the C++ Standards Committee for inclusion in future standards.) This distribution only contains necessary libraries needed for Vespa. %package devel Summary: Headers and libraries for building apps that use vspa-boost Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel Contains development headers for vespa-boost. %prep %setup -q -n boost_%{underscore_version} %define _cxxflags '-std=c++2a' %build %if 0%{?_devtoolset_enable:1} source %{_devtoolset_enable} || true %endif export BOOST_LIBS="system" export CXXFLAGS="-std=c++2a" ./bootstrap.sh --with-libraries=$BOOST_LIBS --prefix=%{buildroot}/%{_prefix} --libdir=%{buildroot}/%{_prefix}/lib64 ./b2 -d+2 %{_smp_mflags} variant=release debug-symbols=on threading=multi link=shared runtime-link=shared dll-path=%{_prefix}/lib64 cxxflags=%{_cxxflags} --layout=versioned --prefix=%{buildroot}/%{_prefix} --libdir=%{buildroot}/%{_prefix}/lib64 %install rm -rf $RPM_BUILD_ROOT %if 0%{?_devtoolset_enable:1} source %{_devtoolset_enable} || true %endif ./b2 -d+2 %{_smp_mflags} variant=release debug-symbols=on threading=multi link=shared runtime-link=shared dll-path=%{_prefix}/lib64 cxxflags=%{_cxxflags} install --layout=versioned --prefix=%{buildroot}/%{_prefix} --libdir=%{buildroot}/%{_prefix}/lib64 --no-cmake-config cd %{buildroot}/%{_includedir} mv boost-%{ver_major}_%{ver_minor}/boost . rm -rf boost-%{ver_major}_%{ver_mainor} cd %{buildroot}/%{_prefix}/lib64 for i in $(ls *.so); do lnk=$(echo $i | sed "s/-gcc[0-9]*-/-/" | sed "s/-%{ver_major}_%{ver_minor}//"); ln -s $i $lnk; done for f in $(ls *\-mt.so); do ln -s "$f" "${f%.*}-d.so"; done %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %license LICENSE_1_0.txt %doc %{_prefix}/lib64/*.so* %files devel %defattr(-,root,root,-) %license LICENSE_1_0.txt %{_includedir}/boost %changelog