|
|
@@ -6,6 +6,7 @@ package("openexr")
|
|
|
add_urls("https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/$(version).tar.gz",
|
|
|
"https://github.com/AcademySoftwareFoundation/openexr.git")
|
|
|
|
|
|
+ add_versions("v3.4.0", "d7b31637d7adc359f5e5a7517ba918cb5997bc1a4ae7a808ec874cdf91da93c0")
|
|
|
add_versions("v3.3.5", "cb0c88710c906c9bfc59027eb147e780d508c7be1a90b43af3ec9e3c2987b70d")
|
|
|
add_versions("v3.3.4", "63abac7c52f280e3e16fc868ac40e06449733bb19179008248ae7e34e4f19824")
|
|
|
add_versions("v3.3.3", "0ffbd842a7ee2128d44affdea30f42294b4061293cde3aa75b61a53573413d1e")
|
|
|
@@ -24,6 +25,7 @@ package("openexr")
|
|
|
add_versions("v3.1.5", "93925805c1fc4f8162b35f0ae109c4a75344e6decae5a240afdfce25f8a433ec")
|
|
|
add_versions("v3.2.1", "61e175aa2203399fb3c8c2288752fbea3c2637680d50b6e306ea5f8ffdd46a9b")
|
|
|
|
|
|
+ add_patches("3.4.0", "patches/3.4.0/openjph-include.patch", "d8eb99fd9f064821134ee61c4bfb0e5dff4be557a21698365361250f13e82e53")
|
|
|
add_patches("3.3.3", "patches/3.3.3/mingw32.patch", "17cbe9d0cbc0c670a846454893c1a427590789cf6bf052a4d800d1263e0faa9a")
|
|
|
|
|
|
add_configs("build_both", {description = "Build both static library and shared library. (deprecated)", default = false, type = "boolean"})
|
|
|
@@ -39,6 +41,11 @@ package("openexr")
|
|
|
add_deps("zlib", "libdeflate")
|
|
|
|
|
|
if on_check then
|
|
|
+ on_check("android", function (package)
|
|
|
+ local ndk = package:toolchain("ndk")
|
|
|
+ local ndk_sdkver = ndk:config("ndk_sdkver")
|
|
|
+ assert(ndk_sdkver and tonumber(ndk_sdkver) >= 28, "package(openexr) dep(openjph) need ndk api level >= 28")
|
|
|
+ end)
|
|
|
on_check("windows", function (package)
|
|
|
local vs_toolset = package:toolchain("msvc"):config("vs_toolset")
|
|
|
if vs_toolset and package:is_arch("arm.*") then
|
|
|
@@ -50,8 +57,11 @@ package("openexr")
|
|
|
end
|
|
|
|
|
|
on_load(function (package)
|
|
|
- local ver = package:version()
|
|
|
+ local ver = assert(package:version(), "package(openexr) require version number")
|
|
|
local suffix = format("-%d_%d", ver:major(), ver:minor())
|
|
|
+ if ver:ge("3.4.0") then
|
|
|
+ package:add("deps", "openjph")
|
|
|
+ end
|
|
|
local links = {}
|
|
|
if ver:ge("3.0") then
|
|
|
package:add("deps", "imath")
|
|
|
@@ -70,6 +80,9 @@ package("openexr")
|
|
|
on_install(function (package)
|
|
|
io.replace("CMakeLists.txt", "add_subdirectory(website/src)", "", {plain = true})
|
|
|
io.replace("cmake/OpenEXRSetup.cmake", [[set(CMAKE_DEBUG_POSTFIX "_d")]], "", {plain = true})
|
|
|
+ if package:version():ge("3.4.0") then
|
|
|
+ -- io.replace("src/lib/OpenEXRCore/CMakeLists.txt", "${EXR_OPENJPH_LIB}", "openjph::openjph", {plain = true})
|
|
|
+ end
|
|
|
|
|
|
local configs = {
|
|
|
"-DBUILD_TESTING=OFF",
|