From 9830f977b7702241f7f50653c0d5fcafb4eb2b16aded4048462970f96d1bf57b Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Thu, 17 Jan 2019 12:22:32 +0000 Subject: [PATCH] Accepting request 665002 from home:susnux:branches:games - Update to 4.1.0 * Added support for Export 3MF (experimental) * Added supprt for Import / Export glTF 2 * Prevent failing stringstream to crash the export process * Fix invalid access to mesh array when the array is empty in Blender, also fixed short overflow. * Fixed memory leak in AMFImporter * Fixed IOStream leak in UnrealLoader: * Fixed out-of-bounds read in MaterialSystem unit test * Added support for SIB models from Silo 2.5 - Changes from 4.0.1 * StreamReader: fix out-of-range exception - Changes From 4.0.0 * New QT-Widget based assimp-viewer * Open3DGC codec supported by glFT-importer * glTF: Read and write transparency values * Support for X3D, AMF and Lugdunum3D * MDLLoader: fix resource leak. * Fix memory leak in Collada importer * Fixed many FBX bugs - Added %check section, run unit tests - Added disable-gitrevision-test.patch to fix testsuite as we do not build from git, git rev will test will fail. - Added do-not-install-irrXML.patch to prevent cmake from installing the irrXML (static) library. OBS-URL: https://build.opensuse.org/request/show/665002 OBS-URL: https://build.opensuse.org/package/show/games/assimp?expand=0&rev=7 --- assimp-3.3.1-suse.tar.gz | 3 -- assimp-4.1.0-suse.tar.xz | 3 ++ assimp.changes | 29 ++++++++++++ assimp.spec | 86 ++++++++++++++++++++++++---------- disable-gitrevision-test.patch | 13 +++++ do-not-install-irrXML.patch | 13 +++++ install-viewer.patch | 11 +++++ sanitize_source.sh | 7 --- 8 files changed, 129 insertions(+), 36 deletions(-) delete mode 100644 assimp-3.3.1-suse.tar.gz create mode 100644 assimp-4.1.0-suse.tar.xz create mode 100644 disable-gitrevision-test.patch create mode 100644 do-not-install-irrXML.patch create mode 100644 install-viewer.patch delete mode 100644 sanitize_source.sh diff --git a/assimp-3.3.1-suse.tar.gz b/assimp-3.3.1-suse.tar.gz deleted file mode 100644 index aaa57a8..0000000 --- a/assimp-3.3.1-suse.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:40b7d298ceb976409fc4e8456331f728a4f4406355b731120eac80abee42e877 -size 27302594 diff --git a/assimp-4.1.0-suse.tar.xz b/assimp-4.1.0-suse.tar.xz new file mode 100644 index 0000000..d8d1f28 --- /dev/null +++ b/assimp-4.1.0-suse.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9c0e16540ae6fe09a9d16f7ff0cfa99667b3269b304cc32f909b7ac908686ee6 +size 21696292 diff --git a/assimp.changes b/assimp.changes index 2b2d5c5..0a543eb 100644 --- a/assimp.changes +++ b/assimp.changes @@ -1,3 +1,32 @@ +------------------------------------------------------------------- +Sat Aug 11 16:16:03 UTC 2018 - rpm@fthiessen.de + +- Update to 4.1.0 + * Added support for Export 3MF (experimental) + * Added supprt for Import / Export glTF 2 + * Prevent failing stringstream to crash the export process + * Fix invalid access to mesh array when the array is + empty in Blender, also fixed short overflow. + * Fixed memory leak in AMFImporter + * Fixed IOStream leak in UnrealLoader: + * Fixed out-of-bounds read in MaterialSystem unit test + * Added support for SIB models from Silo 2.5 +- Changes from 4.0.1 + * StreamReader: fix out-of-range exception +- Changes From 4.0.0 + * New QT-Widget based assimp-viewer + * Open3DGC codec supported by glFT-importer + * glTF: Read and write transparency values + * Support for X3D, AMF and Lugdunum3D + * MDLLoader: fix resource leak. + * Fix memory leak in Collada importer + * Fixed many FBX bugs +- Added %check section, run unit tests +- Added disable-gitrevision-test.patch to fix testsuite as we do + not build from git, git rev will test will fail. +- Added do-not-install-irrXML.patch to prevent cmake from + installing the irrXML (static) library. + ------------------------------------------------------------------- Thu Apr 20 11:05:53 UTC 2017 - jengelh@inai.de diff --git a/assimp.spec b/assimp.spec index e154ac7..4ad6560 100644 --- a/assimp.spec +++ b/assimp.spec @@ -1,7 +1,7 @@ # # spec file for package assimp # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,34 +16,52 @@ # -%define sover 3 +%define sover 4 Name: assimp -Version: 3.3.1 +Version: 4.1.0 Release: 0 Summary: Library to load and process 3D scenes from various data formats -License: BSD-3-Clause +License: BSD-3-Clause AND MIT Group: Development/Libraries/C and C++ Url: http://assimp.org/ -#Source: https://github.com/assimp/assimp/archive/v%{version}/%{name}-%{version}.tar.gz -Source: %{name}-%{version}-suse.tar.gz -Source9: sanitize_source.sh -BuildRequires: boost-devel +# Removed non free parts from the original source package (models-nonbsd) +# https://github.com/assimp/assimp/archive/v%%{version}/%%{name}-%%{version}.tar.gz +Source0: %{name}-%{version}-suse.tar.xz +# PATCH-FIX-OPENSUSE disable-gitrevision-test.patch -- Disable gitrev test as we build from release not from git +Patch0: disable-gitrevision-test.patch +Patch1: do-not-install-irrXML.patch +Patch2: install-viewer.patch BuildRequires: cmake BuildRequires: dos2unix BuildRequires: gcc-c++ +BuildRequires: irrlicht-devel +BuildRequires: libboost_headers-devel BuildRequires: pkgconfig BuildRequires: zlib-devel +BuildRequires: pkgconfig(IL) +BuildRequires: pkgconfig(Qt5OpenGL) +BuildRequires: pkgconfig(Qt5Widgets) +BuildRequires: pkgconfig(glu) +BuildRequires: pkgconfig(minizip) BuildRoot: %{_tmppath}/%{name}-%{version}-build %description -Assimp is a library to load and process geometric scenes from various data formats. It is tailored at typical game scenarios by supporting a node hierarchy, static or skinned meshes, materials, bone animations and potential texture data. The library is not designed for speed, it is primarily useful for importing assets from various sources once and storing it in a engine-specific format for easy and fast every-day-loading. +Assimp is a library to load and process geometric scenes from various data formats. +It is tailored at typical game scenarios by supporting a node hierarchy, static or skinned meshes, +materials, bone animations and potential texture data. The library is not designed for speed, +it is primarily useful for importing assets from various sources once and storing it in a +engine-specific format for easy and fast every-day-loading. %package -n lib%{name}%{sover} Summary: Headers, docs and command-line utility for %{name} Group: System/Libraries %description -n lib%{name}%{sover} -Assimp is a library to load and process geometric scenes from various data formats. It is tailored at typical game scenarios by supporting a node hierarchy, static or skinned meshes, materials, bone animations and potential texture data. The library is not designed for speed, it is primarily useful for importing assets from various sources once and storing it in a engine-specific format for easy and fast every-day-loading. +Assimp is a library to load and process geometric scenes from various data formats. +It is tailored at typical game scenarios by supporting a node hierarchy, static or skinned meshes, +materials, bone animations and potential texture data. The library is not designed for speed, +it is primarily useful for importing assets from various sources once and storing it in a +engine-specific format for easy and fast every-day-loading. %package devel Summary: Headers, docs and command-line utility for %{name} @@ -53,44 +71,60 @@ Requires: lib%{name}%{sover} = %{version} Requires: libstdc++-devel %description devel -Assimp is a library to load and process geometric scenes from various data formats. It is tailored at typical game scenarios by supporting a node hierarchy, static or skinned meshes, materials, bone animations and potential texture data. The library is not designed for speed, it is primarily useful for importing assets from various sources once and storing it in a engine-specific format for easy and fast every-day-loading. +Assimp is a library to load and process geometric scenes from various data formats. +It is tailored at typical game scenarios by supporting a node hierarchy, static or skinned meshes, +materials, bone animations and potential texture data. The library is not designed for speed, +it is primarily useful for importing assets from various sources once and storing it in a +engine-specific format for easy and fast every-day-loading. + +%package viewer +Summary: Viewer for assimp supported assets +Group: Development/Libraries/C and C++ + +%description viewer +Assimp is a library to load and process geometric scenes from various data formats. +It is tailored at typical game scenarios by supporting a node hierarchy, static or skinned meshes, +materials, bone animations and potential texture data. The library is not designed for speed, +it is primarily useful for importing assets from various sources once and storing it in a +engine-specific format for easy and fast every-day-loading. %prep %setup -q - -dos2unix LICENSE CREDITS CHANGES README -find . -type f -name "*.lib" -delete +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 %build %cmake \ - -DCMAKE_BUILD_TYPE="Release" \ -DASSIMP_LIB_INSTALL_DIR="%{_libdir}" -CFLAGS="%{optflags}" make %{?_smp_mflags} +make %{?_smp_mflags} %install -rm -rf examples/.deps %cmake_install find %{buildroot} -type f -name "*.la" -delete -print +%check +pushd build/test +LD_LIBRARY_PATH=%{buildroot}%{_libdir} ctest --output-on-failure --force-new-ctest-process +popd + %post -n lib%{name}%{sover} -p /sbin/ldconfig %postun -n lib%{name}%{sover} -p /sbin/ldconfig %files -n lib%{name}%{sover} -%defattr(-,root,root) -%if 0%{?suse_version} > 1320 -%license CREDITS LICENSE -%else -%doc CREDITS LICENSE -%endif -%{_libdir}/libassimp.so.3* +%license LICENSE +%{_libdir}/libassimp.so.%{sover}* %files devel -%defattr(-,root,root) -%doc README CHANGES +%doc README CHANGES CREDITS %{_includedir}/assimp/ %{_bindir}/assimp %{_libdir}/libassimp.so %{_libdir}/cmake/* %{_libdir}/pkgconfig/assimp.pc +%files viewer +%license LICENSE +%{_bindir}/assimp_qt_viewer + %changelog diff --git a/disable-gitrevision-test.patch b/disable-gitrevision-test.patch new file mode 100644 index 0000000..07cc584 --- /dev/null +++ b/disable-gitrevision-test.patch @@ -0,0 +1,13 @@ +diff -Nur assimp-4.1.0/test/unit/utVersion.cpp new/test/unit/utVersion.cpp +--- assimp-4.1.0/test/unit/utVersion.cpp 2017-12-11 14:22:45.000000000 +0100 ++++ new/test/unit/utVersion.cpp 2018-08-11 18:14:15.231279250 +0200 +@@ -65,7 +65,9 @@ + EXPECT_NE( aiGetCompileFlags(), 0U ); + } + ++/* Does not work, as we do not build from GIT + TEST_F( utVersion, aiGetVersionRevisionTest ) { + EXPECT_NE( aiGetVersionRevision(), 0U ); + } ++*/ + diff --git a/do-not-install-irrXML.patch b/do-not-install-irrXML.patch new file mode 100644 index 0000000..72d2014 --- /dev/null +++ b/do-not-install-irrXML.patch @@ -0,0 +1,13 @@ +diff -Nur assimp-4.1.0/contrib/irrXML/CMakeLists.txt new/contrib/irrXML/CMakeLists.txt +--- assimp-4.1.0/contrib/irrXML/CMakeLists.txt 2017-12-11 14:22:45.000000000 +0100 ++++ new/contrib/irrXML/CMakeLists.txt 2018-08-11 20:36:21.068206869 +0200 +@@ -17,6 +17,6 @@ + set(IRRXML_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "IrrXML_Include" ) + set(IRRXML_LIBRARY "IrrXML" CACHE INTERNAL "IrrXML" ) + +-install(TARGETS IrrXML +- ARCHIVE DESTINATION ${ASSIMP_LIB_INSTALL_DIR} +- COMPONENT ${LIBASSIMP_COMPONENT}) ++#install(TARGETS IrrXML ++# ARCHIVE DESTINATION ${ASSIMP_LIB_INSTALL_DIR} ++# COMPONENT ${LIBASSIMP_COMPONENT}) diff --git a/install-viewer.patch b/install-viewer.patch new file mode 100644 index 0000000..71c6135 --- /dev/null +++ b/install-viewer.patch @@ -0,0 +1,11 @@ +diff -Nur assimp-4.1.0/tools/assimp_qt_viewer/CMakeLists.txt new/tools/assimp_qt_viewer/CMakeLists.txt +--- assimp-4.1.0/tools/assimp_qt_viewer/CMakeLists.txt 2017-12-11 14:22:45.000000000 +0100 ++++ new/tools/assimp_qt_viewer/CMakeLists.txt 2018-08-11 22:08:44.441867937 +0200 +@@ -43,3 +43,7 @@ + endif() + + set_property(TARGET ${PROJECT_NAME} PROPERTY DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) ++ ++install( TARGETS ${PROJECT_NAME} ++ DESTINATION "${ASSIMP_BIN_INSTALL_DIR}" COMPONENT assimp-dev ++) diff --git a/sanitize_source.sh b/sanitize_source.sh deleted file mode 100644 index 050efff..0000000 --- a/sanitize_source.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -p="assimp-3.3.1" -wget -c "https://github.com/assimp/assimp/archive/v3.3.1/$p.tar.gz" -rm -Rf "$p" -tar -xf "$p.tar.gz" -rm -Rf "$p/test/models-nonbsd" -tar --owner=root --group=root -czf "$p-suse.tar.gz" "$p"