[packages/manifold] - new

baggins baggins at pld-linux.org
Tue Nov 5 02:15:52 CET 2024


commit f1cb1c71c79dcf3d4ef3c012b870e375d93324b5
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue Nov 5 00:21:34 2024 +0100

    - new

 install-cmake.patch     | 18 +++++++++++
 install-pkgconfig.patch | 22 +++++++++++++
 manifold.spec           | 84 +++++++++++++++++++++++++++++++++++++++++++++++++
 sonames.patch           | 49 +++++++++++++++++++++++++++++
 4 files changed, 173 insertions(+)
---
diff --git a/manifold.spec b/manifold.spec
new file mode 100644
index 0000000..2f1777c
--- /dev/null
+++ b/manifold.spec
@@ -0,0 +1,84 @@
+# This is what openscad at master needs
+%define	hash	22c66051dfdbcefa2012e30dd12c9b5a20f89a01
+%define	snap	%(echo %{hash} | cut -c 1-7)
+Summary:	Aeometry library dedicated to creating and operating on manifold triangle meshes
+Name:		manifold
+Version:	2.5.1
+Release:	1
+License:	Apache v2.0
+Group:		Libraries
+Source0:	https://github.com/elalish/manifold/archive/%{snap}/%{name}-%{version}-%{snap}.tar.gz
+# Source0-md5:	f88f9a9314a92a6c3fb71c6fc242ae64
+Patch0:		install-pkgconfig.patch
+Patch1:		install-cmake.patch
+Patch2:		sonames.patch
+URL:		https://github.com/elalish/manifold
+BuildRequires:	Clipper2-devel
+BuildRequires:	cmake
+BuildRequires:	tbb-devel
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Manifold is a geometry library dedicated to creating and operating on
+manifold triangle meshes. A manifold mesh is a mesh that represents a
+solid object, and so is very important in manufacturing, CAD,
+structural analysis, etc.
+
+%package devel
+Summary:	Header files for %{name} library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki %{name}
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Header files for %{name} library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki %{name}.
+
+%prep
+%setup -q -n %{name}-%{hash}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+mkdir -p build
+cd build
+%cmake ../ \
+	-DMANIFOLD_PAR=TBB
+
+%{__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 AUTHORS LICENSE README.md
+%attr(755,root,root) %{_libdir}/libmanifold.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libmanifold.so.2
+%attr(755,root,root) %{_libdir}/libcross_section.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libcross_section.so.2
+%attr(755,root,root) %{_libdir}/libpolygon.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libpolygon.so.2
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libmanifold.so
+%attr(755,root,root) %{_libdir}/libcross_section.so
+%attr(755,root,root) %{_libdir}/libpolygon.so
+# C bindings
+%attr(755,root,root) %{_libdir}/libmanifoldc.so
+%{_includedir}/manifold
+%{_libdir}/cmake/manifold
+%{_pkgconfigdir}/manifold.pc
diff --git a/install-cmake.patch b/install-cmake.patch
new file mode 100644
index 0000000..2f01234
--- /dev/null
+++ b/install-cmake.patch
@@ -0,0 +1,18 @@
+--- manifold-22c66051dfdbcefa2012e30dd12c9b5a20f89a01/CMakeLists.txt~	2024-11-04 23:35:23.000000000 +0100
++++ manifold-22c66051dfdbcefa2012e30dd12c9b5a20f89a01/CMakeLists.txt	2024-11-04 23:36:42.051314751 +0100
+@@ -162,13 +162,13 @@
+   VERSION ${MANIFOLD_VERSION}
+   COMPATIBILITY SameMajorVersion
+ )
+-install(EXPORT manifoldTargets DESTINATION ${CMAKE_INSTALL_DATADIR}/manifold)
++install(EXPORT manifoldTargets DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/manifold)
+ configure_file(manifoldConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/manifoldConfig.cmake @ONLY)
+ install(FILES
+   ${CMAKE_CURRENT_SOURCE_DIR}/manifoldDeps.cmake
+   ${CMAKE_CURRENT_BINARY_DIR}/cmake/manifoldConfigVersion.cmake
+   ${CMAKE_CURRENT_BINARY_DIR}/manifoldConfig.cmake
+-  DESTINATION ${CMAKE_INSTALL_DATADIR}/manifold
++  DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/manifold
+ )
+ 
+ if(MANIFOLD_CROSS_SECTION)
diff --git a/install-pkgconfig.patch b/install-pkgconfig.patch
new file mode 100644
index 0000000..6bca8f2
--- /dev/null
+++ b/install-pkgconfig.patch
@@ -0,0 +1,22 @@
+From fa6a6325456f89228e27cdd3e1bae574733c5c33 Mon Sep 17 00:00:00 2001
+From: Chris Mayo <aklhfex at gmail.com>
+Date: Mon, 23 Sep 2024 15:53:28 +0100
+Subject: [PATCH] Install manifold.pc under CMAKE_INSTALL_LIBDIR (#946)
+
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 048700e96..f551322d0 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -176,7 +176,7 @@ if(MANIFOLD_CROSS_SECTION)
+ endif()
+ configure_file(manifold.pc.in ${CMAKE_CURRENT_BINARY_DIR}/manifold.pc @ONLY)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/manifold.pc
+-  DESTINATION lib/pkgconfig)
++  DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+ 
+ endif()
+ 
diff --git a/sonames.patch b/sonames.patch
new file mode 100644
index 0000000..e6c321d
--- /dev/null
+++ b/sonames.patch
@@ -0,0 +1,49 @@
+--- manifold-22c66051dfdbcefa2012e30dd12c9b5a20f89a01/src/cross_section/CMakeLists.txt~	2024-09-16 06:35:55.000000000 +0200
++++ manifold-22c66051dfdbcefa2012e30dd12c9b5a20f89a01/src/cross_section/CMakeLists.txt	2024-11-04 23:58:20.163463086 +0100
+@@ -29,6 +29,9 @@
+         PRIVATE Clipper2)
+ endif()
+ 
++set_property(TARGET cross_section PROPERTY VERSION "${MANIFOLD_VERSION}")
++set_property(TARGET cross_section PROPERTY SOVERSION 2)
++
+ target_compile_options(${PROJECT_NAME} PRIVATE ${MANIFOLD_FLAGS})
+ target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17)
+ 
+--- manifold-22c66051dfdbcefa2012e30dd12c9b5a20f89a01/src/polygon/CMakeLists.txt~	2024-09-16 06:35:55.000000000 +0200
++++ manifold-22c66051dfdbcefa2012e30dd12c9b5a20f89a01/src/polygon/CMakeLists.txt	2024-11-04 23:58:56.379879678 +0100
+@@ -24,6 +24,9 @@
+     PRIVATE $<BUILD_INTERFACE:collider>
+ )
+ 
++set_property(TARGET polygon PROPERTY VERSION "${MANIFOLD_VERSION}")
++set_property(TARGET polygon PROPERTY SOVERSION 2)
++
+ target_compile_options(${PROJECT_NAME} PRIVATE ${MANIFOLD_FLAGS})
+ target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17)
+ 
+--- manifold-22c66051dfdbcefa2012e30dd12c9b5a20f89a01/CMakeLists.txt~	2024-11-04 23:53:54.000000000 +0100
++++ manifold-22c66051dfdbcefa2012e30dd12c9b5a20f89a01/CMakeLists.txt	2024-11-05 00:00:52.049660626 +0100
+@@ -17,6 +17,11 @@
+ 
+ set(CMAKE_VERBOSE_MAKEFILE ON)
+ 
++set(MANIFOLD_VERSION_MAJOR 2)
++set(MANIFOLD_VERSION_MINOR 5)
++set(MANIFOLD_VERSION_PATCH 1)
++set(MANIFOLD_VERSION "${MANIFOLD_VERSION_MAJOR}.${MANIFOLD_VERSION_MINOR}.${MANIFOLD_VERSION_PATCH}")
++
+ if(EMSCRIPTEN)
+   set(JSBIND_DEFAULT ON)
+ else()
+@@ -148,10 +153,6 @@
+ 
+ # installation related
+ 
+-set(MANIFOLD_VERSION_MAJOR 2)
+-set(MANIFOLD_VERSION_MINOR 5)
+-set(MANIFOLD_VERSION_PATCH 1)
+-set(MANIFOLD_VERSION "${MANIFOLD_VERSION_MAJOR}.${MANIFOLD_VERSION_MINOR}.${MANIFOLD_VERSION_PATCH}")
+ set_property(TARGET manifold PROPERTY VERSION "${MANIFOLD_VERSION}")
+ set_property(TARGET manifold PROPERTY SOVERSION 2)
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/manifold.git/commitdiff/f1cb1c71c79dcf3d4ef3c012b870e375d93324b5



More information about the pld-cvs-commit mailing list