mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
OIIO, bump version (#6088)
This commit is contained in:
@@ -6,11 +6,11 @@ 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-2019 Larry Gritz et al."
|
||||
COPYRIGHT="2008-present Contributors to the OpenImageIO project."
|
||||
LICENSE="BSD (3-clause)"
|
||||
REVISION="4"
|
||||
REVISION="1"
|
||||
SOURCE_URI="$HOMEPAGE/oiio/archive/Release-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="930a142c9cabbbc3b249577083c97e9f0407cc8cbf933144f3a3ed0f3ec9cfe0"
|
||||
CHECKSUM_SHA256="d1a59f32dbba3ba71ad2e62e107034d1c5287bca1b0696474e927d504cd05ef4"
|
||||
SOURCE_FILENAME="openimageio-$portVersion.tar.gz"
|
||||
SOURCE_DIR="oiio-Release-$portVersion"
|
||||
PATCHES="openimageio-$portVersion.patchset"
|
||||
@@ -18,6 +18,9 @@ PATCHES="openimageio-$portVersion.patchset"
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="2.2.16"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
openimageio$secondaryArchSuffix = $portVersion
|
||||
cmd:iconvert$secondaryArchSuffix
|
||||
@@ -26,8 +29,8 @@ PROVIDES="
|
||||
cmd:iinfo$secondaryArchSuffix
|
||||
cmd:maketx$secondaryArchSuffix
|
||||
cmd:oiiotool$secondaryArchSuffix
|
||||
lib:libopenimageio$secondaryArchSuffix = $portVersion compat >= 2.0
|
||||
lib:libopenimageio_util$secondaryArchSuffix = $portVersion compat >= 2.0
|
||||
lib:libOpenImageIO$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libOpenImageIO_Util$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
@@ -40,14 +43,17 @@ REQUIRES="
|
||||
lib:libbz2$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libfreetype$secondaryArchSuffix
|
||||
lib:libfmt$secondaryArchSuffix
|
||||
lib:libgif$secondaryArchSuffix
|
||||
lib:libglew$secondaryArchSuffix
|
||||
lib:libhalf_2_4$secondaryArchSuffix
|
||||
lib:libiex_2_4$secondaryArchSuffix
|
||||
lib:libimath_2_4$secondaryArchSuffix
|
||||
lib:libilmthread_2_4$secondaryArchSuffix
|
||||
lib:libheif$secondaryArchSuffix
|
||||
lib:libIex_3_0$secondaryArchSuffix
|
||||
lib:libIlmThread_3_0$secondaryArchSuffix
|
||||
lib:libImath_3_0$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:libopencolorio$secondaryArchSuffix
|
||||
lib:libOpenColorIO$secondaryArchSuffix
|
||||
lib:libOpenEXR_3_0$secondaryArchSuffix
|
||||
lib:libOpenEXRUtil_3_0$secondaryArchSuffix
|
||||
lib:libpng16$secondaryArchSuffix
|
||||
lib:libpugixml$secondaryArchSuffix
|
||||
lib:libraw$secondaryArchSuffix
|
||||
@@ -59,8 +65,8 @@ REQUIRES="
|
||||
|
||||
PROVIDES_devel="
|
||||
openimageio${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libopenimageio$secondaryArchSuffix = $portVersion compat >= 2.0
|
||||
devel:libopenimageio_util$secondaryArchSuffix = $portVersion compat >= 2.0
|
||||
devel:libOpenImageIO$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libOpenImageIO_Util$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
openimageio$secondaryArchSuffix == $portVersion base
|
||||
@@ -69,16 +75,21 @@ REQUIRES_devel="
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libboost_system$secondaryArchSuffix >= 1.69
|
||||
devel:libboost_system$secondaryArchSuffix >= 1.70.0
|
||||
devel:libbz2$secondaryArchSuffix
|
||||
devel:libcrypto$secondaryArchSuffix
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libfmt$secondaryArchSuffix
|
||||
devel:libgif$secondaryArchSuffix
|
||||
devel:libglew$secondaryArchSuffix
|
||||
devel:libhalf_2_4$secondaryArchSuffix
|
||||
devel:libilmimf_2_4$secondaryArchSuffix
|
||||
devel:libheif$secondaryArchSuffix
|
||||
devel:libIex_3_0$secondaryArchSuffix
|
||||
devel:libIlmThread_3_0$secondaryArchSuffix
|
||||
devel:libImath_3_0$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:libopencolorio$secondaryArchSuffix
|
||||
devel:libOpenColorIO$secondaryArchSuffix
|
||||
devel:libOpenEXR_3_0$secondaryArchSuffix
|
||||
devel:libOpenEXRUtil_3_0$secondaryArchSuffix
|
||||
devel:libpng16$secondaryArchSuffix
|
||||
devel:libpugixml$secondaryArchSuffix
|
||||
devel:libraw$secondaryArchSuffix
|
||||
@@ -104,35 +115,36 @@ defineDebugInfoPackage openimageio$secondaryArchSuffix \
|
||||
$binDir/iinfo \
|
||||
$binDir/maketx \
|
||||
$binDir/oiiotool \
|
||||
$libDir/libOpenImageIO.so.$portVersion \
|
||||
$libDir/libOpenImageIO_Util.so.$portVersion
|
||||
$libDir/libOpenImageIO.so.$libVersion \
|
||||
$libDir/libOpenImageIO_Util.so.$libVersion
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake .. \
|
||||
cmake -B build -S . \
|
||||
$cmakeDirArgs \
|
||||
-DUSE_PYTHON=OFF \
|
||||
-DUSE_EXTERNAL_PUGIXML=ON \
|
||||
$cmakeDirArgs
|
||||
make $jobArgs
|
||||
-DOIIO_BUILD_TESTS=OFF \
|
||||
-DBUILD_TESTING=OFF
|
||||
make -C build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make install
|
||||
make -C build install
|
||||
|
||||
prepareInstalledDevelLibs libOpenImageIO libOpenImageIO_Util
|
||||
fixPkgconfig
|
||||
|
||||
# devel package
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
cd build
|
||||
make test
|
||||
# tests fail (also previous version)
|
||||
# enable TESTS in BUILD to check this
|
||||
make -C build test
|
||||
}
|
||||
@@ -1,197 +0,0 @@
|
||||
From 5a64a6b23447c2c548578e014cc126c5292eea7b 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/cmake/compiler.cmake b/src/cmake/compiler.cmake
|
||||
index fb0b43a..b7b840c 100644
|
||||
--- a/src/cmake/compiler.cmake
|
||||
+++ b/src/cmake/compiler.cmake
|
||||
@@ -400,6 +400,9 @@ else ()
|
||||
add_definitions (-DBOOST_ALL_DYN_LINK)
|
||||
add_definitions (-DOPENEXR_DLL)
|
||||
endif ()
|
||||
+ if (HAIKU)
|
||||
+ set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
|
||||
+ endif ()
|
||||
endif ()
|
||||
|
||||
if (DEFINED ENV{TRAVIS} OR DEFINED ENV{APPVEYOR} OR DEFINED ENV{CI})
|
||||
diff --git a/src/libOpenImageIO/CMakeLists.txt b/src/libOpenImageIO/CMakeLists.txt
|
||||
index e3e673a..bf167d8 100644
|
||||
--- a/src/libOpenImageIO/CMakeLists.txt
|
||||
+++ b/src/libOpenImageIO/CMakeLists.txt
|
||||
@@ -164,6 +164,8 @@ if (MSVC)
|
||||
target_link_libraries (OpenImageIO psapi.lib)
|
||||
elseif(MINGW)
|
||||
target_link_libraries (OpenImageIO psapi ws2_32)
|
||||
+elseif (HAIKU)
|
||||
+ target_link_libraries (OpenImageIO network)
|
||||
endif ()
|
||||
|
||||
if (VISIBILITY_MAP_FILE)
|
||||
diff --git a/src/libutil/farmhash.cpp b/src/libutil/farmhash.cpp
|
||||
index 9b50f14..af7bf4b 100644
|
||||
--- a/src/libutil/farmhash.cpp
|
||||
+++ b/src/libutil/farmhash.cpp
|
||||
@@ -167,6 +167,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/libutil/sysutil.cpp b/src/libutil/sysutil.cpp
|
||||
index defbd78..b17f19c 100644
|
||||
--- a/src/libutil/sysutil.cpp
|
||||
+++ b/src/libutil/sysutil.cpp
|
||||
@@ -80,6 +80,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>
|
||||
@@ -276,7 +282,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 46a8ce1..becaadd 100644
|
||||
--- a/src/libutil/xxhash.cpp
|
||||
+++ b/src/libutil/xxhash.cpp
|
||||
@@ -126,8 +126,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 dacdc2e..4918389 100644
|
||||
--- a/src/make/detectplatform.mk
|
||||
+++ b/src/make/detectplatform.mk
|
||||
@@ -46,6 +46,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.21.0
|
||||
|
||||
|
||||
From 4208089ae2fb0924fda1ec1d6f82510231f7a01b Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Wed, 6 Nov 2019 23:18:49 +0100
|
||||
Subject: tiff uses uint32 instead of uint32_t
|
||||
|
||||
|
||||
diff --git a/src/tiff.imageio/tiffinput.cpp b/src/tiff.imageio/tiffinput.cpp
|
||||
index 416ebfa..205f6a4 100644
|
||||
--- a/src/tiff.imageio/tiffinput.cpp
|
||||
+++ b/src/tiff.imageio/tiffinput.cpp
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
+
|
||||
#include <boost/thread/tss.hpp>
|
||||
|
||||
#include <tiffio.h>
|
||||
@@ -51,6 +52,10 @@
|
||||
|
||||
#include "imageio_pvt.h"
|
||||
|
||||
+#if defined(__HAIKU__) && defined(__INTEL__)
|
||||
+#define uint32_t uint32
|
||||
+#endif
|
||||
+
|
||||
|
||||
OIIO_PLUGIN_NAMESPACE_BEGIN
|
||||
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From adfc822a9a5053a8feeeea4457c1506c964ae419 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Thu, 7 Nov 2019 21:30:03 +0100
|
||||
Subject: strutil: specify the global namespace for strtof and strtod calls.
|
||||
|
||||
|
||||
diff --git a/src/libutil/strutil.cpp b/src/libutil/strutil.cpp
|
||||
index cf7b9c6..2277a0d 100644
|
||||
--- a/src/libutil/strutil.cpp
|
||||
+++ b/src/libutil/strutil.cpp
|
||||
@@ -1238,7 +1238,7 @@ Strutil::strtof(const char* nptr, char** endptr)
|
||||
= std::use_facet<std::numpunct<char>>(native).decimal_point();
|
||||
// If the native locale uses decimal, just directly use strtof.
|
||||
if (nativepoint == '.')
|
||||
- return strtof(nptr, endptr);
|
||||
+ return ::strtof(nptr, endptr);
|
||||
// Complex case -- CHEAT by making a copy of the string and replacing
|
||||
// the decimal, then use system strtof!
|
||||
std::string s(nptr);
|
||||
@@ -1251,7 +1251,7 @@ Strutil::strtof(const char* nptr, char** endptr)
|
||||
return d;
|
||||
}
|
||||
// No decimal point at all -- use regular strtof
|
||||
- return strtof(s.c_str(), endptr);
|
||||
+ return ::strtof(s.c_str(), endptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1276,7 +1276,7 @@ Strutil::strtod(const char* nptr, char** endptr)
|
||||
= std::use_facet<std::numpunct<char>>(native).decimal_point();
|
||||
// If the native locale uses decimal, just directly use strtod.
|
||||
if (nativepoint == '.')
|
||||
- return strtod(nptr, endptr);
|
||||
+ return ::strtod(nptr, endptr);
|
||||
// Complex case -- CHEAT by making a copy of the string and replacing
|
||||
// the decimal, then use system strtod!
|
||||
std::string s(nptr);
|
||||
@@ -1289,7 +1289,7 @@ Strutil::strtod(const char* nptr, char** endptr)
|
||||
return d;
|
||||
}
|
||||
// No decimal point at all -- use regular strtod
|
||||
- return strtod(s.c_str(), endptr);
|
||||
+ return ::strtod(s.c_str(), endptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
--
|
||||
2.21.0
|
||||
|
||||
134
media-libs/openimageio/patches/openimageio-2.2.16.0.patchset
Normal file
134
media-libs/openimageio/patches/openimageio-2.2.16.0.patchset
Normal file
@@ -0,0 +1,134 @@
|
||||
From 6b3879484f08f799f8261336d3fb3e7297400127 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 a1ea8bd..9015ce7 100644
|
||||
--- a/src/include/OpenImageIO/detail/farmhash.h
|
||||
+++ b/src/include/OpenImageIO/detail/farmhash.h
|
||||
@@ -175,6 +175,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 7b89dc0..4abe293 100644
|
||||
--- a/src/libOpenImageIO/CMakeLists.txt
|
||||
+++ b/src/libOpenImageIO/CMakeLists.txt
|
||||
@@ -176,7 +176,9 @@ if (MINGW)
|
||||
target_link_libraries (OpenImageIO PRIVATE ws2_32)
|
||||
endif()
|
||||
|
||||
-
|
||||
+if (__HAIKU__)
|
||||
+ target_link_libraries (OpenImageIO network)
|
||||
+endif()
|
||||
|
||||
if (MSVC)
|
||||
# In some MSVC setups, the IBA functions with huge template expansions
|
||||
diff --git a/src/libutil/sysutil.cpp b/src/libutil/sysutil.cpp
|
||||
index 61edc0b..4627990 100644
|
||||
--- a/src/libutil/sysutil.cpp
|
||||
+++ b/src/libutil/sysutil.cpp
|
||||
@@ -58,6 +58,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>
|
||||
@@ -255,7 +261,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 46a8ce1..becaadd 100644
|
||||
--- a/src/libutil/xxhash.cpp
|
||||
+++ b/src/libutil/xxhash.cpp
|
||||
@@ -126,8 +126,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 90fd11b..a28ee3e 100644
|
||||
--- a/src/make/detectplatform.mk
|
||||
+++ b/src/make/detectplatform.mk
|
||||
@@ -51,6 +51,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.30.2
|
||||
|
||||
|
||||
From adfd806d493760052597972e8be99dc1eba4ace7 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Wed, 6 Nov 2019 23:18:49 +0100
|
||||
Subject: tiff uses uint32 instead of uint32_t
|
||||
|
||||
|
||||
diff --git a/src/tiff.imageio/tiffinput.cpp b/src/tiff.imageio/tiffinput.cpp
|
||||
index 01c52a4..a651689 100644
|
||||
--- a/src/tiff.imageio/tiffinput.cpp
|
||||
+++ b/src/tiff.imageio/tiffinput.cpp
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
+
|
||||
#define AVOID_WIN32_FILEIO
|
||||
#include <tiffio.h>
|
||||
#include <zlib.h>
|
||||
@@ -24,6 +25,9 @@
|
||||
|
||||
#include "imageio_pvt.h"
|
||||
|
||||
+#if defined(__HAIKU__) && defined(__INTEL__)
|
||||
+#define uint32_t uint32
|
||||
+#endif
|
||||
|
||||
OIIO_PLUGIN_NAMESPACE_BEGIN
|
||||
|
||||
--
|
||||
2.30.2
|
||||
|
||||
Reference in New Issue
Block a user