Files
haikuports/media-libs/openexr/openexr24-2.4.0.recipe
2019-10-26 20:26:03 +02:00

121 lines
3.6 KiB
Bash

SUMMARY="A high dynamic-range (HDR) image file format"
DESCRIPTION="OpenEXR is a high dynamic-range (HDR) image file format developed \
by Industrial Light & Magic for use in computer imaging applications. OpenEXR \
is used by ILM on all motion pictures currently in production. The first \
movies to employ OpenEXR were Harry Potter and the Sorcerers Stone, Men in \
Black II, Gangs of New York, and Signs. Since then, OpenEXR has become ILM's \
main image file format."
HOMEPAGE="https://www.openexr.com/"
COPYRIGHT="2002-2017 Industrial Light & Magic"
LICENSE="BSD (3-clause)"
REVISION="1"
SOURCE_URI="https://github.com/openexr/openexr/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="4904c5ea7914a58f60a5e2fbc397be67e7a25c380d7d07c1c31a3eefff1c92f1"
SOURCE_FILENAME="openexr-$portVersion.tar.gz"
SOURCE_DIR="openexr-$portVersion"
PATCHES="openexr-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
libVersion="24.0.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
openexr24$secondaryArchSuffix = $portVersion
cmd:exr2aces$secondaryArchSuffix = $portVersion
cmd:exrenvmap$secondaryArchSuffix = $portVersion
cmd:exrheader$secondaryArchSuffix = $portVersion
cmd:exrmakepreview$secondaryArchSuffix = $portVersion
cmd:exrmaketiled$secondaryArchSuffix = $portVersion
cmd:exrmultipart$secondaryArchSuffix = $portVersion
cmd:exrmultiview$secondaryArchSuffix = $portVersion
cmd:exrstdattr$secondaryArchSuffix = $portVersion
lib:libhalf_2_4$secondaryArchSuffix = $libVersionCompat
lib:libiex_2_4$secondaryArchSuffix = $libVersionCompat
lib:libiexmath_2_4$secondaryArchSuffix = $libVersionCompat
lib:libilmimf_2_4$secondaryArchSuffix = $libVersionCompat
lib:libilmimfutil_2_4$secondaryArchSuffix = $libVersionCompat
lib:libilmthread_2_4$secondaryArchSuffix = $libVersionCompat
lib:libimath_2_4$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
openexr24${secondaryArchSuffix}_devel = $portVersion
devel:libhalf_2_4$secondaryArchSuffix = $libVersionCompat
devel:libiexmath_2_4$secondaryArchSuffix = $libVersionCompat
devel:libilmimf_2_4$secondaryArchSuffix = $libVersionCompat
devel:libilmimfutil_2_4$secondaryArchSuffix = $libVersionCompat
devel:libilmthread_2_4$secondaryArchSuffix = $libVersionCompat
devel:libimath_2_4$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
openexr24$secondaryArchSuffix == $portVersion base
"
CONFLICTS_devel="
openexr${secondaryArchSuffix}_devel
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake >= 3.10
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"
BUILD()
{
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=$prefix
make $jobArgs
}
INSTALL()
{
cd build
make install
# prepare development documentation
mkdir -p $developDocDir
mv $prefix/share/doc $developDocDir
#clear empty directory
rmdir $prefix/share
mkdir -p $(dirname $includeDir)
mv $prefix/include $includeDir
if [ -n "$secondaryArchSuffix" ]; then
mv $prefix/lib $prefix/lib2
mv $prefix/bin $prefix/bin2
mkdir -p $(dirname $libDir) $(dirname $binDir)
mv $prefix/lib2 $libDir
mv $prefix/bin2 $binDir
fi
rm $libDir/lib{Half,Iex,Imath,IexMath,IlmImf,IlmImfUtil,IlmThread}.*
# prepare development lib links
prepareInstalledDevelLibs \
libHalf-2_4 libIlmImf-2_4 \
libImath-2_4 libIexMath-2_4 \
libIlmImfUtil-2_4 libIlmThread-2_4
fixPkgconfig
# devel package
packageEntries devel $developDir $libDir/cmake
}
TEST()
{
cd build
make check
}