mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
OSL : new recipe (#2023)
* WIP * WIP_2 * OSL: new recipe * Cleanup * Cleanup * Cleanup. * libVersionCompat
This commit is contained in:
157
media-libs/osl/osl-1.9.5.recipe
Normal file
157
media-libs/osl/osl-1.9.5.recipe
Normal file
@@ -0,0 +1,157 @@
|
||||
SUMMARY="Advanced shading language for production GI renderers"
|
||||
DESCRIPTION="Open Shading Language (OSL) is a small but rich language for \
|
||||
programmable shading in advanced renderers and other applications, ideal \
|
||||
for describing materials, lights, displacement, and pattern generation."
|
||||
HOMEPAGE="https://github.com/imageworks/OpenShadingLanguage"
|
||||
COPYRIGHT="2009-2017 Sony Pictures Imageworks Inc."
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="1"
|
||||
SOURCE_URI="$HOMEPAGE/archive/Release-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256='5d9dc71f3b79714350ae94e4ad5929a7aabae40f292e7837d1749fca180eae96'
|
||||
SOURCE_DIR="OpenShadingLanguage-Release-$portVersion"
|
||||
PATCHES="osl-$portVersion.patchset"
|
||||
|
||||
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
commandBinDir=$binDir
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="?x86"
|
||||
|
||||
libVersion=$portVersion
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
osl$secondaryArchSuffix = $libVersionCompat
|
||||
cmd:oslc$commandSuffix
|
||||
cmd:oslinfo$commandSuffix
|
||||
cmd:testrender$commandSuffix
|
||||
cmd:testshade$commandSuffix
|
||||
cmd:testshade_dso$commandSuffix
|
||||
lib:liboslcomp$secondaryArchSuffix
|
||||
lib:liboslexec$secondaryArchSuffix
|
||||
lib:liboslnoise$secondaryArchSuffix
|
||||
lib:liboslquery$secondaryArchSuffix
|
||||
lib:libtestshade$secondaryArchSuffix
|
||||
lib:osl.imageio$secondaryArchSuffix
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libboost_atomic$secondaryArchSuffix
|
||||
lib:libboost_chrono$secondaryArchSuffix
|
||||
lib:libboost_date_time$secondaryArchSuffix
|
||||
lib:libboost_filesystem$secondaryArchSuffix
|
||||
lib:libboost_serialization$secondaryArchSuffix
|
||||
lib:libboost_system$secondaryArchSuffix
|
||||
lib:libboost_thread$secondaryArchSuffix
|
||||
lib:libboost_wave$secondaryArchSuffix
|
||||
lib:libHalf$secondaryArchSuffix
|
||||
lib:libIex_2_2$secondaryArchSuffix
|
||||
lib:libilmimf$secondaryArchSuffix
|
||||
lib:libIlmThread_2_2$secondaryArchSuffix
|
||||
lib:libImath_2_2$secondaryArchSuffix
|
||||
lib:libLLVM_5.0$secondaryArchSuffix
|
||||
lib:libopenimageio$secondaryArchSuffix
|
||||
lib:libpugixml$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
osl${secondaryArchSuffix}_devel = $libVersionCompat
|
||||
devel:liboslcomp$secondaryArchSuffix
|
||||
devel:liboslexec$secondaryArchSuffix
|
||||
devel:liboslnoise$secondaryArchSuffix
|
||||
devel:liboslquery$secondaryArchSuffix
|
||||
devel:libtestshade$secondaryArchSuffix
|
||||
devel:osl.imageio$secondaryArchSuffix
|
||||
"
|
||||
REQUIRES_devel="
|
||||
osl$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
gcc_syslibs_devel$secondaryArchSuffix
|
||||
devel:libboost_atomic$secondaryArchSuffix
|
||||
devel:libboost_chrono$secondaryArchSuffix
|
||||
devel:libboost_date_time$secondaryArchSuffix
|
||||
devel:libboost_filesystem$secondaryArchSuffix
|
||||
devel:libboost_serialization$secondaryArchSuffix
|
||||
devel:libboost_system$secondaryArchSuffix
|
||||
devel:libboost_thread$secondaryArchSuffix
|
||||
devel:libboost_wave$secondaryArchSuffix
|
||||
devel:libHalf$secondaryArchSuffix
|
||||
devel:libIex_2_2$secondaryArchSuffix
|
||||
devel:libilmimf$secondaryArchSuffix
|
||||
devel:libIlmThread_2_2$secondaryArchSuffix
|
||||
devel:libImath_2_2$secondaryArchSuffix
|
||||
devel:libLLVM_5.0$secondaryArchSuffix
|
||||
devel:libpartio$secondaryArchSuffix
|
||||
devel:libopenimageio$secondaryArchSuffix
|
||||
devel:libpugixml$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:bison
|
||||
cmd:clang
|
||||
cmd:cmake
|
||||
cmd:flex
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:python2
|
||||
"
|
||||
|
||||
defineDebugInfoPackage osl$secondaryArchSuffix \
|
||||
$libDir/liboslcomp.so \
|
||||
$libDir/liboslexec.so \
|
||||
$libDir/liboslnoise.so \
|
||||
$libDir/liboslquery.so \
|
||||
$libDir/libtestshade.so \
|
||||
$libDir/osl.imageio.so \
|
||||
$commandBinDir/oslc$commandSuffix \
|
||||
$commandBinDir/oslinfo$commandSuffix \
|
||||
$commandBinDir/testrender$commandSuffix \
|
||||
$commandBinDir/testshade$commandSuffix \
|
||||
$commandBinDir/testshade_dso$commandSuffix
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake .. \
|
||||
$cmakeDirArgs \
|
||||
-DCMAKE_CXX_FLAGS="-DBOOST_NO_CXX11_CONSTEXPR" \
|
||||
-DCMAKE_INSTALL_BINDIR=$commandBinDir
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make install
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
liboslcomp \
|
||||
liboslexec \
|
||||
liboslnoise \
|
||||
liboslquery \
|
||||
libtestshade \
|
||||
osl.imageio
|
||||
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
cd build
|
||||
make test
|
||||
}
|
||||
30
media-libs/osl/patches/osl-1.9.5.patchset
Normal file
30
media-libs/osl/patches/osl-1.9.5.patchset
Normal file
@@ -0,0 +1,30 @@
|
||||
From 240fc093a14484a4e2ce42bea8df394726796b56 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
Date: Sat, 30 Dec 2017 16:59:09 +0100
|
||||
Subject: Shaders install path
|
||||
|
||||
|
||||
diff --git a/src/shaders/CMakeLists.txt b/src/shaders/CMakeLists.txt
|
||||
index 9b263ff..1f30521 100644
|
||||
--- a/src/shaders/CMakeLists.txt
|
||||
+++ b/src/shaders/CMakeLists.txt
|
||||
@@ -63,4 +63,4 @@ add_custom_target (shaders ALL
|
||||
SOURCES ${shader_source} ${shader_headers})
|
||||
|
||||
install (FILES ${shader_headers} ${shader_source} ${shader_objs}
|
||||
- DESTINATION shaders)
|
||||
+ DESTINATION data/osl/shaders)
|
||||
diff --git a/src/shaders/MaterialX/CMakeLists.txt b/src/shaders/MaterialX/CMakeLists.txt
|
||||
index dc897a7..8664c4d 100644
|
||||
--- a/src/shaders/MaterialX/CMakeLists.txt
|
||||
+++ b/src/shaders/MaterialX/CMakeLists.txt
|
||||
@@ -172,5 +172,5 @@ add_custom_target (mxshaders ALL
|
||||
SOURCES ${shader_source} ${mx_shader_headers})
|
||||
|
||||
install (FILES ${mx_shader_headers} ${mx_shader_objs} ${mx_shader_osls}
|
||||
- DESTINATION shaders/MaterialX)
|
||||
+ DESTINATION data/osl/shaders/MaterialX)
|
||||
|
||||
--
|
||||
2.15.1
|
||||
|
||||
Reference in New Issue
Block a user