Parcourir la source

update gr, openexr and openvdb (#521)

* update gr

* update openexr

* update openvdb

* fix openvdb

* remove explicit default value
Hoildkv il y a 4 ans
Parent
commit
38abae5656

+ 1 - 0
packages/b/blosc/xmake.lua

@@ -34,6 +34,7 @@ package("blosc")
             elseif version:le("1.10") then
                 os.rm(path.join(package:installdir("lib"), "blosc.lib"))
                 os.rm(path.join(package:installdir("lib"), "blosc.dll"))
+                os.mv(path.join(package:installdir("lib"), "libblosc.lib"), path.join(package:installdir("lib"), "blosc.lib"))
             end
         end
     end)

+ 9 - 0
packages/g/gr/xmake.lua

@@ -8,36 +8,45 @@ package("gr")
         if is_arch("x64") then
             add_urls("https://github.com/sciapp/gr/releases/download/v$(version)/gr-$(version)-Windows-x86_64-msvc.tar.gz")
             add_versions("0.57.0", "5e62a425e60885835fa8177ab5311c131bab0bb484722866ee931e81b77a6a5a")
+            add_versions("0.58.0", "a8152c15613c8b8e02f57d2b19632576f133e353057d2d824e9b85c203c3aa90")
         end
     elseif is_plat("macosx") then
         if is_arch("arm64") then
             add_urls("https://github.com/sciapp/gr/releases/download/v$(version)/gr-$(version)-Darwin-aarch64.tar.gz")
             add_versions("0.57.0", "a867a9233a26f8797f13adf2b7d9324a397a84d256750db0a29f4b5032b9a47f")
+            add_versions("0.58.0", "3c0132bc7c26665ed812381e103091273999352a3cda8d9e664759c143387755")
         else
             add_urls("https://github.com/sciapp/gr/releases/download/v$(version)/gr-$(version)-Darwin-x86_64.tar.gz")
             add_versions("0.57.0", "b6114420b6ffff1cc41c7a325b53fd2af90942c5d7840ff27b1217488b6fb950")
+            add_versions("0.58.0", "1c808852fec10badea7a5282bc867c5bcc86eda89e07bce7b2f0017a889f16cf")
         end
     elseif is_plat("linux") then
         if is_arch("x86_64") then
             if linuxos.name() == "ubuntu" then
                 add_urls("https://github.com/sciapp/gr/releases/download/v$(version)/gr-$(version)-Ubuntu-x86_64.tar.gz")
                 add_versions("0.57.0", "5f157733b750be6e8e771e008bf2dab1ee786d50efcc16deb02f6cdda9d03a54")
+                add_versions("0.58.0", "c72767b2880fd561508e526286b30c3fc9bfa78f432ac966eb6455d318c1374d")
             elseif linuxos.name() == "debian" then
                 add_urls("https://github.com/sciapp/gr/releases/download/v$(version)/gr-$(version)-Debian-x86_64.tar.gz")
                 add_versions("0.57.0", "f20e65b4b93df1409377355cefca0fda714f5b4f1bf0c2292c0bad4232ac0a41")
+                add_versions("0.58.0", "5fc6fe7b58193fbfac9fc32538d1078dd9ab5a606d38e3fdb2a1683b37ec2a76")
             elseif linuxos.name() == "archlinux" then
                 add_urls("https://github.com/sciapp/gr/releases/download/v$(version)/gr-$(version)-ArchLinux-x86_64.tar.gz")
                 add_versions("0.57.0", "3224971f16a8cc223f57ea240dea346747ea18111c91b64b38b5554f93721cf8")
+                add_versions("0.58.0", "f90fb2b15459d0c3075326646c31a041a61c9b84b4d4ebe015b4283a43c2fe6e")
             elseif linuxos.name() == "centos" then
                 add_urls("https://github.com/sciapp/gr/releases/download/v$(version)/gr-$(version)-CentOS-x86_64.tar.gz")
                 add_versions("0.57.0", "877d6066690c6dc071db1edb64e79d738fdde6d9a7d4562f33bb76d8b9324b1c")
+                add_versions("0.58.0", "3d403550ae440d4aac607bd61a9c4140ee98390c48ed44594eebef55308466ed")
             else
                 add_urls("https://github.com/sciapp/gr/releases/download/v$(version)/gr-$(version)-Linux-x86_64.tar.gz")
                 add_versions("0.57.0", "793fef6a18f8faa7bc4fbb2067691bc355a9111b5c2ae5ea41f3552d6c7064d5")
+                add_versions("0.58.0", "d7350611e7bd8a3ff1034b2d13fe4c10c65f99c85c994a32e6dd6da59cb7de3c")
             end
         elseif is_arch("x86") then
             add_urls("https://github.com/sciapp/gr/releases/download/v$(version)/gr-$(version)-Linux-i386.tar.gz")
             add_versions("0.57.0", "f6ec390e1f9b2a0a83d5b7da95ebfe615aedc84075475a28c363b671353c65c5")
+            add_versions("0.58.0", "681dbd0fa7cea25e189d4f58e5a4b7cf002cea2b13a663df67598f95f6a548a6")
         end
     end
 

+ 2 - 1
packages/i/imath/xmake.lua

@@ -7,6 +7,7 @@ package("imath")
     add_urls("https://github.com/AcademySoftwareFoundation/Imath/archive/refs/tags/$(version).tar.gz",
              "https://github.com/AcademySoftwareFoundation/Imath.git")
     add_versions("v3.1.0", "211c907ab26d10bd01e446da42f073ee7381e1913d8fa48084444bc4e1b4ef87")
+    add_versions("v3.1.1", "a63fe91d8d0917acdc31b0c9344b1d7dbc74bf42de3e3ef5ec982386324b9ea4")
 
     on_load(function (package)
         if not package.is_built or package:is_built() then
@@ -14,7 +15,7 @@ package("imath")
         end
     end)
 
-    on_install("windows", "macosx", "linux", function (package)
+    on_install("windows", "macosx", "linux", "mingw@windows", "mingw@msys", function (package)
         local configs = {"-DBUILD_TESTING=OFF"}
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
         table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))

+ 23 - 11
packages/o/openexr/xmake.lua

@@ -7,31 +7,43 @@ package("openexr")
              "https://github.com/AcademySoftwareFoundation/openexr.git")
     add_versions("2.5.3", "6a6525e6e3907715c6a55887716d7e42d09b54d2457323fcee35a0376960bebf")
     add_versions("2.5.5", "59e98361cb31456a9634378d0f653a2b9554b8900f233450f2396ff495ea76b3")
+    add_versions("3.1.0", "8c2ff765368a28e8210af741ddf91506cef40f1ed0f1a08b6b73bb3a7faf8d93")
 
     add_deps("cmake")
     add_deps("zlib")
 
+    -- deprecated
     add_configs("build_both", {description = "Build both static library and shared library.", default = false, type = "boolean"})
 
-    on_load("windows", function (package)
-        if package:config("shared") then
+    on_load("windows", "macosx", "linux", "mingw@windows", "mingw@msys", function (package)
+        if package:version():ge("3.0") then
+            package:add("deps", "imath")
+        end
+        if package:is_plat("windows") and package:config("shared") then
             package:add("defines", "OPENEXR_DLL")
         end
     end)
 
     on_install("macosx", "linux", "windows", "mingw@windows", "mingw@msys", function (package)
         local configs = {"-DBUILD_TESTING=OFF", "-DINSTALL_OPENEXR_EXAMPLES=OFF", "-DINSTALL_OPENEXR_DOCS=OFF", "-DOPENEXR_BUILD_UTILS=ON"}
-        if package:config("build_both") then
-            table.insert(configs, "-DBUILD_SHARED_LIBS=ON")
-            table.insert(configs, "-DOPENEXR_BUILD_BOTH_STATIC_SHARED=ON")
-            table.insert(configs, "-DILMBASE_BUILD_BOTH_STATIC_SHARED=ON")
-        else
+        table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
+        if package:version():ge("3.0") then
+            if package:is_plat("mingw") then
+                raise("mingw is not supported in version 3.0")
+            end
             table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
-            table.insert(configs, "-DOPENEXR_BUILD_BOTH_STATIC_SHARED=OFF")
-            table.insert(configs, "-DILMBASE_BUILD_BOTH_STATIC_SHARED=OFF")
+        else
+            if package:config("build_both") then
+                table.insert(configs, "-DBUILD_SHARED_LIBS=ON")
+                table.insert(configs, "-DOPENEXR_BUILD_BOTH_STATIC_SHARED=ON")
+                table.insert(configs, "-DILMBASE_BUILD_BOTH_STATIC_SHARED=ON")
+            else
+                table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
+                table.insert(configs, "-DOPENEXR_BUILD_BOTH_STATIC_SHARED=OFF")
+                table.insert(configs, "-DILMBASE_BUILD_BOTH_STATIC_SHARED=OFF")
+            end
+            table.insert(configs, "-DPYILMBASE_ENABLE=OFF")
         end
-        table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
-        table.insert(configs, "-DPYILMBASE_ENABLE=" .. "OFF")
         table.insert(configs, "-DCMAKE_INSTALL_LIBDIR=lib")
         import("package.tools.cmake").install(package, configs)
     end)

+ 14 - 4
packages/o/openvdb/xmake.lua

@@ -7,13 +7,14 @@ package("openvdb")
              "https://github.com/AcademySoftwareFoundation/openvdb.git")
     add_versions("7.1.0", "0c3588c1ca6e647610738654ec2c6aaf41a203fd797f609fbeab1c9f7c3dc116")
     add_versions("8.0.1", "a6845da7c604d2c72e4141c898930ac8a2375521e535f696c2cd92bebbe43c4f")
+    add_versions("8.1.0", "3e09d47331429be7409a3a3c27fdd3c297f96d31d2153febe194e664a99d6183")
 
     add_deps("cmake")
     add_deps("boost", {system = false, configs = {regex = true, system = true, iostreams = true}})
 
     add_configs("with_houdini", {description = "Location of Houdini installation. Set to enable built with Houdini.", default = "", type = "string"})
     add_configs("with_maya", {description = "Location of Maya installation. Set to enable built with Maya.", default = "", type = "string"})
-    add_configs("simd", {description = "SIMD acceleration architecture.", default = "None", type = "string", values = {"None", "SSE42", "AVX"}})
+    add_configs("simd", {description = "SIMD acceleration architecture.", type = "string", values = {"None", "SSE42", "AVX"}})
     add_configs("print", {description = "Command line binary for displaying information about OpenVDB files.", default = true, type = "boolean"})
     add_configs("lod", {description = "Command line binary for generating volume mipmaps from an OpenVDB grid.", default = false, type = "boolean"})
     add_configs("render", {description = "Command line binary for ray-tracing OpenVDB grids.", default = false, type = "boolean"})
@@ -25,7 +26,7 @@ package("openvdb")
             package:add("deps", "blosc ~1.5.0", {configs = {shared = package:is_plat("linux")}})
             package:add("deps", "openexr", {configs = {shared = package:is_plat("windows")}})
             if package:config("with_maya") == "" then
-                package:add("deps", "tbb <2021.0", {configs = {shared = true}})
+                package:add("deps", "tbb <2021.0")
             end
         end
         if package:config("view") then
@@ -52,13 +53,18 @@ package("openvdb")
         end
         table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
         if package:is_plat("windows") then
+            if package:config("shared") and package:config("vs_runtime"):startswith("MT") then
+                raise("OpenVDB shared library cannot be linked to a static msvc runtime")
+            end
             table.insert(configs, "-DBoost_USE_STATIC_RUNTIME=" .. (package:config("vs_runtime"):startswith("MT") and "ON" or "OFF"))
         end
         table.insert(configs, "-DOPENVDB_BUILD_VDB_LOD=" .. (package:config("lod") and "ON" or "OFF"))
         table.insert(configs, "-DOPENVDB_BUILD_VDB_PRINT=" .. (package:config("print") and "ON" or "OFF"))
         table.insert(configs, "-DOPENVDB_BUILD_VDB_RENDER=" .. (package:config("render") and "ON" or "OFF"))
         table.insert(configs, "-DOPENVDB_BUILD_VDB_VIEW=" .. (package:config("view") and "ON" or "OFF"))
-        table.insert(configs, "-DOPENVDB_SIMD=" .. package:config("simd"))
+        if package:config("simd") then
+            table.insert(configs, "-DOPENVDB_SIMD=" .. package:config("simd"))
+        end
         if package:config("with_houdini") ~= "" then
             table.insert(configs, "-DUSE_HOUDINI=ON")
             table.insert(configs, "-DOPENVDB_BUILD_HOUDINI_PLUGIN=ON")
@@ -69,7 +75,11 @@ package("openvdb")
             table.insert(configs, "-DMaya_ROOT=" .. package:config("with_maya"))
         else
             table.insert(configs, "-DUSE_BLOSC=ON")
-            table.insert(configs, "-DUSE_EXR=ON")
+            if package:version():ge("8.1.0") then
+                table.insert(configs, "-DUSE_IMATH_HALF=OFF")
+            else
+                table.insert(configs, "-DUSE_EXR=ON")
+            end
         end
         import("package.tools.cmake").install(package, configs)
         package:addenv("PATH", "bin")

+ 2 - 0
packages/t/tbb/xmake.lua

@@ -24,6 +24,8 @@ package("tbb")
         end
     end
 
+    add_configs("shared", {description = "Build shared library.", default = true, type = "boolean", readonly = true})
+
     on_fetch("fetch")
     
     add_links("tbb", "tbbmalloc", "tbbmalloc_proxy")