From 70273eaa62fd7c39d55ed0e1c09092a83dec1e7e Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 10 Apr 2024 12:09:39 +0300 Subject: [PATCH] Import from CS git --- SPECS/compat-sap-c++-10.spec | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/SPECS/compat-sap-c++-10.spec b/SPECS/compat-sap-c++-10.spec index 0d264ce..0f5cf63 100644 --- a/SPECS/compat-sap-c++-10.spec +++ b/SPECS/compat-sap-c++-10.spec @@ -28,7 +28,7 @@ Summary: C++ compatibility runtime library for SAP applications Name: %{?scl_prefix}c++-10 ExclusiveArch: x86_64 ppc64le s390x Version: %{gcc_version} -Release: %{gcc_release}.1%{?dist} +Release: %{gcc_release}.2%{?dist} # libgcc, libgfortran, libgomp, libstdc++ and crtstuff have # GCC Runtime Exception. License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD @@ -400,8 +400,40 @@ rm -rf %{buildroot} %{_root_prefix}/%{_lib}/compat-sap-c++-%{gcc_version}.so %{_root_prefix}/%{_lib}/compat-sap-c++-%{gcc_major}.so %{_root_prefix}/%{_lib}/README%{gcc_major} +%ghost %{_root_prefix}/%{_lib}/libstdc++.so.6 + +%transfiletriggerin -- %{_root_prefix}/%{_lib} +if ! [ -d %{_root_prefix}/%{_lib} ]; then + exit 0 +fi +symlink=%{_root_prefix}/%{_lib}/libstdc++.so.6 +if [ -e $symlink ] && ! [ -L $symlink ]; then + exit 0 +fi +latest_so=$(ls %{_root_prefix}/%{_lib} | grep "^compat-sap-c++-[1-9][0-9]\.so$" | tail -n1) +if [ -n $latest_so ]; then + ln -sf $latest_so $symlink +fi +%end + +%transfiletriggerpostun -- %{_root_prefix}/%{_lib} +if ! [ -d %{_root_prefix}/%{_lib} ]; then + exit 0 +fi +symlink=%{_root_prefix}/%{_lib}/libstdc++.so.6 +if [ -e $symlink ] && ! [ -L $symlink ]; then + exit 0 +fi +latest_so=$(ls %{_root_prefix}/%{_lib} | grep "^compat-sap-c++-[1-9][0-9]\.so$" | tail -n1) +if [ -n $latest_so ]; then + ln -sf $latest_so $symlink +fi +%end %changelog +* Tue Jan 09 2024 Patrick Palka 10.2.1-1.2 +- provide /opt/rh/SAP/lib64/libstdc++.so.6 symlink (RHEL-7257) + * Thu May 26 2022 Marek Polacek 10.2.1-1.1 - build on s390x too (#2065777) - disable multilib