[packages/mt-metis] - new

qboosh qboosh at pld-linux.org
Sat Dec 6 17:56:42 CET 2014


commit cc6b5a5edc5f906ff09ef46896610dd9bbd0d455
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Dec 6 17:56:57 2014 +0100

    - new

 mt-metis-cmake.patch | 17 +++++++++
 mt-metis-types.patch | 36 +++++++++++++++++++
 mt-metis.spec        | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 151 insertions(+)
---
diff --git a/mt-metis.spec b/mt-metis.spec
new file mode 100644
index 0000000..1883bfc
--- /dev/null
+++ b/mt-metis.spec
@@ -0,0 +1,98 @@
+Summary:	MT-METIS - OpenMP version of METIS' partitioning routines
+Summary(pl.UTF-8):	MT-METIS - wykorzystujaca OpenMP wersja procedur dzielących biblioteki METIS
+Name:		mt-metis
+Version:	0.3
+Release:	1
+License:	Apache v2.0 (base METIS library), MIT (other components)
+Group:		Libraries
+#Source0Download: http://glaros.dtc.umn.edu/gkhome/metis/metis/download
+Source0:	http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/%{name}-%{version}.tar.gz
+# Source0-md5:	b430f097a53435d2ca4cf4587eb45159
+Patch0:		%{name}-cmake.patch
+Patch1:		%{name}-types.patch
+URL:		http://glaros.dtc.umn.edu/gkhome/views/metis
+BuildRequires:	cmake >= 2.6
+BuildRequires:	gcc >= 6:4.2
+BuildRequires:	libgomp-devel
+BuildRequires:	zlib-devel
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+MT-METIS is an OpenMP version of METIS' partitioning routines.
+
+%description -l pl.UTF-8
+MT-METIS to wykorzystująca OpenMP wersja procedur dzielących METIS.
+
+%package devel
+Summary:	Header file for MT-METIS library
+Summary(pl.UTF-8):	Plik nagłówkowy biblioteki MT-METIS
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Header file for MT-METIS library.
+
+%description devel -l pl.UTF-8
+Plik nagłówkowy biblioteki MT-METIS.
+
+%package static
+Summary:	Static MT-METIS library
+Summary(pl.UTF-8):	Statyczna biblioteka MT-METIS
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static MT-METIS library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka MT-METIS.
+
+%prep
+%setup -q -n %{name}-0.3.0
+%patch0 -p1
+%patch1 -p1
+
+%build
+mkdir -p build-shared build-static
+cd build-static
+%cmake .. \
+	-DBOWSTRING_PATH="bowstring" \
+	-DDOMLIB_PATH="domlib" \
+	-DMETIS_PATH="metis"
+%{__make}
+cd ../build-shared
+%cmake .. \
+	-DBOWSTRING_PATH="bowstring" \
+	-DDOMLIB_PATH="domlib" \
+	-DMETIS_PATH="metis" \
+	-DSHARED=ON
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build-static install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%{__make} -C build-shared install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README.txt
+%attr(755,root,root) %{_bindir}/mtmetis
+%attr(755,root,root) %{_libdir}/libmtmetis.so
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/mtmetis.h
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libmtmetis.a
diff --git a/mt-metis-cmake.patch b/mt-metis-cmake.patch
new file mode 100644
index 0000000..1f95911
--- /dev/null
+++ b/mt-metis-cmake.patch
@@ -0,0 +1,17 @@
+--- mt-metis-0.3.0/CMakeLists.txt.orig	2014-09-30 22:15:28.000000000 +0200
++++ mt-metis-0.3.0/CMakeLists.txt	2014-12-06 13:51:52.603612460 +0100
+@@ -13,10 +13,14 @@
+     add_definitions(-DUSE_ASSERTS=${ASSERT})
+     message("Assertions enabled")
+   endif()
++  if(NOT DEFINED CMAKE_BUILD_TYPE)
+   set(CMAKE_BUILD_TYPE Debug)
+   message("Building a debug release")
++  endif()
+ else()
++  if(NOT DEFINED CMAKE_BUILD_TYPE)
+   set(CMAKE_BUILD_TYPE Release)
++  endif()
+   add_definitions(-DNDEBUG=1)
+   add_definitions(-DNDEBUG2=1)
+   message("Building an optimized release")
diff --git a/mt-metis-types.patch b/mt-metis-types.patch
new file mode 100644
index 0000000..930d15e
--- /dev/null
+++ b/mt-metis-types.patch
@@ -0,0 +1,36 @@
+--- mt-metis-0.3.0/bowstring/src/io/bscomp_funcs.h.orig	2014-12-06 16:59:11.193140821 +0100
++++ mt-metis-0.3.0/bowstring/src/io/bscomp_funcs.h	2014-12-06 16:59:15.983140620 +0100
+@@ -377,6 +377,7 @@
+   int level;
+   #endif
+   uint64_t b64,i;
++  size_t sz;
+   BSCOMP_BIG_T * x = NULL;
+   BSCOMP_SMALL_T * y = NULL; 
+   const BSCOMP_BIG_T * big_buffer;
+@@ -423,10 +424,11 @@
+         dl_mark_file(file);
+         fseek(file->fd,sizeof(uint64_t),SEEK_CUR);
+         if ((rv = BSCOMP_PRI(gzip_compress)((const unsigned char *)big_buffer,
+-            sizeof(BSCOMP_BIG_T)*len,file,&b64,level)) != BOWSTRING_SUCCESS) {
++            sizeof(BSCOMP_BIG_T)*len,file,&sz,level)) != BOWSTRING_SUCCESS) {
+           eprintf("Compression failed.\n");
+           goto END;
+         }
++	b64 = sz;
+         /* go back and write compressed size */
+         dl_restore_file(file);
+         fwrite(&b64,sizeof(uint64_t),1,file->fd);
+@@ -472,10 +474,11 @@
+         fseek(file->fd,sizeof(uint64_t),SEEK_CUR);
+         if ((rv = BSCOMP_PRI(gzip_compress)(
+               (const unsigned char *)small_buffer,sizeof(BSCOMP_SMALL_T)*len,
+-            file,&b64,level)) != BOWSTRING_SUCCESS) {
++            file,&sz,level)) != BOWSTRING_SUCCESS) {
+           eprintf("Compression failed.\n");
+           goto END;
+         }
++	b64 = sz;
+         /* go back and write compressed size */
+         dl_restore_file(file);
+         fwrite(&b64,sizeof(uint64_t),1,file->fd);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mt-metis.git/commitdiff/cc6b5a5edc5f906ff09ef46896610dd9bbd0d455



More information about the pld-cvs-commit mailing list