diff --git a/media-libs/openexr/openexr32-3.2.2.recipe b/media-libs/openexr/openexr32-3.2.2.recipe new file mode 100644 index 000000000..8f02b9aa1 --- /dev/null +++ b/media-libs/openexr/openexr32-3.2.2.recipe @@ -0,0 +1,132 @@ +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="2021, Contributors to the OpenEXR Project." +LICENSE="BSD (3-clause)" +REVISION="1" +SOURCE_URI="https://github.com/AcademySoftwareFoundation/openexr/archive/v$portVersion.tar.gz" +CHECKSUM_SHA256="65de6459c245a4977ce4d7777e70b30d7ef48ec38e0cfb10205706ca50a8bf2e" +SOURCE_FILENAME="openexr-$portVersion.tar.gz" +SOURCE_DIR="openexr-$portVersion" +PATCHES="openexr-$portVersion.patchset" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +libVersion="31.3.2.2" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" +libImathVersion="29.8.0" +libImathVersionCompat="$libImathVersion compat >= ${libImathVersion%%.*}" + +PROVIDES=" + openexr32$secondaryArchSuffix = $portVersion + lib:libIex_3_2$secondaryArchSuffix = $libVersionCompat + lib:libIlmThread_3_2$secondaryArchSuffix = $libVersionCompat + lib:libImath_3_1$secondaryArchSuffix = $libImathVersionCompat + lib:libOpenEXR_3_2$secondaryArchSuffix = $libVersionCompat + lib:libOpenEXRCore_3_2$secondaryArchSuffix = $libVersionCompat + lib:libOpenEXRUtil_3_2$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libdeflate$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " +CONFLICTS=" + ilmbase$secondaryArchSuffix + " + +PROVIDES_tools=" + openexr32${secondaryArchSuffix}_tools = $portVersion + cmd:exr2aces$secondaryArchSuffix = $portVersion + cmd:exrenvmap$secondaryArchSuffix = $portVersion + cmd:exrheader$secondaryArchSuffix = $portVersion + cmd:exrinfo$secondaryArchSuffix = $portVersion + cmd:exrmakepreview$secondaryArchSuffix = $portVersion + cmd:exrmaketiled$secondaryArchSuffix = $portVersion + cmd:exrmultipart$secondaryArchSuffix = $portVersion + cmd:exrmultiview$secondaryArchSuffix = $portVersion + cmd:exrstdattr$secondaryArchSuffix = $portVersion + " +REQUIRES_tools=" + $REQUIRES + openexr32$secondaryArchSuffix == $portVersion base + " + +PROVIDES_devel=" + openexr32${secondaryArchSuffix}_devel = $portVersion + devel:libIex_3_2$secondaryArchSuffix = $libVersionCompat + devel:libIlmThread_3_2$secondaryArchSuffix = $libVersionCompat + devel:libImath_3_1$secondaryArchSuffix = $libImathVersionCompat + devel:libOpenEXR_3_2$secondaryArchSuffix = $libVersionCompat + devel:libOpenEXRCore$secondaryArchSuffix = $libVersionCompat + devel:libOpenEXRCore_3_2$secondaryArchSuffix = $libVersionCompat + devel:libOpenEXRUtil_3_2$secondaryArchSuffix = $libVersionCompat + devel:libIex$secondaryArchSuffix = $libVersionCompat + devel:libIlmThread$secondaryArchSuffix = $libVersionCompat + devel:libImath$secondaryArchSuffix = $libImathVersionCompat + devel:libOpenEXR$secondaryArchSuffix = $libVersionCompat + devel:libOpenEXRUtil$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + openexr32$secondaryArchSuffix == $portVersion base + " +CONFLICTS_devel=" + openexr${secondaryArchSuffix}_devel + openexr25${secondaryArchSuffix}_devel + openexr30${secondaryArchSuffix}_devel + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libdeflate$secondaryArchSuffix + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:git + cmd:ld$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + cmake -Bbuild -S. \ + $cmakeDirArgs \ + -DCMAKE_BUILD_TYPE=Release + make -Cbuild $jobArgs +} + +INSTALL() +{ + make -Cbuild install + + packageEntries tools \ + $binDir + + # prepare development lib links + prepareInstalledDevelLibs \ + libIex-3_2 libIlmThread-3_2 libImath-3_1 \ + libOpenEXR-3_2 libOpenEXRCore-3_2 libOpenEXRUtil-3_2 \ + libIex libIlmThread libImath libOpenEXR libOpenEXRCore libOpenEXRUtil + fixPkgconfig + + # devel package + packageEntries devel \ + $developDir \ + $documentationDir \ + $libDir/cmake +} + +TEST() +{ + # 2% tests passed, 114 tests failed out of 116 + make -Cbuild test +} diff --git a/media-libs/openexr/patches/openexr-3.2.2.patchset b/media-libs/openexr/patches/openexr-3.2.2.patchset new file mode 100644 index 000000000..778d30318 --- /dev/null +++ b/media-libs/openexr/patches/openexr-3.2.2.patchset @@ -0,0 +1,23 @@ +From 91bbf0c150b298de0a0530e2b7cca2846bd51bf9 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Sat, 26 Oct 2019 20:01:01 +0200 +Subject: define bswap_32 for Haiku. + + +diff --git a/src/test/OpenEXRTest/bswap_32.h b/src/test/OpenEXRTest/bswap_32.h +index f67cc03..39ac3a3 100644 +--- a/src/test/OpenEXRTest/bswap_32.h ++++ b/src/test/OpenEXRTest/bswap_32.h +@@ -22,6 +22,9 @@ + # include + # include + # define bswap_32(x) bswap32 (x) ++#elif defined(__HAIKU__) ++# include ++# define bswap_32(x) B_SWAP_INT32(x) + #else + # include + #endif +-- +2.43.2 +