diff --git a/media-libs/openexr/openexr30-3.0.5.recipe b/media-libs/openexr/openexr30-3.0.5.recipe new file mode 100644 index 000000000..77b0f00dd --- /dev/null +++ b/media-libs/openexr/openexr30-3.0.5.recipe @@ -0,0 +1,124 @@ +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="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="7aa6645da70e9a0cce8215d25030cfd4f4b17b4abf1ceec314f7eae15674e8e4" +SOURCE_FILENAME="openexr-$portVersion.tar.gz" +SOURCE_DIR="openexr-$portVersion" +PATCHES="openexr-$portVersion.patchset" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +libVersion="29.0.0" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" +libImathVersion="28.0.2" +libImathVersionCompat="$libImathVersion compat >= ${libImathVersion%%.*}" + +PROVIDES=" + openexr30$secondaryArchSuffix = $portVersion + lib:libIex_3_0$secondaryArchSuffix = $libVersionCompat + lib:libIlmThread_3_0$secondaryArchSuffix = $libVersionCompat + lib:libImath_3_0$secondaryArchSuffix = $libImathVersionCompat + lib:libOpenEXR_3_0$secondaryArchSuffix = $libVersionCompat + lib:libOpenEXRUtil_3_0$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku$secondaryArchSuffix + lib:libz$secondaryArchSuffix + " +CONFLICTS=" + ilmbase$secondaryArchSuffix + " + +PROVIDES_tools=" + openexr30${secondaryArchSuffix}_tools = $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 + " +REQUIRES_tools=" + $REQUIRES + openexr30$secondaryArchSuffix == $portVersion base + " + +PROVIDES_devel=" + openexr30${secondaryArchSuffix}_devel = $portVersion + devel:libIex_3_0$secondaryArchSuffix = $libVersionCompat + devel:libIlmThread_3_0$secondaryArchSuffix = $libVersionCompat + devel:libImath_3_0$secondaryArchSuffix = $libImathVersionCompat + devel:libOpenEXR_3_0$secondaryArchSuffix = $libVersionCompat + devel:libOpenEXRUtil_3_0$secondaryArchSuffix = $libVersionCompat + devel:libIex$secondaryArchSuffix = $libVersionCompat + devel:libIlmThread$secondaryArchSuffix = $libVersionCompat + devel:libImath$secondaryArchSuffix = $libImathVersionCompat + devel:libOpenEXR$secondaryArchSuffix = $libVersionCompat + devel:libOpenEXRUtil$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + openexr30$secondaryArchSuffix == $portVersion base + " +CONFLICTS_devel=" + openexr${secondaryArchSuffix}_devel + openexr25${secondaryArchSuffix}_devel + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libz$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:gcc$secondaryArchSuffix + cmd:git + cmd:ld$secondaryArchSuffix + cmd:make + " + +BUILD() +{ + cmake -B build -S . \ + $cmakeDirArgs \ + -DCMAKE_BUILD_TYPE=Release + make -C build $jobArgs +} + +INSTALL() +{ + make -C build install + + mkdir -p $developDocDir + mv $docDir/* $developDocDir + rm -rf $docDir + + packageEntries tools $binDir + + # prepare development lib links + prepareInstalledDevelLibs \ + libIex-3_0 libIlmThread-3_0 libImath-3_0 \ + libOpenEXR-3_0 libOpenEXRUtil-3_0 \ + libIex libIlmThread libImath libOpenEXR libOpenEXRUtil + fixPkgconfig + + # devel package + packageEntries devel $developDir $libDir/cmake +} + +TEST() +{ + # most of the tests fail + make -C build test +} diff --git a/media-libs/openexr/patches/openexr-3.0.5.patchset b/media-libs/openexr/patches/openexr-3.0.5.patchset new file mode 100644 index 000000000..f45446f7f --- /dev/null +++ b/media-libs/openexr/patches/openexr-3.0.5.patchset @@ -0,0 +1,23 @@ +From 356bb966d5c09e2545bf48d6335fc674713b3431 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 1fc4fc2..b4bd9d8 100644 +--- a/src/test/OpenEXRTest/bswap_32.h ++++ b/src/test/OpenEXRTest/bswap_32.h +@@ -21,6 +21,9 @@ + #elif defined(__NetBSD__) + #include + #include ++#elif defined(__HAIKU__) ++#include ++#define bswap_32(x) B_SWAP_INT32(x) + #if defined(__BSWAP_RENAME) && !defined(__bswap_32) + #define bswap_32(x) bswap32(x) + #endif +-- +2.30.2 +