2019-01-08 11:53:09 +01:00
|
|
|
#
|
|
|
|
# spec file for package OpenShadingLanguage
|
|
|
|
#
|
2020-05-17 15:18:08 +02:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2019-01-08 11:53:09 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-02-04 20:38:51 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2019-01-08 11:53:09 +01:00
|
|
|
#
|
|
|
|
|
2019-11-06 13:12:25 +01:00
|
|
|
|
2019-01-08 11:53:09 +01:00
|
|
|
# The library soname versions follow the package version major and minor numbers.
|
|
|
|
%define sover %(echo %{version} | cut -d . -f 1,2)
|
|
|
|
%define sufx %(echo %{sover}|tr . _)
|
2020-05-17 15:18:08 +02:00
|
|
|
# Required for the plugin directory name, see https://github.com/OpenImageIO/oiio/issues/2583
|
|
|
|
%define oiio_major_minor_ver %(rpm -q --queryformat='%%{version}' OpenImageIO-devel | cut -d . -f 1-2)
|
2019-01-08 11:53:09 +01:00
|
|
|
|
|
|
|
Name: OpenShadingLanguage
|
2020-04-24 10:17:39 +02:00
|
|
|
Version: 1.11.4.1
|
2019-01-08 11:53:09 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: A language for programmable shading
|
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Productivity/Graphics/Other
|
2020-05-17 15:18:08 +02:00
|
|
|
URL: https://github.com/imageworks/OpenShadingLanguage
|
2020-04-24 10:17:39 +02:00
|
|
|
Source0: https://github.com/imageworks/OpenShadingLanguage/archive/Release-%{version}-dev.tar.gz#/%{name}-Release-%{version}.tar.gz
|
2019-01-09 08:30:25 +01:00
|
|
|
Source1: https://creativecommons.org/licenses/by/3.0/legalcode.txt
|
2020-05-17 15:18:08 +02:00
|
|
|
# PATCH-FIX-UPSTREAM
|
2020-04-24 10:17:39 +02:00
|
|
|
Patch0: 0001-LLVM-10-odds-and-ends-1135.patch
|
2020-05-17 15:18:08 +02:00
|
|
|
# PATCH-FIX-UPSTREAM
|
2020-04-24 10:17:39 +02:00
|
|
|
Patch1: 0001-Some-SPI-build-fixes-for-finding-the-right-llvm.patch
|
2020-05-17 15:18:08 +02:00
|
|
|
# PATCH-FIX-UPSTREAM
|
|
|
|
Patch2: 0001-Fix-typo-in-the-.pc.in-files-that-botched-the-versio.patch
|
|
|
|
# PATCH-FIX-UPSTREAM - https://github.com/imageworks/OpenShadingLanguage/pull/1171
|
|
|
|
Patch3: 0001-Use-single-shared-clang-cpp-library-starting-with-LL.patch
|
2020-04-24 10:17:39 +02:00
|
|
|
BuildRequires: OpenEXR-devel
|
2019-01-08 11:53:09 +01:00
|
|
|
BuildRequires: bison
|
2020-05-17 15:18:08 +02:00
|
|
|
BuildRequires: clang-devel >= 7
|
|
|
|
BuildRequires: cmake >= 3.12
|
2019-01-08 11:53:09 +01:00
|
|
|
BuildRequires: flex
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: libboost_filesystem-devel
|
2019-02-04 20:38:51 +01:00
|
|
|
BuildRequires: libboost_system-devel
|
2019-01-08 11:53:09 +01:00
|
|
|
BuildRequires: libboost_thread-devel
|
2020-04-24 10:17:39 +02:00
|
|
|
BuildRequires: pkg-config
|
2020-05-17 15:18:08 +02:00
|
|
|
BuildRequires: python3-base
|
|
|
|
BuildRequires: cmake(OpenImageIO) >= 2.0
|
2020-04-24 10:17:39 +02:00
|
|
|
BuildRequires: cmake(pugixml)
|
2019-02-04 20:38:51 +01:00
|
|
|
Requires: %{name}-common-headers = %{version}
|
2019-01-08 11:53:09 +01:00
|
|
|
Recommends: %{name}-doc = %{version}
|
|
|
|
|
|
|
|
%description
|
2019-01-09 08:30:25 +01:00
|
|
|
Open Shading Language (OSL) is a language for programmable shading
|
|
|
|
in advanced renderers and other applications, ideal for describing
|
|
|
|
materials, lights, displacement, and pattern generation.
|
2019-02-04 20:38:51 +01:00
|
|
|
|
|
|
|
This package contains the standalone oslc compiler and some
|
|
|
|
utilities.
|
2019-01-08 11:53:09 +01:00
|
|
|
|
|
|
|
%package doc
|
2019-01-09 07:51:51 +01:00
|
|
|
Summary: Documentation for OpenShadingLanguage
|
2019-01-09 08:30:25 +01:00
|
|
|
License: CC-BY-3.0
|
2019-01-08 11:53:09 +01:00
|
|
|
Group: Documentation/Other
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description doc
|
2019-01-09 08:30:25 +01:00
|
|
|
Open Shading Language (OSL) is a language for programmable shading
|
|
|
|
in advanced renderers and other applications, ideal for describing
|
|
|
|
materials, lights, displacement, and pattern generation.
|
2019-01-08 11:53:09 +01:00
|
|
|
This package contains documentation.
|
|
|
|
|
2019-02-04 20:38:51 +01:00
|
|
|
%package MaterialX-shaders-source
|
|
|
|
Summary: MaterialX shader nodes
|
2019-11-06 13:12:25 +01:00
|
|
|
License: BSD-3-Clause
|
2019-01-08 11:53:09 +01:00
|
|
|
Group: Development/Languages/Other
|
|
|
|
Requires: %{name} = %{version}
|
2019-02-04 20:38:51 +01:00
|
|
|
Requires: %{name}-common-headers
|
2019-01-08 11:53:09 +01:00
|
|
|
|
2019-02-04 20:38:51 +01:00
|
|
|
%description MaterialX-shaders-source
|
2019-01-09 08:30:25 +01:00
|
|
|
Open Shading Language (OSL) is a language for programmable shading
|
|
|
|
in advanced renderers and other applications, ideal for describing
|
|
|
|
materials, lights, displacement, and pattern generation.
|
2019-02-04 20:38:51 +01:00
|
|
|
|
|
|
|
This package contains the code for the MaterialX shader nodes.
|
|
|
|
|
|
|
|
%package example-shaders-source
|
|
|
|
Summary: OSL shader examples
|
2019-11-06 13:12:25 +01:00
|
|
|
License: BSD-3-Clause
|
2019-02-04 20:38:51 +01:00
|
|
|
Group: Development/Languages/Other
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires: %{name}-common-headers
|
|
|
|
|
|
|
|
%description example-shaders-source
|
|
|
|
Open Shading Language (OSL) is a language for programmable shading
|
|
|
|
in advanced renderers and other applications, ideal for describing
|
|
|
|
materials, lights, displacement, and pattern generation.
|
|
|
|
|
|
|
|
This package contains some OSL example shaders.
|
|
|
|
|
|
|
|
%package common-headers
|
|
|
|
Summary: OSL standard library and auxiliary headers
|
2019-11-06 13:12:25 +01:00
|
|
|
License: BSD-3-Clause
|
2019-02-04 20:38:51 +01:00
|
|
|
Group: Development/Languages/Other
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description common-headers
|
|
|
|
Open Shading Language (OSL) is a language for programmable shading
|
|
|
|
in advanced renderers and other applications, ideal for describing
|
|
|
|
materials, lights, displacement, and pattern generation.
|
|
|
|
|
|
|
|
This package contains the OSL standard library headers, as well
|
|
|
|
as some additional headers useful for writing shaders.
|
2019-01-08 11:53:09 +01:00
|
|
|
|
|
|
|
%package -n liboslcomp%{sufx}
|
2019-01-09 07:51:51 +01:00
|
|
|
Summary: OpenShadingLanguage's compiler component library
|
2019-11-06 13:12:25 +01:00
|
|
|
License: BSD-3-Clause
|
2019-01-08 11:53:09 +01:00
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n liboslcomp%{sufx}
|
2019-01-09 08:30:25 +01:00
|
|
|
Open Shading Language (OSL) is a language for programmable shading
|
|
|
|
in advanced renderers and other applications, ideal for describing
|
|
|
|
materials, lights, displacement, and pattern generation.
|
2019-01-08 11:53:09 +01:00
|
|
|
|
|
|
|
%package -n liboslexec%{sufx}
|
2019-01-09 07:51:51 +01:00
|
|
|
Summary: OpenShadingLanguage's execution component library
|
2019-11-06 13:12:25 +01:00
|
|
|
License: BSD-3-Clause
|
2019-01-08 11:53:09 +01:00
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n liboslexec%{sufx}
|
2019-01-09 08:30:25 +01:00
|
|
|
Open Shading Language (OSL) is a language for programmable shading
|
|
|
|
in advanced renderers and other applications, ideal for describing
|
|
|
|
materials, lights, displacement, and pattern generation.
|
2019-01-08 11:53:09 +01:00
|
|
|
|
|
|
|
%package -n liboslnoise%{sufx}
|
2019-01-09 07:51:51 +01:00
|
|
|
Summary: OpenShadingLanguage's image noise generation library
|
2019-11-06 13:12:25 +01:00
|
|
|
License: BSD-3-Clause
|
2019-01-08 11:53:09 +01:00
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n liboslnoise%{sufx}
|
2019-01-09 08:30:25 +01:00
|
|
|
Open Shading Language (OSL) is a language for programmable shading
|
|
|
|
in advanced renderers and other applications, ideal for describing
|
|
|
|
materials, lights, displacement, and pattern generation.
|
2019-01-08 11:53:09 +01:00
|
|
|
|
|
|
|
%package -n liboslquery%{sufx}
|
|
|
|
Summary: Osl library
|
2019-11-06 13:12:25 +01:00
|
|
|
License: BSD-3-Clause
|
2019-01-08 11:53:09 +01:00
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n liboslquery%{sufx}
|
2019-01-09 08:30:25 +01:00
|
|
|
Open Shading Language (OSL) is a language for programmable shading
|
|
|
|
in advanced renderers and other applications, ideal for describing
|
|
|
|
materials, lights, displacement, and pattern generation.
|
2019-01-08 11:53:09 +01:00
|
|
|
|
|
|
|
%package -n libtestshade%{sufx}
|
|
|
|
Summary: Osl library
|
2019-11-06 13:12:25 +01:00
|
|
|
License: BSD-3-Clause
|
2019-01-08 11:53:09 +01:00
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n libtestshade%{sufx}
|
2019-01-09 08:30:25 +01:00
|
|
|
Open Shading Language (OSL) is a language for programmable shading
|
|
|
|
in advanced renderers and other applications, ideal for describing
|
|
|
|
materials, lights, displacement, and pattern generation.
|
2019-01-08 11:53:09 +01:00
|
|
|
|
2020-05-17 15:18:08 +02:00
|
|
|
%package -n OpenImageIO-plugin-osl
|
|
|
|
Summary: OpenImageIO input plugin
|
2019-11-06 13:12:25 +01:00
|
|
|
License: BSD-3-Clause
|
2019-01-08 11:53:09 +01:00
|
|
|
Group: System/Libraries
|
2020-05-17 15:18:08 +02:00
|
|
|
Obsoletes: osl.imageio < 1.11.4.1
|
|
|
|
Provides: osl.imageio = %{version}
|
2019-01-08 11:53:09 +01:00
|
|
|
|
2020-05-17 15:18:08 +02:00
|
|
|
%description -n OpenImageIO-plugin-osl
|
2019-01-09 08:30:25 +01:00
|
|
|
Open Shading Language (OSL) is a language for programmable shading
|
|
|
|
in advanced renderers and other applications, ideal for describing
|
|
|
|
materials, lights, displacement, and pattern generation.
|
2019-01-08 11:53:09 +01:00
|
|
|
|
2020-05-17 15:18:08 +02:00
|
|
|
This is a plugin to access OSL from OpenImageIO.
|
|
|
|
|
2019-01-08 11:53:09 +01:00
|
|
|
%package devel
|
|
|
|
Summary: Development files for %{name}
|
2019-11-06 13:12:25 +01:00
|
|
|
License: BSD-3-Clause
|
2019-01-08 11:53:09 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires: liboslcomp%{sufx} = %{version}
|
|
|
|
Requires: liboslexec%{sufx} = %{version}
|
|
|
|
Requires: liboslnoise%{sufx} = %{version}
|
|
|
|
Requires: liboslquery%{sufx} = %{version}
|
|
|
|
Requires: libtestshade%{sufx} = %{version}
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
The %{name}-devel package contains libraries and header files for
|
|
|
|
developing applications that use %{name}.
|
|
|
|
|
|
|
|
%prep
|
2020-04-24 10:17:39 +02:00
|
|
|
%setup -q -n %{name}-Release-%{version}-dev
|
|
|
|
%autopatch -p1
|
2020-05-17 15:18:08 +02:00
|
|
|
find . -iname CMakeLists.txt -exec sed "-i" "-e s/COMMAND python/COMMAND python3/" "{}" \;
|
2019-01-08 11:53:09 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
%cmake \
|
|
|
|
-DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name} \
|
2020-05-17 15:18:08 +02:00
|
|
|
-DOSL_SHADER_INSTALL_DIR:PATH=%{_datadir}/%{name}/shaders/ \
|
2020-04-24 10:17:39 +02:00
|
|
|
-DCMAKE_CXX_STANDARD:STRING=14
|
2020-05-17 15:18:08 +02:00
|
|
|
%cmake_build
|
2019-01-08 11:53:09 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
%cmake_install
|
2019-01-09 08:30:25 +01:00
|
|
|
# Add Creative Commons license for documentation
|
|
|
|
cp -v %{SOURCE1} .
|
2020-05-17 15:18:08 +02:00
|
|
|
# Move the OpenImageIO plugin into its default search path
|
|
|
|
mkdir %{buildroot}%{_libdir}/OpenImageIO-%{oiio_major_minor_ver}
|
|
|
|
mv %{buildroot}%{_libdir}/osl.imageio.so %{buildroot}%{_libdir}/OpenImageIO-%{oiio_major_minor_ver}/
|
2019-01-08 11:53:09 +01:00
|
|
|
|
|
|
|
find %{buildroot} -name LICENSE -print -delete
|
2020-04-24 10:17:39 +02:00
|
|
|
find %{buildroot} -name README.md -print -delete
|
|
|
|
find %{buildroot} -name CHANGES.md -print -delete
|
2019-01-08 11:53:09 +01:00
|
|
|
|
|
|
|
%post -n liboslcomp%{sufx} -p /sbin/ldconfig
|
|
|
|
%postun -n liboslcomp%{sufx} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%post -n liboslexec%{sufx} -p /sbin/ldconfig
|
|
|
|
%postun -n liboslexec%{sufx} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%post -n liboslnoise%{sufx} -p /sbin/ldconfig
|
|
|
|
%postun -n liboslnoise%{sufx} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%post -n liboslquery%{sufx} -p /sbin/ldconfig
|
|
|
|
%postun -n liboslquery%{sufx} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%post -n libtestshade%{sufx} -p /sbin/ldconfig
|
|
|
|
%postun -n libtestshade%{sufx} -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
2020-04-24 10:17:39 +02:00
|
|
|
%license LICENSE
|
2019-01-08 11:53:09 +01:00
|
|
|
%{_bindir}/*
|
|
|
|
|
|
|
|
%files doc
|
2019-01-09 08:30:25 +01:00
|
|
|
%license legalcode.txt
|
2019-01-08 11:53:09 +01:00
|
|
|
%doc %{_docdir}/%{name}/
|
|
|
|
|
2019-02-04 20:38:51 +01:00
|
|
|
%files MaterialX-shaders-source
|
2020-05-17 15:18:08 +02:00
|
|
|
%{_datadir}/%{name}/shaders/MaterialX
|
2019-02-04 20:38:51 +01:00
|
|
|
|
|
|
|
%files example-shaders-source
|
2020-05-17 15:18:08 +02:00
|
|
|
%{_datadir}/%{name}/shaders/*.osl
|
|
|
|
%{_datadir}/%{name}/shaders/*.oso
|
2019-02-04 20:38:51 +01:00
|
|
|
|
|
|
|
%files common-headers
|
2020-05-17 15:18:08 +02:00
|
|
|
%dir %{_datadir}/%{name}
|
|
|
|
%dir %{_datadir}/%{name}/shaders
|
|
|
|
%{_datadir}/%{name}/shaders/*.h
|
2019-01-08 11:53:09 +01:00
|
|
|
|
|
|
|
%files -n liboslcomp%{sufx}
|
|
|
|
%license LICENSE
|
|
|
|
%{_libdir}/liboslcomp.so.%{sover}*
|
|
|
|
|
|
|
|
%files -n liboslexec%{sufx}
|
|
|
|
%license LICENSE
|
|
|
|
%{_libdir}/liboslexec.so.%{sover}*
|
|
|
|
|
|
|
|
%files -n liboslnoise%{sufx}
|
|
|
|
%license LICENSE
|
|
|
|
%{_libdir}/liboslnoise.so.%{sover}*
|
|
|
|
|
|
|
|
%files -n liboslquery%{sufx}
|
|
|
|
%license LICENSE
|
|
|
|
%{_libdir}/liboslquery.so.%{sover}*
|
|
|
|
|
|
|
|
%files -n libtestshade%{sufx}
|
|
|
|
%license LICENSE
|
|
|
|
%{_libdir}/libtestshade.so.%{sover}*
|
|
|
|
|
2020-05-17 15:18:08 +02:00
|
|
|
%files -n OpenImageIO-plugin-osl
|
2019-01-08 11:53:09 +01:00
|
|
|
%license LICENSE
|
2020-05-17 15:18:08 +02:00
|
|
|
%{_libdir}/OpenImageIO-%{oiio_major_minor_ver}/osl.imageio.so
|
2019-01-08 11:53:09 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%license LICENSE
|
|
|
|
%{_includedir}/*
|
2020-05-17 15:18:08 +02:00
|
|
|
%{_libdir}/lib*.so
|
2020-04-24 10:17:39 +02:00
|
|
|
%{_libdir}/cmake/
|
|
|
|
%{_libdir}/pkgconfig/
|
2019-01-08 11:53:09 +01:00
|
|
|
|
|
|
|
%changelog
|