commit f3028839222d2a2c4484c88dc753dafe781eb419
Author: Jakub Bogusz <qbo...@pld-linux.org>
Date:   Sat Apr 1 22:44:37 2023 +0200

    - new

 OpenCOLLADA-install-paths.patch |  13 +++++
 OpenCOLLADA-pcre.patch          |  12 ++++
 OpenCOLLADA-system-zlib.patch   |  28 ++++++++++
 OpenCOLLADA.spec                | 120 ++++++++++++++++++++++++++++++++++++++++
 4 files changed, 173 insertions(+)
---
diff --git a/OpenCOLLADA.spec b/OpenCOLLADA.spec
new file mode 100644
index 0000000..00ae901
--- /dev/null
+++ b/OpenCOLLADA.spec
@@ -0,0 +1,120 @@
+# TODO: system MathMLSolver? 
https://sourceforge.net/projects/mathmlsolver/files/
+#
+# Conditional build:
+%bcond_without static_libs     # don't build static libraries
+#
+Summary:       3DS Max / Maya scenes exporter to COLLADA format
+Summary(pl.UTF-8):     Biblioteki do eksportu scen 3DS Max / Maya do formatu 
COLLADA
+Name:          OpenCOLLADA
+Version:       1.6.68
+Release:       1
+License:       MIT
+Group:         Libraries
+#Source0Download: https://github.com/KhronosGroup/OpenCOLLADA/releases
+Source0:       
https://github.com/KhronosGroup/OpenCOLLADA/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: ee7dae874019fea7be11613d07567493
+Patch0:                %{name}-pcre.patch
+Patch1:                %{name}-system-zlib.patch
+Patch2:                %{name}-install-paths.patch
+URL:           http://www.opencollada.org/
+BuildRequires: cmake >= 2.6
+BuildRequires: libstdc++-devel >= 6:4.7
+BuildRequires: libxml2-devel >= 2
+BuildRequires: pcre-devel
+BuildRequires: zlib-devel
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+COLLADAMax and COLLADAMaya are new implementation of a 3ds Max or Maya
+plug-ins to export scene or parts of it to a COLLADA file, released
+under an MIT-license. 
+
+%description -l pl.UTF-8
+COLLADAMax i COLLADAMaya to nowa implementacja wtyczek 3ds Max i Maya
+do eksportu scen lub ich części do plików COLLADA - wydana na licencji
+MIT.
+
+%package devel
+Summary:       Header files for OpenCOLLADA libraries
+Summary(pl.UTF-8):     Pliki nagłówkowe bibliotek OpenCOLLADA
+Group:         Development/Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description devel
+Header files for OpenCOLLADA libraries.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe bibliotek OpenCOLLADA.
+
+%package static
+Summary:       Static OpenCOLLADA libraries
+Summary(pl.UTF-8):     Statyczne biblioteki OpenCOLLADA
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+
+%description static
+Static OpenCOLLADA libraries.
+
+%description static -l pl.UTF-8
+Statyczne biblioteki OpenCOLLADA.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+install -d build
+cd build
+%cmake .. \
+       -DOPENCOLLADA_INST_CMAKECONFIG=%{_libdir}/cmake/opencollada \
+       -DOPENCOLLADA_INST_LIBRARY=%{_libdir} \
+       -DUSE_SHARED=ON \
+       %{!?with_static_libs:-DUSE_STATIC=OFF}
+
+%{__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) %{_libdir}/libGeneratedSaxParser.so
+%attr(755,root,root) %{_libdir}/libMathMLSolver.so
+%attr(755,root,root) %{_libdir}/libOpenCOLLADABaseUtils.so
+%attr(755,root,root) %{_libdir}/libOpenCOLLADAFramework.so
+%attr(755,root,root) %{_libdir}/libOpenCOLLADASaxFrameworkLoader.so
+%attr(755,root,root) %{_libdir}/libOpenCOLLADAStreamWriter.so
+%attr(755,root,root) %{_libdir}/libUTF.so
+%attr(755,root,root) %{_libdir}/libbuffer.so
+%attr(755,root,root) %{_libdir}/libftoa.so
+
+%files devel
+%defattr(644,root,root,755)
+%{_includedir}/opencollada
+%{_libdir}/cmake/opencollada
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libGeneratedSaxParser.a
+%{_libdir}/libMathMLSolver.a
+%{_libdir}/libOpenCOLLADABaseUtils.a
+%{_libdir}/libOpenCOLLADAFramework.a
+%{_libdir}/libOpenCOLLADASaxFrameworkLoader.a
+%{_libdir}/libOpenCOLLADAStreamWriter.a
+%{_libdir}/libUTF.a
+%{_libdir}/libbuffer.a
+%{_libdir}/libftoa.a
+%endif
diff --git a/OpenCOLLADA-install-paths.patch b/OpenCOLLADA-install-paths.patch
new file mode 100644
index 0000000..4703bdf
--- /dev/null
+++ b/OpenCOLLADA-install-paths.patch
@@ -0,0 +1,13 @@
+--- OpenCOLLADA-1.6.68/CMakeLists.txt.orig     2023-04-01 21:36:16.175865211 
+0200
++++ OpenCOLLADA-1.6.68/CMakeLists.txt  2023-04-01 22:00:36.754619243 +0200
+@@ -191,8 +191,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}
+ # Install vars
+ 
+ set(OPENCOLLADA_INST_INCLUDE ${CMAKE_INSTALL_PREFIX}/include/opencollada)
+-set(OPENCOLLADA_INST_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/opencollada)
+-set(OPENCOLLADA_INST_CMAKECONFIG ${OPENCOLLADA_INST_LIBRARY}/cmake)
++set(OPENCOLLADA_INST_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/opencollada CACHE 
PATH "")
++set(OPENCOLLADA_INST_CMAKECONFIG ${OPENCOLLADA_INST_LIBRARY}/cmake CACHE PATH 
"")
+ 
+ 
+ #-----------------------------------------------------------------------------
diff --git a/OpenCOLLADA-pcre.patch b/OpenCOLLADA-pcre.patch
new file mode 100644
index 0000000..965e33b
--- /dev/null
+++ b/OpenCOLLADA-pcre.patch
@@ -0,0 +1,12 @@
+--- 
OpenCOLLADA-1.6.68/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h.orig 
   2018-11-26 23:43:10.000000000 +0100
++++ OpenCOLLADA-1.6.68/COLLADABaseUtils/include/COLLADABUPcreCompiledPattern.h 
2020-12-31 13:31:49.542115850 +0100
+@@ -13,8 +13,7 @@
+ 
+ #include "COLLADABUPrerequisites.h"
+ 
+-struct real_pcre;
+-typedef struct real_pcre pcre;
++#include <pcre.h>
+ 
+ 
+ namespace COLLADABU
diff --git a/OpenCOLLADA-system-zlib.patch b/OpenCOLLADA-system-zlib.patch
new file mode 100644
index 0000000..bb43538
--- /dev/null
+++ b/OpenCOLLADA-system-zlib.patch
@@ -0,0 +1,28 @@
+--- OpenCOLLADA-1.6.68/CMakeLists.txt.orig     2018-11-26 23:43:10.000000000 
+0100
++++ OpenCOLLADA-1.6.68/CMakeLists.txt  2023-04-01 21:00:52.307371195 +0200
+@@ -274,7 +274,6 @@ add_subdirectory(common/libftoa)
+ add_subdirectory(${EXTERNAL_LIBRARIES}/UTF)
+ add_subdirectory(common/libBuffer)
+ add_subdirectory(${EXTERNAL_LIBRARIES}/MathMLSolver)
+-add_subdirectory(${EXTERNAL_LIBRARIES}/zlib)
+ 
+ # building OpenCOLLADA libs
+ add_subdirectory(COLLADABaseUtils)
+--- OpenCOLLADA-1.6.68/DAEValidator/CMakeLists.txt.orig        2018-11-26 
23:43:10.000000000 +0100
++++ OpenCOLLADA-1.6.68/DAEValidator/CMakeLists.txt     2023-04-01 
21:20:25.487682198 +0200
+@@ -80,14 +80,7 @@ if (NOT LIBXML2_FOUND)
+ else ()
+     list(APPEND Libraries ${LIBXML2_LIBRARIES})
+ endif ()
+-if (USE_STATIC)
+-        list(APPEND Libraries zlib_static)
+-    else ()
+-        list(APPEND Libraries zlib_shared)
+-    endif ()
+-if (WIN32)
+-      list(APPEND Libraries ws2_32.lib)
+-endif ()
++list(APPEND Libraries z)
+ target_link_libraries(DAEValidatorExecutable ${Libraries})
+ set_target_properties(DAEValidatorExecutable PROPERTIES OUTPUT_NAME 
DAEValidator)
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/OpenCOLLADA.git/commitdiff/f3028839222d2a2c4484c88dc753dafe781eb419

_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to