Hello community,

here is the log from the commit of package netcdf-cxx4 for openSUSE:Factory 
checked in at 2017-10-26 18:44:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/netcdf-cxx4 (Old)
 and      /work/SRC/openSUSE:Factory/.netcdf-cxx4.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "netcdf-cxx4"

Thu Oct 26 18:44:26 2017 rev:3 rq:536566 version:4.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/netcdf-cxx4/netcdf-cxx4.changes  2016-09-30 
15:32:52.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.netcdf-cxx4.new/netcdf-cxx4.changes     
2017-10-26 18:44:27.455745481 +0200
@@ -1,0 +2,21 @@
+Wed Oct 25 15:03:05 UTC 2017 - e...@suse.com
+
+- Fix Requires for the devel package.
+
+-------------------------------------------------------------------
+Mon Oct 23 05:52:26 UTC 2017 - e...@suse.com
+
+- Fix buildrequires for compiler_families where c_f_ver is set.
+
+-------------------------------------------------------------------
+Sat Oct 14 17:20:49 UTC 2017 - e...@suse.com
+
+- Add static library package.
+
+-------------------------------------------------------------------
+Mon Aug 28 10:46:29 UTC 2017 - e...@suse.com
+
+- Make package multibuild aware and add support for HPC environment
+  modules (FATE#321719).
+
+-------------------------------------------------------------------

New:
----
  _multibuild

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ netcdf-cxx4.spec ++++++
--- /var/tmp/diff_new_pack.WD2L5T/_old  2017-10-26 18:44:28.159712626 +0200
+++ /var/tmp/diff_new_pack.WD2L5T/_new  2017-10-26 18:44:28.167712252 +0200
@@ -1,7 +1,7 @@
 #
-# spec file for package netcdf-cxx4
+# spec file for package netcdf
 #
-# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 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
@@ -16,19 +16,66 @@
 #
 
 
+%global flavor @BUILD_FLAVOR@%{nil}
+
+%global pname netcdf-cxx4
+%global ver 4.3.0
+%global _ver 4_3_0
 %define sover 1
 
-Name:           netcdf-cxx4
-Version:        4.3.0
+%if "%flavor" == ""
+ExclusiveArch:  do_not_build
+%endif
+
+%if "%flavor" == "standard"
+%undefine compiler_family gnu
+%bcond_with hpc
+%endif
+
+%if "%flavor" == "gnu-hpc"
+%global compiler_family gnu
+%bcond_without hpc
+%endif
+
+%if "%flavor" == "gnu6-hpc"
+%global compiler_family gnu
+%bcond_without hpc
+%define c_f_ver 6
+%endif
+
+%if %{with hpc}
+%{hpc_init -c %{compiler_family} %{?c_f_ver:-v %{c_f_ver}}}
+%define package_name %{hpc_package_name %_ver}
+%define libname(s:l:)   lib%{pname}%{hpc_package_name_tail %{?-l:%{-l*}}}
+%define p_bindir %hpc_bindir
+%define p_libdir %hpc_libdir
+%define p_includedir %hpc_includedir
+%else
+%define package_name %pname
+%define libname(s:)   libnetcdf_c++4%{?-s:-%{-s*}}}
+%define p_bindir %_bindir
+%define p_libdir %_libdir
+%define p_includedir %hpc_includedir
+%endif
+
+Name:           %{package_name}
+Version:        %ver
 Release:        0
 Summary:        C++ library for the Unidata network Common Data Form version 4
 License:        NetCDF
 Group:          Productivity/Scientific/Other
 Url:            http://www.unidata.ucar.edu/software/netcdf/
 Source0:        
http://www.unidata.ucar.edu/downloads/netcdf/ftp/netcdf-cxx4-%{version}.tar.gz
+%if %{without hpc}
 BuildRequires:  gcc-c++
-BuildRequires:  pkgconfig(netcdf)
 BuildRequires:  pkg-config
+BuildRequires:  pkgconfig(netcdf)
+%else
+BuildRequires:  %{compiler_family}%{?c_f_ver}-compilers-hpc-macros-devel
+BuildRequires:  lua-lmod
+BuildRequires:  netcdf-%{compiler_family}%{?c_f_ver}-hpc-devel
+BuildRequires:  suse-hpc
+%endif
 
 %description
 NetCDF4 (network Common Data Form) is a set of software libraries and
@@ -49,63 +96,180 @@
 
 This package provides tools for working with the C++ API.
 
+%{?with_hpc:%{hpc_master_package tools}}
 
-%package -n libnetcdf_c++4-%{sover}
+%package -n %{libname -s %{sover} -l %_ver}
 Summary:        C++ library for the Unidata network Common Data Form version 4
 Group:          System/Libraries
-Provides:       libnetcdf%{sover}:%{_libdir}/libnetcdf_c++.so.%{sover}
+%{!?with_hpc:Provides:       
libnetcdf%{sover}:%{p_libdir}/libnetcdf_c++.so.%{sover}}
+%{?with_hpc:%hpc_requires}
 
-%description -n libnetcdf_c++4-%{sover}
+%description -n %{libname -s %{sover} -l %_ver}
 NetCDF4 (network Common Data Form) is a set of software libraries and
 machine-independent data formats that support the creation, access, and sharing
 of array-oriented scientific data.
 
 This package provides the C++ API.
 
-%package -n libnetcdf_c++4-devel
+%{?with_hpc:%{hpc_master_package -n %{libname} -L -l}}
+
+%package -n %{libname -l %_ver}-devel
 Summary:        Development files for netcdf_c++
 Group:          Development/Libraries/C and C++
-Requires:       libnetcdf_c++4-%{sover} = %{version}
+%if %{without hpc}
 Provides:       libnetcdf-devel:%{_libdir}/libnetcdf_c++.so
+%endif
+Requires:       %{libname -s %{sover} -l %_ver} = %{version}
+
+%{?with_hpc:%hpc_requires_devel}
 
-%description -n libnetcdf_c++4-devel
+%description -n %{libname -l %_ver}-devel
 This package contains the netcdf_c++4 header files and shared devel libs.
 
+%{?with_hpc:%{hpc_master_package -l devel}}
+
+%package -n %{libname -l %_ver}-devel-static
+Summary:        Static development files for netcdf_c++
+Group:          Development/Libraries/C and C++
+Requires:       %{libname -l %_ver}-devel = %{version}
+
+%description -n %{libname -l %_ver}-devel-static
+Libraries to build statically linked applications with NetCDF.
+
 %prep
-%setup -q -n netcdf-cxx4-%{version}
+%setup -q -n %{pname}-%{version}
 
 %build
-%configure --disable-static
+%{?with_hpc:%hpc_setup}
+%if %{without hpc}
+%configure \
+     --disable-static
+%else
+module load netcdf
+export CFLAGS="-I $NETCDF_INC -L$NETCDF_LIB -lnetcdf -L$HDF5_LIB -lhdf5"
+export CPPFLAGS=$CFLAGS
+export LDFLAGS="-L$NETCDF_LIB -lnetcdf -L$HDF5_LIB -lhdf5"
+%hpc_configure \
+    --enable-shared \
+    --enable-netcdf-4 \
+    --enable-dap \
+    --enable-ncgen4 \
+    --with-pic \
+    --disable-doxygen \
+    --enable-static
+%endif
 make %{?_smp_mflags}
 
 %install
+%if %{with hpc}
+%{hpc_setup}
+module load netcdf
+export CFLAGS="-I $NETCDF_INC -L$NETCDF_LIB -lnetcdf -L$HDF5_LIB -lhdf5"
+export CPPFLAGS=$CFLAGS
+export LDFLAGS="-L$NETCDF_LIB -lnetcdf -L$HDF5_LIB -lhdf5"
+%endif
 %make_install
-rm %{buildroot}%{_libdir}/libnetcdf_c++4.la
+rm %{buildroot}%{p_libdir}/libnetcdf_c++4.la
+
+%if %{with hpc}
+%hpc_write_modules_files
+#%%Module1.0#####################################################################
+
+proc ModulesHelp { } {
+
+puts stderr " "
+puts stderr "This module loads the NetCDF C++ API built with the 
%{compiler_family} compiler toolchain."
+puts stderr " "
+puts stderr "Note that this build of NetCDF leverages the HDF I/O library and 
requires linkage"
+puts stderr "against hdf5 and the native C NetCDF library. Consequently, phdf5 
and the standard C"
+puts stderr "version of NetCDF are loaded automatically via this module. A 
typical compilation"
+puts stderr "example for C++ applications requiring NetCDF is as follows:"
+puts stderr " "
+puts stderr "\\\$CXX -I\\\$NETCDF_CXX_INC app.cpp -L\\\$NETCDF_CXX_LIB 
-lnetcdf_c++4 -L\\\$NETCDF_LIB -lnetcdf -L\\\$HDF5_LIB -lhdf5"
+
+puts stderr "\nVersion %{version}\n"
+
+}
+module-whatis "Name: %{hpc_upcase %pname} built with %{compiler_family} 
toolchain"
+module-whatis "Version: %{version}"
+module-whatis "Category: runtime library"
+module-whatis "Description: %{summary}"
+module-whatis "%{url}"
+
+# Require generic netcdf
+
+if [ expr [ module-info mode load ] || [module-info mode display ] ] {
+    if {  ![is-loaded netcdf]  } {
+        module load netcdf
+    }
+}
+
+set             version             %{version}
+
+prepend-path    PATH                %{hpc_bindir}
+prepend-path    MANPATH             %{hpc_mandir}
+prepend-path    LD_LIBRARY_PATH     %{hpc_libdir}
+
+setenv          %{hpc_upcase %pname}_DIR        %{hpc_prefix}
+setenv          %{hpc_upcase %pname}_BIN        %{hpc_bindir}
+
+if {[file isdirectory  %{hpc_includedir}]} {
+prepend-path    LIBRARY_PATH        %{hpc_libdir}
+prepend-path    CPATH               %{hpc_includedir}
+prepend-path    C_INCLUDE_PATH      %{hpc_includedir}
+prepend-path    CPLUS_INCLUDE_PATH  %{hpc_includedir}
+prepend-path    INCLUDE                         %{hpc_includedir}
+%hpc_modulefile_add_pkgconfig_path
+
+setenv          %{hpc_upcase %pname}_LIB        %{hpc_libdir}
+setenv          %{hpc_upcase %pname}_INC        %{hpc_includedir}
+}
+EOF
+
+%endif
 
 %check
+%{?hpc_setup}
+%if %{with hpc}
+module load netcdf
+export CFLAGS="-I $NETCDF_INC -L$NETCDF_LIB -lnetcdf -L$HDF5_LIB -lhdf5"
+export CPPFLAGS=$CFLAGS
+export LDFLAGS="-L$NETCDF_LIB -lnetcdf -L$HDF5_LIB -lhdf5"
+%endif
 make check
 
-%post -n libnetcdf_c++4-%{sover} -p /sbin/ldconfig
+%post -n %{libname -s %{sover} -l %_ver} -p /sbin/ldconfig
 
-%postun -n libnetcdf_c++4-%{sover} -p /sbin/ldconfig
+%postun -n %{libname -s %{sover} -l %_ver} 
+/sbin/ldconfig
+%{?with_hpc:%hpc_module_delete_if_default}
 
 %files tools
 %defattr(-,root,root)
 %doc COPYRIGHT
-%{_bindir}/ncxx4-config
+%{?with_hpc:%dir %{p_bindir}}
+%{p_bindir}/ncxx4-config
 
-%files -n libnetcdf_c++4-%{sover}
+%files -n %{libname -s %{sover} -l %_ver}
 %defattr(-,root,root)
 %doc COPYRIGHT
-%{_libdir}/libnetcdf_c++4.so.%{sover}
-%{_libdir}/libnetcdf_c++4.so.%{sover}.*
+%{?with_hpc:%hpc_dirs}
+%{?with_hpc:%hpc_modules_files}
+%{p_libdir}/libnetcdf_c++4.so.%{sover}
+%{p_libdir}/libnetcdf_c++4.so.%{sover}.*
 
-%files -n libnetcdf_c++4-devel
+%files -n %{libname -l %_ver}-devel
 %defattr(-,root,root)
 %doc COPYRIGHT
-%{_includedir}/*
-%{_libdir}/pkgconfig/netcdf-cxx4.pc
-%{_libdir}/libnetcdf_c++4.so
+%{p_includedir}/
+%{?with_hpc:%dir %{hpc_pkgconfigdir}}
+%{p_libdir}/pkgconfig/netcdf-cxx4.pc
+%{p_libdir}/libnetcdf_c++4.so
 
+%if %{with hpc}
+%files -n %{libname -l %_ver}-devel-static
+%defattr(-,root,root)
+%{p_libdir}/*.a
+%endif
 
 %changelog

++++++ _multibuild ++++++
<multibuild>
  <package>gnu-hpc</package>
</multibuild>

Reply via email to