83812e6
# Force out of source build
83812e6
%undefine __cmake_in_source_build
a8f374a
#%%global prerelease _beta2
8f5d73a
# TODO:
8f5d73a
# Python Module
8f5d73a
71e54fd
Name:           alembic
f435e5b
Version:        1.8.6
dbb7fcc
Release:        %autorelease
71e54fd
Summary:        Open framework for storing and sharing scene data
f435e5b
License:        BSD-3-Clause AND BSL-1.0
71e54fd
URL:            http://alembic.io/
71e54fd
39408bf
Source0:        https://github.com/%{name}/%{name}/archive/%{version}%{?prerelease}.tar.gz#/%{name}-%{version}%{?prerelease}.tar.gz
71e54fd
8f7db9e
# Use patch from Gentoo fixing iblmbase root path
8f7db9e
# https://gitweb.gentoo.org/repo/gentoo.git/tree/media-gfx/alembic/files/alembic-1.7.11-0002-Find-IlmBase-by-setting-a-proper-ILMBASE_ROOT-value.patch?id=953b3b21db55df987dd8006dcdec19e945294d98
8f7db9e
Patch0:         alembic-1.7.11-0002-Find-IlmBase-by-setting-a-proper-ILMBASE_ROOT-value.patch 
8f7db9e
BuildRequires:  boost-devel
39408bf
BuildRequires:  cmake >= 3.13
aabc77e
BuildRequires:	gcc-c++
71e54fd
BuildRequires:  hdf5-devel
8f7db9e
c22d51f
# Per https://github.com/alembic/alembic/blob/master/README.txt
c22d51f
# alembic actually needs ilmbase, not OpenEXR.
058cbdd
# As of OpenEXR 3.x Imath is now a standalone library.
058cbdd
%if 0%{?fedora} > 34
058cbdd
BuildRequires:  cmake(Imath)
058cbdd
%else
a700f8b
BuildRequires:  pkgconfig(IlmBase)
058cbdd
%endif
a700f8b
BuildRequires:  pkgconfig(zlib)
71e54fd
71e54fd
%description
71e54fd
Alembic is an open computer graphics interchange framework. Alembic distills
71e54fd
complex, animated scenes into a non-procedural, application-independent set of
71e54fd
baked geometric results. This 'distillation' of scenes into baked geometry is
71e54fd
exactly analogous to the distillation of lighting and rendering scenes into
71e54fd
rendered image data.
71e54fd
71e54fd
%package        libs
71e54fd
Summary:        Core Alembic libraries
71e54fd
71e54fd
%description    libs
71e54fd
Alembic is an open computer graphics interchange framework. Alembic distills
71e54fd
complex, animated scenes into a non-procedural, application-independent set of
71e54fd
baked geometric results. This 'distillation' of scenes into baked geometry is
71e54fd
exactly analogous to the distillation of lighting and rendering scenes into
71e54fd
rendered image data.
71e54fd
71e54fd
%package        devel
71e54fd
Summary:        Development files for %{name}
71e54fd
Requires:       %{name}%{?_isa} = %{version}-%{release}
71e54fd
Requires:       cmake%{?_isa}
71e54fd
71e54fd
%description    devel
71e54fd
The %{name}-devel package contains libraries and header files for developing
71e54fd
applications that use %{name}.
71e54fd
71e54fd
%prep
39408bf
%autosetup -p1 -n %{name}-%{version}%{?prerelease}
71e54fd
8f5d73a
sed -i -e 's/ConfigPackageLocation lib/ConfigPackageLocation %{_lib}/g' \
71e54fd
    lib/Alembic/CMakeLists.txt
71e54fd
ae65b98
iconv -f iso8859-1 -t utf-8 ACKNOWLEDGEMENTS.txt > ACKNOWLEDGEMENTS.txt.conv && \
ae65b98
    mv -f ACKNOWLEDGEMENTS.txt.conv ACKNOWLEDGEMENTS.txt
ae65b98
71e54fd
%build
ae65b98
export CXXFLAGS="%{optflags} -Wl,--as-needed"
ae65b98
%cmake %{?_cmake_skip_rpath} \
8f5d73a
    -DALEMBIC_LIB_INSTALL_DIR=%{_libdir} \
71e54fd
    -DALEMBIC_SHARED_LIBS=ON \
a8f374a
    -DCMAKE_CXX_STANDARD=17 \
71e54fd
    -DUSE_BINARIES=ON \
71e54fd
    -DUSE_HDF5=ON \
71e54fd
    -DUSE_EXAMPLES=ON \
71e54fd
    -DUSE_PYALEMBIC=OFF \
71e54fd
    -DUSE_STATIC_BOOST=OFF \
71e54fd
    -DUSE_STATIC_HDF5=OFF \
83812e6
    -DUSE_TESTS=ON
71e54fd
83812e6
%cmake_build
71e54fd
71e54fd
%install
83812e6
%cmake_install
71e54fd
71e54fd
%files
71e54fd
%{_bindir}/abcconvert
71e54fd
%{_bindir}/abcdiff
71e54fd
%{_bindir}/abcecho
71e54fd
%{_bindir}/abcechobounds
71e54fd
%{_bindir}/abcls
71e54fd
%{_bindir}/abcstitcher
71e54fd
%{_bindir}/abctree
71e54fd
71e54fd
%files libs
71e54fd
%license LICENSE.txt
71e54fd
%doc ACKNOWLEDGEMENTS.txt FEEDBACK.txt NEWS.txt README.txt
71e54fd
%{_libdir}/libAlembic.so.*
71e54fd
71e54fd
%files devel
71e54fd
%{_includedir}/Alembic
71e54fd
%{_libdir}/cmake/Alembic
71e54fd
%{_libdir}/libAlembic.so
71e54fd
71e54fd
%changelog
dbb7fcc
%autochangelog