Accepting request 674844 from science:HPC

- Add links from the generic compiler binary names cc, cpp, c++
  and fc to the compiler specific names in the package private
  binary directory. (forwarded request 674821 from eeich)

OBS-URL: https://build.opensuse.org/request/show/674844
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnu-compilers-hpc?expand=0&rev=7
This commit is contained in:
Stephan Kulow 2019-02-25 16:44:46 +00:00 committed by Git OBS Bridge
commit 7cf8140fd7
2 changed files with 21 additions and 6 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Jan 16 15:01:07 UTC 2019 - eich@suse.com
- Add links from the generic compiler binary names cc, cpp, c++
and fc to the compiler specific names in the package private
binary directory.
-------------------------------------------------------------------
Sun Nov 18 10:32:56 UTC 2018 - eich@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package gnu
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@ -56,7 +56,7 @@ Summary: SUSE HPC GNU Compiler Toolchain environment
License: BSD-3-Clause
Group: Development/Tools/Other
Name: %myname
Version: 1.3
Version: 1.4
Release: 0
Url: https://github.com/openhpc/ohpc
@ -145,9 +145,9 @@ module-whatis "URL: http://gcc.gnu.org"
set version %{hpc_cf_dep_version}
prepend-path MODULEPATH %{hpc_modulepath}
prepend-path PATH %{hpc_cf_install_path}/bin
%if 0%{?c_f_ver:1} > 0
prepend-path MANPATH %{hpc_cf_install_path}/man
prepend-path PATH %{hpc_cf_install_path}/bin
setenv CC gcc%{hpc_gnu_bin_version}
setenv CXX g++%{hpc_gnu_bin_version}
setenv FC gfortran%{hpc_gnu_bin_version}
@ -175,11 +175,11 @@ EOF
rm -rf %{hpc_cf_install_path}/bin %{hpc_cf_install_path}/bin
%endif
%if 0%{?c_f_ver:1}
%posttrans devel
mkdir -p %{hpc_cf_install_path}/bin
%if 0%{?c_f_ver:1}
export list="cpp%{hpc_cf_pack_version} gcc%{hpc_cf_pack_version} \
gcc%{hpc_cf_pack_version}-c++ gcc%{hpc_cf_pack_version}-fortran"
mkdir -p %{hpc_cf_install_path}/bin
for i in $(rpm -ql ${list} | grep -E -e "/usr/bin|/usr/share/man")
do
dir=$(dirname $i)
@ -197,7 +197,15 @@ do
;;
esac
done
%else
# for the base compiler version link to the 'default' binary:
localbindir=%_bindir/
%endif
for i in cc cpp c++
do
test -e %{hpc_cf_install_path}/bin/${i} || ln -sf ${localbindir}${i}%{hpc_gnu_bin_version} %{hpc_cf_install_path}/bin/${i}
done
test -e %{hpc_cf_install_path}/bin/fortran || ln -sf ${localbindir}gfortran%{hpc_gnu_bin_version} %{hpc_cf_install_path}/bin/fc
%files
%defattr(-,root,root,-)