Accepting request 571207 from science:HPC
- Update to gcc v.7 for SLES-12 builds. - Set the 'granularity' for selection to the granularity of GNU toolchain versions we distinguish: For major versions until 4, this is 2 versions, for anything above it is just the major version. - On TW/Factory add explicit dependency to the compiler major version package. This is to make sure package gets rebuilt when this versions changes. OBS-URL: https://build.opensuse.org/request/show/571207 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnu-compilers-hpc?expand=0&rev=5
This commit is contained in:
commit
fce0cd61ab
@ -1,3 +1,17 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 30 10:11:45 UTC 2018 - eich@suse.com
|
||||
|
||||
- Update to gcc v.7 for SLES-12 builds.
|
||||
- Set the 'granularity' for selection to the
|
||||
granularity of GNU toolchain versions we
|
||||
distinguish: For major versions until 4,
|
||||
this is 2 versions, for anything above it
|
||||
is just the major version.
|
||||
- On TW/Factory add explicit dependency to the
|
||||
compiler major version package. This is to make
|
||||
sure package gets rebuilt when this versions
|
||||
changes.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 10 20:17:48 UTC 2017 - eich@suse.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package compilers-hpc
|
||||
# spec file for package gnu
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2018 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
|
||||
@ -31,8 +31,8 @@ ExclusiveArch: do_not_build
|
||||
%undefine c_f_ver
|
||||
%endif
|
||||
|
||||
%if "%flavor" == "gnu6-hpc"
|
||||
%define c_f_ver 6
|
||||
%if "%flavor" == "gnu7-hpc"
|
||||
%define c_f_ver 7
|
||||
%endif
|
||||
|
||||
# Keep in sync with macros.hpc-gnu
|
||||
@ -42,14 +42,19 @@ ExclusiveArch: do_not_build
|
||||
head -1 |\
|
||||
sed -e "s#.* \\([0-9]\\+\\.[0-9.]\\+\\)\\(\$\\| .*\\)#\\1#" )
|
||||
%global hpc_gnu_dep_version %(HPC_CF_FULL_VERSION=%hpc_gnu_full_version; \
|
||||
echo ${HPC_CF_FULL_VERSION%.*})
|
||||
[ ${HPC_CF_FULL_VERSION%%%%.*} -lt 5 ] && \
|
||||
echo ${HPC_CF_FULL_VERSION%%.*} || \
|
||||
echo ${HPC_CF_FULL_VERSION%%%%.*} )
|
||||
%global hpc_gnu_pack_version %{?c_f_ver}
|
||||
%if 0%{!?leap_version:1} && 0%{!?sle_version:1}
|
||||
%global hpc_rolling_release_version %(echo %hpc_gnu_dep_version | tr -d '.')
|
||||
%endif
|
||||
%global hpc_gnu_dir gnu%{hpc_gnu_dep_version}
|
||||
%hpc_init -C -c %compiler_family %{?c_f_ver:-v %{c_f_ver}}
|
||||
|
||||
Summary: SUSE HPC GNU Compiler Toolchain environment
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Languages
|
||||
Group: Development/Tools/Other
|
||||
Name: %myname
|
||||
Version: 1.3
|
||||
Release: 0
|
||||
@ -73,19 +78,24 @@ Provides HPC-compatible setup and configuration for the GNU compiler toolchain.
|
||||
|
||||
%package devel
|
||||
Summary: Devel package for HPC GNU compiler environment
|
||||
Group: Development/Languages
|
||||
Group: Development/Tools/Other
|
||||
BuildArch: noarch
|
||||
Requires: %{name} = %{version}
|
||||
Requires: gcc%{hpc_cf_pack_version}
|
||||
Requires: gcc%{hpc_cf_pack_version}-c++
|
||||
Requires: gcc%{hpc_cf_pack_version}-fortran
|
||||
%if 0%{?hpc_rolling_release_version:1}
|
||||
Requires: gcc%{hpc_rolling_release_version}
|
||||
Requires: gcc%{hpc_rolling_release_version}-c++
|
||||
Requires: gcc%{hpc_rolling_release_version}-fortran
|
||||
%endif
|
||||
|
||||
%description devel
|
||||
Provides package dependencies for building with the GNU compiler toolchain.
|
||||
|
||||
%package macros-devel
|
||||
Summary: Macro package for HPC GNU compiler environment
|
||||
Group: Development/Languages
|
||||
Group: Development/Tools/Other
|
||||
Provides: %{pname}-hpc-macros-devel = %{version}
|
||||
Conflicts: otherproviders(%{pname}-hpc-macros-devel)
|
||||
BuildArch: noarch
|
||||
@ -112,7 +122,7 @@ mkdir -p %{buildroot}%{hpc_cf_install_path}
|
||||
mkdir -p %{buildroot}%{hpc_install_base}
|
||||
mkdir -p %{buildroot}%{hpc_modulepath}
|
||||
mkdir -p %{buildroot}%{lua_lmod_modulesdir}/%pname
|
||||
%{__cat} <<"EOF" > %{buildroot}/%{lmod_base}/%{hpc_cf_full_version}
|
||||
%{__cat} <<EOF > %{buildroot}/%{lmod_base}/%{hpc_cf_dep_version}
|
||||
#%%Module1.0#####################################################################
|
||||
|
||||
proc ModulesHelp { } {
|
||||
@ -124,7 +134,7 @@ puts stderr "Consult the man pages for detailed information"
|
||||
puts stderr "on the commandline syntax and compiler options."
|
||||
puts stderr " "
|
||||
|
||||
puts stderr "\nVersion %{hpc_cf_full_version}\n"
|
||||
puts stderr "\nVersion %{hpc_cf_dep_version}\n"
|
||||
|
||||
}
|
||||
module-whatis "Name: GNU Compiler Collection"
|
||||
@ -133,7 +143,7 @@ module-whatis "Category: compiler, runtime support"
|
||||
module-whatis "Description: GNU Compiler Family (C/C++/Fortran for %_arch)"
|
||||
module-whatis "URL: http://gcc.gnu.org"
|
||||
|
||||
set version %{hpc_cf_full_version}
|
||||
set version %{hpc_cf_dep_version}
|
||||
prepend-path MODULEPATH %{hpc_modulepath}
|
||||
%if 0%{?c_f_ver:1} > 0
|
||||
prepend-path MANPATH %{hpc_cf_install_path}/man
|
||||
@ -150,13 +160,13 @@ family "compiler"
|
||||
|
||||
EOF
|
||||
|
||||
export hpc_cf_full_version=%{hpc_cf_full_version}
|
||||
%{__cat} <<"EOF" > %{buildroot}/%{lmod_base}/.version.%{hpc_cf_full_version}
|
||||
export hpc_cf_dep_version=%{hpc_cf_dep_version}
|
||||
%{__cat} <<EOF > %{buildroot}/%{lmod_base}/.version.%{hpc_cf_dep_version}
|
||||
#%%Module1.0#####################################################################
|
||||
##
|
||||
## version file for GNU-compilers-${hpc_cf_full_version}
|
||||
## version file for GNU-compilers-${hpc_cf_dep_version}
|
||||
##
|
||||
set ModulesVersion "%{hpc_cf_full_version}"
|
||||
set ModulesVersion "%{hpc_cf_dep_version}"
|
||||
|
||||
EOF
|
||||
|
||||
@ -175,6 +185,7 @@ do
|
||||
dir=$(dirname $i)
|
||||
base=$(basename $i)
|
||||
base=${base/%{hpc_gnu_bin_version}/}
|
||||
base=${base/.././}
|
||||
case $dir in
|
||||
/usr/share/man*)
|
||||
mandir=$(basename $dir)
|
||||
@ -196,8 +207,8 @@ done
|
||||
%dir %{hpc_base}
|
||||
%dir %hpc_install_base
|
||||
%hpc_cf_dirs
|
||||
%{lua_lmod_modulesdir}/%{pname}/%{hpc_cf_full_version}
|
||||
%{lua_lmod_modulesdir}/%{pname}/.version.%{hpc_cf_full_version}
|
||||
%{lua_lmod_modulesdir}/%{pname}/%{hpc_cf_dep_version}
|
||||
%{lua_lmod_modulesdir}/%{pname}/.version.%{hpc_cf_dep_version}
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root,-)
|
||||
|
@ -16,10 +16,11 @@
|
||||
gcc%{hpc_gnu_bin_version} --version |\\\
|
||||
head -1 |\\\
|
||||
sed -e "s#.* \\([0-9]\\+\\.[0-9.]\\+\\)\\(\$\\| .*\\)#\\1#")}\
|
||||
# FIXME: We may just want to pick the major.minor or major version only \
|
||||
%{expand: %%global hpc_gnu_dep_version %(\\\
|
||||
FULL_VERSION=%hpc_gnu_full_version; \\\
|
||||
echo ${FULL_VERSION%.*})} \
|
||||
[ ${FULL_VERSION%%%%.*} -lt 5 ] && \\\
|
||||
echo ${FULL_VERSION%%.*} || \\\
|
||||
echo ${FULL_VERSION%%%%.*})} \
|
||||
%{expand: %%global hpc_gnu_pack_version %{?_cf_ver}%{!?_cf_ver:%%{nil}}} \
|
||||
%{expand: %%global hpc_gnu_dir gnu%{hpc_gnu_dep_version}}
|
||||
|
||||
@ -28,7 +29,7 @@
|
||||
export CXX=g++%{hpc_gnu_bin_version} \
|
||||
export FC=gfortran%{hpc_gnu_bin_version} \
|
||||
export F77=gfortran%{hpc_gnu_bin_version} \
|
||||
module load gnu/%hpc_cf_full_version
|
||||
module load gnu/%hpc_gnu_dep_version
|
||||
|
||||
# Requires:
|
||||
%hpc_gnu_requires \
|
||||
|
Loading…
x
Reference in New Issue
Block a user