Files
haikuports/media-libs/osl/osl1.11-1.11.17.0.recipe
Alexander von Gluck 47ea51f320 cmake/meson: Mass fix packages with broken debuginfo (#12822)
* cmake/debuginfo: Mass fix packages with broken debuginfo

* rtl_sdr: Fix trailing whitespace

* meson/debuginfo: Mass fix packages with broken debuginfo

* clean up conflicts

---------

Co-authored-by: Luc Schrijvers <begasus@gmail.com>
2026-01-07 17:36:21 +01:00

169 lines
4.8 KiB
Bash

SUMMARY="Programable shading language for advanced 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-2020 Sony Pictures Imageworks Inc."
LICENSE="BSD (3-clause)"
REVISION="2"
SOURCE_URI="$HOMEPAGE/archive/Release-$portVersion.tar.gz"
CHECKSUM_SHA256="4d23cf742f7917ea534408a1a491da8cfa245eed66b32f32d1a2785cb6a95735"
SOURCE_DIR="OpenShadingLanguage-Release-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
# 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
libVersion="1.11.17"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
osl1.11$secondaryArchSuffix = $portVersion
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:libIex_3_2$secondaryArchSuffix
lib:libIlmThread_3_2$secondaryArchSuffix
lib:libImath_3_1$secondaryArchSuffix
lib:libLLVM_12$secondaryArchSuffix
lib:libOpenEXR_3_2$secondaryArchSuffix
lib:libOpenEXRUtil_3_2$secondaryArchSuffix
lib:libOpenImageIO$secondaryArchSuffix
# lib:libpartio$secondaryArchSuffix
lib:libpugixml$secondaryArchSuffix
lib:libxml2$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
osl1.11${secondaryArchSuffix}_devel = $portVersion
devel:liboslcomp$secondaryArchSuffix
devel:liboslexec$secondaryArchSuffix
devel:liboslnoise$secondaryArchSuffix
devel:liboslquery$secondaryArchSuffix
# devel:libtestshade$secondaryArchSuffix
devel:osl.imageio$secondaryArchSuffix
"
REQUIRES_devel="
osl1.11$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
gcc${secondaryArchSuffix}_syslibs_devel
devel:libboost_atomic$secondaryArchSuffix >= 1.83.0
devel:libboost_chrono$secondaryArchSuffix >= 1.83.0
devel:libboost_date_time$secondaryArchSuffix >= 1.83.0
devel:libboost_filesystem$secondaryArchSuffix >= 1.83.0
devel:libboost_serialization$secondaryArchSuffix >= 1.83.0
devel:libboost_system$secondaryArchSuffix >= 1.83.0
devel:libboost_thread$secondaryArchSuffix >= 1.83.0
devel:libboost_wave$secondaryArchSuffix >= 1.83.0
devel:libdeflate$secondaryArchSuffix
devel:libfmt$secondaryArchSuffix
devel:libIex_3_2$secondaryArchSuffix
devel:libIlmThread_3_2$secondaryArchSuffix
devel:libImath_3_1$secondaryArchSuffix
devel:libLLVM_12$secondaryArchSuffix
devel:libOpenEXR_3_2$secondaryArchSuffix
devel:libOpenEXRUtil_3_2$secondaryArchSuffix
devel:libOpenImageIO$secondaryArchSuffix >= 2.3
# devel:libpartio$secondaryArchSuffix
devel:libpugixml$secondaryArchSuffix
devel:libxml2$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:bison
cmd:clang_12
cmd:cmake
cmd:flex
cmd:gcc$secondaryArchSuffix
cmd:iconvert # move tools back into main OIIO?
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python3
"
defineDebugInfoPackage osl1.11$secondaryArchSuffix \
$libDir/liboslcomp.so.$libVersion \
$libDir/liboslexec.so.$libVersion \
$libDir/liboslnoise.so.$libVersion \
$libDir/liboslquery.so.$libVersion \
$libDir/osl.imageio.so \
$commandBinDir/oslc$commandSuffix \
$commandBinDir/oslinfo$commandSuffix
PATCH()
{
# Use python3 binary instead of unversioned python
sed -i -e "s|COMMAND python|COMMAND python3|" $(find . -iname CMakeLists.txt)
}
BUILD()
{
export LDFLAGS=-lnetwork
cmake -B build -S . \
$cmakeDirArgs \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_CXX_FLAGS="-DBOOST_NO_CXX11_CONSTEXPR" \
-DCMAKE_INSTALL_BINDIR=$commandBinDir \
-DUSE_PYTHON=OFF \
-DVERBOSE=ON \
-DUSE_PARTIO=OFF \
-DOSL_BUILD_TESTS=OFF \
-DOSL_BUILD_SHADERS=OFF \
-DINSTALL_DOCS=OFF
make -C build $jobArgs
}
INSTALL()
{
make -C build install
prepareInstalledDevelLibs \
liboslcomp \
liboslexec \
liboslnoise \
liboslquery \
osl.imageio
fixPkgconfig
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
make -C build test
}