commit c870d07e7e82ef98affead659793ff65f26852ad
Author: Jakub Bogusz <[email protected]>
Date:   Mon Jan 16 20:56:57 2023 +0100

    - new

 Mongoose-static.patch      | 11 ++++++
 Mongoose-suitesparse.patch | 18 +++++++++
 SuiteSparse-Mongoose.spec  | 95 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 124 insertions(+)
---
diff --git a/SuiteSparse-Mongoose.spec b/SuiteSparse-Mongoose.spec
new file mode 100644
index 0000000..03c6560
--- /dev/null
+++ b/SuiteSparse-Mongoose.spec
@@ -0,0 +1,95 @@
+Summary:       Mongoose Graph Partitioning Library
+Summary(pl.UTF-8):     Biblioteka partycjonowania grafów Mongoose
+Name:          SuiteSparse-Mongoose
+Version:       2.0.4
+Release:       1
+License:       GPL v3
+Group:         Libraries
+#Source0Download: https://github.com/ScottKolo/Mongoose/releases
+Source0:       
https://github.com/ScottKolo/Mongoose/archive/v%{version}/Mongoose-%{version}.tar.gz
+# Source0-md5: c7607c83e481f97eb76a3db0b4015957
+Patch0:                Mongoose-suitesparse.patch
+Patch1:                Mongoose-static.patch
+URL:           https://github.com/ScottKolo/Mongoose
+BuildRequires: SuiteSparse-config-devel >= 5.2.0
+BuildRequires: cmake >= 2.8
+BuildRequires: libstdc++-devel >= 6:4.7
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Mongoose is a graph partitioning library. Currently, Mongoose only
+supports edge partitioning, but in the future a vertex separator
+extension will be added.
+
+%description -l pl.UTF-8
+Mongoose to biblioteka partycjonowania grafów. Obecnie Mongoose
+obsługuje tylko partycjonowanie krawędzi, ale w przyszłości zostanie
+dodane rozszerzenie separujące wierzchołki.
+
+%package devel
+Summary:       Header files for Mongoose library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki Mongoose
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+Requires:      SuiteSparse-config-devel >= 5.2.0
+Requires:      libstdc++-devel >= 6:4.7
+
+%description devel
+Header files for Mongoose library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki Mongoose.
+
+%package static
+Summary:       Static Mongoose library
+Summary(pl.UTF-8):     Statyczna biblioteka Mongoose
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+
+%description static
+Static Mongoose library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka Mongoose.
+
+%prep
+%setup -q -n Mongoose-%{version}
+%patch0 -p1
+%patch1 -p1
+
+%build
+install -d build
+cd build
+%cmake .. \
+       -DCMAKE_INSTALL_INCLUDEDIR=%{_includedir}/suitesparse
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build 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 README.md
+%attr(755,root,root) %{_bindir}/mongoose
+%attr(755,root,root) %{_libdir}/libmongoose.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libmongoose.so.2
+
+%files devel
+%defattr(644,root,root,755)
+%doc Doc/Mongoose_UserGuide.pdf
+%attr(755,root,root) %{_libdir}/libmongoose.so
+%{_includedir}/suitesparse/Mongoose.hpp
+
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libmongoose.a
diff --git a/Mongoose-static.patch b/Mongoose-static.patch
new file mode 100644
index 0000000..eea257e
--- /dev/null
+++ b/Mongoose-static.patch
@@ -0,0 +1,11 @@
+--- Mongoose-2.0.4/CMakeLists.txt.orig 2023-01-16 20:09:13.319621223 +0100
++++ Mongoose-2.0.4/CMakeLists.txt      2023-01-16 20:51:05.869342906 +0100
+@@ -174,7 +174,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMA
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
+ 
+ # Build the Mongoose library
+-add_library(mongoose_lib ${MONGOOSE_LIB_FILES})
++add_library(mongoose_lib STATIC ${MONGOOSE_LIB_FILES})
+ set_property(TARGET mongoose_lib PROPERTY POSITION_INDEPENDENT_CODE ON)
+ set_target_properties(mongoose_lib
+         PROPERTIES OUTPUT_NAME mongoose)
diff --git a/Mongoose-suitesparse.patch b/Mongoose-suitesparse.patch
new file mode 100644
index 0000000..16a125a
--- /dev/null
+++ b/Mongoose-suitesparse.patch
@@ -0,0 +1,18 @@
+--- Mongoose-2.0.4/CMakeLists.txt.orig 2019-05-25 19:44:47.000000000 +0200
++++ Mongoose-2.0.4/CMakeLists.txt      2023-01-16 19:57:09.106877953 +0100
+@@ -148,11 +148,10 @@ set(CMAKE_CXX_STANDARD 11)
+ #set(CMAKE_CXX_STANDARD_REQUIRED ON)
+ 
+ # determine which SuiteSparse_config to use
+-if (EXISTS ${PROJECT_SOURCE_DIR}/../SuiteSparse_config)
+-    message(STATUS "External ../SuiteSparse_config" ${BoldBlue} " found" 
${ColourReset} ".")
+-    set ( SUITESPARSE_CONFIG_DIR ${PROJECT_SOURCE_DIR}/../SuiteSparse_config )
+-    link_directories ( ${PROJECT_SOURCE_DIR}/../lib )
+-    message ( STATUS "Note: ../SuiteSparse_config must be compiled before 
compiling Mongoose" )
++if (EXISTS /usr/share/misc/SuiteSparse_config.mk)
++    message(STATUS "External SuiteSparse_config" ${BoldBlue} " found" 
${ColourReset} ".")
++    set ( SUITESPARSE_CONFIG_DIR /usr/include/suitesparse )
++    link_directories ( /usr/lib${LIB_SUFFIX} )
+     set ( SUITESPARSE_CONFIG_LIBRARY suitesparseconfig )
+ else ()
+     message(STATUS "External ../SuiteSparse_config" ${BoldRed} " not found" 
${ColourReset} ", compiling stand-alone Mongoose.")
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/SuiteSparse-Mongoose.git/commitdiff/c870d07e7e82ef98affead659793ff65f26852ad

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to