mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
openimageio2.5, new version (#10619)
This commit is contained in:
189
media-libs/openimageio/openimageio2.5-2.5.12.0.recipe
Normal file
189
media-libs/openimageio/openimageio2.5-2.5.12.0.recipe
Normal file
@@ -0,0 +1,189 @@
|
||||
SUMMARY="A library to read and write images"
|
||||
DESCRIPTION="OpenImageIO is a library for reading and writing images, and a \
|
||||
bunch of related classes, utilities, and applications. There is a particular \
|
||||
emphasis on formats and functionality used in professional, large-scale \
|
||||
animation and visual effects work for film.
|
||||
OpenImageIO is used extensively in animation and VFX studios all over the \
|
||||
world, and is also incorporated into several commercial products."
|
||||
HOMEPAGE="https://github.com/OpenImageIO/"
|
||||
COPYRIGHT="2008-present Contributors to the OpenImageIO project."
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="1"
|
||||
SOURCE_URI="$HOMEPAGE/oiio/archive/refs/tags/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="51ea3c309bad7381fd0d7ef793e93a72d8e0edaeff4ff329f4f21fb5de3d90bd"
|
||||
SOURCE_FILENAME="openimageio-$portVersion.tar.gz"
|
||||
SOURCE_DIR="OpenImageIO-$portVersion"
|
||||
PATCHES="openimageio-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
commandBinDir=$binDir
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
libVersion="${portVersion%.**}"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%.*}"
|
||||
|
||||
PROVIDES="
|
||||
openimageio2.5$secondaryArchSuffix = $portVersion
|
||||
lib:libOpenImageIO$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libOpenImageIO_Util$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libboost_atomic$secondaryArchSuffix
|
||||
lib:libboost_chrono$secondaryArchSuffix
|
||||
lib:libboost_date_time$secondaryArchSuffix
|
||||
lib:libboost_filesystem$secondaryArchSuffix
|
||||
lib:libboost_system$secondaryArchSuffix
|
||||
lib:libboost_thread$secondaryArchSuffix
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libfmt$secondaryArchSuffix
|
||||
lib:libgif$secondaryArchSuffix
|
||||
lib:libglew$secondaryArchSuffix
|
||||
lib:libheif$secondaryArchSuffix
|
||||
lib:libIex_3_2$secondaryArchSuffix
|
||||
lib:libIlmThread_3_2$secondaryArchSuffix
|
||||
lib:libImath_3_1$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:libOpenColorIO$secondaryArchSuffix
|
||||
lib:libOpenEXR_3_2$secondaryArchSuffix
|
||||
lib:libOpenEXRUtil_3_2$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libpugixml$secondaryArchSuffix
|
||||
lib:libraw$secondaryArchSuffix
|
||||
lib:libssl$secondaryArchSuffix
|
||||
lib:libtiff$secondaryArchSuffix
|
||||
lib:libwebp$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
openimageio2.5${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libOpenImageIO$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libOpenImageIO_Util$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
openimageio2.5$secondaryArchSuffix == $portVersion base
|
||||
devel:libboost_system$secondaryArchSuffix
|
||||
"
|
||||
CONFLICTS_devel="
|
||||
openimageio2.3${secondaryArchSuffix}_devel
|
||||
"
|
||||
|
||||
PROVIDES_tools="
|
||||
openimageio2.5${secondaryArchSuffix}_tools = $portVersion
|
||||
cmd:iconvert$commandSuffix = $portVersion
|
||||
cmd:idiff$commandSuffix = $portVersion
|
||||
cmd:igrep$commandSuffix = $portVersion
|
||||
cmd:iinfo$commandSuffix = $portVersion
|
||||
cmd:maketx$commandSuffix = $portVersion
|
||||
cmd:oiiotool$commandSuffix = $portVersion
|
||||
cmd:testtex$commandSuffix = $portVersion
|
||||
"
|
||||
REQUIRES_tools="
|
||||
openimageio2.5$secondaryArchSuffix == $portVersion base
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libIex_3_2$secondaryArchSuffix
|
||||
lib:libIlmThread_3_2$secondaryArchSuffix
|
||||
lib:libImath_3_1$secondaryArchSuffix
|
||||
lib:libOpenEXR_3_2$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libboost_system$secondaryArchSuffix >= 1.83.0
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:libcrypto$secondaryArchSuffix
|
||||
devel:libdeflate$secondaryArchSuffix
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libfmt$secondaryArchSuffix
|
||||
devel:libgif$secondaryArchSuffix
|
||||
devel:libglew$secondaryArchSuffix
|
||||
devel:libheif$secondaryArchSuffix
|
||||
devel:libIex_3_2$secondaryArchSuffix
|
||||
devel:libIlmThread_3_2$secondaryArchSuffix
|
||||
devel:libImath_3_1$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:libOpenColorIO$secondaryArchSuffix >= 2.3
|
||||
devel:libOpenEXR_3_2$secondaryArchSuffix
|
||||
devel:libOpenEXRUtil_3_2$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libpugixml$secondaryArchSuffix
|
||||
devel:libraw$secondaryArchSuffix
|
||||
devel:libssl$secondaryArchSuffix
|
||||
devel:libtiff$secondaryArchSuffix
|
||||
devel:libwebp$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
devel:robin_map
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:git
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:python3
|
||||
"
|
||||
|
||||
defineDebugInfoPackage openimageio2.5$secondaryArchSuffix \
|
||||
"$(getPackagePrefix tools)"/bin/iconvert \
|
||||
"$(getPackagePrefix tools)"/bin/idiff \
|
||||
"$(getPackagePrefix tools)"/bin/igrep \
|
||||
"$(getPackagePrefix tools)"/bin/iinfo \
|
||||
"$(getPackagePrefix tools)"/bin/maketx \
|
||||
"$(getPackagePrefix tools)"/bin/oiiotool \
|
||||
$libDir/libOpenImageIO.so.$libVersion \
|
||||
$libDir/libOpenImageIO_Util.so.$libVersion
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -B build -S . \
|
||||
$cmakeDirArgs \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_BINDIR=$commandBinDir \
|
||||
-DINSTALL_FONTS:BOOL=OFF \
|
||||
-DINTERNALIZE_FMT=OFF \
|
||||
-DUSE_PYTHON=OFF \
|
||||
-DOIIO_BUILD_TESTS=OFF \
|
||||
-DOIIO_BUILD_TOOLS=ON \
|
||||
-DBUILD_MISSING_FMT=OFF \
|
||||
-DUSE_EXTERNAL_PUGIXML=ON \
|
||||
-Wno-dev
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make -C build $jobArgs install
|
||||
|
||||
sed -e "s|\(\${_IMPORT_PREFIX}\)/include|\1/$relativeIncludeDir|" -i \
|
||||
"$libDir"/cmake/OpenImageIO/OpenImageIOTargets.cmake
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libOpenImageIO \
|
||||
libOpenImageIO_Util
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries tools \
|
||||
$commandBinDir
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
# tests fail (also previous version)
|
||||
# enable TESTS in BUILD to check this
|
||||
make -C build test
|
||||
}
|
||||
143
media-libs/openimageio/patches/openimageio-2.5.12.0.patchset
Normal file
143
media-libs/openimageio/patches/openimageio-2.5.12.0.patchset
Normal file
@@ -0,0 +1,143 @@
|
||||
From e5be0a483670a0775ba8ec0ffed240239e6d4448 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Sun, 7 Jun 2015 22:05:26 +0000
|
||||
Subject: Haiku patch
|
||||
|
||||
|
||||
diff --git a/src/include/OpenImageIO/detail/farmhash.h b/src/include/OpenImageIO/detail/farmhash.h
|
||||
index 96cc404..4297770 100644
|
||||
--- a/src/include/OpenImageIO/detail/farmhash.h
|
||||
+++ b/src/include/OpenImageIO/detail/farmhash.h
|
||||
@@ -180,6 +180,13 @@
|
||||
#define bswap_64(x) bswap64(x)
|
||||
#endif
|
||||
|
||||
+#elif defined(__HAIKU__)
|
||||
+
|
||||
+#undef bswap_32
|
||||
+#undef bswap_64
|
||||
+#define bswap_32 __builtin_bswap32
|
||||
+#define bswap_64 __builtin_bswap64
|
||||
+
|
||||
#else
|
||||
|
||||
#undef bswap_32
|
||||
diff --git a/src/libOpenImageIO/CMakeLists.txt b/src/libOpenImageIO/CMakeLists.txt
|
||||
index aeb7b7f..a9dd9db 100644
|
||||
--- a/src/libOpenImageIO/CMakeLists.txt
|
||||
+++ b/src/libOpenImageIO/CMakeLists.txt
|
||||
@@ -171,6 +171,10 @@ if (WIN32)
|
||||
target_link_libraries (OpenImageIO PRIVATE psapi)
|
||||
endif()
|
||||
|
||||
+if (HAIKU)
|
||||
+ target_link_libraries (OpenImageIO PRIVATE network)
|
||||
+endif()
|
||||
+
|
||||
if (MINGW)
|
||||
target_link_libraries (OpenImageIO PRIVATE ws2_32)
|
||||
endif()
|
||||
diff --git a/src/libutil/sysutil.cpp b/src/libutil/sysutil.cpp
|
||||
index 63bd5e1..35a43f7 100644
|
||||
--- a/src/libutil/sysutil.cpp
|
||||
+++ b/src/libutil/sysutil.cpp
|
||||
@@ -60,6 +60,12 @@
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
+#if defined (__HAIKU__)
|
||||
+# include <sys/types.h>
|
||||
+# include <sys/resource.h>
|
||||
+# include <unistd.h>
|
||||
+#endif
|
||||
+
|
||||
#include <OpenImageIO/dassert.h>
|
||||
#include <OpenImageIO/strutil.h>
|
||||
#include <OpenImageIO/sysutil.h>
|
||||
@@ -280,7 +286,7 @@ Sysutil::this_program_path()
|
||||
size_t cb = sizeof(filename);
|
||||
int r = 1;
|
||||
sysctl(mib, 4, filename, &cb, NULL, 0);
|
||||
-#elif defined(__GNU__) || defined(__OpenBSD__) || defined(_WIN32)
|
||||
+#elif defined(__GNU__) || defined(__OpenBSD__) || defined(_WIN32) || defined(__HAIKU__)
|
||||
int r = 0;
|
||||
#else
|
||||
// No idea what platform this is
|
||||
diff --git a/src/libutil/xxhash.cpp b/src/libutil/xxhash.cpp
|
||||
index c0afcfe..016133b 100644
|
||||
--- a/src/libutil/xxhash.cpp
|
||||
+++ b/src/libutil/xxhash.cpp
|
||||
@@ -128,8 +128,10 @@ typedef unsigned long long U64;
|
||||
#if defined(__GNUC__) && !defined(XXH_USE_UNALIGNED_ACCESS)
|
||||
# define _PACKED __attribute__ ((packed))
|
||||
#else
|
||||
+#ifndef __HAIKU__
|
||||
# define _PACKED
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#if !defined(XXH_USE_UNALIGNED_ACCESS) && !defined(__GNUC__)
|
||||
# ifdef __IBMC__
|
||||
diff --git a/src/make/detectplatform.mk b/src/make/detectplatform.mk
|
||||
index b54674f..e906cb0 100644
|
||||
--- a/src/make/detectplatform.mk
|
||||
+++ b/src/make/detectplatform.mk
|
||||
@@ -55,6 +55,14 @@ ifeq (${platform},unknown)
|
||||
endif
|
||||
endif
|
||||
|
||||
+ # Haiku
|
||||
+ ifeq (${uname},haiku)
|
||||
+ platform := haiku
|
||||
+ ifeq (${hw},x86_64)
|
||||
+ platform := haiku64
|
||||
+ endif
|
||||
+ endif
|
||||
+
|
||||
# Windows
|
||||
ifeq (${uname},cygwin)
|
||||
platform := windows
|
||||
--
|
||||
2.45.1
|
||||
|
||||
|
||||
From 8aab9230a4be38bb9f44d05db9eb93e53c698a6d Mon Sep 17 00:00:00 2001
|
||||
From: Schrijvers Luc <begasus@gmail.com>
|
||||
Date: Tue, 18 Jun 2024 10:12:44 +0200
|
||||
Subject: Build fixes for strcasecmp_l and c_loc
|
||||
|
||||
|
||||
diff --git a/src/libutil/strutil.cpp b/src/libutil/strutil.cpp
|
||||
index 4d0d89c..2ba780b 100644
|
||||
--- a/src/libutil/strutil.cpp
|
||||
+++ b/src/libutil/strutil.cpp
|
||||
@@ -67,7 +67,7 @@ static std::mutex output_mutex;
|
||||
// On systems that support it, get a location independent locale.
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) \
|
||||
|| defined(__FreeBSD_kernel__) || defined(__OpenBSD__) \
|
||||
- || defined(__GLIBC__)
|
||||
+ || defined(__HAIKU__) || defined(__GLIBC__)
|
||||
static locale_t c_loc = newlocale(LC_ALL_MASK, "C", nullptr);
|
||||
#elif defined(_WIN32)
|
||||
static _locale_t c_loc = _create_locale(LC_ALL, "C");
|
||||
@@ -452,7 +452,7 @@ strcasecmp(const char* a, const char* b)
|
||||
{
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) \
|
||||
|| defined(__FreeBSD_kernel__) || defined(__OpenBSD__) \
|
||||
- || defined(__GLIBC__)
|
||||
+ || defined(__HAIKU__) || defined(__GLIBC__)
|
||||
return strcasecmp_l(a, b, c_loc);
|
||||
#elif defined(_WIN32)
|
||||
return _stricmp_l(a, b, c_loc);
|
||||
@@ -467,7 +467,7 @@ strncasecmp(const char* a, const char* b, size_t size)
|
||||
{
|
||||
#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) \
|
||||
|| defined(__FreeBSD_kernel__) || defined(__OpenBSD__) \
|
||||
- || defined(__GLIBC__)
|
||||
+ || defined(__HAIKU__) || defined(__GLIBC__)
|
||||
return strncasecmp_l(a, b, size, c_loc);
|
||||
#elif defined(_WIN32)
|
||||
return _strnicmp_l(a, b, size, c_loc);
|
||||
--
|
||||
2.45.1
|
||||
|
||||
Reference in New Issue
Block a user