|
|
58e6765 |
%bcond hip 0
|
|
|
a1e8cfc |
%bcond ninja 0
|
|
|
a1e8cfc |
#%%global prerelease rc
|
|
|
c1c7f42 |
Name: oidn
|
|
|
fb3f021 |
Version: 2.2.2
|
|
|
a1e8cfc |
Release: %autorelease %{?prerelease: -p -e %{prerelease}}
|
|
|
c1c7f42 |
Summary: Library of denoising filters for images rendered with ray tracing
|
|
|
78ddc6a |
License: Apache-2.0
|
|
|
c1c7f42 |
URL: https://openimagedenoise.github.io/
|
|
|
9fda191 |
|
|
|
a1e8cfc |
Source0: https://github.com/OpenImageDenoise/%{name}/releases/download/v%{version}%{?prerelease:-%{prerelease}}/%{name}-%{version}%{?prerelease:-%{prerelease}}.src.tar.gz
|
|
|
c1c7f42 |
|
|
|
48734b7 |
# Library only available on x86_64
|
|
|
48734b7 |
ExclusiveArch: x86_64
|
|
|
9fda191 |
|
|
|
48734b7 |
BuildRequires: cmake >= 3.13.0
|
|
|
a1e8cfc |
# Enable HIP support
|
|
|
a1e8cfc |
%if %{with hip}
|
|
|
a1e8cfc |
BuildRequires: clang-devel
|
|
|
a1e8cfc |
BuildRequires: clang-tools-extra
|
|
|
a1e8cfc |
BuildRequires: hipcc
|
|
|
a1e8cfc |
BuildRequires: lld-devel
|
|
|
a1e8cfc |
BuildRequires: rocm-hip-devel
|
|
|
a1e8cfc |
BuildRequires: rocm-runtime
|
|
|
a1e8cfc |
%endif
|
|
|
40567cc |
# Needed to remove rpath from apps
|
|
|
40567cc |
BuildRequires: chrpath
|
|
|
48734b7 |
BuildRequires: gcc-c++
|
|
|
48734b7 |
BuildRequires: ispc
|
|
|
a1e8cfc |
%if %{with ninja}
|
|
|
a1e8cfc |
BuildRequires: ninja-build
|
|
|
a1e8cfc |
%endif
|
|
|
af3b53f |
BuildRequires: pkgconfig(OpenImageIO)
|
|
|
48734b7 |
BuildRequires: pkgconfig(python3)
|
|
|
48734b7 |
BuildRequires: pkgconfig(tbb)
|
|
|
9fda191 |
|
|
|
9fda191 |
%description
|
|
|
78ddc6a |
Intel Open Image Denoise is an open source library of high-performance,
|
|
|
78ddc6a |
high-quality denoising filters for images rendered with ray tracing.
|
|
|
9fda191 |
|
|
|
c1c7f42 |
%package libs
|
|
|
c1c7f42 |
Summary: Libraries for %{name}
|
|
|
9fda191 |
|
|
|
c1c7f42 |
%description libs
|
|
|
9fda191 |
The %{name}-libs package contains shared library for %{name}.
|
|
|
9fda191 |
|
|
|
c1c7f42 |
%package devel
|
|
|
c1c7f42 |
Summary: Development files for %{name}
|
|
|
c1c7f42 |
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
|
|
9fda191 |
|
|
|
48734b7 |
%description devel
|
|
|
48734b7 |
The %{name}-devel package contains libraries and header files for developing
|
|
|
48734b7 |
applications that use %{name}.
|
|
|
9fda191 |
|
|
|
c1c7f42 |
%package docs
|
|
|
c1c7f42 |
Summary: Documentation for %{name}
|
|
|
c1c7f42 |
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
|
|
c1c7f42 |
BuildArch: noarch
|
|
|
9fda191 |
|
|
|
48734b7 |
%description docs
|
|
|
9fda191 |
The %{name}-docs package contains documentation for %{name}.
|
|
|
9fda191 |
|
|
|
9fda191 |
%prep
|
|
|
c1c7f42 |
%autosetup -p1
|
|
|
9fda191 |
|
|
|
9fda191 |
%build
|
|
|
af3b53f |
%cmake \
|
|
|
a1e8cfc |
%if %{with ninja}
|
|
|
a1e8cfc |
-G Ninja \
|
|
|
a1e8cfc |
%endif
|
|
|
78ddc6a |
-DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE \
|
|
|
a1e8cfc |
%if %{with hip}
|
|
|
a1e8cfc |
-DOIDN_DEVICE_HIP=ON \
|
|
|
a1e8cfc |
-DOIDN_DEVICE_HIP_COMPILER=%{_bindir}/hipcc \
|
|
|
a1e8cfc |
-DROCM_PATH=%{_libdir}/libhsa-runtime64.so.1
|
|
|
a1e8cfc |
%endif
|
|
|
3cac4ef |
%cmake_build
|
|
|
9fda191 |
|
|
|
9fda191 |
%install
|
|
|
3cac4ef |
%cmake_install
|
|
|
9fda191 |
|
|
|
40567cc |
# Remove rpath
|
|
|
40567cc |
chrpath --delete %{buildroot}%{_bindir}/%{name}{Denoise,Test,Benchmark}
|
|
|
d66602f |
chrpath --delete %{buildroot}%{_libdir}/libOpenImageDenoise{,_core,_device_cpu}.so.*
|
|
|
d66602f |
|
|
|
9fda191 |
# Remove duplicated documentation
|
|
|
9fda191 |
rm -rf %{buildroot}%{_docdir}/OpenImageDenoise
|
|
|
9fda191 |
|
|
|
9fda191 |
%files
|
|
|
9fda191 |
%license LICENSE.txt
|
|
|
9fda191 |
%doc CHANGELOG.md
|
|
|
f002456 |
%{_bindir}/%{name}{Denoise,Test,Benchmark}
|
|
|
9fda191 |
|
|
|
9fda191 |
%files libs
|
|
|
78ddc6a |
%{_libdir}/libOpenImageDenoise{,_core,_device_cpu}.so.2
|
|
|
78ddc6a |
%{_libdir}/libOpenImageDenoise{,_core,_device_cpu}.so.%{version}
|
|
|
9fda191 |
|
|
|
9fda191 |
%files docs
|
|
|
9fda191 |
%doc README.md readme.pdf
|
|
|
9fda191 |
|
|
|
9fda191 |
%files devel
|
|
|
2bea2b2 |
%{_libdir}/cmake/OpenImageDenoise-%{version}/*.cmake
|
|
|
9fda191 |
%{_includedir}/OpenImageDenoise
|
|
|
9fda191 |
%{_libdir}/libOpenImageDenoise.so
|
|
|
9fda191 |
|
|
|
9fda191 |
%changelog
|
|
|
40567cc |
%autochangelog
|