import scotch-6.0.5-3.el8

This commit is contained in:
CentOS Sources 2021-03-30 10:39:19 -04:00 committed by Stepan Oksanichenko
parent 12ef5f6f18
commit 5b550269ea
5 changed files with 123 additions and 5 deletions

View File

@ -13,7 +13,8 @@ override CFLAGS += -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_FILE_COMPRESS_BZ2 -DCOMMO
-Drestrict=__restrict -DIDXSIZE64 -Drestrict=__restrict -DIDXSIZE64
CLIBFLAGS = -shared -fPIC CLIBFLAGS = -shared -fPIC
override LDFLAGS += -lz -lbz2 -llzmadec -lm -lrt -lpthread override LDFLAGS += -lz -lbz2 -llzmadec -lm -lrt -lpthread
ARFLAGS = -shared -Wl,-soname=$@.$(SOMAJ) $(LDFLAGS) -o # LDFLAGS added to AR rule in Makefiles to come after objects to work with -Wl,--as-needed
ARFLAGS = -shared -Wl,-soname=$@.$(SOMAJ) -o
CP = cp -av CP = cp -av
LEX = flex LEX = flex
LN = ln LN = ln

View File

@ -0,0 +1,68 @@
diff -urNp a/src/esmumps/Makefile b/src/esmumps/Makefile
--- a/src/esmumps/Makefile 2021-01-12 19:47:38.599350265 +0100
+++ b/src/esmumps/Makefile 2021-01-12 19:52:21.913874810 +0100
@@ -151,7 +151,7 @@ lib$(ESMUMPSLIB)$(LIB) : graph_graph$(O
esmumps$(OBJ) \
esmumps_f$(OBJ) \
esmumps_strats$(OBJ)
- $(AR) $(ARFLAGS) lib$(ESMUMPSLIB)$(LIB) $(?)
+ $(AR) $(ARFLAGS) lib$(ESMUMPSLIB)$(LIB) $(?) $(LDFLAGS)
-$(RANLIB) lib$(ESMUMPSLIB)$(LIB)
main_esmumps$(EXE) : main_esmumps.c \
diff -urNp a/src/libscotch/Makefile b/src/libscotch/Makefile
--- a/src/libscotch/Makefile 2021-01-12 19:47:38.602350292 +0100
+++ b/src/libscotch/Makefile 2021-01-12 19:56:35.901101614 +0100
@@ -2962,26 +2962,26 @@ ptscotchf.h : ptdummysizes$(EXE) \
library_pt_f.h
./ptdummysizes$(EXE) library_pt_f.h ptscotchf.h
-libscotch$(LIB) : $(LIBSCOTCHDEPS)
- $(AR) $(ARFLAGS) $(@) $(?)
+libscotch$(LIB) : $(LIBSCOTCHDEPS) libscotcherr$(LIB)
+ $(AR) $(ARFLAGS) $(@) $(?) $(LDFLAGS) -L . -lscotcherr
-$(RANLIB) $(@)
libscotcherr$(LIB) : library_error$(OBJ)
- $(AR) $(ARFLAGS) $(@) $(?)
+ $(AR) $(ARFLAGS) $(@) $(?) $(LDFLAGS)
-$(RANLIB) $(@)
libscotcherrexit$(LIB) : library_error_exit$(OBJ)
- $(AR) $(ARFLAGS) $(@) $(?)
+ $(AR) $(ARFLAGS) $(@) $(?) $(LDFLAGS)
-$(RANLIB) $(@)
-libptscotch$(LIB) : $(LIBPTSCOTCHDEPS)
- $(AR) $(ARFLAGS) $(@) $(?)
+libptscotch$(LIB) : $(LIBPTSCOTCHDEPS) libscotch$(LIB)
+ $(AR) $(ARFLAGS) $(@) $(?) $(LDFLAGS)
-$(RANLIB) $(@)
libptscotcherr$(LIB) : library_error_pt$(OBJ)
- $(AR) $(ARFLAGS) $(@) $(?)
+ $(AR) $(ARFLAGS) $(@) $(?) $(LDFLAGS)
-$(RANLIB) $(@)
libptscotcherrexit$(LIB) : library_error_exit_pt$(OBJ)
- $(AR) $(ARFLAGS) $(@) $(?)
+ $(AR) $(ARFLAGS) $(@) $(?) $(LDFLAGS)
-$(RANLIB) $(@)
diff -urNp a/src/libscotchmetis/Makefile b/src/libscotchmetis/Makefile
--- a/src/libscotchmetis/Makefile 2021-01-12 19:47:38.599350265 +0100
+++ b/src/libscotchmetis/Makefile 2021-01-12 19:58:40.718189527 +0100
@@ -129,12 +129,12 @@ libptscotchparmetis$(LIB) : parmetis_dgr
parmetis_dgraph_order_f$(OBJ) \
parmetis_dgraph_part$(OBJ) \
parmetis_dgraph_part_f$(OBJ)
- $(AR) $(ARFLAGS) $(@) $(^)
+ $(AR) $(ARFLAGS) $(@) $(^) $(LDFLAGS) -L ../libscotch -lptscotch
-$(RANLIB) $(@)
libscotchmetis$(LIB) : metis_graph_order$(OBJ) \
metis_graph_order_f$(OBJ) \
metis_graph_part$(OBJ) \
metis_graph_part_f$(OBJ)
- $(AR) $(ARFLAGS) $(@) $(^)
+ $(AR) $(ARFLAGS) $(@) $(^) $(LDFLAGS) -L ../libscotch -lscotch
-$(RANLIB) $(@)

10
SOURCES/scotch.h Normal file
View File

@ -0,0 +1,10 @@
#include <bits/wordsize.h>
#if __WORDSIZE == 32
#include "scotch-32.h"
#elif __WORDSIZE == 64
#include "scotch-64.h"
#else
#error "Unknown word size"
#endif

10
SOURCES/scotchf.h Normal file
View File

@ -0,0 +1,10 @@
#include <bits/wordsize.h>
#if __WORDSIZE == 32
#include "scotchf-32.h"
#elif __WORDSIZE == 64
#include "scotchf-64.h"
#else
#error "Unknown word size"
#endif

View File

@ -10,16 +10,21 @@
Name: scotch Name: scotch
Summary: Graph, mesh and hypergraph partitioning library Summary: Graph, mesh and hypergraph partitioning library
Version: 6.0.5 Version: 6.0.5
Release: 1%{?dist} Release: 3%{?dist}
License: CeCILL-C License: CeCILL-C
URL: https://gforge.inria.fr/projects/scotch/ URL: https://gforge.inria.fr/projects/scotch/
Source0: https://gforge.inria.fr/frs/download.php/file/34618/%{name}_%{version}.tar.gz Source0: https://gforge.inria.fr/frs/download.php/file/34618/%{name}_%{version}.tar.gz
Source1: scotch-Makefile.shared.inc.in Source1: scotch-Makefile.shared.inc.in
Source2: scotch.h
Source3: scotchf.h
# Makefile fixes for building esmumps # Makefile fixes for building esmumps
Patch0: scotch_esmumps.patch Patch0: scotch_esmumps.patch
# LD flags fix
Patch1: scotch-ldflags.patch
BuildRequires: flex BuildRequires: flex
BuildRequires: bison BuildRequires: bison
BuildRequires: zlib-devel BuildRequires: zlib-devel
@ -96,7 +101,8 @@ Requires: pt%{name}-openmpi%{?_isa} = %{version}-%{release}
Obsoletes: ptscotch-openmpi-static < 6.0.0-8 Obsoletes: ptscotch-openmpi-static < 6.0.0-8
%description -n ptscotch-openmpi-devel %description -n ptscotch-openmpi-devel
This package contains development libraries for PT-Scotch, compiled against openmpi. This package contains development libraries for PT-Scotch, compiled against
openmpi.
%package -n ptscotch-openmpi-devel-parmetis %package -n ptscotch-openmpi-devel-parmetis
@ -112,6 +118,7 @@ This package contains the parmetis compatibility header for scotch.
# Sigh, they forgot to update the version in the folder name # Sigh, they forgot to update the version in the folder name
%setup -q -n scotch_6.0.4 %setup -q -n scotch_6.0.4
%patch0 -p1 %patch0 -p1
%patch1 -p1
cp -a %{SOURCE1} src/Makefile.inc cp -a %{SOURCE1} src/Makefile.inc
@ -136,13 +143,13 @@ popd
%{_mpich_load} %{_mpich_load}
pushd %{mpichdir}/src/ pushd %{mpichdir}/src/
%make_build ptscotch ptesmumps CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" SOMAJ="%{so_maj}" %make_build ptscotch ptesmumps CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags} -L%{_libdir}/mpich/lib -lmpi" SOMAJ="%{so_maj}"
popd popd
%{_mpich_unload} %{_mpich_unload}
%{_openmpi_load} %{_openmpi_load}
pushd %{openmpidir}/src/ pushd %{openmpidir}/src/
%make_build ptscotch ptesmumps CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}" SOMAJ="%{so_maj}" %make_build ptscotch ptesmumps CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags} -L%{_libdir}/openmpi/lib -lmpi" SOMAJ="%{so_maj}"
popd popd
%{_openmpi_unload} %{_openmpi_unload}
@ -211,6 +218,22 @@ popd
%{_openmpi_unload} %{_openmpi_unload}
############################################################################### ###############################################################################
# Fix multilibs header conflict
%ifarch x86_64 i686
%ifarch x86_64
mv %{buildroot}%{_includedir}/scotch.h \
%{buildroot}%{_includedir}/scotch-64.h
mv %{buildroot}%{_includedir}/scotchf.h \
%{buildroot}%{_includedir}/scotchf-64.h
%else
mv %{buildroot}%{_includedir}/scotch.h \
%{buildroot}%{_includedir}/scotch-32.h
mv %{buildroot}%{_includedir}/scotchf.h \
%{buildroot}%{_includedir}/scotchf-32.h
%endif
install -pm 0644 %{SOURCE2} %{buildroot}%{_includedir}/scotch.h
install -pm 0644 %{SOURCE3} %{buildroot}%{_includedir}/scotchf.h
%endif
%post -p /sbin/ldconfig %post -p /sbin/ldconfig
@ -278,6 +301,12 @@ popd
%doc doc/scotch_example.f %doc doc/scotch_example.f
%changelog %changelog
* Wed Jan 13 2021 Josef Ridky <jridky@redhat.com> - 6.0.5-3
- add gating.yaml
* Tue Jan 12 2021 Josef Ridky <jridky@redhat.com> - 6.0.5-2
- fix library linking and multilib issue (#1853163)
* Mon Feb 12 2018 Sandro Mani <manisandro@gmail.com> - 6.0.5-1 * Mon Feb 12 2018 Sandro Mani <manisandro@gmail.com> - 6.0.5-1
- Update to 6.0.5 - Update to 6.0.5