forked from pool/OpenShadingLanguage
Accepting request 746037 from home:StefanBruens:branches:graphics
- Properly rebase 0001-Generalize-lookup-of-stdosl.h-in-install-directory-a.patch avoid workarounds in the spec file. - Remove conditional code for Leap 42.x - Reflect required versions of OpenIIO and Clang in the spec file. OBS-URL: https://build.opensuse.org/request/show/746037 OBS-URL: https://build.opensuse.org/package/show/graphics/OpenShadingLanguage?expand=0&rev=9
This commit is contained in:
parent
2bc984d153
commit
1d8ebb2e7a
@ -1,4 +1,4 @@
|
|||||||
From 2e80787bfadd3d02064d72f7d5374d07bc0225cc Mon Sep 17 00:00:00 2001
|
From b01c5510a1bc825a5bf90155ca926844fd679430 Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||||
Date: Sun, 13 Jan 2019 01:50:59 +0100
|
Date: Sun, 13 Jan 2019 01:50:59 +0100
|
||||||
Subject: [PATCH] Generalize lookup of stdosl.h in install directory, allow
|
Subject: [PATCH] Generalize lookup of stdosl.h in install directory, allow
|
||||||
@ -26,19 +26,19 @@ The configured path is added to the stdosl.h path lookup, i.e. for
|
|||||||
the example above "/usr/share/OpenShadingLanguage/shaders/stdosl.h".
|
the example above "/usr/share/OpenShadingLanguage/shaders/stdosl.h".
|
||||||
---
|
---
|
||||||
CMakeLists.txt | 9 +++++++++
|
CMakeLists.txt | 9 +++++++++
|
||||||
src/liboslcomp/CMakeLists.txt | 2 ++
|
src/liboslcomp/CMakeLists.txt | 3 +++
|
||||||
src/liboslcomp/oslcomp.cpp | 9 +++++++++
|
src/liboslcomp/oslcomp.cpp | 9 +++++++++
|
||||||
src/liboslcomp/oslcomp_shaders_dir.h.in | 7 +++++++
|
src/liboslcomp/oslcomp_shaders_dir.h.in | 7 +++++++
|
||||||
src/liboslexec/CMakeLists.txt | 1 +
|
src/liboslexec/CMakeLists.txt | 1 +
|
||||||
src/shaders/CMakeLists.txt | 2 +-
|
src/shaders/CMakeLists.txt | 2 +-
|
||||||
src/shaders/MaterialX/CMakeLists.txt | 2 +-
|
src/shaders/MaterialX/CMakeLists.txt | 2 +-
|
||||||
7 files changed, 30 insertions(+), 2 deletions(-)
|
7 files changed, 31 insertions(+), 2 deletions(-)
|
||||||
create mode 100644 src/liboslcomp/oslcomp_shaders_dir.h.in
|
create mode 100644 src/liboslcomp/oslcomp_shaders_dir.h.in
|
||||||
|
|
||||||
Index: OpenShadingLanguage-Release-1.10.7/CMakeLists.txt
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
===================================================================
|
index 3722d68..cb5320e 100644
|
||||||
--- OpenShadingLanguage-Release-1.10.7.orig/CMakeLists.txt 2019-10-01 08:05:04.000000000 +0200
|
--- a/CMakeLists.txt
|
||||||
+++ OpenShadingLanguage-Release-1.10.7/CMakeLists.txt 2019-11-06 11:56:09.880927045 +0200
|
+++ b/CMakeLists.txt
|
||||||
@@ -53,6 +53,15 @@ if (CMAKE_USE_FOLDERS)
|
@@ -53,6 +53,15 @@ if (CMAKE_USE_FOLDERS)
|
||||||
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
|
set_property (GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
endif ()
|
endif ()
|
||||||
@ -55,24 +55,25 @@ Index: OpenShadingLanguage-Release-1.10.7/CMakeLists.txt
|
|||||||
include (GNUInstallDirs)
|
include (GNUInstallDirs)
|
||||||
|
|
||||||
list (APPEND CMAKE_MODULE_PATH
|
list (APPEND CMAKE_MODULE_PATH
|
||||||
Index: OpenShadingLanguage-Release-1.10.7/src/liboslcomp/CMakeLists.txt
|
diff --git a/src/liboslcomp/CMakeLists.txt b/src/liboslcomp/CMakeLists.txt
|
||||||
===================================================================
|
index 549aa54..a91a1b5 100644
|
||||||
--- OpenShadingLanguage-Release-1.10.7.orig/src/liboslcomp/CMakeLists.txt 2019-10-01 08:05:04.000000000 +0200
|
--- a/src/liboslcomp/CMakeLists.txt
|
||||||
+++ OpenShadingLanguage-Release-1.10.7/src/liboslcomp/CMakeLists.txt 2019-11-06 11:56:09.880927045 +0200
|
+++ b/src/liboslcomp/CMakeLists.txt
|
||||||
@@ -29,6 +29,8 @@ else ()
|
@@ -29,6 +29,9 @@ else ()
|
||||||
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
+configure_file ( oslcomp_shaders_dir.h.in oslcomp_shaders_dir.h )
|
+configure_file ( oslcomp_shaders_dir.h.in oslcomp_shaders_dir.h )
|
||||||
|
+target_include_directories ( oslcomp PRIVATE "${CMAKE_BINARY_DIR}/src/liboslcomp" )
|
||||||
+
|
+
|
||||||
TARGET_LINK_LIBRARIES ( oslcomp ${OPENIMAGEIO_LIBRARIES} ${ILMBASE_LIBRARIES}
|
TARGET_LINK_LIBRARIES ( oslcomp ${OPENIMAGEIO_LIBRARIES} ${ILMBASE_LIBRARIES}
|
||||||
${Boost_LIBRARIES} ${CMAKE_DL_LIBS}
|
${Boost_LIBRARIES} ${CMAKE_DL_LIBS}
|
||||||
${CLANG_LIBRARIES} ${LLVM_LIBRARIES} ${LLVM_LDFLAGS}
|
${CLANG_LIBRARIES} ${LLVM_LIBRARIES} ${LLVM_LDFLAGS}
|
||||||
Index: OpenShadingLanguage-Release-1.10.7/src/liboslcomp/oslcomp.cpp
|
diff --git a/src/liboslcomp/oslcomp.cpp b/src/liboslcomp/oslcomp.cpp
|
||||||
===================================================================
|
index 76145dd..db1ec06 100644
|
||||||
--- OpenShadingLanguage-Release-1.10.7.orig/src/liboslcomp/oslcomp.cpp 2019-10-01 08:05:04.000000000 +0200
|
--- a/src/liboslcomp/oslcomp.cpp
|
||||||
+++ OpenShadingLanguage-Release-1.10.7/src/liboslcomp/oslcomp.cpp 2019-11-06 11:56:09.880927045 +0200
|
+++ b/src/liboslcomp/oslcomp.cpp
|
||||||
@@ -36,6 +36,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
@@ -36,6 +36,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
|
|
||||||
#include "oslcomp_pvt.h"
|
#include "oslcomp_pvt.h"
|
||||||
@ -80,7 +81,7 @@ Index: OpenShadingLanguage-Release-1.10.7/src/liboslcomp/oslcomp.cpp
|
|||||||
|
|
||||||
#include <OpenImageIO/platform.h>
|
#include <OpenImageIO/platform.h>
|
||||||
#include <OpenImageIO/sysutil.h>
|
#include <OpenImageIO/sysutil.h>
|
||||||
@@ -485,6 +486,14 @@ find_stdoslpath (const std::vector<std::
|
@@ -485,6 +486,14 @@ find_stdoslpath (const std::vector<std::string>& includepaths)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,10 +96,11 @@ Index: OpenShadingLanguage-Release-1.10.7/src/liboslcomp/oslcomp.cpp
|
|||||||
// Try looking for "oslc" binary in the $PATH, and if so, look in
|
// Try looking for "oslc" binary in the $PATH, and if so, look in
|
||||||
// ../../shaders/stdosl.h
|
// ../../shaders/stdosl.h
|
||||||
std::vector<std::string> exec_path_dirs;
|
std::vector<std::string> exec_path_dirs;
|
||||||
Index: OpenShadingLanguage-Release-1.10.7/src/liboslcomp/oslcomp_shaders_dir.h.in
|
diff --git a/src/liboslcomp/oslcomp_shaders_dir.h.in b/src/liboslcomp/oslcomp_shaders_dir.h.in
|
||||||
===================================================================
|
new file mode 100644
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
index 0000000..0638252
|
||||||
+++ OpenShadingLanguage-Release-1.10.7/src/liboslcomp/oslcomp_shaders_dir.h.in 2019-11-06 11:56:09.880927045 +0200
|
--- /dev/null
|
||||||
|
+++ b/src/liboslcomp/oslcomp_shaders_dir.h.in
|
||||||
@@ -0,0 +1,7 @@
|
@@ -0,0 +1,7 @@
|
||||||
+#ifndef OSL_SHADERS_INSTALL_DIR
|
+#ifndef OSL_SHADERS_INSTALL_DIR
|
||||||
+
|
+
|
||||||
@ -107,10 +109,10 @@ Index: OpenShadingLanguage-Release-1.10.7/src/liboslcomp/oslcomp_shaders_dir.h.i
|
|||||||
+#define OSL_SHADERS_INSTALL_DIR "@INSTALL_FULL_SHADERDIR@/shaders/"
|
+#define OSL_SHADERS_INSTALL_DIR "@INSTALL_FULL_SHADERDIR@/shaders/"
|
||||||
+
|
+
|
||||||
+#endif // OSL_SHADERS_INSTALL_DIR
|
+#endif // OSL_SHADERS_INSTALL_DIR
|
||||||
Index: OpenShadingLanguage-Release-1.10.7/src/liboslexec/CMakeLists.txt
|
diff --git a/src/liboslexec/CMakeLists.txt b/src/liboslexec/CMakeLists.txt
|
||||||
===================================================================
|
index 9f39444..fce411b 100644
|
||||||
--- OpenShadingLanguage-Release-1.10.7.orig/src/liboslexec/CMakeLists.txt 2019-10-01 08:05:04.000000000 +0200
|
--- a/src/liboslexec/CMakeLists.txt
|
||||||
+++ OpenShadingLanguage-Release-1.10.7/src/liboslexec/CMakeLists.txt 2019-11-06 11:56:09.880927045 +0200
|
+++ b/src/liboslexec/CMakeLists.txt
|
||||||
@@ -41,6 +41,7 @@ if (NOT BUILDSTATIC)
|
@@ -41,6 +41,7 @@ if (NOT BUILDSTATIC)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
@ -119,20 +121,20 @@ Index: OpenShadingLanguage-Release-1.10.7/src/liboslexec/CMakeLists.txt
|
|||||||
|
|
||||||
FILE ( GLOB exec_headers "*.h" )
|
FILE ( GLOB exec_headers "*.h" )
|
||||||
FILE ( GLOB compiler_headers "../liboslcomp/*.h" )
|
FILE ( GLOB compiler_headers "../liboslcomp/*.h" )
|
||||||
Index: OpenShadingLanguage-Release-1.10.7/src/shaders/CMakeLists.txt
|
diff --git a/src/shaders/CMakeLists.txt b/src/shaders/CMakeLists.txt
|
||||||
===================================================================
|
index 9b263ff..594c09c 100644
|
||||||
--- OpenShadingLanguage-Release-1.10.7.orig/src/shaders/CMakeLists.txt 2019-10-01 08:05:04.000000000 +0200
|
--- a/src/shaders/CMakeLists.txt
|
||||||
+++ OpenShadingLanguage-Release-1.10.7/src/shaders/CMakeLists.txt 2019-11-06 11:56:09.880927045 +0200
|
+++ b/src/shaders/CMakeLists.txt
|
||||||
@@ -63,4 +63,4 @@ add_custom_target (shaders ALL
|
@@ -63,4 +63,4 @@ add_custom_target (shaders ALL
|
||||||
SOURCES ${shader_source} ${shader_headers})
|
SOURCES ${shader_source} ${shader_headers})
|
||||||
|
|
||||||
install (FILES ${shader_headers} ${shader_source} ${shader_objs}
|
install (FILES ${shader_headers} ${shader_source} ${shader_objs}
|
||||||
- DESTINATION shaders)
|
- DESTINATION shaders)
|
||||||
+ DESTINATION ${INSTALL_FULL_SHADERDIR}/shaders)
|
+ DESTINATION ${INSTALL_FULL_SHADERDIR}/shaders)
|
||||||
Index: OpenShadingLanguage-Release-1.10.7/src/shaders/MaterialX/CMakeLists.txt
|
diff --git a/src/shaders/MaterialX/CMakeLists.txt b/src/shaders/MaterialX/CMakeLists.txt
|
||||||
===================================================================
|
index 88b52f3..42384da 100644
|
||||||
--- OpenShadingLanguage-Release-1.10.7.orig/src/shaders/MaterialX/CMakeLists.txt 2019-10-01 08:05:04.000000000 +0200
|
--- a/src/shaders/MaterialX/CMakeLists.txt
|
||||||
+++ OpenShadingLanguage-Release-1.10.7/src/shaders/MaterialX/CMakeLists.txt 2019-11-06 11:56:09.880927045 +0200
|
+++ b/src/shaders/MaterialX/CMakeLists.txt
|
||||||
@@ -258,5 +258,5 @@ add_custom_target (mxshaders ALL
|
@@ -258,5 +258,5 @@ add_custom_target (mxshaders ALL
|
||||||
SOURCES ${shader_source} ${mx_shader_headers})
|
SOURCES ${shader_source} ${mx_shader_headers})
|
||||||
|
|
||||||
@ -140,3 +142,6 @@ Index: OpenShadingLanguage-Release-1.10.7/src/shaders/MaterialX/CMakeLists.txt
|
|||||||
- DESTINATION shaders/MaterialX)
|
- DESTINATION shaders/MaterialX)
|
||||||
+ DESTINATION ${INSTALL_FULL_SHADERDIR}/shaders/MaterialX)
|
+ DESTINATION ${INSTALL_FULL_SHADERDIR}/shaders/MaterialX)
|
||||||
|
|
||||||
|
--
|
||||||
|
2.24.0
|
||||||
|
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 6 15:45:59 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||||
|
|
||||||
|
- Properly rebase 0001-Generalize-lookup-of-stdosl.h-in-install-directory-a.patch
|
||||||
|
avoid workarounds in the spec file.
|
||||||
|
- Remove conditional code for Leap 42.x
|
||||||
|
- Reflect required versions of OpenIIO and Clang in the spec file.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Nov 6 11:38:51 UTC 2019 - Dave Plater <davejplater@gmail.com>
|
Wed Nov 6 11:38:51 UTC 2019 - Dave Plater <davejplater@gmail.com>
|
||||||
|
|
||||||
|
@ -20,10 +20,6 @@
|
|||||||
%define sover %(echo %{version} | cut -d . -f 1,2)
|
%define sover %(echo %{version} | cut -d . -f 1,2)
|
||||||
%define sufx %(echo %{sover}|tr . _)
|
%define sufx %(echo %{sover}|tr . _)
|
||||||
|
|
||||||
#NOTE: This package was created for blender, blender doesn't build against
|
|
||||||
# the 1.10.x ABI. If there is the need to update to such a version please consult me
|
|
||||||
# first davejplater@gmail.com or suffix the package with a 110 or something.
|
|
||||||
|
|
||||||
Name: OpenShadingLanguage
|
Name: OpenShadingLanguage
|
||||||
Version: 1.10.7
|
Version: 1.10.7
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -39,27 +35,15 @@ Patch0: 0001-Generalize-lookup-of-stdosl.h-in-install-directory-a.patch
|
|||||||
BuildRequires: bison
|
BuildRequires: bison
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: cmake(pugixml)
|
BuildRequires: cmake(pugixml)
|
||||||
%if 0%{suse_version} >= 1500
|
BuildRequires: clang-devel >= 4
|
||||||
BuildRequires: clang-devel
|
|
||||||
%else
|
|
||||||
BuildRequires: llvm-clang-devel >= 3.8
|
|
||||||
BuildRequires: ncurses-devel
|
|
||||||
%endif
|
|
||||||
BuildRequires: flex
|
BuildRequires: flex
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
%if 0%{suse_version} >= 1500
|
|
||||||
BuildRequires: libboost_filesystem-devel
|
BuildRequires: libboost_filesystem-devel
|
||||||
BuildRequires: libboost_system-devel
|
BuildRequires: libboost_system-devel
|
||||||
BuildRequires: libboost_thread-devel
|
BuildRequires: libboost_thread-devel
|
||||||
BuildRequires: libboost_wave-devel
|
BuildRequires: libboost_wave-devel
|
||||||
%else
|
|
||||||
# The default 1.54 is to old, 1.61 has unresolvable
|
|
||||||
# symbols in boost::wave (C++ ABI issue?)
|
|
||||||
BuildRequires: boost-devel >= 1.55.0
|
|
||||||
BuildConflicts: boost-devel >= 1.61.0
|
|
||||||
%endif
|
|
||||||
BuildRequires: OpenEXR-devel
|
BuildRequires: OpenEXR-devel
|
||||||
BuildRequires: OpenImageIO-devel
|
BuildRequires: OpenImageIO-devel >= 1.8
|
||||||
BuildRequires: python
|
BuildRequires: python
|
||||||
Requires: %{name}-common-headers = %{version}
|
Requires: %{name}-common-headers = %{version}
|
||||||
Recommends: %{name}-doc = %{version}
|
Recommends: %{name}-doc = %{version}
|
||||||
@ -88,7 +72,6 @@ This package contains documentation.
|
|||||||
Summary: MaterialX shader nodes
|
Summary: MaterialX shader nodes
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Languages/Other
|
Group: Development/Languages/Other
|
||||||
|
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
Requires: %{name}-common-headers
|
Requires: %{name}-common-headers
|
||||||
|
|
||||||
@ -103,7 +86,6 @@ This package contains the code for the MaterialX shader nodes.
|
|||||||
Summary: OSL shader examples
|
Summary: OSL shader examples
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Languages/Other
|
Group: Development/Languages/Other
|
||||||
|
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
Requires: %{name}-common-headers
|
Requires: %{name}-common-headers
|
||||||
|
|
||||||
@ -118,7 +100,6 @@ This package contains some OSL example shaders.
|
|||||||
Summary: OSL standard library and auxiliary headers
|
Summary: OSL standard library and auxiliary headers
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Languages/Other
|
Group: Development/Languages/Other
|
||||||
|
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
|
|
||||||
%description common-headers
|
%description common-headers
|
||||||
@ -193,7 +174,6 @@ materials, lights, displacement, and pattern generation.
|
|||||||
Summary: Development files for %{name}
|
Summary: Development files for %{name}
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
|
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
Requires: liboslcomp%{sufx} = %{version}
|
Requires: liboslcomp%{sufx} = %{version}
|
||||||
Requires: liboslexec%{sufx} = %{version}
|
Requires: liboslexec%{sufx} = %{version}
|
||||||
@ -211,20 +191,9 @@ developing applications that use %{name}.
|
|||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# We use a combined LLVM on 15.0/TW, so libLLVMMCJIT is neither available nor needed
|
|
||||||
# On 42.3., we have to collect the split libraries ourselfs,
|
|
||||||
# as the supplied FindLLVM.cmake is broken
|
|
||||||
%if 0%{suse_version} < 1500
|
|
||||||
%define llvm_libs %(llvm-config --libfiles | tr ' ' ';')
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%cmake \
|
%cmake \
|
||||||
%{?llvm_libs:-DLLVM_LIBRARY="%{llvm_libs}"} \
|
|
||||||
-DLLVM_MCJIT_LIBRARY="" \
|
|
||||||
-DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name} \
|
-DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name} \
|
||||||
-DOSL_INSTALL_SHADERDIR:PATH=%{_datadir}/%{name}
|
-DOSL_INSTALL_SHADERDIR:PATH=%{_datadir}/%{name}
|
||||||
#Build can't find generated oslcomp_shaders_dir.h because it's under build dir
|
|
||||||
cp -v `find ../ -name oslcomp_shaders_dir.h` ../src/liboslcomp/
|
|
||||||
|
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user