Initial import (#920518).
This commit is contained in:
parent
ebdfd11ffe
commit
ceab4ad938
1
.gitignore
vendored
1
.gitignore
vendored
@ -0,0 +1 @@
|
|||||||
|
/metis-5.0.3.tar.gz
|
56
metis-GKREGEX-GKRAND-LIBSUFFIX-fix.patch
Normal file
56
metis-GKREGEX-GKRAND-LIBSUFFIX-fix.patch
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
--- metis-5.0.3/GKlib/Makefile.orig 2013-03-11 20:50:42.000000000 +0100
|
||||||
|
+++ metis-5.0.3/GKlib/Makefile 2013-03-17 14:26:23.632867727 +0100
|
||||||
|
@@ -41,10 +41,10 @@
|
||||||
|
CONFIG_FLAGS += -DPCRE=$(pcre)
|
||||||
|
endif
|
||||||
|
ifneq ($(gkregex), not-set)
|
||||||
|
- CONFIG_FLAGS += -DGKREGEX=$(pcre)
|
||||||
|
+ CONFIG_FLAGS += -DGKREGEX=$(gkregex)
|
||||||
|
endif
|
||||||
|
ifneq ($(gkrand), not-set)
|
||||||
|
- CONFIG_FLAGS += -DGKRAND=$(pcre)
|
||||||
|
+ CONFIG_FLAGS += -DGKRAND=$(gkrand)
|
||||||
|
endif
|
||||||
|
ifneq ($(prefix), not-set)
|
||||||
|
CONFIG_FLAGS += -DCMAKE_INSTALL_PREFIX=$(prefix)
|
||||||
|
|
||||||
|
--- metis-5.0.3/Makefile.orig 2013-03-11 20:50:09.000000000 +0100
|
||||||
|
+++ metis-5.0.3/Makefile 2013-03-17 18:30:50.634301059 +0100
|
||||||
|
@@ -9,7 +9,10 @@
|
||||||
|
gklib_path = not-set
|
||||||
|
shared = not-set
|
||||||
|
cc = not-set
|
||||||
|
-
|
||||||
|
+libsuffix = not-set
|
||||||
|
+pcre = not-set
|
||||||
|
+gkregex = not-set
|
||||||
|
+gkrand = not-set
|
||||||
|
|
||||||
|
# Basically proxies everything to the builddir cmake.
|
||||||
|
|
||||||
|
@@ -23,6 +26,9 @@
|
||||||
|
ifeq ($(gklib_path), not-set)
|
||||||
|
gklib_path = GKlib
|
||||||
|
endif
|
||||||
|
+ifneq ($(libsuffix), not-set)
|
||||||
|
+ CONFIG_FLAGS += -DLIB_SUFFIX=$(libsuffix)
|
||||||
|
+endif
|
||||||
|
CONFIG_FLAGS += -DGKLIB_PATH=$(abspath $(gklib_path))
|
||||||
|
ifneq ($(gdb), not-set)
|
||||||
|
CONFIG_FLAGS += -DGDB=$(gdb)
|
||||||
|
@@ -51,6 +57,15 @@
|
||||||
|
ifneq ($(cc), not-set)
|
||||||
|
CONFIG_FLAGS += -DCMAKE_C_COMPILER=$(cc)
|
||||||
|
endif
|
||||||
|
+ifneq ($(pcre), not-set)
|
||||||
|
+ CONFIG_FLAGS += -DPCRE=$(pcre)
|
||||||
|
+endif
|
||||||
|
+ifneq ($(gkregex), not-set)
|
||||||
|
+ CONFIG_FLAGS += -DGKREGEX=$(gkregex)
|
||||||
|
+endif
|
||||||
|
+ifneq ($(gkrand), not-set)
|
||||||
|
+ CONFIG_FLAGS += -DGKRAND=$(gkrand)
|
||||||
|
+endif
|
||||||
|
|
||||||
|
VERNUM=5.0.3
|
||||||
|
PKGNAME=metis-$(VERNUM)
|
20
metis-libmetis.patch
Normal file
20
metis-libmetis.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- metis-5.0.3/libmetis/CMakeLists.orig.txt 2011-06-22 19:47:13.000000000 +0200
|
||||||
|
+++ metis-5.0.3/libmetis/CMakeLists.txt 2013-03-15 17:13:19.948911972 +0100
|
||||||
|
@@ -4,13 +4,14 @@
|
||||||
|
file(GLOB metis_sources *.c)
|
||||||
|
# Build libmetis.
|
||||||
|
add_library(metis ${METIS_LIBRARY_TYPE} ${GKlib_sources} ${metis_sources})
|
||||||
|
+set_target_properties(metis PROPERTIES SOVERSION 0)
|
||||||
|
if(UNIX)
|
||||||
|
target_link_libraries(metis m)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(METIS_INSTALL)
|
||||||
|
install(TARGETS metis
|
||||||
|
- LIBRARY DESTINATION lib
|
||||||
|
- RUNTIME DESTINATION lib
|
||||||
|
- ARCHIVE DESTINATION lib)
|
||||||
|
+ LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||||
|
+ RUNTIME DESTINATION lib${LIB_SUFFIX}
|
||||||
|
+ ARCHIVE DESTINATION lib${LIB_SUFFIX})
|
||||||
|
endif()
|
21
metis-shared-GKlib.patch
Normal file
21
metis-shared-GKlib.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
--- metis-5.0.3/GKlib/CMakeLists.orig.txt 2013-03-11 20:50:14.000000000 +0100
|
||||||
|
+++ metis-5.0.3/GKlib/CMakeLists.txt 2013-03-17 19:53:44.220827579 +0100
|
||||||
|
@@ -7,7 +7,7 @@
|
||||||
|
include(GKlibSystem.cmake)
|
||||||
|
|
||||||
|
include_directories(".")
|
||||||
|
-add_library(GKlib STATIC ${GKlib_sources})
|
||||||
|
+add_library(GKlib SHARED ${GKlib_sources})
|
||||||
|
if(UNIX)
|
||||||
|
target_link_libraries(GKlib m)
|
||||||
|
endif(UNIX)
|
||||||
|
@@ -16,6 +16,6 @@
|
||||||
|
add_subdirectory("test")
|
||||||
|
|
||||||
|
install(TARGETS GKlib
|
||||||
|
- ARCHIVE DESTINATION lib
|
||||||
|
- LIBRARY DESTINATION lib)
|
||||||
|
-install(FILES ${GKlib_includes} DESTINATION include)
|
||||||
|
+ ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||||
|
+ LIBRARY DESTINATION lib${LIB_SUFFIX})
|
||||||
|
+install(FILES ${GKlib_includes} DESTINATION include/metis)
|
12
metis-width-datatype.patch
Normal file
12
metis-width-datatype.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
--- metis-5.0.3/include/metis.orig.h 2013-03-11 20:50:00.000000000 +0100
|
||||||
|
+++ metis-5.0.3/include/metis.h 2013-03-16 12:14:59.117329640 +0100
|
||||||
|
@@ -30,7 +30,7 @@
|
||||||
|
GCC does provides these definitions in stdint.h, but it may require some
|
||||||
|
modifications on other architectures.
|
||||||
|
--------------------------------------------------------------------------*/
|
||||||
|
-#define IDXTYPEWIDTH 32
|
||||||
|
+#define IDXTYPEWIDTH 64
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------
|
||||||
|
|
170
metis.spec
Normal file
170
metis.spec
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
Name: metis
|
||||||
|
Version: 5.0.3
|
||||||
|
Release: 7%{?dist}
|
||||||
|
Summary: Serial Graph Partitioning and Fill-reducing Matrix Ordering
|
||||||
|
License: ASL 2.0 and BSD and LGPLv2+
|
||||||
|
Group: Development/Libraries
|
||||||
|
URL: http://glaros.dtc.umn.edu/gkhome/views/%{name}
|
||||||
|
Source0: http://glaros.dtc.umn.edu/gkhome/fetch/sw/%{name}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
## This patch sets up libmetis soname of libmetis
|
||||||
|
Patch0: %{name}-libmetis.patch
|
||||||
|
|
||||||
|
## This patch sets up shared GKlib library
|
||||||
|
Patch1: %{name}-shared-GKlib.patch
|
||||||
|
|
||||||
|
## Specify the width (32 or 64 bits) of the elementary data type
|
||||||
|
## used in METIS. This is controled by the IDXTYPEWIDTH
|
||||||
|
## constant.
|
||||||
|
## For now, on a 32 bit architecture you can only specify a width of 32,
|
||||||
|
## whereas for a 64 bit architecture you can specify a width of either
|
||||||
|
## 32 or 64 bits.
|
||||||
|
Patch2: %{name}-width-datatype.patch
|
||||||
|
|
||||||
|
## This patch sets up GKREGEX, GKRAND, libsuffix options to the Makefiles
|
||||||
|
Patch4: %{name}-GKREGEX-GKRAND-LIBSUFFIX-fix.patch
|
||||||
|
|
||||||
|
BuildRequires: cmake >= 2.8
|
||||||
|
BuildRequires: openmpi-devel
|
||||||
|
BuildRequires: pcre-devel
|
||||||
|
BuildRequires: help2man
|
||||||
|
|
||||||
|
%description
|
||||||
|
METIS is a set of serial programs for partitioning graphs,
|
||||||
|
partitioning finite element meshes, and producing fill reducing
|
||||||
|
orderings for sparse matrices.
|
||||||
|
The algorithms implemented in METIS are based on the multilevel
|
||||||
|
recursive-bisection, multilevel k-way, and multi-constraint
|
||||||
|
partitioning schemes developed in our lab.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: The Metis headers and development-related files
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
%description devel
|
||||||
|
Header and library files of Metis.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{name}-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
|
if [ %{__isa_bits} = "64" ]; then
|
||||||
|
%patch2 -p1
|
||||||
|
fi
|
||||||
|
|
||||||
|
%patch4 -p1
|
||||||
|
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
# Build metis
|
||||||
|
cd build
|
||||||
|
%cmake -DCMAKE_C_COMPILER=%{_bindir}/gcc \
|
||||||
|
-DCMAKE_CXX_COMPILER=%{_bindir}/g++ \
|
||||||
|
-DGKLIB_PATH=../GKlib \
|
||||||
|
-DSHARED=1 \
|
||||||
|
-DOPENMP=%{_includedir}/openmpi-%{_arch} \
|
||||||
|
-DPCRE=%{_includedir} \
|
||||||
|
-DCMAKE_CXX_FLAGS="%{optflags} -fopenmp -pthread" -DCMAKE_C_FLAGS="%{optflags} -fopenmp -pthread" \
|
||||||
|
-DCMAKE_VERBOSE_MAKEFILE=1 \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
||||||
|
..
|
||||||
|
make %{?_smp_mflags}
|
||||||
|
cd ../
|
||||||
|
|
||||||
|
|
||||||
|
%check
|
||||||
|
cp -p %{buildroot}%{_bindir}/* graphs
|
||||||
|
pushd graphs
|
||||||
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./ndmetis mdual.graph
|
||||||
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./mpmetis metis.mesh 2
|
||||||
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./gpmetis test.mgraph 4
|
||||||
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./gpmetis copter2.graph 4
|
||||||
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}:$LD_LIBRARY_PATH ./graphchk 4elt.graph
|
||||||
|
popd
|
||||||
|
|
||||||
|
%install
|
||||||
|
pushd build
|
||||||
|
%make_install
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd %{buildroot}%{_bindir}
|
||||||
|
## Generate manpages from binaries
|
||||||
|
help2man --version-string="%{version}" -n "Partitions a graph into a specified number of parts." \
|
||||||
|
--no-info --output="gpmetis.1" --no-discard-stderr --help-option="-help" ./gpmetis
|
||||||
|
|
||||||
|
help2man --version-string="%{version}" \
|
||||||
|
-n "Computes a fill-reducing ordering of the vertices of the graph using multilevel nested dissection." \
|
||||||
|
--no-info --output="ndmetis.1" --no-discard-stderr --help-option="-help" ./ndmetis
|
||||||
|
|
||||||
|
help2man --version-string="%{version}" -n "Partitions a mesh into a specified number of parts." \
|
||||||
|
--no-info --output="mpmetis.1" --no-discard-stderr --help-option="-help" ./mpmetis
|
||||||
|
|
||||||
|
help2man --version-string="%{version}" -n "Converts a mesh into a graph that is compatible with METIS." \
|
||||||
|
--no-info --output="m2gmetis.1" --no-discard-stderr --help-option="-help" ./m2gmetis
|
||||||
|
|
||||||
|
help2man --version-string="%{version}" -n "Checks the graph for format correctness and consistency." \
|
||||||
|
--no-info --output="graphchk.1" --no-discard-stderr --help-option="-help" ./graphchk
|
||||||
|
|
||||||
|
help2man --version-string="%{version}" --no-info --output=cmpfillin.1 --no-discard-stderr \
|
||||||
|
--help-option="-help" ./cmpfillin
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{_mandir}/man1
|
||||||
|
mv *.1 %{buildroot}%{_mandir}/man1
|
||||||
|
popd
|
||||||
|
|
||||||
|
|
||||||
|
%post -p /sbin/ldconfig
|
||||||
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc LICENSE.txt Changelog manual/manual.pdf
|
||||||
|
%{_bindir}/*
|
||||||
|
%{_mandir}/man1/*.1.gz
|
||||||
|
%{_libdir}/lib%{name}.so.*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%doc Changelog
|
||||||
|
%{_includedir}/%{name}.h
|
||||||
|
%{_libdir}/lib%{name}.so
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Mar 20 2013 Antonio Trande <sagitter@fedoraproject.org> - 5.0.3-7
|
||||||
|
- Removed explicit manpages compression
|
||||||
|
- License tag changed to 'ASL 2.0 and BSD and LGPLv2+'
|
||||||
|
|
||||||
|
* Wed Mar 20 2013 Antonio Trande <sagitter@fedoraproject.org> - 5.0.3-6
|
||||||
|
- Modified %%check section to perform tests properly
|
||||||
|
|
||||||
|
* Tue Mar 19 2013 Antonio Trande <sagitter@fedoraproject.org> - 5.0.3-5
|
||||||
|
- Added %%check section
|
||||||
|
- Removed GK*.h libraries installation
|
||||||
|
|
||||||
|
* Sun Mar 17 2013 Antonio Trande <sagitter@fedoraproject.org> - 5.0.3-4
|
||||||
|
- Added patch to sets up GKREGEX, GKRAND, libsuffix options to the Makefiles
|
||||||
|
- Configured patch2 condition
|
||||||
|
- soname version of libmetis changed to 0
|
||||||
|
- Added cmake options and flags to check openmp
|
||||||
|
- GKlib_includes destination changed to include/metis
|
||||||
|
- Added commands to generate binaries man-page
|
||||||
|
- Added BR openmpi-devel, pcre-devel, help2man
|
||||||
|
|
||||||
|
* Fri Mar 15 2013 Antonio Trande <sagitter@fedoraproject.org> - 5.0.3-3
|
||||||
|
- Static sub-package removed
|
||||||
|
- TEMPORARY fix for files in "/usr/lib" removed
|
||||||
|
- Added patches for set up shared GKlib and soname libmetis
|
||||||
|
- Removed BR chrpath
|
||||||
|
|
||||||
|
* Tue Mar 14 2013 Antonio Trande <sagitter@fedoraproject.org> - 5.0.3-2
|
||||||
|
- Initial release changed from 0 to 1
|
||||||
|
- Removed chrpath command
|
||||||
|
- Added metis-width-datatype.patch only for 64bit systems
|
||||||
|
- Build commands completely changed to use %%cmake
|
||||||
|
- TEMPORARY fix for files in "/usr/lib"
|
||||||
|
|
||||||
|
* Sat Mar 02 2013 Antonio Trande <sagitter@fedoraproject.org> - 5.0.3-1
|
||||||
|
- Initial package
|
||||||
|
- Removed chrpaths
|
||||||
|
- Added BR chrpath
|
||||||
|
- Removed exec permissions to silence spurious-executable-perm warning
|
Loading…
Reference in New Issue
Block a user