SHA256
1
0
forked from pool/llvm14

- Patch exported clang/ClangTargets-relwithdebinfo.cmake to refer

to libclang only by soname, because the installed library might
  be newer than the one originally build with the package.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm14?expand=0&rev=2
This commit is contained in:
Aaron Puchert 2022-04-05 00:25:57 +00:00 committed by Git OBS Bridge
parent a5973cd8b1
commit 718ee78fd8
2 changed files with 8 additions and 0 deletions

View File

@ -37,6 +37,9 @@ Sun Apr 3 13:42:27 UTC 2022 - Aaron Puchert <aaronpuchert@alice-dsl.net>
can't have multiple LLVM versions generate the same package, we
prefix it for the non-default LLVM with a mechanism inspired by
the GCC packaging.
- Patch exported clang/ClangTargets-relwithdebinfo.cmake to refer
to libclang only by soname, because the installed library might
be newer than the one originally build with the package.
- Use the same mechanism to for libc++ and package Clang scripts
only for the default version. This means we'll no longer have to
touch the package when a new major version comes out.

View File

@ -1074,6 +1074,11 @@ sed -i "$(
done
)" %{buildroot}%{_libdir}/cmake/{llvm/LLVMExports,clang/ClangTargets}-relwithdebinfo.cmake
# For libclang, have the CMake export list refer to the library via soname.
# The original library might not be available. (We might have a newer version.)
sed -i "s|\"\${_IMPORT_PREFIX}/%{_lib}/libclang.so.%{_relver}\"|\"\${_IMPORT_PREFIX}/%{_lib}/libclang.so.%{_soclang}\"|g" \
%{buildroot}%{_libdir}/cmake/clang/ClangTargets-relwithdebinfo.cmake
# rpm macro for version checking
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/
cat > %{buildroot}%{_rpmconfigdir}/macros.d/macros.llvm <<EOF