463ff34
%undefine __cmake_in_source_build
01fbb64
Name:           assimp
c07ea6c
Version:        3.3.1
42edbb5
Release:        27%{?dist}
01fbb64
Summary:        Library to import various 3D model formats into applications
c27ec6b
# Assimp is BSD, the bundled openddlparser is MIT.
c27ec6b
License:        BSD and MIT
01fbb64
URL:            http://assimp.sourceforge.net
c27ec6b
#Source0:  https://github.com/assimp/%{name}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz
c27ec6b
# Github releases include nonfree models, source tarball must be re-generated
c27ec6b
# using assimp_generate_tarball.sh
c07ea6c
Source0:        %{name}-%{version}-free.tar.xz
c07ea6c
Source1:        assimp_generate_tarball.sh
9efba47
# Current 3.3.1 not compilable under s390x and ppc64le - BigEndian issues
c07ea6c
Patch0:         %{name}-3.3.1-unbundle.patch
8b2f97f
# Add /usr/lib64 to library lookup paths for python modules
c07ea6c
Patch1:         %{name}-3.2.0-pythonpath.patch
f5767bf
# Fix library and include paths in assimp-config.cmake
f5767bf
# Fixes rhbz#1263698, not submitted upstream
c07ea6c
# Rehashed to 3.3.1
c07ea6c
Patch2:         0001-Assimp-cmake-provider-fix.patch
729f8f8
# fix FTBFS on bigendian platform s390x/ppc64
729f8f8
Patch3:         assimp-3.3.1-namespace-bigendian.patch
8b2dc9d
Patch10:        assimp-3.3.1-install-pkgconfig.patch
028704e
Patch11:        assimp-3.3.1-cmakemacros.patch
42edbb5
Patch12:	assimp-gcc11.patch
028704e
c07ea6c
#Upstream backports
c07ea6c
# Collada morph animation
8c9df41
Patch100:       0001-Morph-animation-support-for-collada.patch
c07ea6c
# Generate doc from CMakeFiles. Backported from Upstream
8c9df41
Patch101:       0001-Enable-doxygen-been-properly-used-from-cmake-build-a.patch
8c9df41
# Strips bundled irrXML out of build files, and allows project to build
8c9df41
# against system versions of the libraries (not yet submitted upstream)
8c9df41
Patch102:       0001-Apply-mechanism-to-decide-use-for-IrrXML-external-or.patch
c07ea6c
Igor Gnatenko 3e62a91
BuildRequires:  gcc-c++
c07ea6c
BuildRequires: boost-devel
c07ea6c
BuildRequires: cmake
c07ea6c
BuildRequires: dos2unix
c07ea6c
BuildRequires: irrlicht-devel
c07ea6c
BuildRequires: irrXML-devel
c07ea6c
BuildRequires: doxygen
c07ea6c
BuildRequires: poly2tri-devel
8c9df41
BuildRequires: gtest-devel
8c9df41
BuildRequires: pkgconfig(zzip-zlib-config)
c07ea6c
BuildRequires: pkgconfig(zlib)
fb414da
BuildRequires: minizip-compat-devel
Orion Poplawski c3be2fe
# Incompatible - https://github.com/assimp/assimp/issues/788
Orion Poplawski 7eef89e
#BuildRequires: pkgconfig(polyclipping)
Orion Poplawski 7eef89e
Provides:      bundled(polyclipping) = 4.8.8
3b61f3b
BuildRequires: pkgconfig(ILUT)
c07ea6c
BuildRequires: pkgconfig(python3)
ddec090
BuildRequires: python3-devel
ed7b020
c27ec6b
Provides: bundled(openddl-parser)
c27ec6b
01fbb64
%description
c27ec6b
Assimp, the Open Asset Import Library, is a free library to import
c27ec6b
various well-known 3D model formats into applications.  Assimp aims
c27ec6b
to provide a full asset conversion pipeline for use in game
c27ec6b
engines and real-time rendering systems, but is not limited
01fbb64
to these applications.
01fbb64
01fbb64
%package devel
01fbb64
Summary: Header files and libraries for assimp
c27ec6b
Requires: %{name}%{?_isa} = %{version}-%{release}
01fbb64
01fbb64
%description devel
01fbb64
This package contains the header files and libraries
01fbb64
for assimp. If you would like to develop programs using assimp,
01fbb64
you will need to install assimp-devel.
01fbb64
8482203
%if 0%{?fedora} || 0%{?rhel} > 7
8b2f97f
%package -n python3-%{name}
ed7b020
Summary: Python 3 bindings for assimp
ed7b020
BuildArch: noarch
ed7b020
Requires: %{name} = %{version}-%{release}
ed7b020
Requires: python3
8b2f97f
Provides: %{name}-python3 = %{version}-%{release}
8b2f97f
Obsoletes: %{name}-python3 < 3.1.1
ed7b020
8b2f97f
%description -n python3-%{name}
ed7b020
This package contains the PyAssimp3 python bindings
c07ea6c
%endif
c07ea6c
c07ea6c
%package doc
c07ea6c
Summary: Assimp documentation
c07ea6c
BuildArch: noarch
c07ea6c
c07ea6c
%description doc
c07ea6c
%{summary}.
e02cb5b
01fbb64
%prep
c07ea6c
%setup -q
01fbb64
# Get rid of bundled libs so we can't accidently build against them
Orion Poplawski 7eef89e
#rm -r contrib/clipper
Orion Poplawski 7eef89e
rm -r contrib/irrXML
Orion Poplawski 7eef89e
rm -r contrib/zlib
Orion Poplawski 7eef89e
rm -r contrib/unzip
Orion Poplawski 7eef89e
rm -r contrib/poly2tri
220cd92
%patch0 -p1 -b .unbundle
c07ea6c
%patch1 -p1 -b .pythonpath
c07ea6c
%patch2 -p1 -b .cmakefix
729f8f8
%patch3 -p1 -b .bigendian
8b2dc9d
# Need to be upstreamed
8b2dc9d
%patch10 -p1 -b .pkgconfig
c07ea6c
# Backported from upstream
c07ea6c
%patch100 -p1 -b .docfix
c07ea6c
%patch101 -p1 -b .qt3d
8c9df41
%patch102 -p1 -b .systemirrxml
028704e
%patch11 -p0 -b .cmakemacros
42edbb5
%patch12 -p1 -b .gcc11
f170e99
01fbb64
%build
463ff34
%cmake \
463ff34
 -DCMAKE_BUILD_TYPE=Release \
8b2f97f
 -DASSIMP_LIB_INSTALL_DIR=%{_libdir} \
01045a2
 -DASSIMP_BIN_INSTALL_DIR=%{_bindir} \
f5767bf
 -DASSIMP_INCLUDE_INSTALL_DIR=%{_includedir} \
4d671dc
%ifarch s390x ppc64
3b61f3b
 -DAI_BUILD_BIG_ENDIAN=TRUE \
3b61f3b
%endif
c07ea6c
 -DBUILD_DOCS=ON \
c07ea6c
 -DHTML_OUTPUT=%{name}-%{version} \
c07ea6c
 -DCMAKE_INSTALL_DOCDIR=%{_docdir} \
Orion Poplawski 7eef89e
 -DPOLY2TRI_INCLUDE_PATH=%{_includedir}/poly2tri \
8c9df41
 -DSYSTEM_IRRXML=ON
Orion Poplawski 7eef89e
# To use system polyclipping if assimp ever becomes compatible:
Orion Poplawski 7eef89e
# -DCLIPPER_INCLUDE_PATH=%{_includedir}/polyclipping
463ff34
463ff34
%cmake_build
01fbb64
01fbb64
# Fix file encoding
8b2f97f
dos2unix README LICENSE CREDITS port/PyAssimp/README.md
01fbb64
iconv -f iso8859-1 -t utf-8 CREDITS > CREDITS.conv && mv -f CREDITS.conv CREDITS
01fbb64
01fbb64
%install
463ff34
%cmake_install
ed7b020
mkdir -p %{buildroot}%{python3_sitelib}/pyassimp/
8b2f97f
install -m0644 port/PyAssimp/pyassimp/*.py %{buildroot}%{python3_sitelib}/pyassimp/
01fbb64
7d43d0a
%ldconfig_scriptlets
01fbb64
01fbb64
01fbb64
%files
8b2f97f
%license LICENSE
8b2f97f
%doc README CREDITS
01fbb64
%{_bindir}/assimp
01fbb64
%{_libdir}/*.so.*
01fbb64
01fbb64
%files devel
01fbb64
%{_includedir}/assimp
01fbb64
%{_libdir}/*.so
01fbb64
%{_libdir}/pkgconfig/*.pc
c07ea6c
%{_libdir}/cmake/*
c07ea6c
c07ea6c
%files doc
c07ea6c
%{_docdir}/*
01fbb64
8482203
%if 0%{?fedora} || 0%{?rhel} > 7
8b2f97f
%files -n python3-%{name}
8b2f97f
%doc port/PyAssimp/README.md
ed7b020
%{python3_sitelib}/pyassimp
c07ea6c
%endif
01fbb64
01fbb64
%changelog
42edbb5
* Tue Aug 18 2020 Jeff Law <law@redhat.com> - 3.3.1-27
42edbb5
- Fix minor C++17 issues
42edbb5
21b4583
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-26
21b4583
- Second attempt - Rebuilt for
21b4583
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
21b4583
e88e96e
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-25
e88e96e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
e88e96e
4322cd0
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 3.3.1-24
4322cd0
- Rebuilt for Python 3.9
4322cd0
5c23ca9
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-23
5c23ca9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
5c23ca9
b6946fb
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 3.3.1-22
b6946fb
- Rebuilt for Python 3.8.0rc1 (#1748018)
b6946fb
a1149c2
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 3.3.1-21
a1149c2
- Rebuilt for Python 3.8
a1149c2
3f799c9
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-20
3f799c9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
3f799c9
79a1733
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-19
79a1733
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
79a1733
ddec090
* Mon Jan 14 2019 Miro Hrončok <mhroncok@redhat.com> - 3.3.1-18
ddec090
- Subpackage python2-assimp has been removed
ddec090
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
ddec090
fb414da
* Tue Aug 28 2018 Patrik Novotný <panovotn@redhat.com> - 3.3.1-17
fb414da
- update requires to minizip-compat(-devel), rhbz#1609830, rhbz#1615381
fb414da
d52aa21
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-16
d52aa21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
d52aa21
6e3109c
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 3.3.1-15
6e3109c
- Rebuilt for Python 3.7
6e3109c
9f5dcf0
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-14
9f5dcf0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
9f5dcf0
8482203
* Mon Oct 02 2017 Troy Dawson <tdawson@redhat.com> - 3.3.1-13
8482203
- Cleanup spec file conditionals
8482203
6300f24
* Sun Aug 06 2017 Björn Esser <besser82@fedoraproject.org> - 3.3.1-12
6300f24
- Rebuilt for AutoReq cmake-filesystem
6300f24
c5c59c2
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-11
c5c59c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
c5c59c2
d8bfa6f
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.1-10
d8bfa6f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
d8bfa6f
beb78d0
* Mon Jul 03 2017 Jonathan Wakely <jwakely@redhat.com> - 3.3.1-9
beb78d0
- Rebuilt for Boost 1.64
beb78d0
8b2dc9d
* Thu May 18 2017 Helio Chissini de Castro <helio@kde.org> - 3.3.1-8
8b2dc9d
- Fix invalid pkgconfig generation
8b2dc9d
0471bd6
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.1-7
0471bd6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
0471bd6
Orion Poplawski 7eef89e
* Sat May 13 2017 Orion Poplawski <orion@cora.nwra.com> - 3.3.1-6
Orion Poplawski 7eef89e
- Properly find poly2tri and note use of bundled polyclipping
Orion Poplawski 7eef89e
729f8f8
* Fri May 05 2017 Than Ngo <than@redhat.com> - 3.3.1-5
729f8f8
- fixed build issue on bigendian platform s390x/ppc64
729f8f8
- dropped excludearch s390x ppc64
729f8f8
9efba47
* Fri May 05 2017 Helio Chissini de Castro <helio@kde.org> - 3.3.1-4
9efba47
- Disable ppc64le and s390x arches due bigendian issue not yet solved
9efba47
8c9df41
* Sat Apr 29 2017 Helio Chissini de Castro <helio@kde.org> - 3.3.1-3
8c9df41
- Compile assimp with current exterbal irrXML
8c9df41
c07ea6c
* Wed Apr 19 2017 Helio Chissini de Castro <helio@kde.org> - 3.3.1-2
c07ea6c
- Revamp assimp with new upstream release 3.3.1 plus new upstreamed doc patches
c07ea6c
36061de
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-7
36061de
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
36061de
60ebb77
* Fri Jan 27 2017 Jonathan Wakely <jwakely@redhat.com> - 3.2.0-6
60ebb77
- Rebuilt for Boost 1.63
60ebb77
7d8b170
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 3.2.0-5
7d8b170
- Rebuild for Python 3.6
7d8b170
3f4c42a
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.0-4
3f4c42a
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
3f4c42a
dbc2bd7
* Fri Jul 01 2016 Dan Horák <dan[at]danny.cz> - 3.2.0-3
dbc2bd7
- Fix build on big endian platforms
dbc2bd7
01045a2
* Fri Jun 03 2016 Rich Mattes <richmattes@gmail.com> - 3.2.0-2
01045a2
- Fix pkgconfig and cmake files (rhbz#1340656)
01045a2
c27ec6b
* Mon May 09 2016 Rich Mattes <richmattes@gmail.com> - 3.2.0-1
c27ec6b
- Update to release 3.2.0 (rhbz#1332434)
c27ec6b
74c600a
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.1-9
74c600a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
74c600a
5f32314
* Thu Jan 14 2016 Jonathan Wakely <jwakely@redhat.com> - 3.1.1-8
5f32314
- Rebuilt for Boost 1.60
5f32314
f170e99
* Wed Dec 09 2015 Rich Mattes <richmattes@gmail.com> - 3.1.1-7
f170e99
- Add patch to fix build on big-endian architectures
f170e99
f979ead
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.1-6
f979ead
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
f979ead
f5767bf
* Thu Sep 17 2015 Rich Mattes <richmattes@gmail.com> - 3.1.1-5
f5767bf
- Fix assimp-config paths (rhbz#1263698)
f5767bf
- Build against system boost instead of using included workaround
f5767bf
a23e3e9
* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 3.1.1-4
a23e3e9
- Rebuilt for Boost 1.59
a23e3e9
677b05b
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.1-3
677b05b
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
677b05b
9a617c7
* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 3.1.1-2
9a617c7
- rebuild for Boost 1.58
9a617c7
8b2f97f
* Fri Jul 03 2015 Rich Mattes <richmattes@gmail.com> - 3.1.1-1
8b2f97f
- Update to release 3.1.1 (rhbz#1206371)
8b2f97f
- Remove upstreamed patches
8b2f97f
- Correct python package names
8b2f97f
- Use license macro
8b2f97f
7eb9fde
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1270-11
7eb9fde
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
7eb9fde
046db88
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 3.0.1270-10
046db88
- Rebuilt for GCC 5 C++11 ABI change
046db88
Petr Machata c934513
* Mon Jan 26 2015 Petr Machata <pmachata@redhat.com> - 3.0.1270-9
Petr Machata c934513
- Rebuild for boost 1.57.0
Petr Machata c934513
9d7d68f
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1270-8
9d7d68f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
9d7d68f
d397a4e
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1270-7
d397a4e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
d397a4e
61d9d39
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 3.0.1270-6
61d9d39
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
61d9d39
Petr Machata a4e51d8
* Thu May 22 2014 Petr Machata <pmachata@redhat.com> - 3.0.1270-5
Petr Machata a4e51d8
- Rebuild for boost 1.55.0
Petr Machata a4e51d8
ed7b020
* Sun Mar 02 2014 Scott K Logan <logans@cottsay.net> - 3.0.1270-4
ed7b020
- Changed upstream source to Github
ed7b020
- Un-commented assimp-python, added python-devel to build deps
ed7b020
- Added assimp-python3 subpackage
ed7b020
3ade79a
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.1270-3
3ade79a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
3ade79a
Petr Machata 8c8d70b
* Tue Jul 30 2013 Petr Machata <pmachata@redhat.com> - 3.0.1270-2
Petr Machata 8c8d70b
- Rebuild for boost 1.54.0
Petr Machata 8c8d70b
220cd92
* Wed May 01 2013 Rich Mattes <richmattes@gmail.com> 3.0.1270-1
220cd92
- Update to release 3.0.1270
220cd92
1e08944
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.863-9.20110824svn
1e08944
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
1e08944
e02cb5b
* Thu Oct 25 2012 Rich Mattes <richmattes@gmail.com> - 2.0.863-8.20110824svn
e02cb5b
- Install python bindings
e02cb5b
60a2fef
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.863-7.20110824svn
60a2fef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
60a2fef
20437ea
* Tue Jul  3 2012 Tom Callaway <spot@fedoraproject.org> - 2.0.863-6.20110824svn
20437ea
- rebuild against new irrlicht/irrxml
20437ea
01fbb64
* Wed Apr 11 2012 Rich Mattes <richmattes@gmail.com> - 2.0.863-5.20110824svn
01fbb64
- Changed spec to use buildroot macro
01fbb64
01fbb64
* Sat Dec 17 2011 Rich Mattes <richmattes@gmail.com> - 2.0.863-4.20110824svn
01fbb64
- Fixed pkgconfig paths
01fbb64
01fbb64
* Wed Aug 24 2011 Rich Mattes <richmattes@gmail.com> - 2.0.863-3.20110824svn
01fbb64
- Upgrade to latest svn snapshot
01fbb64
- Port changes to link against system irrXML
01fbb64
- Removed upstreamed zlib/unzip unbundling patches
01fbb64
01fbb64
* Thu Mar 24 2011 Rich Mattes <richmattes@gmail.com> - 2.0.863-2.20110324svn
01fbb64
- Upgrade to latest svn snapshot
01fbb64
- Port changes to link against libIrrXML
01fbb64
01fbb64
* Sat Dec 18 2010 Rich Mattes <richmattes@gmail.com> - 2.0.863-1
01fbb64
- Upgrade to release 2.0
01fbb64
01fbb64
* Mon Sep 20 2010 Rich Mattes <richmattes@gmail.com> - 1.1.700-3
01fbb64
- Remove extra buildrequires
01fbb64
- Generate doxygen docs manually
01fbb64
01fbb64
* Mon Sep 20 2010 Rich Mattes <richmattes@gmail.com> - 1.1.700-2
01fbb64
- Included doxygen-generated docs
01fbb64
- Using original .zip file from project download page
01fbb64
01fbb64
* Sun Sep 19 2010 Rich Mattes <richmattes@gmail.com> - 1.1.700-1
01fbb64
- First build