File macros.hpc-gnu of Package gnu-compilers-hpc.14095

#
# GNU Toolchain
#
# Version extension on binaries - GNU specific

# Use an init function to set these globally. This gets us around the arbitrary
# recursion limit of 16 in RPM.
%hpc_gnu_init(v:) \
 %{-v: %define _cf_ver %{-v*}} \
 %{echo: hpc_gnu_init %{?_cf_ver:version: %_cf_ver}} \
 %{expand: %%global hpc_gnu_bin_version %{?_cf_ver:-%(\\\
 	     echo %_cf_ver | \\\
	     sed -e "s@\\([0-9]\\)@\\1.@g" \\\
	     -e "s@\\([0-9]\\)\\.\\$@\\1@g")}%{!?_cf_ver:%%{nil}}} \
 %{expand: %%global hpc_gnu_full_version %(\\\
 	     gcc%{hpc_gnu_bin_version} --version |\\\
	     head -1 |\\\
	     sed -e "s#.* \\([0-9]\\+\\.[0-9.]\\+\\)\\(\$\\| .*\\)#\\1#")}\
 %{expand: %%global hpc_gnu_dep_version %(\\\
 	     FULL_VERSION=%hpc_gnu_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}} \
 %{expand: %%global _hpc_gnu_module gnu/%hpc_gnu_dep_version}

%hpc_setup_gnu \
    export CC=gcc%{hpc_gnu_bin_version} \
    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_gnu_dep_version

# Requires:
%hpc_gnu_requires \
Requires: gnu%{?hpc_cf_pack_version}-compilers-hpc

%hpc_gnu_requires_devel \
Requires: gnu%{?hpc_cf_pack_version}-compilers-hpc-devel

openSUSE Build Service is sponsored by